Prime prove con Colmena
This commit is contained in:
parent
9f1ba4a64b
commit
1000a3de75
4 changed files with 159 additions and 16 deletions
86
flake.nix
86
flake.nix
|
|
@ -15,24 +15,84 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, home-manager
|
||||
, ...
|
||||
}@inputs:
|
||||
outputs = { self, nixpkgs, home-manager, ... }@flakeInputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
deadbeef = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/deadbeef
|
||||
];
|
||||
|
||||
specialArgs = inputs;
|
||||
colmena = {
|
||||
meta = {
|
||||
nixpkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [];
|
||||
};
|
||||
};
|
||||
|
||||
deadbeef = {
|
||||
deployment = {
|
||||
targetHost = "somehost.tld";
|
||||
targetPort = 1234;
|
||||
targetUser = "luser";
|
||||
};
|
||||
boot.isContainer = true;
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
formatter.${system} = pkgs.nixpkgs-fmt;
|
||||
|
||||
nixosConfigurations =
|
||||
let
|
||||
mkNixosConfiguration = name: extraModules: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit flakeInputs; };
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
# formatter.${system} = pkgs.nixpkgs-fmt;
|
||||
|
||||
# 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
|
||||
# ];
|
||||
|
||||
|
||||
# };
|
||||
# };
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue