intial osprey config

This commit is contained in:
Tyler Starr 2024-10-16 08:54:54 -07:00
parent 531a380237
commit 3614b6aefb
4 changed files with 45 additions and 31 deletions

View File

@ -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;
});
};
};
}

View File

@ -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";
#};
};
};
}

View File

@ -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

View File

@ -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.<interface>.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;
}