diff options
author | tzlil <tzlils@protonmail.com> | 2023-07-30 05:04:25 +0300 |
---|---|---|
committer | tzlil <tzlils@protonmail.com> | 2023-07-30 05:04:25 +0300 |
commit | 7a64b105f9f851b0c92e6a406c939f1ceec3e6a1 (patch) | |
tree | f3c68fb2824bfe7ad3071871a375360801c258f6 | |
parent | 5a956add3f59715b9cf43a044abfabce4ca6382f (diff) |
fix mounts
-rw-r--r-- | hosts/default.nix | 4 | ||||
-rw-r--r-- | hosts/navi/default.nix | 4 | ||||
-rw-r--r-- | hosts/navi/hardware-configuration.nix | 1 | ||||
-rw-r--r-- | mixins/syncthing.nix | 14 | ||||
-rw-r--r-- | profiles/default.nix | 8 | ||||
-rw-r--r-- | profiles/impermanence.nix | 38 |
6 files changed, 29 insertions, 40 deletions
diff --git a/hosts/default.nix b/hosts/default.nix index 3d181bb..164030c 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -6,11 +6,11 @@ inputs: let ../profiles/tzlil.nix ../profiles/security.nix ../profiles/ssh.nix - ../profiles/network.nix + ../profiles/network.nix + ../profiles/impermanence.nix ]; } inputs.agenix.nixosModules.age - inputs.impermanence.nixosModules.impermanence ]; commonHome = [ diff --git a/hosts/navi/default.nix b/hosts/navi/default.nix index a0ebd95..497f5f7 100644 --- a/hosts/navi/default.nix +++ b/hosts/navi/default.nix @@ -45,7 +45,7 @@ time.timeZone = lib.mkDefault "Israel"; -/* + /* fileSystems."/" = { device = "none"; fsType = "tmpfs"; @@ -62,7 +62,7 @@ device = "/dev/disk/by-uuid/8a8cc550-034e-4545-a958-564779f51061"; fsType = "btrfs"; }; -*/ + */ zramSwap = { enable = true; algorithm = "zstd"; diff --git a/hosts/navi/hardware-configuration.nix b/hosts/navi/hardware-configuration.nix index 5eef790..7b24c68 100644 --- a/hosts/navi/hardware-configuration.nix +++ b/hosts/navi/hardware-configuration.nix @@ -23,7 +23,6 @@ in { hardware.bluetooth.enable = true; - disko.devices = { disk.${baseNameOf device} = { inherit device; diff --git a/mixins/syncthing.nix b/mixins/syncthing.nix index 69cdba9..18b8f78 100644 --- a/mixins/syncthing.nix +++ b/mixins/syncthing.nix @@ -12,14 +12,14 @@ overrideDevices = true; overrideFolders = true; #settings = { - devices = { - "phone" = {id = "UHWVTEZ-BERNFCH-3ZXQHNE-ZRBHLU6-MBAVEHB-TKLQJM7-ZGHLJ4R-6E4SAA7";}; + devices = { + "phone" = {id = "UHWVTEZ-BERNFCH-3ZXQHNE-ZRBHLU6-MBAVEHB-TKLQJM7-ZGHLJ4R-6E4SAA7";}; + }; + folders = { + "passwords" = { + path = "/home/tzlil/sync/passwords"; + devices = ["phone"]; }; - folders = { - "passwords" = { - path = "/home/tzlil/sync/passwords"; - devices = ["phone"]; - }; #}; }; }; diff --git a/profiles/default.nix b/profiles/default.nix deleted file mode 100644 index 77921b6..0000000 --- a/profiles/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{inputs, ...}: { - flake.nixosModules = { - nix = import ./nix.nix {inherit inputs;}; - security = ./security.nix; - tzlil = ./tzlil.nix; - ssh = ./ssh.nix; - }; -} diff --git a/profiles/impermanence.nix b/profiles/impermanence.nix index e325405..d4034a3 100644 --- a/profiles/impermanence.nix +++ b/profiles/impermanence.nix @@ -1,29 +1,27 @@ -{inputs, ...}: { +{inputs, config, lib, options, ... }: let - sshHostKeys = builtins.catAttrs "path" ["/etc/ssh/ssh_host_ed25519_key"]; + sshHostKeys = ["/etc/ssh/ssh_host_ed25519_key" "/etc/ssh/ssh_host_rsa_key"]; in { imports = [inputs.impermanence.nixosModules.impermanence]; - config = lib.mkMerge [ - { - environment.persistence."/nix/persistent" = { - hideMounts = true; - directories = [ - "/var/log" - "/var/lib/systemd/coredump" - "/tmp" # Make builds not crash by running them on disk instead of RAM (We still clean /tmp on boot) - ]; - files = - [ - "/etc/machine-id" - ] - ++ sshHostKeys; - }; - } - (lib.optionalAttrs (options ? age) {age.identityPaths = map (x: "/nix/persistent" + x) sshHostKeys;}) - ]; + config = { + environment.persistence."/nix/persistent" = { + hideMounts = true; + directories = [ + "/var/log" + "/var/lib/systemd/coredump" + "/tmp" # Make builds not crash by running them on disk instead of RAM (We still clean /tmp on boot) + ]; + files = + [ + "/etc/machine-id" + ] + ++ sshHostKeys; + }; + age.identityPaths = (map (x: "/nix/persistent" + x) sshHostKeys); + }; } |