From 33658c20eb86ae35d0700d873624d90e41a3d73e Mon Sep 17 00:00:00 2001 From: derfenix Date: Tue, 16 Sep 2025 19:51:36 +0300 Subject: [PATCH] Refactoring and fixing --- flake.lock | 18 +++++++++--------- hosts/fenixpc/default.nix | 38 ++++++++++++++++++++++++++++++++++++++ hosts/fenixpc/fenix.nix | 2 +- modules/hm/pt.nix | 3 +++ modules/hm/ssh.nix | 1 + modules/hm/syncthing.nix | 26 +++++++++++++++++++++++++- modules/hm/zsh.nix | 16 ++++++++++++++-- roles/desktop.nix | 1 - 8 files changed, 91 insertions(+), 14 deletions(-) diff --git a/flake.lock b/flake.lock index 872828e..a7cab61 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ ] }, "locked": { - "lastModified": 1757475826, - "narHash": "sha256-x6x30IzUOxKmOtE0KzQu9UxLrxg0HLurd5rpak62OL0=", + "lastModified": 1757698511, + "narHash": "sha256-UqHHGydF/q3jfYXCpvYLA0TWtvByOp1NwOKCUjhYmPs=", "owner": "nix-community", "repo": "home-manager", - "rev": "a60021a8c99bf5a28919c0a9fbb6b04422a6a8da", + "rev": "a3fcc92180c7462082cd849498369591dfb20855", "type": "github" }, "original": { @@ -93,11 +93,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1757347588, - "narHash": "sha256-tLdkkC6XnsY9EOZW9TlpesTclELy8W7lL2ClL+nma8o=", + "lastModified": 1757487488, + "narHash": "sha256-zwE/e7CuPJUWKdvvTCB7iunV4E/+G0lKfv4kk/5Izdg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b599843bad24621dcaa5ab60dac98f9b0eb1cabe", + "rev": "ab0f3607a6c7486ea22229b92ed2d355f1482ee0", "type": "github" }, "original": { @@ -109,11 +109,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1757408970, - "narHash": "sha256-aSgK4BLNFFGvDTNKPeB28lVXYqVn8RdyXDNAvgGq+k0=", + "lastModified": 1757545623, + "narHash": "sha256-mCxPABZ6jRjUQx3bPP4vjA68ETbPLNz9V2pk9tO7pRQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d179d77c139e0a3f5c416477f7747e9d6b7ec315", + "rev": "8cd5ce828d5d1d16feff37340171a98fc3bf6526", "type": "github" }, "original": { diff --git a/hosts/fenixpc/default.nix b/hosts/fenixpc/default.nix index f70c619..7588704 100644 --- a/hosts/fenixpc/default.nix +++ b/hosts/fenixpc/default.nix @@ -45,6 +45,7 @@ in enable = true; user = "fenix"; }; + lact.enable = true; }; systemd.services.calibre-web.serviceConfig.environment = lib.mkForce ""; systemd.services.calibre-web.environment.CACHE_DIR = "/var/cache/calibre-web"; @@ -72,6 +73,7 @@ in "input" "audio" "users" + "gamemode" ]; }); groups = { @@ -100,4 +102,40 @@ in kwallet.enable = true; }); }; + + programs = { + gamemode = { + enable = true; + settings = { + general = { + renice = 10; + # blacklist = "vlc,firefox"; + # whitelist = "game1,game2"; + }; + cpu = { + governor = "performance"; + boost = "auto"; + }; + gpu = { + amd_performance_level = "high"; + apply_gpu_optimizations = 1; + per_process_gpu_clocks = 1; + }; + supervisor = { + # killlist = "tracker-miner-fs,tracker-store"; + }; + custom = { + start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; + end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; + }; + }; + }; + }; + + hardware.graphics = { + extraPackages = with pkgs; [ + libva + vulkan-tools + ]; + }; } diff --git a/hosts/fenixpc/fenix.nix b/hosts/fenixpc/fenix.nix index 2469e26..15e3a50 100644 --- a/hosts/fenixpc/fenix.nix +++ b/hosts/fenixpc/fenix.nix @@ -16,6 +16,7 @@ in packages = with pkgs; [ calibre spotify + obsidian transmission_4-qt6 # Games @@ -45,7 +46,6 @@ in vscode.enable = true; gpg.enable = true; neovim.enable = true; - obsidian.enable = true; ssh.enable = true; vivaldi = { diff --git a/modules/hm/pt.nix b/modules/hm/pt.nix index c7cec33..753365c 100644 --- a/modules/hm/pt.nix +++ b/modules/hm/pt.nix @@ -72,6 +72,9 @@ in enabled = true; label = "PTDev"; path = devFolder; + devices = [ + "nas" + ]; }; }; }; diff --git a/modules/hm/ssh.nix b/modules/hm/ssh.nix index 896389d..3a80b03 100644 --- a/modules/hm/ssh.nix +++ b/modules/hm/ssh.nix @@ -2,6 +2,7 @@ { programs = { ssh = { + enableDefaultConfig = false; matchBlocks = { "router" = { user = "admin"; diff --git a/modules/hm/syncthing.nix b/modules/hm/syncthing.nix index 75e6f6d..f5bf4cc 100644 --- a/modules/hm/syncthing.nix +++ b/modules/hm/syncthing.nix @@ -19,6 +19,10 @@ enabled = lib.mkDefault true; label = "Sync"; path = "~/Sync"; + devices = [ + "nas" + "s25" + ]; }; "Documents" = { id = "ikwrq-ahv5a"; @@ -26,6 +30,9 @@ enabled = lib.mkDefault false; label = "Documents"; path = "~/Documents"; + devices = [ + "nas" + ]; }; "Music" = { id = "6ytyt-ngvta"; @@ -33,6 +40,9 @@ enabled = lib.mkDefault false; label = "Music"; path = "~/Music"; + devices = [ + "nas" + ]; }; "Obsidian" = { id = "hyeaf-ygups"; @@ -40,6 +50,10 @@ enabled = lib.mkDefault false; label = "Obsidian"; path = "~/Obsidian"; + devices = [ + "nas" + "s25" + ]; }; "Camera S25" = { id = "sm-s938b_9wbf-фото"; @@ -47,14 +61,21 @@ type = "receiveonly"; label = "Camera S25"; path = "~/Photos/S25"; + devices = [ + "nas" + "s25" + ]; }; "PhotoArchive" = { id = "6detn-xjbco"; - type = "receiveonly"; + type = "sendreceive"; enabled = lib.mkDefault false; label = "PhotoArchive"; path = "~/Photos/archive"; ignorePerms = true; + devices = [ + "nas" + ]; }; "books" = { id = "6st45-t9jej"; @@ -62,6 +83,9 @@ enabled = lib.mkDefault false; label = "Books"; path = "/mnt/hdd/Books"; + devices = [ + "nas" + ]; }; }; diff --git a/modules/hm/zsh.nix b/modules/hm/zsh.nix index 5b7e020..3539472 100644 --- a/modules/hm/zsh.nix +++ b/modules/hm/zsh.nix @@ -1,5 +1,13 @@ -{ lib, ... }: { + lib, + pkgs, + config, + ... +}: +{ + + home.packages = lib.mkIf config.programs.zsh.enable (with pkgs; [ zsh-powerlevel10k ]); + programs.zsh = { autosuggestion = { enable = true; @@ -48,11 +56,15 @@ "aliases" "alias-finder" "rsync" + "z" ]; - theme = lib.mkDefault "agnoster"; + # theme = lib.mkDefault "powerlevel10k/powerlevel10k"; }; initContent = '' + source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme + source ~/.p10k.zsh + zstyle ':omz:plugins:alias-finder' autoload yes zstyle ':omz:plugins:alias-finder' longer no zstyle ':omz:plugins:alias-finder' exact yes diff --git a/roles/desktop.nix b/roles/desktop.nix index 8f7290b..ba6b3a9 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -161,7 +161,6 @@ in environment.systemPackages = with pkgs; [ mesa wl-clipboard - libva-vdpau-driver steam-run telegram-desktop