2024-03-07 22:14:44 +00:00
|
|
|
{
|
|
|
|
description = "Homelab v5 Nixos Server Configurations";
|
|
|
|
|
|
|
|
inputs = {
|
2024-06-02 22:21:47 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05";
|
2024-03-07 22:14:44 +00:00
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
2024-10-21 08:57:14 +00:00
|
|
|
|
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
2024-10-21 08:58:12 +00:00
|
|
|
backup-helper = {
|
|
|
|
url = "git+https://git.t-juice.club/torjus/backup-helper?ref=master";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
2024-03-07 22:14:44 +00:00
|
|
|
};
|
|
|
|
|
2024-10-20 20:09:23 +00:00
|
|
|
outputs =
|
|
|
|
{
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
nixpkgs-unstable,
|
|
|
|
sops-nix,
|
|
|
|
backup-helper,
|
|
|
|
...
|
|
|
|
}@inputs:
|
2024-03-07 22:14:44 +00:00
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
overlay-unstable = final: prev: {
|
|
|
|
unstable = import nixpkgs-unstable {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
nixosConfigurations = {
|
2024-03-13 22:26:28 +00:00
|
|
|
ns1 = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2024-10-20 20:09:23 +00:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
2024-03-13 22:26:28 +00:00
|
|
|
modules = [
|
2024-10-20 20:09:23 +00:00
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
2024-03-13 22:26:28 +00:00
|
|
|
./hosts/ns1
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
];
|
|
|
|
};
|
|
|
|
ns2 = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2024-10-20 20:09:23 +00:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
2024-03-13 22:26:28 +00:00
|
|
|
modules = [
|
2024-10-20 20:09:23 +00:00
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
2024-03-13 22:26:28 +00:00
|
|
|
./hosts/ns2
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
];
|
|
|
|
};
|
2024-03-07 22:14:44 +00:00
|
|
|
ns3 = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2024-10-20 20:09:23 +00:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
2024-03-07 22:14:44 +00:00
|
|
|
modules = [
|
2024-10-20 20:09:23 +00:00
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
2024-03-07 22:17:42 +00:00
|
|
|
./hosts/ns3
|
2024-03-07 22:14:44 +00:00
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
];
|
|
|
|
};
|
2024-03-11 17:23:01 +00:00
|
|
|
ns4 = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2024-10-20 20:09:23 +00:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
2024-03-11 17:23:01 +00:00
|
|
|
modules = [
|
2024-10-20 20:09:23 +00:00
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
2024-03-11 17:23:01 +00:00
|
|
|
./hosts/ns4
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
];
|
|
|
|
};
|
2024-06-02 19:50:40 +00:00
|
|
|
nixos-test1 = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2024-10-20 20:09:23 +00:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
2024-06-02 19:50:40 +00:00
|
|
|
modules = [
|
2024-10-20 20:09:23 +00:00
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
2024-06-02 19:50:40 +00:00
|
|
|
./hosts/nixos-test1
|
|
|
|
sops-nix.nixosModules.sops
|
2024-06-02 22:10:28 +00:00
|
|
|
backup-helper.nixosModules.backup-helper
|
2024-06-02 19:50:40 +00:00
|
|
|
];
|
|
|
|
};
|
2024-05-01 17:11:55 +00:00
|
|
|
ha1 = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2024-10-20 20:09:23 +00:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
2024-05-01 17:11:55 +00:00
|
|
|
modules = [
|
2024-10-20 20:09:23 +00:00
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
2024-05-01 17:11:55 +00:00
|
|
|
./hosts/ha1
|
|
|
|
sops-nix.nixosModules.sops
|
2024-06-02 22:18:25 +00:00
|
|
|
backup-helper.nixosModules.backup-helper
|
2024-05-01 17:11:55 +00:00
|
|
|
];
|
|
|
|
};
|
2024-06-27 19:10:20 +00:00
|
|
|
inc1 = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2024-10-20 20:09:23 +00:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
2024-06-27 19:10:20 +00:00
|
|
|
modules = [
|
2024-10-20 20:09:23 +00:00
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
2024-06-27 19:10:20 +00:00
|
|
|
./hosts/inc1
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
# backup-helper.nixosModules.backup-helper
|
|
|
|
];
|
|
|
|
};
|
|
|
|
inc2 = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2024-10-20 20:09:23 +00:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
2024-06-27 19:10:20 +00:00
|
|
|
modules = [
|
2024-10-20 20:09:23 +00:00
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
2024-06-27 19:10:20 +00:00
|
|
|
./hosts/inc2
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
# backup-helper.nixosModules.backup-helper
|
|
|
|
];
|
|
|
|
};
|
2024-03-08 19:10:50 +00:00
|
|
|
template1 = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2024-10-20 20:09:23 +00:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
2024-03-08 19:10:50 +00:00
|
|
|
modules = [
|
2024-10-20 20:09:23 +00:00
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
2024-03-08 19:10:50 +00:00
|
|
|
./hosts/template
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
];
|
|
|
|
};
|
2024-10-20 20:09:23 +00:00
|
|
|
http-proxy = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
|
|
|
./hosts/http-proxy
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
];
|
|
|
|
};
|
2024-10-21 09:01:10 +00:00
|
|
|
ca = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
|
|
|
./hosts/ca
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
];
|
|
|
|
};
|
2024-12-01 00:51:29 +00:00
|
|
|
monitoring01 = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self sops-nix;
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
(
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
|
|
}
|
|
|
|
)
|
|
|
|
./hosts/monitoring01
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
];
|
|
|
|
};
|
2024-03-07 22:14:44 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|