feat: overdue linux update

This commit is contained in:
winston 2023-05-13 07:04:20 +02:00
parent bcdd748e9a
commit 355f2fec43
Signed by: winston
GPG key ID: 3786770EDBC2B481
9 changed files with 90 additions and 195 deletions

View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1682773107, "lastModified": 1683754942,
"narHash": "sha256-+h94XeJnG3uk5imJlBi/1lVmcfCbxHpwZp5u7n3Krwg=", "narHash": "sha256-L+Bj8EL4XLmODRIuOkk9sI6FDECVzK+C8jeZFv7q6eY=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "379d42fad6bc5c28f79d5f7ff2fa5f1c90cb7bf8", "rev": "252541bd05a7f55f3704a3d014ad1badc1e3360d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -113,11 +113,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1683543852, "lastModified": 1683929392,
"narHash": "sha256-aS9qNcg9GwSYFLCWa3Lw+2nVPG11mmQ3B7Oka1hh04M=", "narHash": "sha256-qJddrb/bgS58AXAv25iv5xJ+69G5g7FAYCWec1lLnW0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "3f3fa731ad0f99741d4dc98e8e1287b45e30b452", "rev": "eec22729990ddf53d1e45e74624ddf667cdbe11b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -131,11 +131,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1682804856, "lastModified": 1683947575,
"narHash": "sha256-6wid+0ayFgmUUdEgKO7AmXEk6bUZNmq8bn4pFA0Kyhs=", "narHash": "sha256-aKc3vzJLkhPXkcovK+X3tMbs+lk6tzj8l4qKmVTL3ts=",
"owner": "nekowinston", "owner": "nekowinston",
"repo": "nur", "repo": "nur",
"rev": "a2df2ca00e11a1b5e3c5d5e10c200a32f5461834", "rev": "9a8861b5367f4242973fdae7aa2a6f51e34fa90d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -151,11 +151,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1683560204, "lastModified": 1683638468,
"narHash": "sha256-YidI1lVXVtz4fYCsQkapUx/76WKs682rZybztLOt9S0=", "narHash": "sha256-tQEaGZfZ2Hpw+XIVEHaJ8FaF1yNQyMDDhUyIQ7LTIEg=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "54049e3d602b4525dabca5d61865adf529377774", "rev": "219067a5e3cf4b9581c8b4fcfc59ecd5af953d07",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -166,11 +166,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1681693905, "lastModified": 1683777345,
"narHash": "sha256-XdXMvCt+i2ZcmAIPZvu3RUwcdaC9OX7d1WMAJJokzeA=", "narHash": "sha256-V2p/A4RpEGqEZussOnHYMU6XglxBJGCODdzoyvcwig8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "db34d7561caa508ece0265a56f382c5d3b7a6c1b", "rev": "635a306fc8ede2e34cb3dd0d6d0a5d49362150ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -214,11 +214,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1683475240, "lastModified": 1683777345,
"narHash": "sha256-sy6MYoCaIZsOenYplbzVXI4Ce9Bp/vIOpuFa97+a6wc=", "narHash": "sha256-V2p/A4RpEGqEZussOnHYMU6XglxBJGCODdzoyvcwig8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e040aab15638aaf8d0786894851a2b1ca09a7baf", "rev": "635a306fc8ede2e34cb3dd0d6d0a5d49362150ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -262,11 +262,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1683578896, "lastModified": 1683946044,
"narHash": "sha256-7X3kWQYP4+mwvHD/ObSZnyHi5ZUj6ZBdHSfHmTmV3lY=", "narHash": "sha256-23K45lAT63YN1quyxaIGS+sLqjuvgpXUOUuLW3CBCCk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nur", "repo": "nur",
"rev": "0f94a162c73f870b142c15f7a5892df6f65db470", "rev": "ff2a014db7026ae20be955a7ac2a3acae59b8964",
"type": "github" "type": "github"
}, },
"original": { "original": {

8
home/apps/fonts.nix Normal file
View file

@ -0,0 +1,8 @@
{pkgs}: {
home.packages = with pkgs; [
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
victor-mono
ibm-plex
xkcd-font
];
}

View file

@ -26,9 +26,6 @@
{ {
command = "${lib.getExe pkgs._1password-gui} --silent"; command = "${lib.getExe pkgs._1password-gui} --silent";
} }
{
command = "${pkgs.volnoti}/bin/volnoti";
}
]; ];
workspaceAutoBackAndForth = true; workspaceAutoBackAndForth = true;
terminal = "wezterm start --always-new-process"; terminal = "wezterm start --always-new-process";
@ -51,15 +48,7 @@
else "${pkgs.flameshot}/bin/flameshot gui"; else "${pkgs.flameshot}/bin/flameshot gui";
playerctl = lib.getExe pkgs.playerctl; playerctl = lib.getExe pkgs.playerctl;
wpctl = pkgs.wireplumber + "/bin/wpctl"; wpctl = pkgs.wireplumber + "/bin/wpctl";
volnotify = pkgs.writeShellScript "volnotify" '' # TODO: replace xdotool with wayland equivalent
volumeRaw=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | head -n1)
volume=$(echo $volumeRaw | sed 's/Volume: //' | awk '{printf "%.0f\n", $1 * 100}')
if [[ "$volumeRaw" =~ "MUTED" ]]; then
volnoti-show -m
else
volnoti-show $volume
fi
'';
gopassRofi = pkgs.writeShellScript "gopass-rofi" '' gopassRofi = pkgs.writeShellScript "gopass-rofi" ''
${gopass} ls --flat | \ ${gopass} ls --flat | \
${rofi} -dmenu -dpi $dpi | \ ${rofi} -dmenu -dpi $dpi | \
@ -77,8 +66,6 @@
# Start Applications # Start Applications
"${mod}+Shift+Return" = "exec ${terminal}"; "${mod}+Shift+Return" = "exec ${terminal}";
"${mod}+e" = "exec --no-startup-id ${thunar}"; "${mod}+e" = "exec --no-startup-id ${thunar}";
"${mod}+Ctrl+x" = "exec --no-startup-id ${lib.getExe pkgs.xorg.xkill}";
# TODO: replace xdotool with wayland equivalent
"${hyper}+space" = "exec --no-startup-id ${gopassRofi}"; "${hyper}+space" = "exec --no-startup-id ${gopassRofi}";
"${hyper}+p" = "exec --no-startup-id ${screenshot}"; "${hyper}+p" = "exec --no-startup-id ${screenshot}";
@ -160,9 +147,9 @@
"${mod}+Shift+space" = "exec ${lib.getExe pkgs._1password-gui} --quick-access"; "${mod}+Shift+space" = "exec ${lib.getExe pkgs._1password-gui} --quick-access";
# audio # audio
"XF86AudioRaiseVolume" = "exec --no-startup-id ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.0 && ${volnotify}"; "XF86AudioRaiseVolume" = "exec --no-startup-id ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.0";
"XF86AudioLowerVolume" = "exec --no-startup-id ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.0 && ${volnotify}"; "XF86AudioLowerVolume" = "exec --no-startup-id ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.0";
"XF86AudioMute" = "exec --no-startup-id ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle && ${volnotify}"; "XF86AudioMute" = "exec --no-startup-id ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86AudioNext" = "exec --no-startup-id ${playerctl} next"; "XF86AudioNext" = "exec --no-startup-id ${playerctl} next";
"XF86AudioPrev" = "exec --no-startup-id ${playerctl} previous"; "XF86AudioPrev" = "exec --no-startup-id ${playerctl} previous";
"XF86AudioPause" = "exec --no-startup-id ${playerctl} play-pause"; "XF86AudioPause" = "exec --no-startup-id ${playerctl} play-pause";
@ -205,8 +192,6 @@
bars = [ bars = [
{ {
mode = "hide"; mode = "hide";
# use waybar if wayland
command = lib.mkIf wayland "${lib.getExe config.programs.waybar.package}";
position = "top"; position = "top";
workspaceNumbers = false; workspaceNumbers = false;
inherit fonts; inherit fonts;
@ -278,9 +263,11 @@
set $ws9 9: set $ws9 9:
set $ws10 10: set $ws10 10:
for_window [floating] border pixel 2
# floating sticky # floating sticky
for_window [class="1Password"] floating enable sticky enable border pixel 1 for_window [class="1Password"] floating enable sticky enable
for_window [window_role="PictureInPicture"] floating enable sticky enable border pixel 1 for_window [window_role="PictureInPicture"] floating enable sticky enable
# floating # floating
for_window [class="GParted"] floating enable for_window [class="GParted"] floating enable
@ -349,7 +336,6 @@ in {
flameshot flameshot
pavucontrol pavucontrol
sway-contrib.grimshot sway-contrib.grimshot
volnoti
xclip xclip
]; ];
pointerCursor = { pointerCursor = {
@ -483,8 +469,10 @@ in {
shadows enable shadows enable
shadow_color #00000099 shadow_color #00000099
shadow_blur_radius 10 shadow_blur_radius 10
corner_radius 5 corner_radius 5
smart_corner_radius enable smart_corner_radius enable
blur enable blur enable
blur_passes 2 blur_passes 2
blur_radius 2 blur_radius 2

View file

@ -7,103 +7,6 @@
in { in {
home.packages = lib.mkIf isLinux (with pkgs; [ home.packages = lib.mkIf isLinux (with pkgs; [
clipman clipman
grim
slurp
wl-clipboard wl-clipboard
]); ]);
programs.waybar = lib.mkIf isLinux {
enable = true;
package = pkgs.waybar;
settings = [
{
layer = "top";
position = "top";
margin-left = 7;
margin-right = 7;
margin-top = 7;
height = 32;
modules-left = ["sway/workspaces" "mpd"];
modules-center = [];
modules-right = ["tray" "cpu" "memory" "clock"];
"sway/workspaces" = {
disable-scroll = true;
format = "{name}";
};
mpd = {
format = "{artist} - {title}";
format-disconnected = "";
format-paused = "";
format-stopped = "";
interval = 10;
};
tray = {
reverse-direction = true;
spacing = 5;
};
cpu = {
format = " {usage:2}%";
interval = 1;
};
memory = {
format = "󰍛 {percentage:2}%";
interval = 1;
};
spacing = 4;
}
];
style = ''
@define-color red #f38ba8;
@define-color mauve #cba6f7;
@define-color pink #f5c2e7;
@define-color crust #11111c;
@define-color base #1e1e2e;
@define-color text #cdd6f4;
* {
font-family: IBM Plex Sans;
font-size: 16px;
}
window#waybar {
background-color: @base;
border: 2px solid @crust;
border-radius: 5px;
color: @text;
}
#workspaces button {
padding: 0 5px;
color: alpha(@mauve, 0.5);
}
#workspaces button.focused {
color: @pink;
}
#workspaces button.urgent {
background-color: @red;
}
#clock,
#cpu,
#idle_inhibitor,
#memory,
#mpd,
#pulseaudio,
#tray {
padding: 0 5px;
}
#mpd {
font-family: Symbols Nerd Font, Victor Mono;
font-style: italic;
}
#cpu,
#memory {
font-family: Berkeley Mono;
}
'';
};
} }

