{ description = "Evie's machine configurations"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; hyprland = { url = "github:hyprwm/Hyprland"; inputs.nixpkgs.follows = "nixpkgs"; }; anyrun = { url = "github:Kirottu/anyrun"; inputs.nixpkgs.follows = "nixpkgs"; }; wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git"; tokyonight = { url = "github:folke/tokyonight.nvim"; flake = false; }; }; outputs = { self, nixpkgs, home-manager, hyprland, anyrun, wallpapers, tokyonight, }: let systemConfig = { hostName, user ? "xenia", system ? "x86_64-linux", shell ? "zsh" }: let pkgs = import nixpkgs { inherit system; config.allowUnfree = true; overlays = [ (final: prev: { waybar = prev.waybar.overrideAttrs (oldAttrs: { mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; }); }) ]; }; in nixpkgs.lib.nixosSystem { inherit pkgs; specialArgs = { inherit hostName user shell hyprland; }; modules = [ ./hosts/${hostName}/configuration.nix ./services/${hostName}.nix { networking = { inherit hostName; }; users.users.${user} = { isNormalUser = true; description = "Evie Litherland-Smith"; group = "users"; extraGroups = [ "networkmanager" "wheel" "video" ]; shell = pkgs.${shell}; openssh.authorizedKeys.keys = import ./auth/authorized_keys.nix; }; } home-manager.nixosModules.home-manager { home-manager = { useGlobalPkgs = true; useUserPackages = false; extraSpecialArgs = { inherit hostName user shell hyprland anyrun wallpapers tokyonight; shellConfig = ./home/shell/${shell}.nix; }; users.${user} = import ./hosts/${hostName}/home.nix; }; } ]; }; homeConfig = { hostName, user, system ? "x86_64-linux", shell ? "zsh" }: home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.${system}; extraSpecialArgs = { inherit hostName user shell hyprland anyrun wallpapers tokyonight; shellConfig = ./home/shell/${shell}.nix; }; modules = [ ./hosts/${hostName}/home.nix ]; }; in { nixosConfigurations = { Legion = systemConfig { hostName = "Legion"; user = "xenia"; system = "x86_64-linux"; shell = "zsh"; }; Ronin = systemConfig { hostName = "Ronin"; user = "elitherl"; system = "x86_64-linux"; shell = "zsh"; }; Vanguard = systemConfig { hostName = "Vanguard"; user = "xenia"; system = "x86_64-linux"; shell = "zsh"; }; }; homeConfigurations = { "tux@Monarch" = homeConfig { hostName = "Monarch"; user = "tux"; system = "aarch64-darwin"; shell = "zsh"; }; }; }; }