From 1cfe3294236f7a392d8457836171959eafbb4392 Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Tue, 18 Jul 2023 17:18:24 -0400 Subject: [PATCH] various fixes --- flake.lock | 61 +++++++++++++++++----------------- flake.nix | 2 +- hosts/gerg-desktop/default.nix | 3 -- hosts/gerg-desktop/disko.nix | 18 ++++++---- modules/misc.nix | 2 +- modules/nix.nix | 8 +++-- 6 files changed, 50 insertions(+), 44 deletions(-) diff --git a/flake.lock b/flake.lock index 2650015..8295014 100644 --- a/flake.lock +++ b/flake.lock @@ -90,11 +90,11 @@ }, "master": { "locked": { - "lastModified": 1689477032, - "narHash": "sha256-tcVslINoIDszgc5cES0Y1k0Lq1HHPla9PSALU+Y8jkY=", + "lastModified": 1689714265, + "narHash": "sha256-W0KAM+fCwof0a4Hwq90t6y/Rq2VXXigkd8He/0VuIQM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "66c990850b878437510cc6096e6babce86de5dcb", + "rev": "09bdd6271391d562ca0d20d44e5f6e08e950b5eb", "type": "github" }, "original": { @@ -106,11 +106,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1689353238, - "narHash": "sha256-48FzJRK2+MD4GVXWMFNWih+8zJE+m7zBlyNOSJM1Dok=", + "lastModified": 1689691350, + "narHash": "sha256-rofLdQzpR98qB6HOdhUcz+uYZqiKu2NMBVMkH/gTrdo=", "owner": "neovim", "repo": "neovim", - "rev": "33e1a8cd7042816a064c0d2bf32b6570d7e88b79", + "rev": "be74807eef13ff8c90d55cf8b22b01d6d33b1641", "type": "github" }, "original": { @@ -143,11 +143,11 @@ }, "nixlib": { "locked": { - "lastModified": 1688259758, - "narHash": "sha256-CYVbYQfIm3vwciCf6CCYE+WOOLE3vcfxfEfNHIfKUJQ=", + "lastModified": 1689469483, + "narHash": "sha256-2SBhY7rZQ/iNCxe04Eqxlz9YK9KgbaTMBssq3/BgdWY=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "a92befce80a487380ea5e92ae515fe33cebd3ac6", + "rev": "02fea408f27186f139153e1ae88f8ab2abd9c22c", "type": "github" }, "original": { @@ -164,11 +164,11 @@ ] }, "locked": { - "lastModified": 1688738567, - "narHash": "sha256-yax5BYOfpE0+95kyJmEcfKEdZBaFvCENDogBB4VQB3Q=", + "lastModified": 1689558522, + "narHash": "sha256-diNpqSRebzvT3P4fLX+40VWZbf2H2hraJDDdg5NJSj0=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "9191c85aab6b1a7ad395c13d340f2aa0e3ddf552", + "rev": "11c98929963a95ad3830960a9216d00e2f792502", "type": "github" }, "original": { @@ -211,11 +211,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1689398528, - "narHash": "sha256-qVn/doWn20axR+KvmAAGexv0A5RVzcBbd5HfNMAMeVI=", + "lastModified": 1689473667, + "narHash": "sha256-41ePf1ylHMTogSPAiufqvBbBos+gtB6zjQlYFSEKFMM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3dc2bc15956db2ff2316af45eefd45803fc1372b", + "rev": "13231eccfa1da771afa5c0807fdd73e05a1ec4e6", "type": "github" }, "original": { @@ -234,11 +234,11 @@ ] }, "locked": { - "lastModified": 1689386166, - "narHash": "sha256-Vue9Wk6M5SU125WJrunklOen4fPcN9oBV/y9bbmlOA8=", + "lastModified": 1689714720, + "narHash": "sha256-I+dQltXVuxQOTESF7Mq90Khu5kWPUv48CIbjTHGl0Ss=", "owner": "gerg-L", "repo": "nvim-flake", - "rev": "3ec1c636652aa3809b4199a546bbc44761bc7875", + "rev": "6788a669fa8e55159637c616305b15de1a8b91c6", "type": "github" }, "original": { @@ -287,11 +287,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1689405598, - "narHash": "sha256-80fuO3FiXgJmUDQgB7sc2lq8Qe/oSkqDNwx9N/fCtBs=", + "lastModified": 1689534977, + "narHash": "sha256-EB4hasmjKgetTR0My2bS5AwELZFIQ4zANLqHKi7aVXg=", "owner": "mic92", "repo": "sops-nix", - "rev": "cfe47aff8660fd760b1db89613a3205c2c4ba7b6", + "rev": "bd695cc4d0a5e1bead703cc1bec5fa3094820a81", "type": "github" }, "original": { @@ -307,27 +307,26 @@ ] }, "locked": { - "lastModified": 1689297469, - "narHash": "sha256-ZNwNpESPRD/STBJa0c3VCQ+gFtimSPeKCN/A0Xmb8ls=", + "lastModified": 1689544884, + "narHash": "sha256-6baLlCq5VkRij/6dB6UaAaUWw/E4sTzKSwryRWARWTU=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "d57dd446a91490ae2983c968f4767bd50047ab5b", + "rev": "a48f9a4cdae18516a54fe771051447300d77fb63", "type": "github" }, "original": { "owner": "Gerg-L", - "ref": "personal", "repo": "spicetify-nix", "type": "github" } }, "stable": { "locked": { - "lastModified": 1689326639, - "narHash": "sha256-79zi0t83Dcc2dE0NuYZ+2hqtKXZN1yWVq5mtx8D2d7Y=", + "lastModified": 1689605451, + "narHash": "sha256-u2qp2k9V1smCfk6rdUcgMKvBj3G9jVvaPHyeXinjN9E=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9fdfaeb7b96f05e869f838c73cde8d98c640c649", + "rev": "53657afe29748b3e462f1f892287b7e254c26d77", "type": "github" }, "original": { @@ -359,11 +358,11 @@ }, "unstable": { "locked": { - "lastModified": 1689373857, - "narHash": "sha256-mtBksyvhhT98Zsm9tYHuMKuLwUKDwv+BGTl6K5nOGhY=", + "lastModified": 1689534811, + "narHash": "sha256-jnSUdzD/414d94plCyNlvTJJtiTogTep6t7ZgIKIHiE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "dfdbcc428f365071f0ca3888f6ec8c25c3792885", + "rev": "6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index ee4c2b1..22dc0b9 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,7 @@ }; spicetify-nix = { #url = "github:the-argus/spicetify-nix"; - url = "github:Gerg-L/spicetify-nix/personal"; + url = "github:Gerg-L/spicetify-nix"; inputs.nixpkgs.follows = "unstable"; }; #my own packages diff --git a/hosts/gerg-desktop/default.nix b/hosts/gerg-desktop/default.nix index 90072c5..61b96fb 100644 --- a/hosts/gerg-desktop/default.nix +++ b/hosts/gerg-desktop/default.nix @@ -21,8 +21,6 @@ }; allowedUnfree = [ "nvidia-x11" - "steam" - "steam-original" ]; }; boot.binfmt.emulatedSystems = ["aarch64-linux"]; @@ -42,7 +40,6 @@ loadInNixShell = false; silent = true; }; - programs.fish.enable = true; nix.settings.system-features = ["kvm" "big-parallel" "nixos-test" "benchmark"]; diff --git a/hosts/gerg-desktop/disko.nix b/hosts/gerg-desktop/disko.nix index 4731863..8227fed 100644 --- a/hosts/gerg-desktop/disko.nix +++ b/hosts/gerg-desktop/disko.nix @@ -90,31 +90,37 @@ in { type = "zfs_fs"; options.mountpoint = "legacy"; mountpoint = "/"; - postCreateHook = "zfs snapshot root@empty"; + postCreateHook = '' + zfs snapshot rpool/root@empty + zfs snapshot rpool/root@lastboot + ''; }; "nix" = { type = "zfs_fs"; options.mountpoint = "legacy"; mountpoint = "/nix"; - postCreateHook = "zfs snapshot nix@empty"; + postCreateHook = "zfs snapshot rpool/nix@empty"; }; "var" = { type = "zfs_fs"; options.mountpoint = "legacy"; mountpoint = "/var"; - postCreateHook = "zfs snapshot var@empty"; + postCreateHook = '' + zfs snapshot rpool/var@empty + zfs snapshot rpool/var@lastboot + ''; }; "persist" = { type = "zfs_fs"; options.mountpoint = "legacy"; mountpoint = "/persist"; - postCreateHook = "zfs snapshot persist@empty"; + postCreateHook = "zfs snapshot rpool/persist@empty"; }; "home" = { type = "zfs_fs"; options.mountpoint = "legacy"; mountpoint = "/home"; - postCreateHook = "zfs snapshot home@empty"; + postCreateHook = "zfs snapshot rpool/home@empty"; }; }; }; @@ -141,7 +147,7 @@ in { type = "zfs_fs"; options.mountpoint = "legacy"; mountpoint = "/boot"; - postCreateHook = "zfs snapshot boot@empty"; + postCreateHook = "zfs snapshot bpool/boot@empty"; }; }; }; diff --git a/modules/misc.nix b/modules/misc.nix index 20ff6c2..b3def3d 100644 --- a/modules/misc.nix +++ b/modules/misc.nix @@ -31,7 +31,7 @@ _: { enable = true; hostKeys = lib.mkForce []; settings = { - PermitRootLogin = "yes"; + PermitRootLogin = "no"; PasswordAuthentication = false; KbdInteractiveAuthentication = false; }; diff --git a/modules/nix.nix b/modules/nix.nix index 679e552..85d8520 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -1,4 +1,8 @@ -inputs: {pkgs, ...}: { +inputs: { + pkgs, + config, + ... +}: { #other nix settings nix = { package = inputs.nix.packages.${pkgs.system}.default; @@ -24,6 +28,6 @@ inputs: {pkgs, ...}: { }; #fix for use-xdg-base-directories environment.profiles = [ - "$HOME/.local/state/nix/profiles/profile" + "${config.environment.variables.XDG_STATE_HOME or "$HOME/.local/state"}/nix/profile" ]; }