Prove
This commit is contained in:
parent
d75ce43826
commit
d64d03a54f
1 changed files with 112 additions and 98 deletions
210
flake.nix
210
flake.nix
|
|
@ -1,98 +1,112 @@
|
||||||
{
|
{
|
||||||
description = "Pazpi's systems";
|
description = "Pazpi's systems";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|
||||||
# NixOS related inputs
|
# NixOS related inputs
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.05";
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, ... }@flakeInputs:
|
outputs = { self, nixpkgs, home-manager, ... }@flakeInputs:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
colmena = {
|
colmena = {
|
||||||
meta = {
|
meta = {
|
||||||
nixpkgs = import nixpkgs {
|
nixpkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [];
|
overlays = [ ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
deadbeef = {
|
childnixos = {
|
||||||
deployment = {
|
deployment = {
|
||||||
targetHost = "somehost.tld";
|
targetHost = "10.42.135.101";
|
||||||
targetPort = 1234;
|
targetPort = 22;
|
||||||
targetUser = "luser";
|
targetUser = "root";
|
||||||
};
|
};
|
||||||
boot.isContainer = true;
|
|
||||||
time.timeZone = "America/Los_Angeles";
|
imports = [ ./lxc-nix/configuration.nix ];
|
||||||
|
};
|
||||||
};
|
|
||||||
|
# deadbeef = {
|
||||||
};
|
# deployment = {
|
||||||
|
# targetHost = "10.42.135.101";
|
||||||
|
# targetPort = 22;
|
||||||
formatter.${system} = pkgs.nixpkgs-fmt;
|
# targetUser = "root";
|
||||||
|
# };
|
||||||
nixosConfigurations =
|
|
||||||
let
|
|
||||||
mkNixosConfiguration = name: extraModules: nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
# boot.isContainer = true;
|
||||||
specialArgs = { inherit flakeInputs; };
|
# time.timeZone = "Europe/Rome";
|
||||||
modules = [
|
# environment.systemPackages = with pkgs; [ htop ];
|
||||||
{
|
|
||||||
networking.hostName = name;
|
# };
|
||||||
nixpkgs.overlays = [ (_: _: { nixfiles = self.packages.${system}; }) ];
|
|
||||||
# sops.defaultSopsFile = ./hosts + "/${name}" + /secrets.yaml;
|
};
|
||||||
}
|
|
||||||
./modules
|
|
||||||
(./hosts + "/${name}")
|
formatter.${system} = pkgs.nixpkgs-fmt;
|
||||||
# (./hosts + "/${name}" + /hardware.nix)
|
|
||||||
# sops-nix.nixosModules.sops
|
nixosConfigurations =
|
||||||
] ++ extraModules;
|
let
|
||||||
};
|
mkNixosConfiguration = name: extraModules: nixpkgs.lib.nixosSystem {
|
||||||
in
|
inherit system;
|
||||||
{
|
specialArgs = { inherit flakeInputs; };
|
||||||
deadbeef = mkNixosConfiguration "deadbeef" [ ];
|
modules = [
|
||||||
# nyarlathotep = mkNixosConfiguration "nyarlathotep" [ "${nixpkgs}/nixos/modules/installer/scan/not-detected.nix" ];
|
{
|
||||||
};
|
networking.hostName = name;
|
||||||
};
|
nixpkgs.overlays = [ (_: _: { nixfiles = self.packages.${system}; }) ];
|
||||||
|
# sops.defaultSopsFile = ./hosts + "/${name}" + /secrets.yaml;
|
||||||
|
}
|
||||||
|
./modules
|
||||||
# formatter.${system} = pkgs.nixpkgs-fmt;
|
(./hosts + "/${name}")
|
||||||
|
# (./hosts + "/${name}" + /hardware.nix)
|
||||||
# nixosConfigurations = {
|
# sops-nix.nixosModules.sops
|
||||||
|
] ++ extraModules;
|
||||||
# deadbeef = nixpkgs.lib.nixosSystem {
|
};
|
||||||
# # inherit system;
|
in
|
||||||
# system = "x86_64-linux";
|
{
|
||||||
# specialArgs = { inherit inputs; };
|
deadbeef = mkNixosConfiguration "deadbeef" [ ];
|
||||||
|
# nyarlathotep = mkNixosConfiguration "nyarlathotep" [ "${nixpkgs}/nixos/modules/installer/scan/not-detected.nix" ];
|
||||||
# modules = [
|
};
|
||||||
# {
|
};
|
||||||
# networking.hostName = "deadbeef";
|
|
||||||
# nixpkgs.overlays = [ (_: _: { nixfiles = self.packages."x86_64-linux"; }) ];
|
|
||||||
# }
|
|
||||||
# ./hosts/deadbeef
|
# 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