Compare commits
2 Commits
a96b8f65c9
...
better-wor
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52824e39ee | ||
|
|
8793120436 |
@@ -1,15 +0,0 @@
|
|||||||
name: "Evaluate Hydra Jobs"
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
jobs:
|
|
||||||
eval-hydra-jobs:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install dependencies for Nix setup action
|
|
||||||
run: |
|
|
||||||
apt update -y
|
|
||||||
apt install sudo -y
|
|
||||||
- uses: cachix/install-nix-action@v27
|
|
||||||
- run: nix eval --no-update-lock-file --accept-flake-config .\#hydraJobs
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
name: "Check flake syntax"
|
name: "Check flake syntax"
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
push:
|
push:
|
||||||
jobs:
|
jobs:
|
||||||
flake-check:
|
flake-check:
|
||||||
@@ -11,5 +10,5 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install sudo -y
|
apt install sudo -y
|
||||||
- uses: cachix/install-nix-action@v27
|
- uses: cachix/install-nix-action@v30
|
||||||
- run: nix flake check --no-update-lock-file --accept-flake-config .
|
- run: nix flake check --no-update-lock-file --accept-flake-config .
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ in
|
|||||||
|
|
||||||
malobeo.disks = {
|
malobeo.disks = {
|
||||||
enable = true;
|
enable = true;
|
||||||
legacy = true;
|
|
||||||
hostId = "a3c3102f";
|
hostId = "a3c3102f";
|
||||||
root = {
|
root = {
|
||||||
disk0 = "disk/by-id/ata-HITACHI_HTS725016A9A364_110308PCKB04VNHX9XTJ";
|
disk0 = "disk/by-id/ata-HITACHI_HTS725016A9A364_110308PCKB04VNHX9XTJ";
|
||||||
@@ -34,7 +33,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
malobeo.initssh = {
|
malobeo.initssh = {
|
||||||
enable = false;
|
enable = true;
|
||||||
|
authorizedKeys = sshKeys.admins;
|
||||||
|
ethernetDrivers = ["r8169"];
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.sane.enable = true; #scanner support
|
hardware.sane.enable = true; #scanner support
|
||||||
|
|||||||
@@ -20,11 +20,6 @@ in
|
|||||||
default = true;
|
default = true;
|
||||||
description = "Allows encryption to be disabled for testing";
|
description = "Allows encryption to be disabled for testing";
|
||||||
};
|
};
|
||||||
legacy = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable legacy boot (bios)";
|
|
||||||
};
|
|
||||||
devNodes = lib.mkOption {
|
devNodes = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "/dev/disk/by-id/";
|
default = "/dev/disk/by-id/";
|
||||||
@@ -86,25 +81,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkIf cfg.enable {
|
||||||
(lib.mkIf (cfg.enable && !cfg.legacy) {
|
|
||||||
boot = {
|
|
||||||
loader.systemd-boot.enable = true;
|
|
||||||
loader.efi.canTouchEfiVariables = true;
|
|
||||||
supportedFilesystems = [ "vfat" "zfs" ];
|
|
||||||
};
|
|
||||||
fileSystems."/boot".neededForBoot = true;
|
|
||||||
})
|
|
||||||
(lib.mkIf (cfg.enable && cfg.legacy) {
|
|
||||||
boot.loader.grub = {
|
|
||||||
enable = lib.mkForce true;
|
|
||||||
device = "/dev/${cfg.root.disk0}-part1";
|
|
||||||
efiSupport = false;
|
|
||||||
enableCryptodisk = cfg.encryption;
|
|
||||||
zfsSupport = true;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(lib.mkIf cfg.enable {
|
|
||||||
networking.hostId = cfg.hostId;
|
networking.hostId = cfg.hostId;
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = lib.mkMerge [
|
disk = lib.mkMerge [
|
||||||
@@ -115,7 +92,7 @@ in
|
|||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
ESP = lib.mkIf (!cfg.legacy) {
|
ESP = {
|
||||||
size = "1024M";
|
size = "1024M";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
content = {
|
content = {
|
||||||
@@ -125,10 +102,6 @@ in
|
|||||||
mountOptions = [ "umask=0077" ];
|
mountOptions = [ "umask=0077" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
boot = lib.mkIf cfg.legacy {
|
|
||||||
size = "1024M";
|
|
||||||
type = "EF02";
|
|
||||||
};
|
|
||||||
encryptedSwap = {
|
encryptedSwap = {
|
||||||
size = cfg.root.swap;
|
size = cfg.root.swap;
|
||||||
content = {
|
content = {
|
||||||
@@ -297,9 +270,9 @@ in
|
|||||||
|
|
||||||
fileSystems."/".neededForBoot = true;
|
fileSystems."/".neededForBoot = true;
|
||||||
fileSystems."/etc".neededForBoot = true;
|
fileSystems."/etc".neededForBoot = true;
|
||||||
|
fileSystems."/boot".neededForBoot = true;
|
||||||
fileSystems."/var".neededForBoot = true;
|
fileSystems."/var".neededForBoot = true;
|
||||||
fileSystems."/home".neededForBoot = true;
|
fileSystems."/home".neededForBoot = true;
|
||||||
fileSystems."/nix".neededForBoot = true;
|
fileSystems."/nix".neededForBoot = true;
|
||||||
})
|
};
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,9 +26,13 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) {
|
config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) {
|
||||||
boot = {
|
boot = {
|
||||||
|
loader.systemd-boot.enable = true;
|
||||||
|
loader.efi.canTouchEfiVariables = true;
|
||||||
|
supportedFilesystems = [ "vfat" "zfs" ];
|
||||||
zfs = {
|
zfs = {
|
||||||
forceImportAll = true;
|
forceImportAll = true;
|
||||||
requestEncryptionCredentials = true;
|
requestEncryptionCredentials = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = cfg.ethernetDrivers;
|
availableKernelModules = cfg.ethernetDrivers;
|
||||||
|
|||||||
Reference in New Issue
Block a user