This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

machines hilum: update with new stick

+43 -71
+36 -27
machines/hilum/disk.nix
··· 1 - { lib, disk, keyFile, ... }: 1 + { ... }: 2 2 { 3 - disk = { 3 + disko.devices.disk = { 4 4 main = { 5 5 type = "disk"; 6 - device = disk; 6 + device = "/dev/disk/by-id/usb-Kingston_DataTraveler_Max_BFB8357EA7B1718B0070-0:0"; 7 7 content = { 8 - type = "table"; 9 - format = "gpt"; 10 - partitions = [ 11 - { 12 - name = "boot"; 13 - start = "0"; 14 - end = "1M"; 15 - flags = ["bios_grub"]; 16 - } 17 - { 18 - name = "ESP"; 19 - start = "1M"; 20 - end = "50%"; 21 - bootable = true; 8 + type = "gpt"; 9 + partitions = { 10 + MBR = { 11 + size = "1M"; 12 + type = "EF02"; 13 + priority = 1; 14 + }; 15 + DATA = { 16 + size = "100G"; 17 + type = "8300"; # not sure if correct type 18 + priority = 2; 19 + content = { 20 + type = "filesystem"; 21 + format = "exfat"; 22 + }; 23 + }; 24 + boot = { 25 + size = "25G"; 26 + type = "EF00"; 27 + priority = 3; 22 28 content = { 23 29 type = "filesystem"; 24 30 format = "vfat"; 25 31 mountpoint = "/boot"; 26 32 }; 27 - } 28 - { 29 - name = "root"; 30 - start = "50%"; 31 - end = "100%"; 33 + }; 34 + root = { 35 + size = "100%"; 36 + priority = 4; 32 37 content = { 33 - type = "filesystem"; 34 - format = "ext4"; 35 - mountpoint = "/"; 38 + type = "luks"; 39 + name = "hilum"; 40 + content = { 41 + type = "filesystem"; 42 + format = "ext4"; 43 + mountpoint = "/"; 44 + }; 36 45 }; 37 - } 38 - ]; 46 + }; 47 + }; 39 48 }; 40 49 }; 41 50 };
-43
machines/hilum/flash-stick.sh
··· 1 - #!/bin/sh 2 - set -efux 3 - 4 - disk=$1 5 - 6 - cd "$(dirname "$0")" 7 - export NIXPKGS_ALLOW_UNFREE=1 8 - (umask 077; pass show admin/hilum/luks > /tmp/hilum.luks) 9 - trap 'rm -f /tmp/hilum.luks' EXIT 10 - echo "$disk" > /tmp/hilum-disk 11 - trap 'rm -f /tmp/hilum-disk' EXIT 12 - 13 - stockholm_root=$(git rev-parse --show-toplevel) 14 - ssh root@localhost -t -- $(nix-build \ 15 - --no-out-link \ 16 - -I nixpkgs=/var/src/nixpkgs \ 17 - -I stockholm="$stockholm_root" \ 18 - -I secrets="$stockholm_root"/lass/2configs/tests/dummy-secrets \ 19 - -E "with import <nixpkgs> {}; (pkgs.nixos [ 20 - { 21 - luksPassFile = \"/tmp/hilum.luks\"; 22 - mainDisk = \"$disk\"; 23 - disko.rootMountPoint = \"/mnt/hilum\"; 24 - } 25 - ./physical.nix 26 - ]).disko" 27 - ) 28 - rm -f /tmp/hilum.luks 29 - $(nix-build \ 30 - --no-out-link \ 31 - -I nixpkgs=/var/src/nixpkgs \ 32 - "$stockholm_root"/lass/krops.nix -A populate \ 33 - --argstr name hilum \ 34 - --argstr target "root@localhost/mnt/hilum/var/src" \ 35 - --arg force true 36 - ) 37 - ssh root@localhost << SSH 38 - set -efux 39 - mkdir -p /mnt/hilum/etc 40 - NIXOS_CONFIG=/mnt/hilum/var/src/nixos-config nixos-install --no-bootloader --no-root-password --root /mnt/hilum -I /var/src 41 - nixos-enter --root /mnt/hilum -- nixos-rebuild -I /var/src switch --install-bootloader 42 - umount -Rv /mnt/hilum 43 - SSH
+7 -1
machines/hilum/physical.nix
··· 1 - { self, modulesPath, config, lib, pkgs, ... }: 1 + { self, modulesPath, lib, ... }: 2 2 3 3 { 4 4 imports = [ 5 + self.inputs.disko.nixosModules.disko 6 + ./disk.nix 5 7 ./config.nix 6 8 (modulesPath + "/installer/scan/not-detected.nix") 7 9 ]; ··· 10 12 boot.initrd.kernelModules = [ "dm-snapshot" ]; 11 13 boot.kernelModules = [ "kvm-intel" ]; 12 14 boot.extraModulePackages = [ ]; 15 + boot.loader.grub = { 16 + efiSupport = true; 17 + efiInstallAsRemovable = true; 18 + }; 13 19 14 20 swapDevices = [ ]; 15 21