initial config for htpc role and first htpc machine in json

This commit is contained in:
Tyler Starr 2024-12-21 14:48:14 -08:00
parent 85d52e311f
commit 6184934d1c
3 changed files with 51 additions and 0 deletions

View File

@ -22,5 +22,9 @@
"wsl": {
"role": "wsl",
"user": "user"
},
"htpc-bako": {
"role": "htpc",
"user": "starr"
}
}

View File

@ -0,0 +1,26 @@
{ config, pkgs, user, lib, hostname, ... }:
{
# Use performance governor for sweet gaming performance!
powerManagement.cpuFreqGovernor = "performance";
# Set networking options
networking.hostName = "${hostname}";
networking.firewall.checkReversePath = "loose";
networking.firewall.enable = false;
# Modules
modules = {
desktop = {
enable = true;
gnome.enable = true;
};
programs = {
chezmoi.apply = true;
kitty.enable = true;
};
services = {
samba-client.enable = true;
ssh.enable = true;
};
};
}

View File

@ -0,0 +1,21 @@
{ lib, specialArgs, system, inputs, agenix, home-manager, ... }:
let
user = specialArgs.user;
hostname = specialArgs.hostname;
in {
inherit system;
specialArgs = { inherit user hostname inputs home-manager; };
modules = [
../default # shared by all configs
../default/physical/configuration.nix # shared by physical machines
./configuration.nix # htpc specific
../../modules
/etc/nixos/hardware-configuration.nix
agenix.nixosModules.default
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user; };
}
];
}