diff --git a/nixos/hosts/flandre-m5p/disko-fs.nix b/nixos/hosts/flandre-m5p/disko-fs.nix deleted file mode 100644 index 3804dc2..0000000 --- a/nixos/hosts/flandre-m5p/disko-fs.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - environment.globalPersistence = { - enable = true; - root = "/persist"; - }; -} diff --git a/nixos/hosts/kanako-hkg0/disko-fs.nix b/nixos/hosts/kanako-hkg0/disko-fs.nix deleted file mode 100644 index 3804dc2..0000000 --- a/nixos/hosts/kanako-hkg0/disko-fs.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - environment.globalPersistence = { - enable = true; - root = "/persist"; - }; -} diff --git a/nixos/hosts/marisa-7d76/disko-fs.nix b/nixos/hosts/marisa-7d76/disko-fs.nix deleted file mode 100644 index 58bc124..0000000 --- a/nixos/hosts/marisa-7d76/disko-fs.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: -{ - environment.globalPersistence = { - enable = true; - root = "/persist"; - }; -} diff --git a/nixos/hosts/marisa-a7s/disko-fs.nix b/nixos/hosts/marisa-a7s/disko-fs.nix deleted file mode 100644 index 3804dc2..0000000 --- a/nixos/hosts/marisa-a7s/disko-fs.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - environment.globalPersistence = { - enable = true; - root = "/persist"; - }; -} diff --git a/nixos/hosts/reisen-fra0/disko-fs.nix b/nixos/hosts/reisen-fra0/disko-fs.nix deleted file mode 100644 index 3804dc2..0000000 --- a/nixos/hosts/reisen-fra0/disko-fs.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - environment.globalPersistence = { - enable = true; - root = "/persist"; - }; -} diff --git a/nixos/hosts/reisen-nrt0/disko-fs.nix b/nixos/hosts/reisen-nrt0/disko-fs.nix deleted file mode 100644 index 3804dc2..0000000 --- a/nixos/hosts/reisen-nrt0/disko-fs.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - environment.globalPersistence = { - enable = true; - root = "/persist"; - }; -} diff --git a/nixos/hosts/reisen-sea0/disko-fs.nix b/nixos/hosts/reisen-sea0/disko-fs.nix deleted file mode 100644 index 3804dc2..0000000 --- a/nixos/hosts/reisen-sea0/disko-fs.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - environment.globalPersistence = { - enable = true; - root = "/persist"; - }; -} diff --git a/nixos/hosts/reisen-sin0/disko-fs.nix b/nixos/hosts/reisen-sin0/disko-fs.nix deleted file mode 100644 index 3804dc2..0000000 --- a/nixos/hosts/reisen-sin0/disko-fs.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - environment.globalPersistence = { - enable = true; - root = "/persist"; - }; -} diff --git a/nixos/hosts/suwako-vie0/disko-fs.nix b/nixos/hosts/suwako-vie0/disko-fs.nix deleted file mode 100644 index 3804dc2..0000000 --- a/nixos/hosts/suwako-vie0/disko-fs.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - environment.globalPersistence = { - enable = true; - root = "/persist"; - }; -} diff --git a/nixos/profiles/system/global-persistence.nix b/nixos/profiles/system/global-persistence.nix index 946fe45..d11e5cb 100644 --- a/nixos/profiles/system/global-persistence.nix +++ b/nixos/profiles/system/global-persistence.nix @@ -1,6 +1,17 @@ -{ ... }: +{ config, ... }: { + assertions = [ + { + assertion = config.fileSystems ? "/persist"; + message = '' + `config.fileSystems."/persist"` must be set. + ''; + } + ]; + environment.globalPersistence = { + enable = true; + root = "/persist"; directories = [ "/var/cache" "/var/lib"