Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
36bc85d301 | |||
6373a30f95 | |||
ca77d2e0e9 | |||
f853cb93f1 |
7 changed files with 97 additions and 89 deletions
39
flake.lock
generated
39
flake.lock
generated
|
@ -18,6 +18,27 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixfiles-private": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745002185,
|
||||||
|
"narHash": "sha256-bdWS7dY1yUe+RfW9a3ySrorYq1S+pWJm4AE2J0yp3+I=",
|
||||||
|
"ref": "refs/tags/0.0.1",
|
||||||
|
"rev": "a0e92bad8feeb269f985a2d8112723bf5926528c",
|
||||||
|
"revCount": 2,
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://forgejo@git.werkraum-karlsruhe.org/WRK/nixfiles-private"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"ref": "refs/tags/0.0.1",
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://forgejo@git.werkraum-karlsruhe.org/WRK/nixfiles-private"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743420942,
|
"lastModified": 1743420942,
|
||||||
|
@ -36,18 +57,15 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743501102,
|
"lastModified": 1744533305,
|
||||||
"narHash": "sha256-7PCBQ4aGVF8OrzMkzqtYSKyoQuU2jtpPi4lmABpe5X4=",
|
"narHash": "sha256-56qCMHw9q2hkyh6qlbrTKTN102OfZPkXVI4YGLa5Wgc=",
|
||||||
"owner": "NixOS",
|
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
|
||||||
"repo": "nixpkgs",
|
"type": "tarball",
|
||||||
"rev": "02f2af8c8a8c3b2c05028936a1e84daefa1171d4",
|
"url": "https://releases.nixos.org/nixos/24.11/nixos-24.11.716947.26d499fc9f1d/nixexprs.tar.xz"
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"type": "tarball",
|
||||||
"ref": "nixos-24.11",
|
"url": "https://channels.nixos.org/nixos-24.11/nixexprs.tar.xz"
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
|
@ -68,6 +86,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
|
"nixfiles-private": "nixfiles-private",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
nixpkgs.url = "https://channels.nixos.org/nixos-24.11/nixexprs.tar.xz";
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
nixfiles-private = {
|
||||||
|
url = "git+ssh://forgejo@git.werkraum-karlsruhe.org/WRK/nixfiles-private?ref=refs/tags/0.0.1";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
|
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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,50 +1,12 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ inputs, config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
../../services/sshd
|
../../services/sshd
|
||||||
|
inputs.nixfiles-private.nixosModules.hosts.backstage
|
||||||
];
|
];
|
||||||
|
|
||||||
# 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";
|
||||||
|
|
||||||
|
@ -61,29 +23,12 @@
|
||||||
git
|
git
|
||||||
tmux
|
tmux
|
||||||
htop
|
htop
|
||||||
|
pciutils
|
||||||
|
lshw
|
||||||
|
ethtool
|
||||||
|
usbutils
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.root = {
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCnjrKWYc0bcIsTkdpyC+yAsxSeY9M1WxVDNm3I/R3BYqyvfFuzJMQyh5APhM52yKGMN9UOuJPNPz0C4P6EY3iC3ZqUHFJ6ILrZZxdLZBVxdy2F19Xv6XcZkZxLpRKWapVFECF5z/Bi0rg1uzNRyrHjfZWcHfHIvlqxUYiitvvTbbSMQKqEV8wlnshSzBoYzaKtV1+crwlgz6wCnXq8HIupEeWfUc9kc+zunpYnuHnU5Z3HhzQGBuIiPoVritDjOo7qYREftV4qQ15xFWdezsMZlR15edwZeyNdAEx044QgaGddC8uEMoi5cp4APIqH1cEkIvSU6Y+esdgZ4CHU6M5G5ub5PTT2TaKoUMLLFtpW6QImjVApixFTHWR7tUhqInplWWLqvviS4MoI1ppxgcDUg/bgPdeDBsoRkbESr2uT8ResNi9DlPlN2rlUjlb28awzHm7agFhwfPQZ1afnFSUh0tTFz1WeR7xIGhxR1xXc8sapJhgLnYYWpR2NaJzbYYdk7CWW/3rgEsJem7Kvll6HevnFgRP/uVhEyGZl9hw+tECzvwB/LEmQ/4raDMxqOB9XO9kusJX/jTnQIObrFubfKn3ToXlYbQxZX9+QobANvQ8huILz1bBeH8aKjf9RXu+j4VNyoCKhzU/v0MIdRCsgVWgjuYXMGRo0MFMFyMqQiw==''
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
# users.users.alice = {
|
|
||||||
# isNormalUser = true;
|
|
||||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
||||||
# packages = with pkgs; [
|
|
||||||
# tree
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||||||
# accidentally delete configuration.nix.
|
# accidentally delete configuration.nix.
|
||||||
|
|
|
@ -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