Files
homelab-config/nixos/flake.nix
T

67 lines
2.1 KiB
Nix
Raw Normal View History

2025-04-09 14:30:42 -05:00
{
2025-06-01 22:04:21 -05:00
description = "Server Config Controller";
2025-04-09 14:30:42 -05:00
inputs = {
2025-06-01 22:04:21 -05:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
2025-06-12 15:43:10 -05:00
quasiSecrets.url = "git+ssh://git@github.com/RoyDumblauskas/server-semi-secrets/main?shallow=1";
2025-06-01 22:04:21 -05:00
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-06-05 12:13:34 -05:00
impermanence.url = "github:nix-community/impermanence";
2025-06-01 22:04:21 -05:00
# This is a path to the services I've declared.
# It just happens to be stored in the same repository (relative),
# but could well be a separate repository
2025-06-12 15:45:24 -05:00
tests-service.url = "github:RoyDumblauskas/tests-service/main?shallow=1";
minio-service.url = "path:../homelab-services/minio-service";
2025-04-09 14:30:42 -05:00
};
outputs = { self, nixpkgs, home-manager, disko, sops-nix, quasiSecrets, impermanence, tests-service, minio-service }@inputs:
2025-06-01 22:04:21 -05:00
let
nodes = [
{
name = "nixos-homelab-00";
hostId = "3884D2F1";
}
];
in {
nixosConfigurations = builtins.listToAttrs (map (node: {
name = node.name;
value = nixpkgs.lib.nixosSystem {
specialArgs = {
meta = {
hostname = node.name;
hostId = node.hostId;
};
};
2025-06-01 22:04:21 -05:00
system = "x86_64-linux";
modules = [
./configuration.nix
./hardware-configuration.nix
./disk-config.nix
disko.nixosModules.disko
sops-nix.nixosModules.sops
quasiSecrets.nixosModules.ipAddrs
quasiSecrets.nixosModules.serviceList
2025-06-05 12:00:56 -05:00
impermanence.nixosModules.impermanence
2025-06-02 10:43:30 -05:00
tests-service.nixosModules.default
minio-service.nixosModules.default
2025-06-01 22:04:21 -05:00
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.sysAdmin = ./home.nix;
}
];
2025-06-01 22:04:21 -05:00
};
}) nodes);
};
2025-04-09 14:30:42 -05:00
}