Add initial legacy configuration

This commit is contained in:
Fabian Hauser 2025-02-22 20:27:25 +02:00
parent febfe1d970
commit db07652d99
64 changed files with 3287 additions and 13 deletions

View file

@ -0,0 +1,38 @@
{ ... }:
{
imports = [
./filesystems.nix
./networking.nix
# TODO: Hardware
];
nixpkgs.hostPlatform = "x86_64-linux";
virtualisation = {
# TODO: This should probably be somewhere else.
docker = {
enable = true;
enableOnBoot = false;
};
libvirtd.enable = true;
spiceUSBRedirection.enable = true;
};
users.extraUsers.fhauser.extraGroups = [ "libvirtd" ];
boot.extraModprobeConfig = ''
options kvm_intel nested=1
options kvm_intel emulate_invalid_guest_state=0
options kvm ignore_msrs=1
'';
# This value determines the NixOS release from which the default
# settings for stateful data, like fi:le locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -0,0 +1,43 @@
{
lib,
...
}:
{
boot.initrd.luks.devices = {
"luks".device = "/dev/disk/by-label/luks";
};
fileSystems =
let
rootdev = "/dev/disk/by-label/hv_ochsenchopf";
in
{
"/" = {
device = rootdev;
fsType = "btrfs";
options = [ "subvol=nixos" ];
};
"/home" = {
device = rootdev;
fsType = "btrfs";
options = [ "subvol=home" ];
};
"/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
};
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.systemd.enable = true;
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
}

View file

@ -0,0 +1,26 @@
{ ... }:
{
networking = {
networkmanager = {
enable = true;
# Does currently not work...
#enableFccUnlock = true;
};
useDHCP = false;
};
services.tailscale = {
enable = true;
openFirewall = true;
useRoutingFeatures = "client";
authKeyFile = "/secrets/wireguard/tailscale-key";
extraUpFlags = [
"--operator"
"fhauser"
"--accept-routes"
"--exit-node=100.64.0.6"
"--login-server=https://vpn.qo.is"
];
};
}