feat: port Phase 1 foundational modules and setup comin in flake.nix
This commit is contained in:
parent
647ccfd6e2
commit
17de32268d
9 changed files with 196 additions and 0 deletions
65
flake.nix
Normal file
65
flake.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
description = "Homelab configuration using flakes (v2 GitOps)";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
utils = {
|
||||
url = "github:gytis-ivaskevicius/flake-utils-plus";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
|
||||
comin = {
|
||||
url = "github:nlewo/comin";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{
|
||||
self, nixpkgs,
|
||||
flake-utils, sops-nix, utils, comin,
|
||||
...
|
||||
}:
|
||||
let
|
||||
system = utils.lib.system.x86_64-linux;
|
||||
in
|
||||
utils.lib.mkFlake {
|
||||
inherit self inputs;
|
||||
|
||||
hostDefaults = {
|
||||
inherit system;
|
||||
|
||||
modules = [
|
||||
./modules
|
||||
./users
|
||||
|
||||
sops-nix.nixosModules.sops
|
||||
comin.nixosModules.comin
|
||||
|
||||
# Base comin configuration for all nodes
|
||||
({ config, pkgs, ... }: {
|
||||
services.comin = {
|
||||
enable = true;
|
||||
remotes = [{
|
||||
name = "origin";
|
||||
# Replace with actual internal forgejo URL once available
|
||||
url = "https://github.com/example/nix-config.git";
|
||||
branches.main.name = "v2";
|
||||
}];
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
hosts = {
|
||||
# Hosts will be populated here as they are migrated to the v2 branch.
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue