An opinionated NixOS configuration with Hyprland, featuring: - Modular flake-based architecture - Parameterized user configuration (username, timezone, locale, etc.) - Classical/antiquity theme with Thomas Cole wallpapers - Full Hyprland setup with waybar, rofi, swaync - Custom utility scripts (screenshots, screen recording, WiFi QR) - Neovim with LSP support - Interactive installer for existing NixOS systems - ISO builder for fresh installations Flake outputs: - nixosConfigurations.example - Test configuration - nixosConfigurations.installer - ISO installer - packages.iso - Bootable ISO image - apps.default - Interactive installer - lib.mkHost - Host builder function - templates.default - Starter template Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
58 lines
1.4 KiB
Nix
58 lines
1.4 KiB
Nix
# System services
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
nomarchyConfig,
|
|
...
|
|
}: {
|
|
# Printing service
|
|
services.printing = lib.mkIf (nomarchyConfig.enablePrinting or true) {
|
|
enable = true;
|
|
browsed.enable = true;
|
|
drivers = with pkgs; [brlaser gutenprint];
|
|
};
|
|
|
|
# Avahi for mDNS discovery (network printers)
|
|
services.avahi = lib.mkIf (nomarchyConfig.enablePrinting or true) {
|
|
enable = true;
|
|
nssmdns4 = true;
|
|
openFirewall = true;
|
|
};
|
|
|
|
# Mullvad VPN
|
|
services.mullvad-vpn.enable = nomarchyConfig.enableMullvad or false;
|
|
|
|
# Syncthing - parameterized user
|
|
services.syncthing = lib.mkIf (nomarchyConfig.enableSyncthing or true) {
|
|
enable = true;
|
|
user = nomarchyConfig.username;
|
|
dataDir = "/home/${nomarchyConfig.username}/.config/syncthing";
|
|
configDir = "/home/${nomarchyConfig.username}/.config/syncthing";
|
|
openDefaultPorts = true;
|
|
guiAddress = "127.0.0.1:8384";
|
|
};
|
|
|
|
# Auto-cpufreq for automatic CPU power management
|
|
services.auto-cpufreq = {
|
|
enable = true;
|
|
settings = {
|
|
battery = {
|
|
governor = "powersave";
|
|
turbo = "never";
|
|
scaling_min_freq = 800000;
|
|
scaling_max_freq = 2000000;
|
|
};
|
|
charger = {
|
|
governor = "performance";
|
|
turbo = "auto";
|
|
scaling_min_freq = 800000;
|
|
scaling_max_freq = 4500000;
|
|
};
|
|
};
|
|
};
|
|
|
|
# Disable power-profiles-daemon (conflicts with auto-cpufreq)
|
|
services.power-profiles-daemon.enable = false;
|
|
}
|