diff --git a/flake.nix b/flake.nix index bffbfec..f715b39 100644 --- a/flake.nix +++ b/flake.nix @@ -100,6 +100,9 @@ # Work laptop fa-t14-2025 = normalSys "fa-t14-2025" { }; + # Web host + leonard = normalSys "leonard" { }; + # Web host malcolm = normalSys "malcolm" { }; diff --git a/hosts/leonard/configuration.nix b/hosts/leonard/configuration.nix new file mode 100644 index 0000000..1fe2e27 --- /dev/null +++ b/hosts/leonard/configuration.nix @@ -0,0 +1,34 @@ +{ config, pkgs, lib, ... }: + +{ + imports = + [ + ../../base.nix + ../../common/metrics-exporters.nix + ../../common/auto-upgrade.nix + ./hardware-configuration.nix + ]; + + boot.loader.systemd-boot.enable = lib.mkForce false; + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + + + networking = { + hostName = "leonard"; + defaultGateway = "192.168.10.1"; + interfaces.ens18.ipv4 = { + addresses = [ + { address = "192.168.10.207"; prefixLength = 24; } + ]; + }; + hostId = "b99c12d1"; + }; + + sops.defaultSopsFile = ../../secrets/leonard/leonard.yaml; + + environment.variables = { EDITOR = "vim"; }; + + system.stateVersion = "25.05"; +} + diff --git a/hosts/leonard/hardware-configuration.nix b/hosts/leonard/hardware-configuration.nix new file mode 100644 index 0000000..4847b2f --- /dev/null +++ b/hosts/leonard/hardware-configuration.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/4a70c1d5-9d72-4581-8f75-733b91c10669"; + fsType = "ext4"; + }; + + swapDevices = [ ]; # TODO + + networking.useDHCP = lib.mkDefault false; + # networking.interfaces.ens18.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/hosts/leonard/home.nix b/hosts/leonard/home.nix new file mode 100644 index 0000000..3ea958f --- /dev/null +++ b/hosts/leonard/home.nix @@ -0,0 +1,12 @@ +{ pkgs, lib, ... }: +{ + imports = [ + ./../../home/base.nix + ]; + + programs = { + zsh.shellAliases."rebuild" = "sudo nixos-rebuild switch --flake /config"; + }; + + home.stateVersion = "25.05"; +}