{ description = "NixOS system configuration"; inputs = { agenix = { url = "github:ryantm/agenix"; inputs.home-manager.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs"; }; agenix-rekey = { url = "github:oddlama/agenix-rekey"; inputs.nixpkgs.follows = "nixpkgs"; inputs.pre-commit-hooks.follows = "pre-commit-hooks"; }; deploy-rs = { url = "github:serokell/deploy-rs"; inputs.nixpkgs.follows = "nixpkgs"; }; devshell = { url = "github:numtide/devshell"; inputs.nixpkgs.follows = "nixpkgs"; }; disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; hyprland.url = "github:hyprwm/Hyprland"; hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; firefox-gnome-theme = { url = "github:rafaelmardojai/firefox-gnome-theme"; flake = false; }; flake-parts.url = "github:hercules-ci/flake-parts"; gitea-github-theme = { url = "git+ssh://git@git.vimium.com/jordan/gitea-github-theme.git?ref=main"; flake = false; }; impermanence.url = "github:nix-community/impermanence"; kvlibadwaita = { url = "github:GabePoel/KvLibadwaita"; flake = false; }; nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-mailserver = { url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; nixpkgs.url = "nixpkgs/nixos-25.05"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; # nixpkgs-master.url = "nixpkgs"; nixvim = { url = "github:nix-community/nixvim/nixos-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; nix-topology = { url = "github:oddlama/nix-topology"; inputs.nixpkgs.follows = "nixpkgs"; inputs.pre-commit-hooks.follows = "pre-commit-hooks"; }; pre-commit-hooks = { url = "github:cachix/git-hooks.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; secrets = { url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git"; flake = false; }; thunderbird-gnome-theme = { url = "github:rafaelmardojai/thunderbird-gnome-theme"; flake = false; }; treefmt-nix = { url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs@{ nixpkgs, flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } { imports = [ inputs.agenix-rekey.flakeModule inputs.pre-commit-hooks.flakeModule inputs.nix-topology.flakeModule inputs.treefmt-nix.flakeModule ./nix/devshell.nix ./nix/hosts.nix ]; flake = { overlays = nixpkgs.lib.packagesFromDirectoryRecursive { callPackage = path: overrides: import path; directory = ./overlays; }; }; systems = [ "aarch64-linux" "x86_64-linux" ]; perSystem = { pkgs, ... }: { formatter = pkgs.nixfmt-rfc-style; legacyPackages = pkgs.lib.packagesFromDirectoryRecursive { callPackage = pkgs.callPackage; directory = ./pkgs; }; pre-commit = { settings = { excludes = [ "pkgs/libcamera-rpi/libcamera-rpi-ipa-priv-key.pem" ]; hooks = { check-case-conflicts.enable = true; check-executables-have-shebangs.enable = true; check-merge-conflicts.enable = true; detect-private-keys.enable = true; end-of-file-fixer.enable = true; fix-byte-order-marker.enable = true; mixed-line-endings.enable = true; treefmt.enable = true; trim-trailing-whitespace.enable = true; }; }; }; treefmt = { projectRootFile = "flake.nix"; programs = { deadnix = { enable = true; no-lambda-arg = true; }; mdformat.enable = true; nixfmt-rfc-style.enable = true; shellcheck.enable = true; }; }; }; }; }