Apply all pending changes excluding .sops.yaml

This commit is contained in:
Don Harper 2026-05-05 14:20:58 -05:00
parent 7b04942bb2
commit 89929ac69a
20 changed files with 439 additions and 167 deletions

View file

@ -1,29 +1,21 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
{ inputs, outputs, lib, config, pkgs, ... }: {
imports = [
../templates/workstation.nix
inputs.nixos-hardware.nixosModules.google-pixelbook
inputs.sops-nix.nixosModules.sops
./hardware-configuration.nix
# ../disko/mmcblk.nix
../workstation
];
# Host-specific configuration
networking.hostName = "book";
variables.address = "100.72.121.75";
variables.swayScale = "1.5";
# Enable roles for this host
roles = {
citrix.enable = false;
zoom.enable = false;
gui.enable = true;
kmscon.enable = true;
auto-cpufreq.enable = true;
gnome-calendar.enable = true;
};
wm = {sway.enable = true;};
wm.sway.enable = true;
}

23
hosts/common/boot.nix Normal file
View file

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }: {
# Common boot configuration
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
timeout = 3;
};
# Plymouth for boot splash
plymouth.enable = true;
# Kernel parameters
kernelParams = ["quiet" "splash"];
# Console settings
consoleLogLevel = 0;
initrd.verbose = false;
};
}

View file

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }: {
# Common networking configuration
networking = {
networkmanager.enable = true;
enableIPv6 = true;
useDHCP = false;
dhcpcd.enable = false;
};
# Firewall
networking.firewall = {
enable = true;
allowPing = true;
};
# DNS
networking.nameservers = [
"1.1.1.1"
"8.8.8.8"
];
}

View file

@ -1,20 +1,15 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
{ inputs, outputs, lib, config, pkgs, ... }: {
imports = [
../templates/server.nix
inputs.nixos-hardware.nixosModules.raspberry-pi-4
inputs.sops-nix.nixosModules.sops
./hardware-configuration.nix
../pi-server
./kiosk.nix
];
# Host-specific configuration
networking.hostName = "display";
variables.address = "100.72.208.107";
nixpkgs.overlays = [
(final: super: {
makeModulesClosure = x:

View file

@ -17,7 +17,7 @@
networking.hostName = "fred";
variables.address = "100.72.236.170";
boot = {
binfmt.emulatedSystems = ["aarch64-linux"];
binfmt.emulatedSystems = lib.optional (config.system != "aarch64-linux") [ "aarch64-linux" ];
loader = {
systemd-boot = {enable = true;};
efi = {

View file

@ -1,22 +1,16 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
{ inputs, outputs, lib, config, pkgs, ... }: {
imports = [
../templates/workstation.nix
inputs.nixos-hardware.nixosModules.framework-amd-ai-300-series
inputs.sops-nix.nixosModules.sops
./hardware-configuration.nix
# ../disko/nvme.nix
../workstation
];
# Host-specific configuration
networking.hostName = "loki";
variables.address = "100.72.0.1";
variables.swayScale = "1.2";
# Enable roles for this host
roles = {
citrix.enable = true;
zoom.enable = true;
@ -26,9 +20,9 @@
games.enable = true;
auto-cpufreq.enable = true;
gnome-calendar.enable = true;
primary.enable = false;
lmstudio.enable = true;
ollama.enable = true;
};
primary.enable = false;
lmstudio.enable = true;
ollama.enable = true;
wm = {sway.enable = true;};
wm.sway.enable = true;
}

26
hosts/roles/default.nix Normal file
View file

@ -0,0 +1,26 @@
{ lib, ... }: {
options.roles = {
citrix = lib.mkEnableOption "Citrix Workspace client";
zoom = lib.mkEnableOption "Zoom client";
gui = lib.mkEnableOption "GUI environment";
games = lib.mkEnableOption "Gaming packages and Steam";
kvm = lib.mkEnableOption "Virtualization support (libvirtd, waydroid)";
kmscon = lib.mkEnableOption "Console improvements";
auto-cpufreq = lib.mkEnableOption "CPU power management";
gnome-calendar = lib.mkEnableOption "GNOME Calendar integration";
tlp = lib.mkEnableOption "TLP power management";
wine = lib.mkEnableOption "Wine for Windows compatibility";
# Window manager selection
wm = lib.mkOption {
type = lib.types.enum ["sway" "gnome" "none"];
default = "none";
description = "Window manager to enable";
};
# Special host-specific roles
primary = lib.mkEnableOption "Primary workstation designation";
lmstudio = lib.mkEnableOption "LM Studio AI tools";
ollama = lib.mkEnableOption "Ollama AI server";
};
}

View file

@ -65,7 +65,7 @@ in {
# Bootloader.
boot = {
binfmt.emulatedSystems = ["aarch64-linux"];
binfmt.emulatedSystems = lib.optional (config.system != "aarch64-linux") [ "aarch64-linux" ];
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["consoleblank=60"];
#loader = {

View file

@ -0,0 +1,23 @@
{ inputs, outputs, lib, config, pkgs, ... }: {
imports = [
inputs.sops-nix.nixosModules.sops
../server
../common/boot.nix
../common/networking.nix
../common/tailscale.nix
../../home/pi-server.nix
../../modules/beszel-agent.nix
];
config = {
# Common server setup
nix.settings.trusted-users = ["root" "don"];
# Server-specific Nix settings
nix.gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 7d";
};
};
}

View file

@ -0,0 +1,17 @@
{ inputs, outputs, lib, config, pkgs, ... }: {
imports = [
inputs.sops-nix.nixosModules.sops
../workstation
../common/boot.nix
../common/networking.nix
../common/tailscale.nix
../../home
../../home/gui
../wm/sway
];
config = {
# Common workstation setup
nix.settings.trusted-users = ["root" "don"];
};
}

View file

@ -164,14 +164,14 @@ in {
# Bootloader.
boot = {
binfmt.emulatedSystems = ["aarch64-linux"];
binfmt.emulatedSystems = lib.optional (config.system != "aarch64-linux") [ "aarch64-linux" ];
# kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_zen;
kernelParams = ["consoleblank=60" "mem_sleep_default=deep"];
# extraModulePackages = [config.boot.kernelPackages.ddcci-driver];
# kernelModules = ["i2c-dev" "ddcci_backlight"];
loader =
if (pkgs.hostPlatform != lib.mkDefault "aarch64-linux")
if config.system != "aarch64-linux"
then {
systemd-boot = {enable = true;};
efi = {
@ -314,7 +314,7 @@ in {
fonts.packages = with pkgs; [
anonymousPro
font-awesome
# jetbrains-mono # FIXME Causing build error? 2026-02-25
jetbrains-mono
nerd-fonts.symbols-only
nerd-fonts.roboto-mono
nerd-fonts.monaspace