{ description = "Hi!"; # The `flake.lock` generation is not computable[1]. So far it's impossible to # add helper functions to manage inputs. # # [1]: https://github.com/NixOS/nix/issues/5373 inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs-master.url = "github:NixOS/nixpkgs/master"; nixpkgs-stable.url = "github:NixOS/nixpkgs/release-24.05"; # TODO Upstream this? nixpkgs-amneziawg.url = "github:azahi/nixpkgs/amneziawg"; nixos-hardware.url = "github:NixOS/nixos-hardware"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; srvos = { url = "github:nix-community/srvos"; inputs.nixpkgs.follows = "nixpkgs"; }; stylix = { url = "github:danth/stylix"; inputs = { flake-compat.follows = "flake-compat"; home-manager.follows = "home-manager"; nixpkgs.follows = "nixpkgs"; }; }; impermanence.url = "github:nix-community/impermanence"; agenix = { url = "github:ryantm/agenix"; inputs = { home-manager.follows = "home-manager"; nixpkgs.follows = "nixpkgs"; }; }; # agenix-rekey = { # url = "github:oddlama/agenix-rekey"; # inputs = { # flake-utils.follows = "flake-utils"; # nixpkgs.follows = "nixpkgs"; # pre-commit-hooks.follows = "git-hooks"; # }; # }; infuse = { url = "git+https://codeberg.org/amjoseph/infuse.nix"; flake = false; }; dns = { url = "github:nix-community/dns.nix"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; }; mailserver = { url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; inputs = { flake-compat.follows = "flake-compat"; nixpkgs.follows = "nixpkgs"; }; }; alertmanager-ntfy = { url = "github:pinpox/alertmanager-ntfy"; inputs = { flake-compat.follows = "flake-compat"; flake-utils.follows = "flake-utils"; nixpkgs.follows = "nixpkgs"; }; }; vscode-extensions = { url = "github:nix-community/nix-vscode-extensions"; inputs = { flake-compat.follows = "flake-compat"; flake-utils.follows = "flake-utils"; nixpkgs.follows = "nixpkgs"; }; }; arkenfox = { url = "github:dwarfmaster/arkenfox-nixos"; inputs = { flake-compat.follows = "flake-compat"; flake-utils.follows = "flake-utils"; nixpkgs.follows = "nixpkgs"; pre-commit.follows = "git-hooks"; }; }; minecraft = { url = "github:Infinidoge/nix-minecraft"; inputs = { flake-compat.follows = "flake-compat"; flake-utils.follows = "flake-utils"; nixpkgs.follows = "nixpkgs"; }; }; nix-index-database = { url = "github:nix-community/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; nix-topology = { url = "github:oddlama/nix-topology"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; pre-commit-hooks.follows = "git-hooks"; }; }; homelab-svg-assets = { url = "github:loganmarchione/homelab-svg-assets"; flake = false; }; azahi-cc = { url = "git+https://git.azahi.cc/azahi-cc?ref=master"; flake = false; }; nmap-vulners = { url = "github:vulnersCom/nmap-vulners"; flake = false; }; nmap-vulscan = { url = "github:scipag/vulscan"; flake = false; }; git-hooks = { url = "github:cachix/git-hooks.nix"; inputs = { flake-compat.follows = "flake-compat"; nixpkgs.follows = "nixpkgs"; nixpkgs-stable.follows = "nixpkgs-stable"; }; }; flake-utils.url = "github:numtide/flake-utils"; flake-compat.url = "github:edolstra/flake-compat"; }; outputs = inputs@{ self, nixpkgs, ... }: let lib = nixpkgs.lib.extend (lib: _: (import ./lib { inherit inputs lib system; })); system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default inputs.nix-topology.overlays.default ]; }; in with lib; { inherit lib; apps.${system}.default = { type = "app"; program = getExe self.packages.${system}.nixfiles; }; packages.${system} = { default = self.packages.${system}.nixfiles; inherit (self.legacyPackages.${system}) nixfiles; topology = self.topology.config.output; iso = self.nixosConfigurations.iso.config.system.build.isoImage; test-headless = self.nixosConfigurations.test-headless.config.system.build.vm; test-headful = self.nixosConfigurations.test-headful.config.system.build.vm; }; legacyPackages.${system} = pkgs; overlays = import ./overlays.nix { inherit lib inputs; }; devShells.${system}.default = with pkgs; mkShell { inherit (self.checks.${system}.git-hooks) shellHook; packages = [ go-task ]; }; formatter.${system} = pkgs.nixfmt; checks.${system} = import ./checks.nix { inherit inputs pkgs system; }; nixosModules.default = _: { imports = attrValues (modulesIn ./modules); }; nixosConfigurations = import ./configurations { inherit inputs lib pkgs; }; topology = import ./topology.nix { inherit inputs lib pkgs; }; }; }