mirror of
https://github.com/sstent/vmimages.git
synced 2025-12-06 06:01:51 +00:00
112 lines
3.2 KiB
Nix
112 lines
3.2 KiB
Nix
{
|
|
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";
|
|
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;
|
|
};
|
|
|
|
};
|
|
}
|