1
0
Fork 0

Modularize K8s and gaming configs

This commit is contained in:
Aires 2024-03-11 12:27:30 -04:00
parent 5fca149b6c
commit 330bcc0360
6 changed files with 41 additions and 40 deletions

View file

@ -117,11 +117,11 @@
]
},
"locked": {
"lastModified": 1709904018,
"narHash": "sha256-fVp/89wNjWg7OQ/Gj3eSK2IXKDk9mXSj5ltOz98Ce2w=",
"lastModified": 1710164657,
"narHash": "sha256-l64+ZjaQAVkHDVaK0VHwtXBdjcBD6nLBD+p7IfyBp/w=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8b07ca541939211d3cc437ddfd74ebdef3d72471",
"rev": "017b12de5b899ef9b64e2c035ce257bfe95b8ae2",
"type": "github"
},
"original": {
@ -174,11 +174,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1709410583,
"narHash": "sha256-esOSUoQ7mblwcsSea0K17McZuwAIjoS6dq/4b83+lvw=",
"lastModified": 1710123225,
"narHash": "sha256-j3oWlxRZxB7cFsgEntpH3rosjFHRkAo/dhX9H3OfxtY=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "59e37017b9ed31dee303dbbd4531c594df95cfbc",
"rev": "ad2fd7b978d5e462048729a6c635c45d3d33c9ba",
"type": "github"
},
"original": {
@ -222,11 +222,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1709703039,
"narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=",
"lastModified": 1709961763,
"narHash": "sha256-6H95HGJHhEZtyYA3rIQpvamMKAGoa8Yh2rFV29QnuGw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d",
"rev": "3030f185ba6a4bf4f18b87f345f104e6a6961f34",
"type": "github"
},
"original": {

View file

@ -15,6 +15,7 @@ in
host = {
role = "server";
development.kubernetes.enable = true;
services = {
apcupsd.enable = true;
duplicacy-web = {

View file

@ -23,7 +23,10 @@ in
host = {
role = "workstation";
apps = {
development.enable = true;
development = {
enable = true;
kubernetes.enable = true;
};
dj.enable = true;
gaming.enable = true;
hugo.enable = true;
@ -54,23 +57,6 @@ in
};
};
# Configure users
users.users = {
aires = {
extraGroups = [ "libvirt" "gremlin" ];
};
gremlin = {
extraGroups = [ "libvirt" ];
};
};
# Add packages specific to Shura
environment.systemPackages = with pkgs; [
kubectl
kubevirt # Virtctl command-line tool
linuxKernel.packages.linux_zen.xpadneo # Xbox controller driver
];
# Move files into target system
systemd.tmpfiles.rules = [
# Use gremlin user's monitor config for GDM (defined above)

View file

@ -29,12 +29,8 @@
kernelModules = [
"kvm-amd"
"hid_xpadneo"
];
# Add XPadNeo
extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];
# Add kernel patch to enable sound over the speakers.
# This might not be necessary for long - see https://forums.lenovo.com/topic/findpost/27/5258964/6212600
#kernelPatches = [{

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.host.apps.development;
@ -6,15 +6,27 @@ in
with lib;
{
options = {
host.apps.development.enable = mkEnableOption (mdDoc "Enables development tools");
host.apps.development = {
enable = mkEnableOption (mdDoc "Enables development tools");
kubernetes.enable = mkEnableOption (mdDoc "Enables kubectl, virtctl, and similar tools.");
};
};
config = mkIf cfg.enable {
host.ui.flatpak.enable = true;
config = mkMerge [
(mkIf cfg.enable {
host.ui.flatpak.enable = true;
services.flatpak.packages = [
"com.vscodium.codium"
"dev.k8slens.OpenLens"
];
};
services.flatpak.packages = [
"com.vscodium.codium"
"dev.k8slens.OpenLens"
];
})
(mkIf (cfg.kubernetes.enable) {
environment.systemPackages = with pkgs; [
kubectl
kubernetes-helm
kubevirt # Virtctl command-line tool
];
})
];
}

View file

@ -16,5 +16,11 @@ with lib;
"com.valvesoftware.Steam"
"org.firestormviewer.FirestormViewer"
];
# Enable Xbox controller driver (XPadNeo)
boot = {
extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];
kernelModules = [ "hid_xpadneo" ];
};
};
}