{ description = "JawZ NixOS flake setup"; inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs-small.url = "github:nixos/nixpkgs?ref=nixos-unstable-small"; nixpkgs-chrome.url = "github:nixos/nixpkgs?rev=05bbf675397d5366259409139039af8077d695ce"; ucodenix.url = "github:e-tho/ucodenix"; nix-gaming.url = "github:fufexan/nix-gaming"; hyprland.url = "github:hyprwm/Hyprland"; zen-browser.url = "github:MarceColl/zen-browser-flake"; home-manager.url = "github:nix-community/home-manager/master"; sops-nix.url = "github:Mic92/sops-nix"; nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic"; }; outputs = { self, ... }@inputs: let inherit (self) outputs; system = "x86_64-linux"; makePkgs = repo: import repo { inherit system; config.allowUnfree = true; }; createConfig = name: let useGUI = name == "workstation"; nixpkgsSelect = if useGUI then inputs.nixpkgs else inputs.nixpkgs-small; pkgs = makePkgs nixpkgsSelect; pkgs-chrome = makePkgs inputs.nixpkgs-chrome; overlayFile = import ./overlay.nix { inherit pkgs pkgs-chrome; }; lib = nixpkgsSelect.lib // inputs.home-manager.lib; in lib.nixosSystem { inherit system; specialArgs = { inherit inputs outputs; }; modules = [ { nixpkgs.overlays = [ overlayFile ]; } ./hosts/${name}/configuration.nix inputs.sops-nix.nixosModules.sops inputs.nixos-cosmic.nixosModules.default ]; }; in { nixosConfigurations = { workstation = createConfig "workstation"; miniserver = createConfig "miniserver"; server = createConfig "server"; }; }; }