Switch to lix and update the arr stack
This commit is contained in:
parent
e860e4a9bd
commit
34f11ee2fb
6 changed files with 249 additions and 148 deletions
135
flake.nix
135
flake.nix
|
|
@ -1,14 +1,22 @@
|
|||
{
|
||||
# Source of inspiration:
|
||||
# - https://github.com/BonusPlay/sysconf/blob/master/flake.nix
|
||||
# - https://github.com/NixOS/infra/blob/master/build/flake.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";
|
||||
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -29,110 +37,61 @@
|
|||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
nixos-hardware,
|
||||
lix-module,
|
||||
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
|
||||
];
|
||||
};
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
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
|
||||
];
|
||||
};
|
||||
nixosConfigurations = (import ./hosts inputs);
|
||||
|
||||
colmena =
|
||||
{
|
||||
meta = {
|
||||
description = "pazpi.top infrastructure";
|
||||
nixpkgs = import nixpkgs { inherit system; };
|
||||
lib.recursiveUpdate
|
||||
(builtins.mapAttrs (k: v: { imports = v._module.args.modules; }) self.nixosConfigurations)
|
||||
{
|
||||
meta = {
|
||||
nixpkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [ ];
|
||||
};
|
||||
nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations;
|
||||
nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) self.nixosConfigurations;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
imports = [ ./modules ];
|
||||
deployment.targetUser = "pazpi";
|
||||
};
|
||||
|
||||
arr = {
|
||||
deployment = {
|
||||
targetHost = "192.168.1.189";
|
||||
targetUser = lib.mkForce "root";
|
||||
tags = [
|
||||
"lxc"
|
||||
"bacco"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
deadbeef.deployment = {
|
||||
allowLocalDeployment = true;
|
||||
targetHost = null;
|
||||
tags = [ "local" ];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
// 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; [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue