chore(hosts/backstage): cleanup
This commit is contained in:
parent
e9a7e56e02
commit
f853cb93f1
5 changed files with 57 additions and 56 deletions
45
hosts/backstage/boot.nix
Normal file
45
hosts/backstage/boot.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{config, lib, ...}:
|
||||||
|
{
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi = {
|
||||||
|
canTouchEfiVariables = true;
|
||||||
|
efiSysMountPoint = "/boot/efi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
initrd = {
|
||||||
|
network = {
|
||||||
|
enable = true;
|
||||||
|
ssh = {
|
||||||
|
enable = true;
|
||||||
|
port = 22;
|
||||||
|
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
|
||||||
|
hostKeys = [
|
||||||
|
"/boot/efi/initrd_id_ed25519"
|
||||||
|
"/boot/efi/initrd_id_rsa4096"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
network = config.systemd.network;
|
||||||
|
targets.initrd.wants = [
|
||||||
|
"systemd-networkd-wait-online@enp1s0.service"
|
||||||
|
];
|
||||||
|
users.root.shell = "/bin/systemd-tty-ask-password-agent";
|
||||||
|
};
|
||||||
|
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "virtio_pci" "r8169" ];
|
||||||
|
kernelModules = [ "dm-snapshot" ];
|
||||||
|
luks.devices."backstage" = {
|
||||||
|
preLVM = true;
|
||||||
|
device = "/dev/disk/by-uuid/7f3ccd2d-8022-491e-baa1-675805919fd7";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kernelModules = [ "kvm-intel" ];
|
||||||
|
kernelParams = [
|
||||||
|
"zfs.zfs_arc_max=1024000000"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -6,45 +6,6 @@
|
||||||
../../services/sshd
|
../../services/sshd
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
efi = {
|
|
||||||
canTouchEfiVariables = true;
|
|
||||||
efiSysMountPoint = "/boot/efi";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
initrd = {
|
|
||||||
network = {
|
|
||||||
enable = true;
|
|
||||||
ssh = {
|
|
||||||
enable = true;
|
|
||||||
port = 22;
|
|
||||||
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
|
|
||||||
hostKeys = [
|
|
||||||
"/boot/efi/initrd_id_ed25519"
|
|
||||||
"/boot/efi/initrd_id_rsa4096"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd = {
|
|
||||||
enable = true;
|
|
||||||
network = {
|
|
||||||
enable = true;
|
|
||||||
networks."10-dhcp" = {
|
|
||||||
matchConfig.Name = "enp1s0";
|
|
||||||
DHCP = "yes";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
targets.initrd.wants = [
|
|
||||||
"systemd-networkd-wait-online@enp1s0.service"
|
|
||||||
];
|
|
||||||
users.root.shell = "/bin/systemd-tty-ask-password-agent";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,6 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./network.nix
|
./network.nix
|
||||||
|
./boot.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,21 +5,6 @@
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
|
||||||
initrd = {
|
|
||||||
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "virtio_pci" "r8169" ];
|
|
||||||
kernelModules = [ "dm-snapshot" ];
|
|
||||||
luks.devices."backstage" = {
|
|
||||||
preLVM = true;
|
|
||||||
device = "/dev/disk/by-uuid/7f3ccd2d-8022-491e-baa1-675805919fd7";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
kernelModules = [ "kvm-intel" ];
|
|
||||||
kernelParams = [
|
|
||||||
"zfs.zfs_arc_max=1024000000"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "zpool/root";
|
{ device = "zpool/root";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
|
|
|
@ -1,10 +1,19 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
useNetworkd = true;
|
useNetworkd = true;
|
||||||
useDHCP = lib.mkDefault true;
|
|
||||||
hostName = "backstage";
|
hostName = "backstage";
|
||||||
hostId = "0ccd2304";
|
hostId = "0ccd2304";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.network = {
|
||||||
|
enable = true;
|
||||||
|
networks = {
|
||||||
|
"enp1s0" = {
|
||||||
|
matchConfig.Name = "enp1s0";
|
||||||
|
DHCP = "yes";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue