intial osprey config

This commit is contained in:
Tyler Starr 2024-10-16 08:54:54 -07:00 committed by Tyler Starr
parent 531a380237
commit 729d665af6
4 changed files with 51 additions and 32 deletions

View File

@ -39,6 +39,10 @@
inherit lib; inherit lib;
inherit system user inputs agenix home-manager nixos-wsl; 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,37 +1,22 @@
{ config, pkgs, user, lib, ... }: { config, pkgs, user, lib, ... }:
{ {
imports = [ imports = [
./syncthing.nix
./backup.nix
]; ];
# Use performance governor for sweet gaming performance! # Use performance governor for sweet gaming performance!
powerManagement.cpuFreqGovernor = "performance"; powerManagement.cpuFreqGovernor = "performance";
# Set networking options # Set networking options
networking.hostName = "kestrel"; networking.hostName = "osprey";
networking.firewall.checkReversePath = "loose"; networking.firewall.checkReversePath = "loose";
networking.firewall.enable = false; networking.firewall.enable = false;
# Nvidia options
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
open = true;
powerManagement.enable = true;
nvidiaSettings = true;
};
# Enable docker # Enable docker
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
virtualisation.docker.storageDriver = "btrfs";
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
]; ];
# Secrets
age.secrets."wireguard/kestrel".file = ../../secrets/wireguard/kestrel.age;
# Modules # Modules
modules = { modules = {
desktop = { desktop = {
@ -42,16 +27,9 @@
}; };
}; };
devel = { devel = {
engineering.enable = true;
notes.enable = true;
python.enable = true; python.enable = true;
tooling.enable = true; tooling.enable = true;
}; };
gaming = {
emulation.enable = true;
minecraft.enable = true;
steam.enable = true;
};
programs = { programs = {
chezmoi.apply = true; chezmoi.apply = true;
kitty.enable = true; kitty.enable = true;
@ -62,16 +40,15 @@
virt-manager.enable = true; virt-manager.enable = true;
}; };
system = { system = {
backup.enable = true;
ssh.enable = true; ssh.enable = true;
terminal.enable = true; terminal.enable = true;
wireguard-client = { #wireguard-client = {
enable = true; # enable = true;
privateKeyFile = "/run/agenix/wireguard/kestrel"; # privateKeyFile = "/run/agenix/wireguard/kestrel";
address = [ "192.168.3.3/24" ]; # address = [ "192.168.3.3/24" ];
publicKey = "bd7bbZOngl/FTdBlnbIhgCLNf6yx5X8WjiRB7E1NEQQ="; # publicKey = "bd7bbZOngl/FTdBlnbIhgCLNf6yx5X8WjiRB7E1NEQQ=";
endpoint = "66.218.43.87"; # endpoint = "66.218.43.87";
}; #};
}; };
}; };
} }

View File

@ -5,7 +5,7 @@
modules = [ modules = [
../default # shared by all configs ../default # shared by all configs
../default/physical/configuration.nix # shared by physical machines ../default/physical/configuration.nix # shared by physical machines
./configuration.nix # kestrel specific ./configuration.nix # osprey specific
./hardware.nix ./hardware.nix
../../modules ../../modules
agenix.nixosModules.default agenix.nixosModules.default

View File

@ -0,0 +1,38 @@
# 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/ab94a911-1186-405a-a2aa-fc60bfbe308f";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/69B4-4853";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
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;
}