diff --git a/home/default.nix b/home/default.nix index 709e6d6..fd6d208 100644 --- a/home/default.nix +++ b/home/default.nix @@ -29,10 +29,8 @@ in # These imports will be scoped under this key so all settings # in them will be added to `home-manager.users.${username}`.. imports = [ - ./misc ./packages ./programs - ./impermanence ]; config = { diff --git a/home/impermanence/default.nix b/home/impermanence/default.nix deleted file mode 100644 index 0c7f196..0000000 --- a/home/impermanence/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - lib, - osConfig, - inputs, - ... -}: let - inherit (lib) mkIf; - cfg = osConfig.myOptions.system.impermanence.home; -in { - imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ]; - - config = mkIf cfg.enable { - home.persistence."${cfg.persistentMountPoint}" = { - directories = [ - ".cache/nix" - ".cache/nix-index" - ] ++ cfg.extraDirectories; - - files = [ - - ] ++ cfg.extraFiles; - - # Allow other users (such as root), to access files through the bind - # mounted directories listed in `directories`. Useful for `sudo` operations, - # Docker, etc. Requires NixOS configuration programs.fuse.userAllowOther = true; - allowOther = true; - }; - }; -} diff --git a/home/misc/dconf.nix b/home/misc/dconf.nix deleted file mode 100644 index f876c1a..0000000 --- a/home/misc/dconf.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - dconf.settings = { - # This is like a system-wide dark mode swithc that some apps respect - # Equivalent of the following dconf command: - # `conf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"` - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - }; - }; -} diff --git a/home/misc/default.nix b/home/misc/default.nix deleted file mode 100644 index b1508c3..0000000 --- a/home/misc/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - imports = [ - ./dconf.nix - ]; -} diff --git a/hosts/voyager/default.nix b/hosts/voyager/default.nix index e9d1316..7c6d552 100644 --- a/hosts/voyager/default.nix +++ b/hosts/voyager/default.nix @@ -37,47 +37,7 @@ sound.enable = true; bluetooth.enable = true; - impermanence = { - root = { - enable = true; - - # Some people use /nix/persist/system for this, leaving persistent files in /nix subvolume - # I much prefer using a standalone subvolume for this though. - persistentMountPoint = "/persist"; - - extraDirectories = [ - "/var/log" - ]; - }; - - home = { - enable = true; - persistentMountPoint = "/persist/home"; - extraDirectories = [ - "Downloads" - "Personal" - "Media" - "dots" - - ".local/share/gnupg" - ".local/share/wakatime" - ".local/share/nvim" - ".local/state/nvim" - ".local/share/zsh" - ".local/cargo" - ".local/go" - ]; - extraFiles = [ - ".config/git/git-credentials" - ]; - }; - - # Configure automatic root subvolume wiping on boot from initrd - autoWipeBtrfs = { - enable = true; - devices."/dev/disk/by-label/NIXOS-FS".subvolumes = [ "root" ]; - }; - }; + # TODO: Impermanence }; device = { diff --git a/hosts/voyager/hardware-configuration.nix b/hosts/voyager/hardware-configuration.nix index 9a3901a..08dbecf 100644 --- a/hosts/voyager/hardware-configuration.nix +++ b/hosts/voyager/hardware-configuration.nix @@ -34,6 +34,12 @@ neededForBoot = true; }; + fileSystems."/home" = + { device = "/dev/disk/by-label/NIXOS-FS"; + fsType = "btrfs"; + options = [ "subvol=home" "noatime" "compress=zstd:3" ]; + }; + fileSystems."/data" = { device = "/dev/disk/by-label/NIXOS-FS"; fsType = "btrfs"; diff --git a/options/system/impermanence.nix b/options/system/impermanence.nix index ff50350..732f5da 100644 --- a/options/system/impermanence.nix +++ b/options/system/impermanence.nix @@ -34,47 +34,6 @@ in Path to a persistent directory (usually a mount point to a standalone partition / subvolume), which will hold the persistent system state files. - - This should point to the entire persistent partition, this setup - then expects this directory to contain `passwords` and `system` subdirectories. - ''; - }; - }; - - home = { - enable = mkEnableOption '' - the Impermanence module for persisting important state directories. - - This requires home-manager. - ''; - - extraFiles = mkOption { - default = []; - type = types.listOf types.str; - example = literalExpression ''[".zshrc"]''; - description = '' - Additional files in home to link to persistent storage. - ''; - }; - - extraDirectories = mkOption { - default = []; - type = types.listOf types.str; - example = literalExpression ''["Downloads"]''; - description = '' - Additional directories in home to link to persistent storage. - ''; - }; - - persistentMountPoint = mkOption { - default = "/persist/home"; - description = '' - Path to a persistent directory (usually a mount point to a - standalone partition / subvolume), which will hold the persistent - system state files. - - This does not expect any subdirectories, all of the persistent home files - will be put directly in here. The user should be the owner of this direcotry. ''; }; }; diff --git a/system/roles/workstation/programs/misc.nix b/system/roles/workstation/programs/misc.nix index db97a18..3c43b0b 100644 --- a/system/roles/workstation/programs/misc.nix +++ b/system/roles/workstation/programs/misc.nix @@ -16,9 +16,6 @@ in { # gnome's keyring manager seahorse.enable = true; - - # registry for linux (thanks to Gnome) - dconf.enable = true; }; }; } diff --git a/system/shared/impermanence/root.nix b/system/shared/impermanence/root.nix index 4633728..b24b053 100644 --- a/system/shared/impermanence/root.nix +++ b/system/shared/impermanence/root.nix @@ -32,9 +32,6 @@ in "/etc/nixos" # NixOS configuration source "/etc/NetworkManager/system-connections" # saved network connections "/var/db/sudo" # keeps track of who got the sudo lecture already - # "/var/log" # I sometimes use a subvolume for this, added manually if not - "/var/lib/nixos" - "/var/lib/bluetooth" "/var/lib/systemd/coredump" # captured coredumps ] ++ cfg.extraDirectories;