From f420ad44f2e51f5eef550a4767812e49a9e1d59f Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Tue, 9 Jul 2024 09:46:05 -0500 Subject: [PATCH] enable auto scrubbing and stuff --- flake.lock | 42 +++++++++++----------- hosts/desktop/configuration.nix | 44 ++++++++++++++---------- hosts/desktop/hardware-configuration.nix | 5 +++ hosts/nas/configuration.nix | 3 ++ 4 files changed, 55 insertions(+), 39 deletions(-) diff --git a/flake.lock b/flake.lock index bbfe68f..e9d31f4 100644 --- a/flake.lock +++ b/flake.lock @@ -11,11 +11,11 @@ "yafas": "yafas" }, "locked": { - "lastModified": 1719992991, - "narHash": "sha256-X1WYxzXRB/KbYLML90AtMTE0mpLHtAe6avSDBh203bs=", + "lastModified": 1720452593, + "narHash": "sha256-lE6r0ty6o3tbwSg8HGSMc4RVhtryRP7OtcmgEAvSwUM=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "378c12fede02f2cbdb14508af603cbefa334bcac", + "rev": "5cd32d60b3f8ce3b0552103bb8de0635c3c0d87d", "type": "github" }, "original": { @@ -256,11 +256,11 @@ ] }, "locked": { - "lastModified": 1720045378, - "narHash": "sha256-lmE7B+QXw7lWdBu5GQlUABSpzPk3YBb9VbV+IYK5djk=", + "lastModified": 1720470846, + "narHash": "sha256-7ftA4Bv5KfH4QdTRxqe8/Hz2YTKo+7IQ9n7vbNWgv28=", "owner": "nix-community", "repo": "home-manager", - "rev": "0a30138c694ab3b048ac300794c2eb599dc40266", + "rev": "2fb5c1e0a17bc6059fa09dc411a43d75f35bb192", "type": "github" }, "original": { @@ -381,11 +381,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1719845423, - "narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=", + "lastModified": 1720469887, + "narHash": "sha256-BwPsGQ/EMqCreUc5j9Efj+wx13AjREtuHhbyHZygcE4=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "ec12b88104d6c117871fad55e931addac4626756", + "rev": "fabc653517106127e2ed435fb52e7e8854354428", "type": "github" }, "original": { @@ -474,11 +474,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1719895800, - "narHash": "sha256-xNbjISJTFailxass4LmdWeV4jNhAlmJPwj46a/GxE6M=", + "lastModified": 1720515935, + "narHash": "sha256-8b+fzR4W2hI5axwB+4nBwoA15awPKkck4ghhCt8v39M=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "6e253f12b1009053eff5344be5e835f604bb64cd", + "rev": "a111ce6b537df12a39874aa9672caa87f8677eda", "type": "github" }, "original": { @@ -490,11 +490,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719848872, - "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", + "lastModified": 1720031269, + "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8", + "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", "type": "github" }, "original": { @@ -522,11 +522,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1719956923, - "narHash": "sha256-nNJHJ9kfPdzYsCOlHOnbiiyKjZUW5sWbwx3cakg3/C4=", + "lastModified": 1720386169, + "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "706eef542dec88cc0ed25b9075d3037564b2d164", + "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", "type": "github" }, "original": { @@ -538,11 +538,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1719848872, - "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", + "lastModified": 1720418205, + "narHash": "sha256-cPJoFPXU44GlhWg4pUk9oUPqurPlCFZ11ZQPk21GTPU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8", + "rev": "655a58a72a6601292512670343087c2d75d859c1", "type": "github" }, "original": { diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 0392905..c8d705b 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -73,7 +73,12 @@ in # Override kernel to latest kernelPackages = pkgs.linuxPackages_latest; - kernelParams = [ "quiet" ]; + kernelParams = [ + "quiet" + # needed cause ssd powersaving is broken af I guess + "nvme_core.default_ps_max_latency_us=0" + "pcie_aspm=off" + ]; consoleLogLevel = 3; bootspec.enable = true; @@ -136,12 +141,12 @@ in }; }; - rsync-home = { - path = [ pkgs.bash pkgs.rsync ]; - script = '' - rsync -rtpogv --progress --ignore-existing --exclude={'/home/matt/Games/*', '/home/matt/1TB/*'} -lHzs /home/matt /media/nas/backup/desktop-nix/home - ''; - }; + # rsync-home = { + # path = [ pkgs.bash pkgs.rsync ]; + # script = '' + # rsync -rtpogv --progress --ignore-existing --exclude={'/home/matt/Games/*', '/home/matt/1TB/*'} -lHzs /home/matt /media/nas/backup/desktop-nix/home + # ''; + # }; }; # Networking configs @@ -179,6 +184,7 @@ in kmod lact nano + onlyoffice-bin os-prober papirus-icon-theme pciutils @@ -215,17 +221,19 @@ in }; services = { - # borgbackup.jobs.home-matt = { - # paths = "/home/matt"; - # encryption.mode = "none"; - # # environment.BORG_RSH = "ssh -i /home/matt/.ssh/id_ed25519"; - # repo = "/media/nas/backup/desktop-nix/home"; - # compression = "auto,zstd"; - # exclude = [ - # "/home/matt/Games" - # "/home/matt/1TB" - # ]; - # }; + borgbackup.jobs.home-matt = { + encryption.mode = "repokey"; + encryption.passCommand = "cat /root/borg"; + environment.BORG_RSH = "ssh -i /home/matt/.ssh/id_ed25519"; + repo = "/media/nas/backup/desktop-nix/borg/home"; + compression = "auto,zstd"; + inhibitsSleep = true; + paths = "/home/matt"; + exclude = [ + "/home/matt/Games" + "/home/matt/1TB" + ]; + }; btrfs = { autoScrub.enable = true; diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix index 748dcd6..00719d2 100644 --- a/hosts/desktop/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -42,6 +42,7 @@ "subvol=nix" "compress=zstd" "noatime" + "autodefrag" ]; }; @@ -52,6 +53,7 @@ "subvol=etc" "compress=zstd" "noatime" + "autodefrag" ]; }; @@ -62,6 +64,7 @@ "subvol=root" "compress=zstd" "noatime" + "autodefrag" ]; }; @@ -72,6 +75,7 @@ "subvol=log" "compress=zstd" "noatime" + "autodefrag" ]; }; @@ -81,6 +85,7 @@ options = [ "subvol=home" "compress=zstd" + "autodefrag" ]; }; diff --git a/hosts/nas/configuration.nix b/hosts/nas/configuration.nix index 6ed9f71..b0965c5 100644 --- a/hosts/nas/configuration.nix +++ b/hosts/nas/configuration.nix @@ -449,6 +449,7 @@ in ninja nodejs-18_x nut + nmon protonvpn-cli protonmail-bridge pass @@ -463,6 +464,7 @@ in tpm2-tools tpm2-tss cryptsetup + duperemove ]; }; @@ -471,6 +473,7 @@ in fish.enable = false; virt-manager.enable = true; nix-ld.enable = true; + screen.enable = true; }; power.ups = {