{ description = "Madmin's system's nix Config"; # ===================================================================== # # ============================== INPUTS =============================== # # ===================================================================== # inputs = { # ============= Official NixOS and HM Package Sources ============= # nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # also see 'unstable-packages' overlay at 'overlays/default.nix" hardware.url = "github:nixos/nixos-hardware"; home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; # =========================== Utilities =========================== # # -------------------------- Lanzaboote --------------------------- # #lanzabote = { # url = "github:nix-community/lanzaboote"; # inputs.nixpkgs.follows = "unstable"; #}; # ------------ Declarative partitioning and formatting ------------ # disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; # ------------- Secrets mngmt. C ./docs/secretsmgmt.md ------------ # #sops-nix = { # url = "github:mic92/sops-nix"; # inputs.nixpkgs.follows = "nixpkgs"; #}; # ------------------------------ VIM ------------------------------ # nixvim = { url = "github:nix-community/nixvim/nixos-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; # ------------------------ Windows manager ------------------------ # # TODO #hyprland = { # url = "github:hyprwm/hyprland"; # inputs.nixpkgs.follows = "nixpkgs"; #}; #hyprland-plugins = { # url = "github:hyprwm/hyprland-plugins"; # inputs.hyprland.follows = "hyprland"; #}; #hyprland-themes = { # url = "github:hyprwm/hyprland-themes"; # inputs.hyprland.follows = "hyprland"; #}; # ------------------------------ ZSH ------------------------------ # #nix-zsh-completions = { # url = "github:nix-community/nix-zsh-completions"; # inputs.nixpkgs.follows = "nixpkgs"; #}; # -------------------------- Nix-Colors --------------------------- # # TODO # https://github.com/Misterio77/nix-colors nix-colors = { url = "github:misterio77/nix-colors"; }; # ---------------------------- Stylix ----------------------------- # stylix = { url = "github:danth/stylix"; }; # ====================== Personal Repositories ====================== # # Private secrets repo. See ./docs/secretsmgmt.md # Authenticate via ssh and use shallow clone #nix-secrets = { # url = "git+ssh://git@gitlab.com/emergentmind/nix-secrets.git?ref=main&shallow=1"; # flake = false; #}; }; # ===================================================================== # # ============================== OUTPUTS ============================== # # ===================================================================== # outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, disko, ... }@inputs: let inherit (self) outputs; forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ]; inherit (nixpkgs) lib; configVars = import ./vars { inherit inputs lib; }; configLib = import ./lib { inherit lib; }; specialArgs = { inherit inputs outputs configVars configLib nixpkgs; }; in { # ============================ CUSTOM ============================= # # ---------------------------- Modules ---------------------------- # # Custom modules to enable special functionality for nixos or home-manager oriented configs. nixosModules = import ./modules/nixos; homeManagerModules = import ./modules/home-manager; # ---------------------------- Overlays --------------------------- # # Custom modifications/overrides to upstream packages. overlays = import ./overlays { inherit inputs outputs; }; # ---------------------------- Packages --------------------------- # # Custom packages to be shared or upstreamed. packages = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; in import ./pkgs { inherit pkgs; } ); # ============================= Tools ============================= # # --------------------------- Formatter --------------------------- # # Nix formatter available through 'nix fmt' https://nix-community.github.io/nixpkgs-fmt formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt ); # -------------------------- INIT Shell -------------------------- # # Devshell for bootstrapping # Acessible through 'nix develop' or 'nix-shell' (legacy) # Shell configured with packages that are typically only needed when working on or with nix-config. devShells = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; in import ./shell.nix { inherit pkgs; } ); # ======================= Nixos Configurations ========================== # # # Building configurations available through `just rebuild` or `nixos-rebuild --flake .#hostname` nixosConfigurations = { # Jedidiah - the # jedidiah # TODO: The one who listened too much #rehoboam = lib.nixosSystem { # modules = [ ./system/rehoboam ]; # specialArgs = { inherit inputs outputs;}; #}; # The rebel who worships the golden calf jeroboam = lib.nixosSystem { inherit specialArgs; modules = [ home-manager.nixosModules.home-manager{ home-manager.extraSpecialArgs = specialArgs; } ./systems/jeroboam ]; }; }; }; }