summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/fs
diff options
context:
space:
mode:
Diffstat (limited to 'makefu/2configs/fs')
-rw-r--r--makefu/2configs/fs/cac-boot-partition.nix2
-rw-r--r--makefu/2configs/fs/sda-crypto-root.nix4
-rw-r--r--makefu/2configs/fs/single-partition-ext4.nix10
-rw-r--r--makefu/2configs/fs/vm-single-partition.nix15
4 files changed, 15 insertions, 16 deletions
diff --git a/makefu/2configs/fs/cac-boot-partition.nix b/makefu/2configs/fs/cac-boot-partition.nix
index fdf4b89d8..cec004582 100644
--- a/makefu/2configs/fs/cac-boot-partition.nix
+++ b/makefu/2configs/fs/cac-boot-partition.nix
@@ -18,6 +18,4 @@ with lib;
hardware.enableAllFirmware = true;
nixpkgs.config.allowUnfree = true;
- hardware.cpu.amd.updateMicrocode = true;
-
}
diff --git a/makefu/2configs/fs/sda-crypto-root.nix b/makefu/2configs/fs/sda-crypto-root.nix
index 54db87547..2bfe26960 100644
--- a/makefu/2configs/fs/sda-crypto-root.nix
+++ b/makefu/2configs/fs/sda-crypto-root.nix
@@ -6,8 +6,8 @@
with lib;
{
boot = {
- loader.grub.enable =true;
- loader.grub.version =2;
+ loader.grub.enable = true;
+ loader.grub.version = 2;
loader.grub.device = "/dev/sda";
initrd.luks.devices = [ { name = "luksroot"; device = "/dev/sda2"; allowDiscards=true; }];
diff --git a/makefu/2configs/fs/single-partition-ext4.nix b/makefu/2configs/fs/single-partition-ext4.nix
new file mode 100644
index 000000000..1970c949f
--- /dev/null
+++ b/makefu/2configs/fs/single-partition-ext4.nix
@@ -0,0 +1,10 @@
+{config, ...}:
+{
+ boot.loader.grub.enable = assert config.boot.loader.grub.device != ""; true;
+ boot.loader.grub.version = 2;
+
+ fileSystems."/" = {
+ device = "/dev/disk/by-label/nixos";
+ fsType = "ext4";
+ };
+}
diff --git a/makefu/2configs/fs/vm-single-partition.nix b/makefu/2configs/fs/vm-single-partition.nix
index 78a5e7175..27e28cb68 100644
--- a/makefu/2configs/fs/vm-single-partition.nix
+++ b/makefu/2configs/fs/vm-single-partition.nix
@@ -3,18 +3,9 @@
# vda1 ext4 (label nixos) -> only root partition
with lib;
{
- boot.loader.grub.enable = true;
- boot.loader.grub.version = 2;
+ imports = [
+ ./single-partition-ext4.nix
+ ];
boot.loader.grub.device = "/dev/vda";
- fileSystems."/" = {
- device = "/dev/disk/by-label/nixos";
- fsType = "ext4";
- };
-
- hardware.enableAllFirmware = true;
- nixpkgs.config.allowUnfree = true;
- hardware.cpu.amd.updateMicrocode = true;
-
-
}