View file

@ -1,7 +1,6 @@
{ {
config, config,
flakePath, flakePath,
lib,
pkgs, pkgs,
... ...
}: let }: let
@ -83,8 +82,7 @@ in {
''; '';
envExtra = '' envExtra = ''
export PATH="$PATH:${config.xdg.dataHome}/krew/bin:${config.home.sessionVariables.GOPATH}/bin:${config.home.sessionVariables.CARGO_HOME}/bin:$HOME/.local/bin" export ZVM_INIT_MODE=sourcing ZVM_CURSOR_BLINKING_BEAM=1
export ZVM_INIT_MODE=sourcing ZVM_CURSOR_STYLE_ENABLED=false
''; '';
dotDir = ".config/zsh"; dotDir = ".config/zsh";

View file

@ -12,6 +12,7 @@ in {
imports = imports =
[ [
./apps/browsers.nix ./apps/browsers.nix
./apps/fonts.nix
./apps/git.nix ./apps/git.nix
./apps/gpg.nix ./apps/gpg.nix
./apps/i3.nix ./apps/i3.nix
@ -23,8 +24,8 @@ in {
./apps/newsboat.nix ./apps/newsboat.nix
./apps/rice.nix ./apps/rice.nix
./apps/vscode.nix ./apps/vscode.nix
./apps/wezterm.nix
./apps/wayland.nix ./apps/wayland.nix
./apps/wezterm.nix
./apps/zsh.nix ./apps/zsh.nix
./secrets/sops.nix ./secrets/sops.nix
./xdg.nix ./xdg.nix
@ -37,7 +38,6 @@ in {
home = { home = {
packages = with pkgs; ([ packages = with pkgs; ([
zsh
fd fd
ffmpeg ffmpeg
file file
@ -49,13 +49,7 @@ in {
gh gh
mosh mosh
nur.repos.nekowinston.org-stats
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
victor-mono
ibm-plex
xkcd-font
wezterm wezterm
podman podman
podman-compose podman-compose
qemu qemu
@ -65,16 +59,10 @@ in {
#insomnia #insomnia
#mattermost-desktop #mattermost-desktop
neovide neovide
kooha
#jetbrains.webstorm #jetbrains.webstorm
#gnome.gnome-boxes gnome.gnome-boxes
]
++ lib.optionals (isLinux && machine.personal) [
nur.repos.nekowinston.discover-overlay
(discord.override {withOpenASAR = true;})
lutris
heroic
]); ]);
sessionVariables = lib.mkIf isDarwin { sessionVariables = lib.mkIf isDarwin {
SSH_AUTH_SOCK = "${config.programs.gpg.homedir}/S.gpg-agent.ssh"; SSH_AUTH_SOCK = "${config.programs.gpg.homedir}/S.gpg-agent.ssh";
}; };

View file

@ -7,7 +7,8 @@
}: let }: let
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux; inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
in { in {
home.sessionVariables = { home = {
sessionVariables = {
AZURE_CONFIG_DIR = "${config.xdg.configHome}/azure"; AZURE_CONFIG_DIR = "${config.xdg.configHome}/azure";
CARGO_HOME = "${config.xdg.dataHome}/cargo"; CARGO_HOME = "${config.xdg.dataHome}/cargo";
CARGO_REGISTRIES_CRATES_IO_PROTOCOL = "sparse"; CARGO_REGISTRIES_CRATES_IO_PROTOCOL = "sparse";
@ -21,6 +22,13 @@ in {
RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompose"; XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompose";
}; };
sessionPath = [
"$HOME/.local/bin"
"${config.xdg.dataHome}/krew/bin"
"${config.home.sessionVariables.GOPATH}/bin"
"${config.home.sessionVariables.CARGO_HOME}/bin"
];
};
home.activation.npmrc_xdg = '' home.activation.npmrc_xdg = ''
export NPM_CONFIG_USERCONFIG="${config.home.sessionVariables.NPM_CONFIG_USERCONFIG}" export NPM_CONFIG_USERCONFIG="${config.home.sessionVariables.NPM_CONFIG_USERCONFIG}"
@ -48,6 +56,7 @@ in {
"inode/directory" = "thunar.desktop"; "inode/directory" = "thunar.desktop";
"application/pdf" = "zathura.desktop"; "application/pdf" = "zathura.desktop";
"text/plain" = "code.desktop";
"text/html" = "firefox.desktop"; "text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop"; "x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop"; "x-scheme-handler/https" = "firefox.desktop";

View file

@ -1,20 +1,23 @@
{ {pkgs, ...}: {
environment.systemPackages = with pkgs; [
mullvad-vpn
];
services = { services = {
dnsmasq = { dnsmasq = {
enable = true; enable = true;
servers = [ settings = {
# stubby
no-resolv = true;
proxy-dnssec = true;
listen-address = "::1,127.0.0.1";
server = [
"::1#53000" "::1#53000"
"127.0.0.1#53000" "127.0.0.1#53000"
]; ];
extraConfig = ''
# stubby
no-resolv
proxy-dnssec
listen-address=::1,127.0.0.1
# loopback for development # loopback for development
address=/test/127.0.0.1 address = "/test/127.0.0.1";
''; };
}; };
mullvad-vpn = { mullvad-vpn = {
enable = true; enable = true;

View file

@ -46,18 +46,16 @@ in {
system.stateVersion = "22.11"; system.stateVersion = "22.11";
environment.systemPackages = with pkgs; [
(discord.override {withOpenASAR = true;})
heroic
lutris
nur.repos.nekowinston.discover-overlay
wineWowPackages.staging
winetricks
];
programs = { programs = {
steam = {
enable = true;
package = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [gamemode mangohud];
extraLibraries = pkgs:
with config.hardware.opengl;
if pkgs.hostPlatform.is64bit
then [package] ++ extraPackages
else [package32] ++ extraPackages32;
};
};
gamemode = { gamemode = {
enable = true; enable = true;
settings = { settings = {