summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hosts/eostre/default.nix3
-rw-r--r--hosts/surtr/default.nix7
-rw-r--r--hosts/vidhar/default.nix8
-rw-r--r--system-profiles/nfsroot.nix11
-rw-r--r--system-profiles/tmpfs-root.nix12
5 files changed, 19 insertions, 22 deletions
diff --git a/hosts/eostre/default.nix b/hosts/eostre/default.nix
index 4aa6473e..e20929b4 100644
--- a/hosts/eostre/default.nix
+++ b/hosts/eostre/default.nix
@@ -67,9 +67,6 @@ with lib;
67 zramSwap.enable = true; 67 zramSwap.enable = true;
68 68
69 system.stateVersion = config.system.nixos.release; # No state 69 system.stateVersion = config.system.nixos.release; # No state
70 security.sudo.extraConfig = ''
71 Defaults lecture = never
72 '';
73 70
74 71
75 time.timeZone = "Europe/Berlin"; 72 time.timeZone = "Europe/Berlin";
diff --git a/hosts/surtr/default.nix b/hosts/surtr/default.nix
index e031c9b3..92d0088c 100644
--- a/hosts/surtr/default.nix
+++ b/hosts/surtr/default.nix
@@ -1,7 +1,7 @@
1{ flake, pkgs, lib, ... }: 1{ flake, pkgs, lib, ... }:
2{ 2{
3 imports = with flake.nixosModules.systemProfiles; [ 3 imports = with flake.nixosModules.systemProfiles; [
4 qemu-guest openssh rebuild-machines zfs 4 tmpfs-root qemu-guest openssh rebuild-machines zfs
5 ./zfs.nix ./dns ./tls ./http ./bifrost ./matrix ./postgresql.nix ./prometheus ./email ./vpn 5 ./zfs.nix ./dns ./tls ./http ./bifrost ./matrix ./postgresql.nix ./prometheus ./email ./vpn
6 ]; 6 ];
7 7
@@ -30,11 +30,6 @@
30 }; 30 };
31 31
32 fileSystems = { 32 fileSystems = {
33 "/" = {
34 fsType = "tmpfs";
35 options = [ "mode=0755" ];
36 };
37
38 "/boot" = 33 "/boot" =
39 { device = "/dev/disk/by-label/boot"; 34 { device = "/dev/disk/by-label/boot";
40 fsType = "vfat"; 35 fsType = "vfat";
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix
index fc77f03c..2f86c368 100644
--- a/hosts/vidhar/default.nix
+++ b/hosts/vidhar/default.nix
@@ -5,6 +5,7 @@ with lib;
5{ 5{
6 imports = with flake.nixosModules.systemProfiles; [ 6 imports = with flake.nixosModules.systemProfiles; [
7 ./zfs.nix ./network ./samba.nix ./dns ./prometheus ./borg 7 ./zfs.nix ./network ./samba.nix ./dns ./prometheus ./borg
8 tmpfs-root
8 initrd-all-crypto-modules default-locale openssh rebuild-machines 9 initrd-all-crypto-modules default-locale openssh rebuild-machines
9 build-server 10 build-server
10 initrd-ssh 11 initrd-ssh
@@ -55,13 +56,6 @@ with lib;
55 }; 56 };
56 }; 57 };
57 58
58 fileSystems = {
59 "/" = {
60 fsType = "tmpfs";
61 options = [ "mode=0755" ];
62 };
63 };
64
65 services.timesyncd.enable = false; 59 services.timesyncd.enable = false;
66 services.chrony = { 60 services.chrony = {
67 enable = true; 61 enable = true;
diff --git a/system-profiles/nfsroot.nix b/system-profiles/nfsroot.nix
index 92cf98de..ab028de3 100644
--- a/system-profiles/nfsroot.nix
+++ b/system-profiles/nfsroot.nix
@@ -1,10 +1,14 @@
1{ config, pkgs, lib, flakeInputs, ... }: 1{ config, pkgs, lib, flake, flakeInputs, ... }:
2 2
3with lib; 3with lib;
4 4
5let 5let
6 cfg = config.nfsroot; 6 cfg = config.nfsroot;
7in { 7in {
8 imports = with flake.nixosModules.systemProfiles; [
9 tmpfs-root
10 ];
11
8 options = { 12 options = {
9 nfsroot = { 13 nfsroot = {
10 storeDevice = mkOption { 14 storeDevice = mkOption {
@@ -34,11 +38,6 @@ in {
34 then [] 38 then []
35 else [ pkgs.grub2 pkgs.syslinux ]); 39 else [ pkgs.grub2 pkgs.syslinux ]);
36 40
37 fileSystems."/" = mkImageMediaOverride
38 { fsType = "tmpfs";
39 options = [ "mode=0755" ];
40 };
41
42 # In stage 1, mount a tmpfs on top of /nix/store (the squashfs 41 # In stage 1, mount a tmpfs on top of /nix/store (the squashfs
43 # image) to make this a live CD. 42 # image) to make this a live CD.
44 fileSystems."/nix/.ro-store" = mkImageMediaOverride 43 fileSystems."/nix/.ro-store" = mkImageMediaOverride
diff --git a/system-profiles/tmpfs-root.nix b/system-profiles/tmpfs-root.nix
new file mode 100644
index 00000000..d0b3be76
--- /dev/null
+++ b/system-profiles/tmpfs-root.nix
@@ -0,0 +1,12 @@
1{ ... }: {
2 config = {
3 fileSystems."/" = {
4 fsType = "tmpfs";
5 options = [ "mode=0755" ];
6 };
7
8 security.sudo.extraConfig = ''
9 Defaults lecture = never
10 '';
11 };
12}