This commit finalizes the multi-host deployment framework, introducing the laptop profile alongside the desktop. It integrates essential hardware services, declaratively binds the Hyprland compositor, and thoroughly documents the repository architecture. - Initialize `hosts/laptop` profile configured for the Niri compositor, utilizing `lib.mkForce` to override default `greetd` logic. - Declare `hyprland.conf` directly via Home Manager (`home.file`) to ensure reproducible compositor settings (blur, gaps, bindings). - Enable Bluetooth daemon (`hardware.bluetooth`) and printing services (`cups-pk-helper`) system-wide. - Configure default system typography with `inter` and `fira-code` via `fonts.fontconfig`. - Enhance `tuigreet` login screen with session memory, password asterisks, and a custom declarative greeting. - Add comprehensive inline documentation to all Nix modules and shell scripts, alongside a complete project `README.md`. - Update the Home Manager declarations in flake.nix to include home-manager.backupFileExtension = "backup" Rationale: Hardcoding the Hyprland configuration and core hardware services ensures the desktop is fully immutable. Branching the host profiles allows the laptop to share 100% of the user-space configurations (terminal, editor, shell aliases) while cleanly swapping the graphical compositor stack to Niri.
87 lines
3.3 KiB
Nix
87 lines
3.3 KiB
Nix
{
|
|
description = "Kiskaadee's Modular NixOS Configuration";
|
|
|
|
# --- External Repositories & Flake Inputs ---
|
|
# These inputs specify where Nix downloads package sets, tools, and configurations.
|
|
inputs = {
|
|
# NixOS Unstable channel - used for bleeding-edge package releases
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
# Home Manager - manages user-space configurations, dotfiles, and shell environments
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs"; # Forces home-manager to use the same nixpkgs channel
|
|
};
|
|
|
|
# DankMaterialShell (DMS) - core custom desktop shell environment and panel
|
|
dms = {
|
|
url = "github:AvengeMedia/DankMaterialShell";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# dgop - companion system monitoring / daemon utility for DankMaterialShell
|
|
dgop = {
|
|
url = "github:AvengeMedia/dgop";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Zen Browser - modern, lightweight, community-maintained browser
|
|
zen-browser = {
|
|
url = "github:0xc000022070/zen-browser-flake";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Antigravity CLI - coding companion and local AI agent helper
|
|
antigravity = {
|
|
url = "github:jacopone/antigravity-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
# --- System Outputs (Configuration Definitions) ---
|
|
# Maps host machines to target environments, architecture types, and user settings.
|
|
outputs = { self, nixpkgs, home-manager, dms, dgop, zen-browser, antigravity, ...}@inputs: {
|
|
nixosConfigurations = {
|
|
|
|
# 🖥️ DESKTOP HOST
|
|
# Target workstation running Hyprland as the window manager.
|
|
desktop = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = { inherit inputs; }; # Pass flake inputs into submodules (e.g. system/base.nix)
|
|
modules = [
|
|
./hosts/desktop/hardware-configuration.nix # Autogenerated hardware/disk/CPU module
|
|
./hosts/desktop/configuration.nix # Desktop environment / system package settings
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.backupFileExtension = "backup"; # Auto-back up conflicting files
|
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
|
home-manager.users.kiskaadee = import ./home.nix; # Mount home configuration
|
|
}
|
|
];
|
|
};
|
|
|
|
# 💻 LAPTOP HOST
|
|
# Target laptop workstation. Intended to run Niri window manager.
|
|
# Shares modules/ base, but customizes graphical desktop components.
|
|
laptop = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
./hosts/laptop/hardware-configuration.nix
|
|
./hosts/laptop/configuration.nix
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.backupFileExtension = "backup"; # Auto-back up conflicting files
|
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
|
home-manager.users.kiskaadee = import ./home.nix;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|