diff options
author | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
commit | 060a8f28fa1fc648bdf66afb31a5d1efac868837 (patch) | |
tree | 2b354eacc7897365ee45244fe7a51720e0d0333f /makefu/2configs/fs | |
parent | cbfcc890e3b76d942b927809bf981a5fa7289e6a (diff) |
makefu: move out to own repo, add vacation-note
Diffstat (limited to 'makefu/2configs/fs')
-rw-r--r-- | makefu/2configs/fs/CAC-CentOS-7-64bit.nix | 20 | ||||
-rw-r--r-- | makefu/2configs/fs/cac-boot-partition.nix | 20 | ||||
-rw-r--r-- | makefu/2configs/fs/sda-crypto-root-home.nix | 49 | ||||
-rw-r--r-- | makefu/2configs/fs/sda-crypto-root.nix | 34 | ||||
-rw-r--r-- | makefu/2configs/fs/simple-swap.nix | 11 | ||||
-rw-r--r-- | makefu/2configs/fs/single-partition-ext4.nix | 12 | ||||
-rw-r--r-- | makefu/2configs/fs/vm-single-partition.nix | 11 |
7 files changed, 0 insertions, 157 deletions
diff --git a/makefu/2configs/fs/CAC-CentOS-7-64bit.nix b/makefu/2configs/fs/CAC-CentOS-7-64bit.nix deleted file mode 100644 index c9eb97f44..000000000 --- a/makefu/2configs/fs/CAC-CentOS-7-64bit.nix +++ /dev/null @@ -1,20 +0,0 @@ -_: - -{ - boot.loader.grub = { - device = "/dev/sda"; - }; - fileSystems = { - "/" = { - device = "/dev/centos/root"; - fsType = "xfs"; - }; - "/boot" = { - device = "/dev/sda1"; - fsType = "xfs"; - }; - }; - swapDevices = [ - { device = "/dev/centos/swap"; } - ]; -} diff --git a/makefu/2configs/fs/cac-boot-partition.nix b/makefu/2configs/fs/cac-boot-partition.nix deleted file mode 100644 index 14480bc4a..000000000 --- a/makefu/2configs/fs/cac-boot-partition.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -# vda1 ext4 (label nixos) -> only root partition -{ - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - boot.loader.grub.device = "/dev/sda"; - - fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - }; - fileSystems."/boot" = { - device = "/dev/disk/by-label/boot"; - fsType = "ext4"; - }; - - hardware.enableRedistributableFirmware = true; - nixpkgs.config.allowUnfree = true; -} diff --git a/makefu/2configs/fs/sda-crypto-root-home.nix b/makefu/2configs/fs/sda-crypto-root-home.nix deleted file mode 100644 index 4f0cf8c6b..000000000 --- a/makefu/2configs/fs/sda-crypto-root-home.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ config, lib, pkgs, ... }: - -# ssd # -# sda: bootloader grub2 -# sda1: boot ext4 (label nixboot) -# sda2: cryptoluks -> -# lvm: -# / (main-root) -# /home (main-home) - -# clean the boot sector: -# dd if=/dev/zero of=/dev/sda count=2048 -# Installation Instruction on ISO: -# fdisk /dev/sda - # boot 500M - # rest rest -# cryptsetup luksFormat /dev/sda2 -# mkfs.ext4 -L nixboot /dev/sda1 -# cryptsetup luksOpen /dev/sda2 cryptoluks -# pvcreate /dev/mapper/cryptoluks -# vgcreate main /dev/mapper/cryptoluks -# lvcreate -L 200Gib main -n root -# lvcreate -L 800Gib main -n home -# mkfs.ext4 /dev/main/root -# mkfs.ext4 /dev/main/home -# mount /dev/mapper/main-root /mnt -# mkdir -p /mnt/{boot,home,var/src} /var/src -# mount /dev/sda1 /mnt/boot -# mount /dev/mapper/main-home /mnt/home -# touch /mnt/var/src/.populate -# mount -o bind /mnt/var/src /var/src -# nix-channel --add https://nixos.org/channels/nixos-19.03 nixpkgs && # nix-channel --update -# nix-env -iA nixpkgs.gitMinimal -# (on deploy-host) $(nix-build ~/stockholm/makefu/krops.nix --no-out-link --argstr name x --argstr target 10.42.22.91 -A deploy --show-trace) -# NIXOS_CONFIG=/var/src/nixos-config nixos-install -I /var/src --no-root-passwd --no-channel-copy -{ - - imports = [ - ./sda-crypto-root.nix # configures crypto + boot - ]; - fileSystems = { - "/".device = lib.mkForce "/dev/mapper/main-root"; - "/home" = { - device = "/dev/mapper/main-home"; - fsType = "ext4"; - options = [ "defaults" "discard" ]; - }; - }; -} diff --git a/makefu/2configs/fs/sda-crypto-root.nix b/makefu/2configs/fs/sda-crypto-root.nix deleted file mode 100644 index 54ee9f9e5..000000000 --- a/makefu/2configs/fs/sda-crypto-root.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, lib, pkgs, ... }: - -# sda: bootloader grub2 -# sda1: boot ext4 (label nixboot) - must be unlocked on boot if required: - # boot.initrd.luks.devices = [ { name = "luksroot"; device = "/dev/sda2"; allowDiscards=true; }]; -# sda2: cryptoluks -> ext4 - -# fdisk /dev/sda - # boot 500M - # rest rest -# cryptsetup luksFormat /dev/sda2 -# mkfs.ext4 -L nixboot /dev/sda1 -{ - boot = { - loader.grub.enable = true; - loader.grub.version = 2; - loader.grub.device = lib.mkDefault "/dev/sda"; - - #initrd.luks.cryptoModules = ["aes" "sha512" "sha1" "xts" ]; - initrd.availableKernelModules = ["cbc" "hmac" "sha256" "rng" "aes" "encrypted_keys" "xhci_hcd" "ehci_pci" "ahci" "usb_storage" ]; - }; - fileSystems = { - "/" = { - device = "/dev/mapper/luksroot"; - fsType = "ext4"; - options = [ "defaults" "discard" ]; - }; - "/boot" = { - device = "/dev/disk/by-label/nixboot"; - fsType = "ext4"; - options = [ "defaults" "discard" ]; - }; - }; -} diff --git a/makefu/2configs/fs/simple-swap.nix b/makefu/2configs/fs/simple-swap.nix deleted file mode 100644 index 8c161b287..000000000 --- a/makefu/2configs/fs/simple-swap.nix +++ /dev/null @@ -1,11 +0,0 @@ -_: -{ - # do not swap that often - boot.kernel.sysctl = { - "vm.swappiness" = 25; - }; - - swapDevices = [ - { device = "/dev/disk/by-label/swap"; } - ]; -} diff --git a/makefu/2configs/fs/single-partition-ext4.nix b/makefu/2configs/fs/single-partition-ext4.nix deleted file mode 100644 index 1655556a5..000000000 --- a/makefu/2configs/fs/single-partition-ext4.nix +++ /dev/null @@ -1,12 +0,0 @@ -{config, ...}: -{ - # fdisk /dev/sda - # mkfs.ext4 -L nixos /dev/sda1 - 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 deleted file mode 100644 index 26908c357..000000000 --- a/makefu/2configs/fs/vm-single-partition.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, lib, pkgs, ... }: - -# vda1 ext4 (label nixos) -> only root partition -with import <stockholm/lib>; -{ - imports = [ - ./single-partition-ext4.nix - ]; - boot.loader.grub.device = "/dev/vda"; - -} |