130 lines
3 KiB
Nix
130 lines
3 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; };
|
|
in
|
|
{
|
|
|
|
# used with: `nix fmt`
|
|
formatter.${system} = pkgs.nixfmt-rfc-style;
|
|
|
|
colmena = {
|
|
meta = {
|
|
nixpkgs = pkgs;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
};
|
|
|
|
defaults = {
|
|
imports = [
|
|
"${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
|
./modules
|
|
];
|
|
};
|
|
|
|
# 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 = "root";
|
|
};
|
|
|
|
imports = [ ./hosts/arr ];
|
|
};
|
|
|
|
};
|
|
|
|
nixosConfigurations =
|
|
let
|
|
mkNixosConfiguration =
|
|
name: extraModules:
|
|
nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
{
|
|
networking.hostName = name;
|
|
nixpkgs.overlays = [ (_: _: { nixfiles = self.packages.${system}; }) ];
|
|
# sops.defaultSopsFile = ./hosts + "/${name}" + /secrets.yaml;
|
|
}
|
|
./modules
|
|
(./hosts + "/${name}")
|
|
# (./hosts + "/${name}" + /hardware.nix)
|
|
# sops-nix.nixosModules.sops
|
|
] ++ extraModules;
|
|
};
|
|
in
|
|
{
|
|
deadbeef = mkNixosConfiguration "deadbeef" [ ];
|
|
# nyarlathotep = mkNixosConfiguration "nyarlathotep" [ "${nixpkgs}/nixos/modules/installer/scan/not-detected.nix" ];
|
|
};
|
|
};
|
|
|
|
# nixosConfigurations = {
|
|
|
|
# deadbeef = nixpkgs.lib.nixosSystem {
|
|
# # inherit system;
|
|
# system = "x86_64-linux";
|
|
# specialArgs = { inherit inputs; };
|
|
|
|
# modules = [
|
|
# {
|
|
# networking.hostName = "deadbeef";
|
|
# nixpkgs.overlays = [ (_: _: { nixfiles = self.packages."x86_64-linux"; }) ];
|
|
# }
|
|
# ./hosts/deadbeef
|
|
# ];
|
|
|
|
# };
|
|
# };
|
|
|
|
}
|