{ description = "NixOS configuration"; inputs = { # Main nixpkgs channel nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # Import home-manager modules home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; # Import deploy-rs for deployments deploy-rs.url = "github:serokell/deploy-rs"; deploy-rs.inputs.nixpkgs.follows = "nixpkgs"; # Import nixos hardware quirks settings #nixos-hardware.url = "github:NixOS/nixos-hardware"; #ssssh secret!! Agenix install agenix.url = "github:ryantm/agenix"; agenix.inputs.nixpkgs.follows = "nixpkgs"; #import nixos-generators for building images nixos-generators = { url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixpkgs"; }; #nixos-wsl nixos-wsl.url = github:nix-community/NixOS-WSL; nixos-wsl.inputs.nixpkgs.follows = "nixpkgs"; npiperelay.url = "path:./pkgs/npiperelay"; }; outputs = inputs@{ self, nixpkgs, home-manager, nixos-generators, nixos-wsl,deploy-rs , agenix, npiperelay, ... }: let system = "x86_64-linux"; myData = import ./data.nix; # overlays = [ (final: prev: { npiperelay = npiperelay.defaultPackage.x86_64-linux; }) ]; in { nixosConfigurations = { HyperV = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; # specialArgs = { inherit inputs; }; # Pass flake inputs to our config modules = [ ./hosts/HyperV/configuration.nix ./modules # Add agenix for secret management. agenix.nixosModules.age { environment.systemPackages = [agenix.defaultPackage.${system}]; } ]; specialArgs = { inherit inputs myData; }; }; nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; # specialArgs = { inherit inputs; }; # Pass flake inputs to our config modules = [ ./hosts/wsl2 ./modules nixos-wsl.nixosModules.wsl inputs.agenix.nixosModules.age inputs.home-manager.nixosModules.home-manager # Add agenix for secret management. # agenix.nixosModules.age # { # environment.systemPackages = [agenix.defaultPackage.${system}]; # } ]; specialArgs = { inherit inputs myData; }; }; }; packages.x86_64-linux = { HV = nixos-generators.nixosGenerate { system = "x86_64-linux"; modules = [ ./hosts/HyperV/configuration.nix ./hosts/HyperV/hyperv.nix ./modules ]; format = "hyperv"; }; }; deploy.nodes.HyperV = { sshUser = "sstent"; user = "root"; hostname = "192.168.1.230"; remoteBuild = true; magicRollback = false; profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.HyperV; }; }; }