Initial commit: Nomarchy NixOS configuration
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>
This commit is contained in:
92
lib/mkHost.nix
Normal file
92
lib/mkHost.nix
Normal file
@@ -0,0 +1,92 @@
|
||||
# Helper function to create a NixOS host configuration
|
||||
{inputs, lib}: {
|
||||
system,
|
||||
config,
|
||||
extraModules ? [],
|
||||
}: let
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
pkgs-stable = import inputs.nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs pkgs-stable;
|
||||
nomarchyConfig = config;
|
||||
};
|
||||
|
||||
modules =
|
||||
[
|
||||
# Core system modules
|
||||
../modules/core
|
||||
../modules/desktop
|
||||
../modules/services
|
||||
../modules/programs
|
||||
../modules/performance
|
||||
|
||||
# Secrets management
|
||||
inputs.agenix.nixosModules.default
|
||||
|
||||
# Home-manager integration
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs pkgs-stable;
|
||||
nomarchyConfig = config;
|
||||
};
|
||||
users.${config.username} = import ../modules/home;
|
||||
};
|
||||
}
|
||||
|
||||
# Theme
|
||||
../themes/theme.nix
|
||||
|
||||
# Dynamic configuration based on user settings
|
||||
({...}: {
|
||||
# Networking
|
||||
networking.hostName = config.hostname;
|
||||
|
||||
# Locale and timezone
|
||||
time.timeZone = config.timezone;
|
||||
i18n.defaultLocale = config.locale;
|
||||
i18n.extraLocaleSettings = let
|
||||
locale = config.locale;
|
||||
in {
|
||||
LC_ADDRESS = locale;
|
||||
LC_IDENTIFICATION = locale;
|
||||
LC_MEASUREMENT = locale;
|
||||
LC_MONETARY = locale;
|
||||
LC_NAME = locale;
|
||||
LC_NUMERIC = locale;
|
||||
LC_PAPER = locale;
|
||||
LC_TELEPHONE = locale;
|
||||
LC_TIME = locale;
|
||||
};
|
||||
|
||||
# User account
|
||||
users.users.${config.username} = {
|
||||
isNormalUser = true;
|
||||
description = config.username;
|
||||
extraGroups = ["networkmanager" "wheel" "adbusers" "video" "audio"];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# Enable flakes
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# State version
|
||||
system.stateVersion = "24.11";
|
||||
})
|
||||
]
|
||||
++ extraModules;
|
||||
}
|
||||
Reference in New Issue
Block a user