# This is the main flake containing all the nix related stuff { description = "Main nixos system configuration management von Jonas Hahn "; inputs = { nixpkgs.url = "nixpkgs/nixos-25.05"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; sops-nix = { url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; xremap-flake.url = "github:xremap/nix-flake?rev=8001f37b1ffe86e76b62f36afadee2f4acf90e70"; }; outputs = { self, nixpkgs, sops-nix, nixpkgs-unstable, home-manager, ... }@inputs: let system = "x86_64-linux"; overlay-unstable = final: prev: { unstable = nixpkgs-unstable.legacyPackages.${prev.system}; }; helperModules = [ ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.users.jonas = import ./nixos/users/jonas/home.nix; } ]; in { nixosConfigurations = { "thinix" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ # Use overlay magic with pkgs.unstable. ./nixos/hosts/thinkpadt470s/configuration.nix ] ++ helperModules; }; "nixyos" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ ./nixos/hosts/asus-vivo/configuration.nix ] ++ helperModules; }; "minoxy" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ ./nixos/hosts/minoxy/configuration.nix ] ++ helperModules; }; }; }; }