{ description = "flake for nixos-pulse"; nixConfig = { }; inputs = { systems = { url = "github:nix-systems/x86_64-linux"; }; nixos-hardware = { url = "github:NixOS/nixos-hardware/master"; }; nixpkgs = { url = "github:NixOS/nixpkgs/nixos-unstable"; # url = "github:tristandruyen/nixpkgs/nixos-unstable-small"; # fork for rocm fix # url = "github:NixOS/nixpkgs/nixos-unstable-small"; # url = "github:mschwaig/nixpkgs/fix-rocm-build-by-disabling-test"; }; nixpkgs-stable = { url = "github:NixOS/nixpkgs/nixos-24.05"; }; nixos-images = { url = "github:nix-community/nixos-images"; }; agenix = { url = "github:ryantm/agenix"; inputs.home-manager.follows = "home-manager"; inputs.systems.follows = "systems"; }; agenix-rekey = { url = "github:oddlama/agenix-rekey"; inputs.nixpkgs.follows = "nixpkgs"; inputs.treefmt-nix.follows = "treefmt-nix"; inputs.flake-parts.follows = "flake-parts"; inputs.devshell.follows = "devshell"; }; treefmt-nix = { url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; flake-utils = { url = "github:numtide/flake-utils"; inputs.systems.follows = "systems"; }; flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; }; gitignore = { url = "github:hercules-ci/gitignore.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"; lanzaboote = { url = "github:nix-community/lanzaboote/v0.4.2"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-compat.follows = "flake-compat"; inputs.flake-parts.follows = "flake-parts"; }; lix-module = { url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; }; chaotic = { url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; home-manager = { # url = "github:nix-community/home-manager"; url = "github:NovaViper/home-manager/kde6-qt"; # TODO Back to default after https://github.com/nix-community/home-manager/pull/6493 inputs.nixpkgs.follows = "nixpkgs"; }; emacs-overlay = { url = "github:nix-community/emacs-overlay/7cd35bfbe2fbb2906bc85803eab0bdc499b6f253"; inputs.flake-utils.follows = "flake-utils"; inputs.nixpkgs-stable.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs"; }; disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; nur = { url = "github:nix-community/NUR"; inputs.nixpkgs.follows = "nixpkgs"; inputs.treefmt-nix.follows = "treefmt-nix"; inputs.flake-parts.follows = "flake-parts"; }; nix-wallpaper = { url = "github:lunik1/nix-wallpaper"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; }; nix-index-database = { url = "github:Mic92/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; plasma-manager = { url = "github:nix-community/plasma-manager"; inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; nix-alien = { url = "github:thiagokokada/nix-alien"; inputs.nixpkgs.follows = "nixpkgs"; inputs.nix-index-database.follows = "nix-index-database"; inputs.flake-compat.follows = "flake-compat"; }; envfs = { url = "github:Mic92/envfs"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-parts.follows = "flake-parts"; inputs.treefmt-nix.follows = "treefmt-nix"; }; nix-ld-rs = { url = "github:nix-community/nix-ld-rs"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; inputs.flake-compat.follows = "flake-compat"; }; stylix = { # url = "github:danth/stylix"; # TODO Switch to this once https://github.com/danth/stylix/pull/866 is merged url = "github:brckd/stylix/treewide/add-overlays-option"; inputs.flake-compat.follows = "flake-compat"; inputs.flake-utils.follows = "flake-utils"; inputs.home-manager.follows = "home-manager"; inputs.nixpkgs.follows = "nixpkgs"; inputs.systems.follows = "systems"; }; llama-cpp = { url = "git+https://git.vlt81.de/tristan/llama.cpp.git"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-parts.follows = "flake-parts"; }; winapps = { url = "github:winapps-org/winapps"; inputs.flake-compat.follows = "flake-compat"; inputs.flake-utils.follows = "flake-utils"; }; devshell.url = "github:numtide/devshell"; }; outputs = { self , nixpkgs , lanzaboote , nixos-hardware , agenix , agenix-rekey , flake-utils , devshell , lix-module , home-manager , plasma-manager , emacs-overlay , nur , nix-index-database , disko , chaotic , envfs , llama-cpp , stylix , nix-wallpaper , winapps , ... } @ inputs: let system = "x86_64-linux"; my-overlay = final: prev: { my = self.packages."${system}"; nix-wallpaper = nix-wallpaper.packages."${system}".default; }; overlays = [ my-overlay emacs-overlay.overlay inputs.nix-alien.overlays.default inputs.nix-ld-rs.overlays.default agenix-rekey.overlays.default devshell.overlays.default ]; config = { allowUnfree = true; android_sdk.accept_license = true; permittedInsecurePackages = [ "jitsi-meet-1.0.8043" # "olm-3.2.16" ]; }; pkgs = import nixpkgs { inherit config system overlays; }; lib = pkgs.lib; hmModules = [ nix-index-database.hmModules.nix-index nur.modules.homeManager.default plasma-manager.homeManagerModules.plasma-manager # stylix.homeManagerModules.stylix ]; osModules = [ lanzaboote.nixosModules.lanzaboote lix-module.nixosModules.default disko.nixosModules.disko home-manager.nixosModules.home-manager nix-index-database.nixosModules.nix-index nur.modules.nixos.default chaotic.nixosModules.default envfs.nixosModules.envfs stylix.nixosModules.stylix agenix.nixosModules.default agenix-rekey.nixosModules.default ]; args = { inherit self inputs system; }; in { formatter."${system}" = pkgs.nixpkgs-fmt; packages."${system}" = import ./pkgs { inherit pkgs lib config; }; diskoConfigurations = { nixos-desk = import ./systems/nixos-desk/disko.nix; nixos-pulse = import ./systems/nixos-pulse/disko.nix; nixos-he4 = import ./systems/nixos-he4/disko.nix; }; agenix-rekey = agenix-rekey.configure { userFlake = self; nixosConfigurations = self.nixosConfigurations; }; # replace this with a auto-importing variant like the packages decl. above (instead of callPackage we just need to import the path) nixosConfigurations = lib.attrsets.mergeAttrsList ( lib.lists.forEach [ "nixos-desk" "nixos-pulse" "nixos-fw16" "rescue-iso" ] (host: { "${host}" = nixpkgs.lib.nixosSystem { inherit system; specialArgs = args; modules = [ ./systems/${host} { nixpkgs = { inherit config system overlays; }; # nixpkgs.pkgs = pkgs; nix.registry.nixpkgs.flake = nixpkgs; home-manager.sharedModules = hmModules; home-manager.extraSpecialArgs = args; } ] ++ osModules; }; }) ); hydraJobs = let osConfigs = builtins.mapAttrs (_: system: system.config.system.build.toplevel) self.nixosConfigurations; packages = self.packages."${system}"; in { inherit osConfigs packages; }; } # Devshell with local dev utils // flake-utils.lib.eachDefaultSystem (system: rec { devShells.default = pkgs.mkShell { packages = [ pkgs.rage pkgs.nh pkgs.agenix-rekey ]; # ... }; }); }