diff --git a/clients/quadraticserver/disko.nix b/clients/quadraticserver/disko.nix deleted file mode 100644 index 3b6e713..0000000 --- a/clients/quadraticserver/disko.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - inputs, - lib, -}: { - imports = [inputs.disko.nixosModules.disko]; - disko.devices = { - disk.disk1 = { - device = lib.mkDefault "/dev/sda"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - boot = { - name = "boot"; - size = "1M"; - type = "EF02"; - }; - esp = { - name = "ESP"; - size = "500M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - name = "root"; - size = "100%"; - content = { - type = "lvm_pv"; - vg = "pool"; - }; - }; - }; - }; - }; - lvm_vg = { - pool = { - type = "lvm_vg"; - lvs = { - root = { - size = "100%FREE"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - mountOptions = [ - "defaults" - ]; - }; - }; - }; - }; - }; - }; -} diff --git a/modules/common/run0.nix b/modules/desktop/run0.nix similarity index 82% rename from modules/common/run0.nix rename to modules/desktop/run0.nix index 91dd9da..1811a7b 100644 --- a/modules/common/run0.nix +++ b/modules/desktop/run0.nix @@ -1,4 +1,5 @@ { + # TODO: Server too security = { polkit.persistentAuthentication = true; run0-sudo-shim.enable = true; diff --git a/modules/server/boot.nix b/modules/server/boot.nix new file mode 100644 index 0000000..6e4260e --- /dev/null +++ b/modules/server/boot.nix @@ -0,0 +1,8 @@ +{modulesPath, ...}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix")]; + boot.loader.grub = { + enable = true; + efiSupport = true; + efiInstallAsRemovable = true; + }; +} diff --git a/modules/server/disko.nix b/modules/server/disko.nix new file mode 100644 index 0000000..b9e2160 --- /dev/null +++ b/modules/server/disko.nix @@ -0,0 +1,34 @@ +{inputs, ...}: { + imports = [inputs.disko.nixosModules.disko]; + disko.devices.disk.main = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; # for grub MBR + }; + ESP = { + size = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = ["umask=0077"]; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; +}