diff --git a/provision/flake.nix b/provision/flake.nix index 25ac2dd9..f21acd23 100644 --- a/provision/flake.nix +++ b/provision/flake.nix @@ -39,6 +39,10 @@ inherit lib; inherit system user inputs agenix home-manager nixos-wsl; }); + osprey = lib.nixosSystem (import ./hosts/osprey { + inherit lib; + inherit system user inputs agenix home-manager; + }); }; }; } diff --git a/provision/hosts/kestrel/configuration.nix b/provision/hosts/osprey/configuration.nix similarity index 55% rename from provision/hosts/kestrel/configuration.nix rename to provision/hosts/osprey/configuration.nix index 2f98329b..76ba2879 100644 --- a/provision/hosts/kestrel/configuration.nix +++ b/provision/hosts/osprey/configuration.nix @@ -1,27 +1,16 @@ { config, pkgs, user, lib, ... }: { imports = [ - ./syncthing.nix - ./backup.nix ]; # Use performance governor for sweet gaming performance! powerManagement.cpuFreqGovernor = "performance"; # Set networking options - networking.hostName = "kestrel"; + networking.hostName = "osprey"; networking.firewall.checkReversePath = "loose"; networking.firewall.enable = false; - # Nvidia options - services.xserver.videoDrivers = ["nvidia"]; - hardware.nvidia = { - modesetting.enable = true; - open = true; - powerManagement.enable = true; - nvidiaSettings = true; - }; - # Enable docker virtualisation.docker.enable = true; virtualisation.docker.storageDriver = "btrfs"; @@ -29,9 +18,6 @@ environment.systemPackages = with pkgs; [ ]; - # Secrets - age.secrets."wireguard/kestrel".file = ../../secrets/wireguard/kestrel.age; - # Modules modules = { desktop = { @@ -42,16 +28,9 @@ }; }; devel = { - engineering.enable = true; - notes.enable = true; python.enable = true; tooling.enable = true; }; - gaming = { - emulation.enable = true; - minecraft.enable = true; - steam.enable = true; - }; programs = { chezmoi.apply = true; kitty.enable = true; @@ -62,16 +41,15 @@ virt-manager.enable = true; }; system = { - backup.enable = true; ssh.enable = true; terminal.enable = true; - wireguard-client = { - enable = true; - privateKeyFile = "/run/agenix/wireguard/kestrel"; - address = [ "192.168.3.3/24" ]; - publicKey = "bd7bbZOngl/FTdBlnbIhgCLNf6yx5X8WjiRB7E1NEQQ="; - endpoint = "66.218.43.87"; - }; + #wireguard-client = { + # enable = true; + # privateKeyFile = "/run/agenix/wireguard/kestrel"; + # address = [ "192.168.3.3/24" ]; + # publicKey = "bd7bbZOngl/FTdBlnbIhgCLNf6yx5X8WjiRB7E1NEQQ="; + # endpoint = "66.218.43.87"; + #}; }; }; } diff --git a/provision/hosts/kestrel/default.nix b/provision/hosts/osprey/default.nix similarity index 90% rename from provision/hosts/kestrel/default.nix rename to provision/hosts/osprey/default.nix index c4d30e18..3b4f8302 100644 --- a/provision/hosts/kestrel/default.nix +++ b/provision/hosts/osprey/default.nix @@ -5,7 +5,7 @@ modules = [ ../default # shared by all configs ../default/physical/configuration.nix # shared by physical machines - ./configuration.nix # kestrel specific + ./configuration.nix # osprey specific ./hardware.nix ../../modules agenix.nixosModules.default diff --git a/provision/hosts/osprey/hardware.nix b/provision/hosts/osprey/hardware.nix new file mode 100644 index 00000000..2f226123 --- /dev/null +++ b/provision/hosts/osprey/hardware.nix @@ -0,0 +1,32 @@ +# 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, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/521c9cf1-6786-4fac-beaf-fcf5404931b5"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}