feat(tower01): Init
This commit is contained in:
parent
30daeb5edc
commit
8656a52afe
7 changed files with 194 additions and 0 deletions
17
machines/nixos/tower01/_configuration.nix
Normal file
17
machines/nixos/tower01/_configuration.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
# SPDX-FileCopyrightText: 2024 Elias Coppens <elias@dgnum.eu>
|
||||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
{ lib, ... }:
|
||||
|
||||
lib.extra.mkConfig {
|
||||
enabledModules = [ ];
|
||||
|
||||
enabledServices = [ ];
|
||||
|
||||
extraConfig = {
|
||||
services.netbird.enable = true;
|
||||
};
|
||||
|
||||
root = ./.;
|
||||
}
|
120
machines/nixos/tower01/_hardware-configuration.nix
Normal file
120
machines/nixos/tower01/_hardware-configuration.nix
Normal file
|
@ -0,0 +1,120 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"mpt3sas"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
|
||||
luks.devices = {
|
||||
rootfs01 = {
|
||||
device = "/dev/disk/by-label/rootfs01";
|
||||
keyFile = "/dev/zero";
|
||||
keyFileSize = 1;
|
||||
};
|
||||
rootfs02 = {
|
||||
device = "/dev/disk/by-label/rootfs02";
|
||||
keyFile = "/dev/zero";
|
||||
keyFileSize = 1;
|
||||
};
|
||||
slow0101 = {
|
||||
device = "/dev/disk/by-label/slow0101";
|
||||
keyFile = "/dev/zero";
|
||||
keyFileSize = 1;
|
||||
};
|
||||
slow0102 = {
|
||||
device = "/dev/disk/by-label/slow0102";
|
||||
keyFile = "/dev/zero";
|
||||
keyFileSize = 1;
|
||||
};
|
||||
slow0201 = {
|
||||
device = "/dev/disk/by-label/slow0201";
|
||||
keyFile = "/dev/zero";
|
||||
keyFileSize = 1;
|
||||
};
|
||||
slow0202 = {
|
||||
device = "/dev/disk/by-label/slow0202";
|
||||
keyFile = "/dev/zero";
|
||||
keyFileSize = 1;
|
||||
};
|
||||
slow0301 = {
|
||||
device = "/dev/disk/by-label/slow0301";
|
||||
keyFile = "/dev/zero";
|
||||
keyFileSize = 1;
|
||||
};
|
||||
slow0302 = {
|
||||
device = "/dev/disk/by-label/slow0302";
|
||||
keyFile = "/dev/zero";
|
||||
keyFileSize = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "rootfs";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
# boot1 = boot partition (primary)
|
||||
# boot2 = boot partition (backup)
|
||||
|
||||
"/boot1" = {
|
||||
device = "/dev/disk/by-uuid/1965-5D59";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
"/boot2" = {
|
||||
device = "/dev/disk/by-uuid/19C4-49E1";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
device = "rootfs/nix";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
"/var" = {
|
||||
device = "rootfs/var";
|
||||
fsType = "zfs";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/7614fa12-c6a7-456e-9620-eb9c0e025140"; }
|
||||
{ device = "/dev/disk/by-uuid/eb0aef44-b264-4f94-b847-3ad5dcc19ffd"; }
|
||||
];
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
7
machines/nixos/tower01/secrets/secrets.nix
Normal file
7
machines/nixos/tower01/secrets/secrets.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
# SPDX-FileCopyrightText: 2024 La Délégation Générale Numérique <context@dgnum.eu>
|
||||
#
|
||||
# SPDX-License-Identifer: EUPL-1.2
|
||||
|
||||
(import ../../../../keys).mkSecrets [ "tower01" ] [
|
||||
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue