mirror of
https://github.com/sstent/vmimages.git
synced 2026-01-26 07:02:03 +00:00
first commit
This commit is contained in:
65
flake.nix
Normal file
65
flake.nix
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
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";
|
||||
|
||||
#import nixos-generators for building images
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{ self, nixpkgs, home-manager, nixos-generators, deploy-rs, agenix, ... }: {
|
||||
nixosConfigurations = {
|
||||
HyperV = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
# specialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||
modules = [
|
||||
./hosts/HyperV/configuration.nix
|
||||
./modules
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user