146 lines
3.2 KiB
Nix
146 lines
3.2 KiB
Nix
{
|
|
description = "Pazpi's systems";
|
|
|
|
inputs = {
|
|
|
|
# NixOS related inputs
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
|
|
agenix = {
|
|
url = "github:ryantm/agenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
colmena = {
|
|
url = "github:zhaofengli/colmena";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
nixpkgs-unstable,
|
|
agenix,
|
|
colmena,
|
|
home-manager,
|
|
...
|
|
}@inputs:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
myModule = {
|
|
imports = [ ./modules ];
|
|
};
|
|
|
|
proxmoxModule = {
|
|
imports = [
|
|
"${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
|
./modules/virtualisation/proxmox.nix
|
|
];
|
|
};
|
|
|
|
in
|
|
{
|
|
|
|
# used with: `nix fmt`
|
|
formatter.${system} = pkgs.nixfmt-rfc-style;
|
|
|
|
nixosConfigurations.deadbeef = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
myModule
|
|
./hosts/deadbeef
|
|
];
|
|
};
|
|
|
|
nixosConfigurations.arr = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
|
|
modules = [
|
|
myModule
|
|
proxmoxModule
|
|
./hosts/arr
|
|
];
|
|
};
|
|
|
|
colmena =
|
|
{
|
|
meta = {
|
|
description = "pazpi.top infrastructure";
|
|
nixpkgs = import nixpkgs { inherit system; };
|
|
};
|
|
}
|
|
// builtins.mapAttrs (name: value: {
|
|
nixpkgs.system = value.config.nixpkgs.system;
|
|
imports = value._module.args.modules;
|
|
deployment = {
|
|
targetHost = "${name}.nixos.org";
|
|
};
|
|
}) self.nixosConfigurations;
|
|
|
|
# colmena = {
|
|
# meta = {
|
|
# nixpkgs = pkgs;
|
|
# specialArgs = {
|
|
# inherit inputs;
|
|
# };
|
|
# };
|
|
|
|
# defaults = {
|
|
# imports = [
|
|
# "${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
|
# ./modules
|
|
# ./modules/virtualisation/proxmox.nix
|
|
# ];
|
|
# };
|
|
|
|
# # childnixos = {
|
|
# # deployment = {
|
|
# # targetHost = "10.233.244.63";
|
|
# # targetPort = 22;
|
|
# # targetUser = "root";
|
|
# # };
|
|
|
|
# # imports = [ ./lxc-nix/configuration.nix ];
|
|
# # };
|
|
|
|
# arr = {
|
|
# deployment = {
|
|
# targetHost = "192.168.1.189";
|
|
# targetPort = 22;
|
|
# targetUser = "pazpi";
|
|
# };
|
|
|
|
# time.timeZone = "Europe/Rome";
|
|
# imports = [ ./hosts/arr ];
|
|
# };
|
|
|
|
# };
|
|
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
agenix.packages.${system}.agenix
|
|
colmena.packages.${system}.colmena
|
|
];
|
|
};
|
|
|
|
};
|
|
|
|
}
|