mirror of
https://github.com/sstent/vmimages.git
synced 2025-12-06 06:01:51 +00:00
sync
This commit is contained in:
114
flake.nix
114
flake.nix
@@ -2,110 +2,16 @@
|
||||
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";
|
||||
nixpkgs = "github:NixOS/nixpkgs/nixos-unstable"; # Main nixpkgs channel
|
||||
home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs";};
|
||||
deploy-rs = { url = "github:serokell/deploy-rs"; inputs.nixpkgs.follows = "nixpkgs";}; # Import deploy-rs for deployments
|
||||
#nixos-hardware.url = "github:NixOS/nixos-hardware"; # Import nixos hardware quirks settings
|
||||
nixos-generators = { url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixpkgs";}; #import nixos-generators for building images
|
||||
nixos-wsl.url = {url = "github:nix-community/NixOS-WSL"; inputs.nixpkgs.follows = "nixpkgs";};
|
||||
sops-nix.url = github:Mic92/sops-nix;
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
# 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";
|
||||
sops-nix.url = github:Mic92/sops-nix;
|
||||
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, nixos-generators, deploy-rs
|
||||
, ... }:
|
||||
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.
|
||||
#inputs.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
|
||||
inputs.nixos-wsl.nixosModules.wsl
|
||||
inputs.agenix.nixosModules.age
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
# inputs.agenix.nixosModules.age
|
||||
# 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;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
outputs = { ... } @ args: import ./outputs.nix args;
|
||||
}
|
||||
Reference in New Issue
Block a user