diff options
| author | adikro <adikro@disroot.org> | 2026-02-12 23:04:24 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-02-12 23:04:24 +0100 |
| commit | 512483106110b5f9209bb03238d44b991fe15d22 (patch) | |
| tree | 94b53e9e610053d4584f00799843c901d10e0b19 | |
| parent | 9868584ddabad45a9964ae9bf64d109963fd1e3d (diff) | |
thinkpad configuration finalization
| -rw-r--r-- | flake.lock | 6 | ||||
| -rw-r--r-- | flake.nix | 5 | ||||
| -rw-r--r-- | hm/conf/xdg-dirs.nix | 32 | ||||
| -rw-r--r-- | hm/conf/xdg-mime.nix | 1 | ||||
| -rw-r--r-- | hm/editors/editors.nix | 2 | ||||
| -rw-r--r-- | hm/editors/nixvim/binds.nix | 0 | ||||
| -rw-r--r-- | hm/editors/nixvim/nixvim.nix (renamed from hm/editors/nixvim.nix) | 0 | ||||
| -rw-r--r-- | hm/env/niri/binds.nix | 263 | ||||
| -rw-r--r-- | hm/soft/media.nix | 2 | ||||
| -rw-r--r-- | hm/soft/mpv.nix | 12 | ||||
| -rw-r--r-- | hosts/desktop/configuration.nix | 30 | ||||
| -rw-r--r-- | hosts/desktop/disko.nix | 30 | ||||
| -rw-r--r-- | hosts/desktop/home.nix | 26 | ||||
| -rw-r--r-- | hosts/thinkpad/configuration.nix | 20 | ||||
| -rw-r--r-- | hosts/thinkpad/disko.nix | 12 | ||||
| -rw-r--r-- | hosts/thinkpad/home.nix | 10 | ||||
| -rw-r--r-- | os/core/bootloader.nix | 1 | ||||
| -rw-r--r-- | os/core/greet.nix | 9 | ||||
| -rw-r--r-- | os/core/security.nix | 34 | ||||
| -rw-r--r-- | os/core/ssh.nix | 12 | ||||
| -rw-r--r-- | os/core/storage.nix | 1 | ||||
| -rw-r--r-- | os/core/users.nix | 2 | ||||
| -rw-r--r-- | os/srv/compat.nix | 13 | ||||
| -rw-r--r-- | os/srv/files.nix | 29 | ||||
| -rw-r--r-- | os/srv/gaming.nix | 38 | ||||
| -rw-r--r-- | os/srv/kdeconnect.nix | 13 | ||||
| -rw-r--r-- | os/srv/nix-helper.nix | 25 | ||||
| -rw-r--r-- | os/wm/niri.nix | 2 |
28 files changed, 328 insertions, 302 deletions
@@ -136,11 +136,11 @@ ] }, "locked": { - "lastModified": 1770915843, - "narHash": "sha256-ZwU5wXKNqpOQvjNz6aBp1j5peiBZow1++6pLnk5VAhs=", + "lastModified": 1770930784, + "narHash": "sha256-J5YzA89ctwpSpfk+SJWVRWLzhuziXRRcFmo+cs+1K5M=", "owner": "nix-community", "repo": "home-manager", - "rev": "6a1f7101d2c3ee87d485a87880d73b4665c6a4bd", + "rev": "2cc195b4783991b30fb8499c0dd2f9a7bf44d347", "type": "github" }, "original": { @@ -69,10 +69,7 @@ { self, nixpkgs, ... }@inputs: let system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - }; + pkgs = import nixpkgs { inherit system; }; scripts = import ./scripts { inherit pkgs; }; mkHost = { diff --git a/hm/conf/xdg-dirs.nix b/hm/conf/xdg-dirs.nix index ee34bd0..ba5b063 100644 --- a/hm/conf/xdg-dirs.nix +++ b/hm/conf/xdg-dirs.nix @@ -6,10 +6,10 @@ in options.hm.conf.xdg-dirs = { enable = lib.mkEnableOption "enables xdg dirs"; - mediaPath = lib.mkOption { + storagePath = lib.mkOption { type = lib.types.path; default = config.home.homeDirectory; - description = "base path for media"; + description = "base path for storage"; }; }; config = lib.mkIf cfg.enable { @@ -20,8 +20,8 @@ in download = "${config.home.homeDirectory}/dl"; documents = "${config.home.homeDirectory}/docs"; - pictures = "${toString cfg.mediaPath}/pics"; - videos = "${toString cfg.mediaPath}/vids"; + pictures = "${toString cfg.storagePath}/pics"; + videos = "${toString cfg.storagePath}/vids"; desktop = null; music = null; @@ -31,23 +31,23 @@ in extraConfig = { PROJECTS = "${config.home.homeDirectory}/proj"; GAMES = "${config.home.homeDirectory}/games"; - MEDIA = "${toString cfg.mediaPath}"; - SS = "${toString cfg.mediaPath}/pics/ss"; - CLIPS = "${toString cfg.mediaPath}/vids/clips"; - MOVIES = "${toString cfg.mediaPath}/movies"; - ANIME = "${toString cfg.mediaPath}/anime"; - ARCHIVE = "${toString cfg.mediaPath}/archive"; + storage = "${toString cfg.storagePath}"; + SS = "${toString cfg.storagePath}/pics/ss"; + CLIPS = "${toString cfg.storagePath}/vids/clips"; + MOVIES = "${toString cfg.storagePath}/movies"; + ANIME = "${toString cfg.storagePath}/anime"; + ARCHIVE = "${toString cfg.storagePath}/archive"; }; }; home.sessionVariables = { PROJECTS = "${config.home.homeDirectory}/proj"; GAMES = "${config.home.homeDirectory}/games"; - MEDIA = "${toString cfg.mediaPath}"; - SS = "${toString cfg.mediaPath}/pics/ss"; - CLIPS = "${toString cfg.mediaPath}/vids/clips"; - MOVIES = "${toString cfg.mediaPath}/movies"; - ANIME = "${toString cfg.mediaPath}/anime"; - ARCHIVE = "${toString cfg.mediaPath}/archive"; + storage = "${toString cfg.storagePath}"; + SS = "${toString cfg.storagePath}/pics/ss"; + CLIPS = "${toString cfg.storagePath}/vids/clips"; + MOVIES = "${toString cfg.storagePath}/movies"; + ANIME = "${toString cfg.storagePath}/anime"; + ARCHIVE = "${toString cfg.storagePath}/archive"; }; }; } diff --git a/hm/conf/xdg-mime.nix b/hm/conf/xdg-mime.nix index 0f55c5d..e024a89 100644 --- a/hm/conf/xdg-mime.nix +++ b/hm/conf/xdg-mime.nix @@ -32,6 +32,7 @@ in "audio/ogg" = [ "mpv.desktop" ]; "text/html" = [ "firefox.desktop" ]; + "x-scheme-handler/terminal" = [ "foot.desktop" ]; "x-scheme-handler/http" = [ "firefox.desktop" ]; "x-scheme-handler/https" = [ "firefox.desktop" ]; "inode/directory" = [ "thunar.desktop" ]; diff --git a/hm/editors/editors.nix b/hm/editors/editors.nix index bca92dd..02c349b 100644 --- a/hm/editors/editors.nix +++ b/hm/editors/editors.nix @@ -2,7 +2,7 @@ { imports = [ ./helix.nix - ./nixvim.nix + ./nixvim/nixvim.nix # ./nvf.nix ]; } diff --git a/hm/editors/nixvim/binds.nix b/hm/editors/nixvim/binds.nix new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/hm/editors/nixvim/binds.nix diff --git a/hm/editors/nixvim.nix b/hm/editors/nixvim/nixvim.nix index 579c9e2..579c9e2 100644 --- a/hm/editors/nixvim.nix +++ b/hm/editors/nixvim/nixvim.nix diff --git a/hm/env/niri/binds.nix b/hm/env/niri/binds.nix index fd46c17..e85b867 100644 --- a/hm/env/niri/binds.nix +++ b/hm/env/niri/binds.nix @@ -4,156 +4,159 @@ pkgs, ... }: -with config.lib.niri.actions; let +with config.lib.niri.actions; +let playerctl = spawn "${pkgs.playerctl}/bin/playerctl"; - ss = "${toString config.hm.conf.xdg-dirs.mediaPath}/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)"; + ss = "${toString config.hm.conf.xdg-dirs.storagePath}/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)"; in - { - "Mod+O" = { - action = toggle-overview; - repeat = false; - }; - "Mod+Slash".action = show-hotkey-overlay; - - XF86AudioRaiseVolume.action = playerctl "volume" "0.03+"; - XF86AudioLowerVolume.action = playerctl "volume" "0.03-"; - XF86AudioMute.action = spawn "sh" "-c" '' - wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \ - wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle - ''; - XF86Tools.action = spawn "sh" "-c" '' - wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \ - wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle - ''; +{ + "Mod+O" = { + action = toggle-overview; + repeat = false; + }; + "Mod+Slash".action = show-hotkey-overlay; - "Mod+WheelScrollDown".action = focus-column-right; - "Mod+WheelScrollUp".action = focus-column-left; - "Mod+Shift+WheelScrollDown".action = move-column-right; - "Mod+Shift+WheelScrollUp".action = move-column-left; + XF86AudioRaiseVolume.action = playerctl "volume" "0.03+"; + XF86AudioLowerVolume.action = playerctl "volume" "0.03-"; + XF86AudioMute.action = spawn "sh" "-c" '' + wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \ + wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle + ''; + XF86Tools.action = spawn "sh" "-c" '' + wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \ + wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle + ''; - "Super+WheelScrollDown".action = focus-workspace-down; - "Super+WheelScrollUp".action = focus-workspace-up; - "Super+Shift+WheelScrollDown".action = move-window-down-or-to-workspace-down; - "Super+Shift+WheelScrollUp".action = move-window-up-or-to-workspace-up; + "Mod+WheelScrollDown".action = focus-column-right; + "Mod+WheelScrollUp".action = focus-column-left; + "Mod+Shift+WheelScrollDown".action = move-column-right; + "Mod+Shift+WheelScrollUp".action = move-column-left; - XF86Launch5.action = consume-or-expel-window-right; - XF86Launch6.action = consume-or-expel-window-left; - XF86Launch7.action = switch-preset-column-width; + "Super+WheelScrollDown".action = focus-workspace-down; + "Super+WheelScrollUp".action = focus-workspace-up; + "Super+Shift+WheelScrollDown".action = move-window-down-or-to-workspace-down; + "Super+Shift+WheelScrollUp".action = move-window-up-or-to-workspace-up; - "Super+Shift+L".action = spawn "swaylock" "-f"; - XF86AudioPlay.action = playerctl "play-pause"; - XF86AudioPrev.action = playerctl "previous"; - XF86AudioNext.action = playerctl "next"; + XF86Launch5.action = consume-or-expel-window-right; + XF86Launch6.action = consume-or-expel-window-left; + XF86Launch7.action = switch-preset-column-width; - "Mod+Minus".action = set-column-width "-10%"; - "Mod+Equal".action = set-column-width "+10%"; + "Super+Shift+L".action = spawn "swaylock" "-f"; + XF86AudioPlay.action = playerctl "play-pause"; + XF86AudioPrev.action = playerctl "previous"; + XF86AudioNext.action = playerctl "next"; - "Mod+Shift+Minus".action = set-window-height "-10%"; - "Mod+Shift+Equal".action = set-window-height "+10%"; + "Mod+Minus".action = set-column-width "-10%"; + "Mod+Equal".action = set-column-width "+10%"; - "Mod+Shift+V".action = toggle-window-floating; - "Mod+W".action = toggle-column-tabbed-display; + "Mod+Shift+Minus".action = set-window-height "-10%"; + "Mod+Shift+Equal".action = set-window-height "+10%"; - "Mod+XF86Launch7" = { - action = spawn "sh" "-c" '' - wayfreeze & - sleep 0.1 - GEOM=$(slurp) - if [ -n "$GEOM" ]; then - grim -g "$GEOM" - | tee ${ss}.png | wl-copy - fi - pkill -n wayfreeze - ''; - repeat = false; - }; + "Mod+Shift+V".action = toggle-window-floating; + "Mod+W".action = toggle-column-tabbed-display; - "Mod+Shift+XF86Launch7" = { - action = spawn "sh" "-c" '' - wayfreeze & - sleep 0.1 - GEOM=$(slurp) - if [ -n "$GEOM" ]; then - grim -g "$GEOM" -t ppm - | satty --filename - --output-filename "${ss}-edited.png" - fi - pkill -n wayfreeze - ''; - repeat = false; - }; + "Mod+XF86Launch7" = { + action = spawn "sh" "-c" '' + wayfreeze & + sleep 0.1 + GEOM=$(slurp) + if [ -n "$GEOM" ]; then + grim -g "$GEOM" - | tee ${ss}.png | wl-copy + fi + pkill -n wayfreeze + ''; + repeat = false; + }; - "Mod+S" = { - action = spawn "sh" "-c" '' - wayfreeze & - sleep 0.1 - GEOM=$(slurp) - if [ -n "$GEOM" ]; then - grim -g "$GEOM" - | tee ${ss}.png | wl-copy - fi - pkill -n wayfreeze - ''; - repeat = false; - }; + "Mod+Shift+XF86Launch7" = { + action = spawn "sh" "-c" '' + wayfreeze & + sleep 0.1 + GEOM=$(slurp) + if [ -n "$GEOM" ]; then + grim -g "$GEOM" -t ppm - | satty --filename - --output-filename "${ss}-edited.png" + fi + pkill -n wayfreeze + ''; + repeat = false; + }; - "Mod+Shift+S" = { - action = spawn "sh" "-c" '' - wayfreeze & - sleep 0.1 - GEOM=$(slurp) - if [ -n "$GEOM" ]; then - grim -g "$GEOM" -t ppm - | satty --filename - --output-filename "${ss}-edited.png" - fi - pkill -n wayfreeze - ''; - repeat = false; - }; + "Mod+S" = { + action = spawn "sh" "-c" '' + wayfreeze & + sleep 0.1 + GEOM=$(slurp) + if [ -n "$GEOM" ]; then + grim -g "$GEOM" - | tee ${ss}.png | wl-copy + fi + pkill -n wayfreeze + ''; + repeat = false; + }; - "Mod+Shift+D".action = spawn "sh" "-c" '' - cliphist list | fuzzel --dmenu | cliphist decode | wl-copy + "Mod+Shift+S" = { + action = spawn "sh" "-c" '' + wayfreeze & + sleep 0.1 + GEOM=$(slurp) + if [ -n "$GEOM" ]; then + grim -g "$GEOM" -t ppm - | satty --filename - --output-filename "${ss}-edited.png" + fi + pkill -n wayfreeze ''; + repeat = false; + }; + + "Mod+Shift+D".action = spawn "sh" "-c" '' + cliphist list | fuzzel --dmenu | cliphist decode | wl-copy + ''; - "Mod+Return".action = spawn "foot"; - "Mod+D".action = spawn "fuzzel"; - "Mod+C".action = spawn "qalculate-gtk"; - "Mod+BracketLeft".action = consume-or-expel-window-left; - "Mod+BracketRight".action = consume-or-expel-window-right; + "Mod+Return".action = spawn "foot"; + "Mod+D".action = spawn "fuzzel"; + "Mod+C".action = spawn "qalculate-gtk"; + "Mod+BracketLeft".action = consume-or-expel-window-left; + "Mod+BracketRight".action = consume-or-expel-window-right; - "Mod+R".action = switch-preset-column-width; - "Mod+Shift+R".action = reset-window-height; - "Mod+F".action = maximize-column; - "Mod+Shift+F".action = fullscreen-window; + "Mod+R".action = switch-preset-column-width; + "Mod+Shift+R".action = reset-window-height; + "Mod+F".action = maximize-column; + "Mod+Shift+F".action = fullscreen-window; - "Mod+Comma".action = consume-window-into-column; - "Mod+Period".action = expel-window-from-column; + "Mod+Comma".action = consume-window-into-column; + "Mod+Period".action = expel-window-from-column; - "Mod+Shift+E".action = quit; + "Mod+Shift+E".action = quit; - "Mod+H".action = focus-column-left; - "Mod+L".action = focus-column-right; - "Mod+J".action = focus-workspace-down; - "Mod+K".action = focus-workspace-up; + "Mod+H".action = focus-column-left; + "Mod+L".action = focus-column-right; + "Mod+J".action = focus-workspace-down; + "Mod+K".action = focus-workspace-up; - "Mod+Shift+H".action = move-column-left; - "Mod+Shift+L".action = move-column-right; - "Mod+Shift+J".action = move-window-down-or-to-workspace-down; - "Mod+Shift+K".action = move-window-up-or-to-workspace-up; + "Mod+Shift+H".action = move-column-left; + "Mod+Shift+L".action = move-column-right; + "Mod+Shift+J".action = move-window-down-or-to-workspace-down; + "Mod+Shift+K".action = move-window-up-or-to-workspace-up; - "Mod+Shift+Q".action = close-window; + "Mod+Shift+Q".action = close-window; - "Super+Return".action = spawn "obs-cmd" "replay" "save"; - } - // (builtins.listToAttrs ( - builtins.concatMap ( - keyNum: let - key = toString keyNum; - targetWS = keyNum + 1; - in [ - { - name = "Mod+${key}"; - value.action = focus-workspace targetWS; - } - { - name = "Mod+Shift+${key}"; - value.action.move-column-to-workspace = [targetWS]; - } - ] - ) (lib.range 1 9) - )) + "Super+Return".action = spawn "obs-cmd" "replay" "save"; +} +// (builtins.listToAttrs ( + builtins.concatMap ( + keyNum: + let + key = toString keyNum; + targetWS = keyNum + 1; + in + [ + { + name = "Mod+${key}"; + value.action = focus-workspace targetWS; + } + { + name = "Mod+Shift+${key}"; + value.action.move-column-to-workspace = [ targetWS ]; + } + ] + ) (lib.range 1 9) +)) diff --git a/hm/soft/media.nix b/hm/soft/media.nix index b307904..89cbe13 100644 --- a/hm/soft/media.nix +++ b/hm/soft/media.nix @@ -51,11 +51,11 @@ in }; }; home.packages = with pkgs; [ + czkawka nsxiv pinta ffmpeg imagemagick - exiftool mediainfo sox syncplay-nogui diff --git a/hm/soft/mpv.nix b/hm/soft/mpv.nix index 4af4198..380d0d5 100644 --- a/hm/soft/mpv.nix +++ b/hm/soft/mpv.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.hm.soft.mpv; s = "~~/shaders/shim"; @@ -12,7 +17,8 @@ in ]; home.file = { - ".config/mpv/shaders/shim".source = "${pkgs.mpv-shim-default-shaders}/share/mpv-shim-default-shaders/shaders"; + ".config/mpv/shaders/shim".source = + "${pkgs.mpv-shim-default-shaders}/share/mpv-shim-default-shaders/shaders"; }; programs.mpv = { @@ -69,7 +75,7 @@ in screenshot-format = "png"; screenshot-sw = "no"; - screenshot-directory = "${toString config.hm.conf.xdg-dirs.mediaPath}/pics/ss"; + screenshot-directory = "${toString config.hm.conf.xdg-dirs.storagePath}/pics/ss"; screenshot-template = "mpv-%f-%wH.%wM.%wS-#%#00n"; }; diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 50fb2c9..42be28c 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -2,6 +2,7 @@ config, inputs, username, + pkgs, ... }: { @@ -48,10 +49,7 @@ }; locale.enable = true; memory = { - zram = { - enable = true; - percent = 25; - }; + zram.enable = true; swapfile = { enable = true; size = 32; @@ -64,26 +62,18 @@ users.enable = true; }; srv = { - sops.enable = true; - syncthing.enable = true; - files = { - thunar.enable = true; - krusader.enable = true; - utils.enable = true; - }; + files.enable = true; gaming = { enable = true; steam.enable = true; - vr.enable = true; }; virtualization.enable = true; + kdeconnect.enable = true; nix-helper.enable = true; ollama.enable = true; - kdeconnect.enable = true; - monero = { - enable = true; - # service.enable = true; - }; + monero.enable = true; + sops.enable = true; + syncthing.enable = true; }; wm = { enable = true; @@ -91,6 +81,12 @@ }; }; + programs.wireshark = { + enable = true; + package = pkgs.wireshark; + }; + users.users.adam.extraGroups = [ "wireshark" ]; + boot = { kernelModules = [ "nct6687" ]; extraModulePackages = [ diff --git a/hosts/desktop/disko.nix b/hosts/desktop/disko.nix index 86d1e71..93941e9 100644 --- a/hosts/desktop/disko.nix +++ b/hosts/desktop/disko.nix @@ -31,7 +31,6 @@ mountpoint = "/"; mountOptions = [ "compress=zstd:1" - "space_cache=v2" "discard=async" "noatime" ]; @@ -40,56 +39,70 @@ mountpoint = "/nix"; mountOptions = [ "compress=zstd:1" + "discard=async" "nodev" + "noatime" ]; }; "home" = { mountpoint = "/home"; mountOptions = [ "compress=zstd:1" + "discard=async" "nosuid" "nodev" + "noatime" ]; }; "log" = { mountpoint = "/var/log"; mountOptions = [ "compress=zstd:1" + "discard=async" "nosuid" "nodev" + "noatime" ]; }; "games" = { mountpoint = "/games"; mountOptions = [ "compress=none" + "discard=async" "nosuid" "nodev" + "noatime" ]; }; "llms" = { mountpoint = "/llms"; mountOptions = [ "compress=none" + "discard=async" "nodatacow" "nosuid" "nodev" + "noatime" ]; }; "vms" = { mountpoint = "/vms"; mountOptions = [ "compress=none" + "discard=async" "nodatacow" "nosuid" "nodev" + "noatime" ]; }; "swap" = { mountpoint = "/.swapvol"; mountOptions = [ "compress=none" + "discard=async" "nodatacow" + "noatime" ]; }; }; @@ -119,9 +132,10 @@ mountpoint = "/storage/archive"; mountOptions = [ "compress=zstd:1" - "autodefrag" "nosuid" "nodev" + "noatime" + "nofail" "x-systemd.device-timeout=5s" ]; @@ -130,9 +144,10 @@ mountpoint = "/storage/movies"; mountOptions = [ "compress=none" - "autodefrag" "nosuid" "nodev" + "noatime" + "nofail" "x-systemd.device-timeout=5s" ]; @@ -141,9 +156,10 @@ mountpoint = "/storage/anime"; mountOptions = [ "compress=none" - "autodefrag" "nosuid" "nodev" + "noatime" + "nofail" "x-systemd.device-timeout=5s" ]; @@ -152,9 +168,10 @@ mountpoint = "/storage/pics"; mountOptions = [ "compress=none" - "autodefrag" "nosuid" "nodev" + "noatime" + "nofail" "x-systemd.device-timeout=5s" ]; @@ -163,9 +180,10 @@ mountpoint = "/storage/vids"; mountOptions = [ "compress=none" - "autodefrag" "nosuid" "nodev" + "noatime" + "nofail" "x-systemd.device-timeout=5s" ]; diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index ba5777a..8211143 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -1,8 +1,4 @@ -{ - username, - pkgs, - ... -}: +{ username, ... }: { imports = [ ../../hm/default.nix ]; @@ -21,7 +17,7 @@ git.enable = true; xdg-dirs = { enable = true; - mediaPath = /storage; + storagePath = /storage; }; xdg-mime.enable = true; }; @@ -63,22 +59,4 @@ yt-dlp.enable = true; }; }; - - home.packages = with pkgs; [ - sweethome3d.application - sweethome3d.furniture-editor - czkawka - ]; - - xdg.mimeApps = { - enable = true; - defaultApplications = { - "x-scheme-handler/terminal" = [ "foot.desktop" ]; - "inode/directory" = [ "thunar.desktop" ]; - }; - }; - - home.sessionVariables = { - XDG_UTILS_TERMINAL = "foot"; - }; } diff --git a/hosts/thinkpad/configuration.nix b/hosts/thinkpad/configuration.nix index d58858a..21fc467 100644 --- a/hosts/thinkpad/configuration.nix +++ b/hosts/thinkpad/configuration.nix @@ -25,6 +25,7 @@ type = "grub"; efi = false; timeout = 0; + grub.device = "/dev/nvme0n1"; luks.enable = true; }; drivers = { @@ -41,14 +42,8 @@ }; locale.enable = true; memory = { - zram = { - enable = true; - percent = 25; - }; - swapfile = { - enable = true; - size = 8; - }; + zram.enable = true; + swapfile.enable = true; }; network.enable = true; power = { @@ -62,13 +57,14 @@ }; srv = { bluetooth.enable = true; - files = { - thunar.enable = true; - utils.enable = true; - }; + files.enable = true; + gaming.enable = true; + virtualization.enable = true; kdeconnect.enable = true; nix-helper.enable = true; monero.enable = true; + sops.enable = true; + syncthing.enable = true; }; wm = { enable = true; diff --git a/hosts/thinkpad/disko.nix b/hosts/thinkpad/disko.nix index 8b41240..b5ccdc1 100644 --- a/hosts/thinkpad/disko.nix +++ b/hosts/thinkpad/disko.nix @@ -34,7 +34,6 @@ mountpoint = "/"; mountOptions = [ "compress=zstd:1" - "space_cache=v2" "discard=async" "noatime" ]; @@ -43,7 +42,6 @@ mountpoint = "/nix"; mountOptions = [ "compress=zstd:1" - "space_cache=v2" "discard=async" "nodev" "noatime" @@ -53,7 +51,6 @@ mountpoint = "/home"; mountOptions = [ "compress=zstd:1" - "space_cache=v2" "discard=async" "nosuid" "nodev" @@ -64,7 +61,6 @@ mountpoint = "/var/log"; mountOptions = [ "compress=zstd:1" - "space_cache=v2" "discard=async" "nosuid" "nodev" @@ -75,7 +71,6 @@ mountpoint = "/games"; mountOptions = [ "compress=none" - "space_cache=v2" "discard=async" "nosuid" "nodev" @@ -86,7 +81,6 @@ mountpoint = "/vms"; mountOptions = [ "compress=none" - "space_cache=v2" "discard=async" "nodatacow" "nosuid" @@ -98,7 +92,6 @@ mountpoint = "/.swapvol"; mountOptions = [ "compress=none" - "space_cache=v2" "discard=async" "nodatacow" "noatime" @@ -132,7 +125,6 @@ mountpoint = "/storage/archive"; mountOptions = [ "compress=zstd:1" - "space_cache=v2" "discard=async" "nosuid" "nodev" @@ -146,7 +138,6 @@ mountpoint = "/storage/movies"; mountOptions = [ "compress=none" - "space_cache=v2" "discard=async" "nosuid" "nodev" @@ -160,7 +151,6 @@ mountpoint = "/storage/anime"; mountOptions = [ "compress=none" - "space_cache=v2" "discard=async" "nosuid" "nodev" @@ -174,7 +164,6 @@ mountpoint = "/storage/pics"; mountOptions = [ "compress=none" - "space_cache=v2" "discard=async" "nosuid" "nodev" @@ -188,7 +177,6 @@ mountpoint = "/storage/vids"; mountOptions = [ "compress=none" - "space_cache=v2" "discard=async" "nosuid" "nodev" diff --git a/hosts/thinkpad/home.nix b/hosts/thinkpad/home.nix index 78a39d9..3a8215d 100644 --- a/hosts/thinkpad/home.nix +++ b/hosts/thinkpad/home.nix @@ -15,7 +15,11 @@ backend = "wayland"; }; git.enable = true; - xdg-dirs.enable = true; + xdg-dirs = { + enable = true; + storagePath = /storage; + }; + xdg-mime.enable = true; }; editors.nixvim.enable = true; env = { @@ -36,10 +40,12 @@ starship.enable = true; }; soft = { - browser.brave.enable = true; + browser.librewolf.enable = true; + email.thunderbird.enable = true; media.enable = true; mpv.enable = true; nixcord.enable = true; + onlyoffice.enable = true; obsidian.enable = true; spicetify.enable = true; torrent.enable = true; diff --git a/os/core/bootloader.nix b/os/core/bootloader.nix index 7f3a85e..dfd9101 100644 --- a/os/core/bootloader.nix +++ b/os/core/bootloader.nix @@ -12,7 +12,6 @@ in type = lib.types.enum [ "systemd-boot" "grub" - "none" ]; default = "systemd-boot"; description = "Which bootloader to use"; diff --git a/os/core/greet.nix b/os/core/greet.nix index 953b017..cf814af 100644 --- a/os/core/greet.nix +++ b/os/core/greet.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.os.core.greet; in @@ -24,6 +29,6 @@ in }; security.pam.services.greetd.enableGnomeKeyring = true; - environment.systemPackages = with pkgs; [ tuigreet ]; + # environment.systemPackages = with pkgs; [ tuigreet ]; }; } diff --git a/os/core/security.nix b/os/core/security.nix index e8c541c..bc2c41c 100644 --- a/os/core/security.nix +++ b/os/core/security.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.os.core.security; in @@ -8,22 +13,25 @@ in services.gnome.gnome-keyring.enable = true; security = { - pam.services.swaylock = {}; + pam.services = { + swaylock = { }; + login.enableGnomeKeyring = true; + }; polkit.enable = true; rtkit.enable = true; }; - systemd.user.services.polkit-gnome-authentication-agent-1 = { - description = "gnome-polkit-authentication-agent-1"; - wantedBy = [ "graphical-session.target" ]; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; - }; - }; + # systemd.user.services.polkit-gnome-authentication-agent-1 = { + # description = "gnome-polkit-authentication-agent-1"; + # wantedBy = [ "graphical-session.target" ]; + # serviceConfig = { + # Type = "simple"; + # ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + # }; environment.systemPackages = with pkgs; [ veracrypt diff --git a/os/core/ssh.nix b/os/core/ssh.nix index 2fb35f8..4069d31 100644 --- a/os/core/ssh.nix +++ b/os/core/ssh.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, username, ... }: +{ + config, + lib, + pkgs, + username, + ... +}: let cfg = config.os.core.ssh; in @@ -10,9 +16,7 @@ in openFirewall = true; }; - services.openssh = { - enable = true; - }; + services.openssh.enable = true; programs.gnupg.agent = { enable = true; diff --git a/os/core/storage.nix b/os/core/storage.nix index 59f0093..8527bac 100644 --- a/os/core/storage.nix +++ b/os/core/storage.nix @@ -8,7 +8,6 @@ in }; config = lib.mkIf cfg.enable { nix.settings.auto-optimise-store = true; - programs.nh.enable = true; services.fstrim.enable = true; services.btrfs.autoScrub = { enable = true; diff --git a/os/core/users.nix b/os/core/users.nix index 03eff8a..86c015c 100644 --- a/os/core/users.nix +++ b/os/core/users.nix @@ -23,7 +23,7 @@ in extraGroups = lib.mkMerge [ [ "wheel" ] - (lib.mkIf (config.os.core.drivers.amd.enable or false) [ + (lib.mkIf (config.os.core.drivers.graphics.enable or false) [ "video" "render" ]) diff --git a/os/srv/compat.nix b/os/srv/compat.nix index f174e02..721fab1 100644 --- a/os/srv/compat.nix +++ b/os/srv/compat.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.os.srv.compat; in @@ -13,12 +18,6 @@ in environment.sessionVariables = { NIXOS_OZONE_WL = "1"; ELECTRON_ENABLE_WAYLAND = "1"; - WINE_RT_PRIO = "1"; }; - - environment.systemPackages = with pkgs; [ - winetricks - wineWowPackages.waylandFull - ]; }; } diff --git a/os/srv/files.nix b/os/srv/files.nix index b4130b0..875a825 100644 --- a/os/srv/files.nix +++ b/os/srv/files.nix @@ -9,16 +9,11 @@ let in { options.os.srv.files = { - thunar.enable = lib.mkEnableOption "enables the thunar file manager"; + enable = lib.mkEnableOption "enables general file management stuff"; krusader.enable = lib.mkEnableOption "enables krusader for easier file moving using ssh"; - utils.enable = lib.mkEnableOption "enables compression and trash utilities"; }; config = lib.mkMerge [ { - os.srv.files.utils.enable = lib.mkDefault cfg.thunar.enable; - } - - (lib.mkIf cfg.thunar.enable { programs.thunar = { enable = true; plugins = with pkgs; [ @@ -28,10 +23,15 @@ in }; services = { tumbler.enable = true; - gnome.gnome-keyring.enable = true; + gvfs.enable = true; }; - environment.systemPackages = with pkgs; [ file-roller ]; - }) + environment.systemPackages = with pkgs; [ + file-roller + gdu + pxz + pigz + ]; + } (lib.mkIf cfg.krusader.enable { environment.systemPackages = with pkgs; [ @@ -39,16 +39,5 @@ in kdePackages.kio-extras ]; }) - - (lib.mkIf cfg.utils.enable { - services.gvfs.enable = true; - - environment.systemPackages = with pkgs; [ - trashy - gdu - pxz - pigz - ]; - }) ]; } diff --git a/os/srv/gaming.nix b/os/srv/gaming.nix index f0ff771..912a252 100644 --- a/os/srv/gaming.nix +++ b/os/srv/gaming.nix @@ -10,12 +10,22 @@ let in { options.os.srv.gaming = { - enable = lib.mkEnableOption "enables gaming utilities"; + enable = lib.mkEnableOption "enables general gaming support"; + + tools.enable = lib.mkEnableOption "enables performance tools" // { + default = cfg.enable; + }; + launchers.enable = lib.mkEnableOption "enables 3rd party launchers" // { + default = cfg.enable; + }; + games.enable = lib.mkEnableOption "enables specific native games"; steam.enable = lib.mkEnableOption "enables steam utilities"; vr.enable = lib.mkEnableOption "enables vr support"; }; + config = lib.mkMerge [ - (lib.mkIf cfg.enable { + # --- PERFORMANCE & TOOLING --- + (lib.mkIf cfg.tools.enable { programs.gamescope = { enable = true; capSysNice = true; @@ -26,23 +36,34 @@ in enableRenice = true; }; + home-manager.users.${username}.hm.soft.mangohud.enable = true; + environment.systemPackages = with pkgs; [ - openttd-jgrpp ludusavi protonplus - openmw + ]; + }) + + # --- EXTERNAL LAUNCHERS --- + (lib.mkIf cfg.launchers.enable { + environment.systemPackages = with pkgs; [ heroic (prismlauncher.override { - additionalLibs = with pkgs; [ - ocl-icd - ]; + additionalLibs = with pkgs; [ ocl-icd ]; jdks = with pkgs; [ javaPackages.compiler.temurin-bin.jdk-25 ]; }) ]; + }) - home-manager.users.${username}.hm.soft.mangohud.enable = true; + # --- SPECIFIC GAMES --- + (lib.mkIf cfg.games.enable { + environment.systemPackages = with pkgs; [ + openttd-jgrpp + openmw + ]; }) + # --- STEAM --- (lib.mkIf cfg.steam.enable { programs.steam = { enable = true; @@ -58,6 +79,7 @@ in }; }) + # --- VR SUPPORT --- (lib.mkIf cfg.vr.enable { programs.alvr = { enable = true; diff --git a/os/srv/kdeconnect.nix b/os/srv/kdeconnect.nix index 049a1c6..01a0e4d 100644 --- a/os/srv/kdeconnect.nix +++ b/os/srv/kdeconnect.nix @@ -4,16 +4,15 @@ username, pkgs, ... -}: let +}: +let cfg = config.os.srv.kdeconnect; -in { +in +{ options.os.srv.kdeconnect.enable = lib.mkEnableOption "enables kde connect"; config = lib.mkIf cfg.enable { - environment.systemPackages = [pkgs.kdePackages.dolphin]; + environment.systemPackages = [ pkgs.kdePackages.dolphin ]; programs.kdeconnect.enable = true; - home-manager.users.${username}.services.kdeconnect = { - enable = true; - # indicator = true; - }; + home-manager.users.${username}.services.kdeconnect.enable = true; }; } diff --git a/os/srv/nix-helper.nix b/os/srv/nix-helper.nix index 63b3182..0bb819a 100644 --- a/os/srv/nix-helper.nix +++ b/os/srv/nix-helper.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, username, ... }: +{ + config, + lib, + pkgs, + username, + ... +}: let cfg = config.os.srv.nix-helper; in @@ -6,18 +12,25 @@ in options.os.srv.nix-helper.enable = lib.mkEnableOption "enables nix-helper"; config = lib.mkIf cfg.enable { nix.settings = { - trusted-users = [ "root" "${username}" ]; - experimental-features = [ "nix-command" "flakes" ]; + trusted-users = [ + "root" + "${username}" + ]; + experimental-features = [ + "nix-command" + "flakes" + ]; }; programs.nh = { enable = true; flake = "/etc/nixos"; + clean.extraArgs = "--keep 5"; }; - environment.sessionVariables = { - NH_OS_FLAKE = "/etc/nixos"; - }; + # environment.sessionVariables = { + # NH_OS_FLAKE = "/etc/nixos"; + # }; environment.systemPackages = with pkgs; [ nix-output-monitor diff --git a/os/wm/niri.nix b/os/wm/niri.nix index 587f543..58d27af 100644 --- a/os/wm/niri.nix +++ b/os/wm/niri.nix @@ -19,7 +19,7 @@ in programs.niri = { enable = true; - # package = pkgs.niri-unstable; + package = pkgs.niri-unstable; }; os.srv.compat.enable = true; |
