forked from fediversity/fediversity
Compare commits
6 commits
37d11bc7d1
...
f5b8304475
| Author | SHA1 | Date | |
|---|---|---|---|
| f5b8304475 | |||
| ccc7d24bf0 | |||
| 4012f2b3a6 | |||
| f98301aacf | |||
| e47642ea5c | |||
| 6f58d38c45 |
36 changed files with 111 additions and 278 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
runNixOSTest,
|
runNixOSTest,
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
|
|
@ -9,7 +10,10 @@ runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
sources,
|
sources,
|
||||||
lib,
|
lib,
|
||||||
providers,
|
providers,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
@ -23,7 +24,7 @@ in
|
||||||
../common/targetResource.nix
|
../common/targetResource.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = { inherit inputs sources modulesPath; };
|
||||||
|
|
||||||
inherit nodeName pathToRoot pathFromRoot;
|
inherit nodeName pathToRoot pathFromRoot;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,12 @@
|
||||||
outputs =
|
outputs =
|
||||||
inputs:
|
inputs:
|
||||||
import ./mkFlake.nix inputs (
|
import ./mkFlake.nix inputs (
|
||||||
{ inputs, sources, ... }:
|
{
|
||||||
|
inputs,
|
||||||
|
sources,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixops4.modules.flake.default
|
inputs.nixops4.modules.flake.default
|
||||||
|
|
@ -15,7 +20,7 @@
|
||||||
|
|
||||||
nixops4Deployments.check-deployment-basic = {
|
nixops4Deployments.check-deployment-basic = {
|
||||||
imports = [ ./deployment/check/basic/deployment.nix ];
|
imports = [ ./deployment/check/basic/deployment.nix ];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = { inherit inputs sources modulesPath; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
runNixOSTest,
|
runNixOSTest,
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
|
|
@ -9,7 +10,10 @@ runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
lib,
|
lib,
|
||||||
|
modulesPath,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
@ -15,7 +16,7 @@ let
|
||||||
|
|
||||||
makeTargetResource = nodeName: {
|
makeTargetResource = nodeName: {
|
||||||
imports = [ ../common/targetResource.nix ];
|
imports = [ ../common/targetResource.nix ];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = { inherit inputs sources modulesPath; };
|
||||||
inherit
|
inherit
|
||||||
nodeName
|
nodeName
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
lib,
|
lib,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
|
@ -19,7 +20,12 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
nixops4Deployments = import ./deployment/check/cli/deployments.nix {
|
nixops4Deployments = import ./deployment/check/cli/deployments.nix {
|
||||||
inherit inputs sources lib;
|
inherit
|
||||||
|
inputs
|
||||||
|
sources
|
||||||
|
lib
|
||||||
|
modulesPath
|
||||||
|
;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
sources,
|
|
||||||
modulesPath,
|
modulesPath,
|
||||||
|
sources,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
@ -76,7 +76,6 @@ in
|
||||||
machine =
|
machine =
|
||||||
(pkgs.nixos [
|
(pkgs.nixos [
|
||||||
./targetNode.nix
|
./targetNode.nix
|
||||||
# ../../../infra/common/nixos/repart.nix
|
|
||||||
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
||||||
config.system.extraDependenciesFromModule
|
config.system.extraDependenciesFromModule
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
config,
|
config,
|
||||||
hostPkgs,
|
hostPkgs,
|
||||||
sources,
|
sources,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
@ -78,6 +79,8 @@ in
|
||||||
./targetResource.nix
|
./targetResource.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
acmeNodeIP = config.nodes.acme.networking.primaryIPAddress;
|
||||||
|
|
||||||
nodes = lib.mkMerge [
|
nodes = lib.mkMerge [
|
||||||
{
|
{
|
||||||
deployer = lib.mkMerge [
|
deployer = lib.mkMerge [
|
||||||
|
|
@ -86,7 +89,7 @@ in
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = { inherit inputs sources; };
|
||||||
enableAcme = config.enableAcme;
|
enableAcme = config.enableAcme;
|
||||||
}
|
}
|
||||||
(lib.mkIf config.enableAcme rec {
|
(lib.mkIf config.enableAcme {
|
||||||
acmeNodeIP = config.nodes.acme.networking.primaryIPAddress;
|
acmeNodeIP = config.nodes.acme.networking.primaryIPAddress;
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
|
|
@ -96,7 +99,7 @@ in
|
||||||
security.pki.certificateFiles = [
|
security.pki.certificateFiles = [
|
||||||
(import "${inputs.nixpkgs}/nixos/tests/common/acme/server/snakeoil-certs.nix").ca.cert
|
(import "${inputs.nixpkgs}/nixos/tests/common/acme/server/snakeoil-certs.nix").ca.cert
|
||||||
];
|
];
|
||||||
networking.extraHosts = "${acmeNodeIP} acme.test";
|
networking.extraHosts = "${config.acmeNodeIP} acme.test";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -112,7 +115,7 @@ in
|
||||||
(genAttrs config.targetMachines (_: {
|
(genAttrs config.targetMachines (_: {
|
||||||
imports = [
|
imports = [
|
||||||
./targetNode.nix
|
./targetNode.nix
|
||||||
] ++ (lib.optional config.useFlake "${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix");
|
] ++ (lib.optional config.useFlake "${modulesPath}/../lib/testing/nixos-test-base.nix");
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = { inherit inputs sources; };
|
||||||
enableAcme = config.enableAcme;
|
enableAcme = config.enableAcme;
|
||||||
acmeNodeIP = if config.enableAcme then config.nodes.acme.networking.primaryIPAddress else null;
|
acmeNodeIP = if config.enableAcme then config.nodes.acme.networking.primaryIPAddress else null;
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ in
|
||||||
_class = "nixos";
|
_class = "nixos";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/minimal.nix")
|
"${modulesPath}/profiles/minimal.nix"
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
"${modulesPath}/profiles/qemu-guest.nix"
|
||||||
./sharedOptions.nix
|
./sharedOptions.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,8 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
./targetNode.nix
|
./targetNode.nix
|
||||||
(lib.modules.importJSON (config.pathToCwd + "/${config.nodeName}-network.json"))
|
(lib.modules.importJSON (config.pathToCwd + "/${config.nodeName}-network.json"))
|
||||||
] ++ (lib.optional config.useFlake "${modulesPath}/../lib/testing/nixos-test-base.nix");
|
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
||||||
|
];
|
||||||
|
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = { inherit inputs sources; };
|
||||||
enableAcme = config.enableAcme;
|
enableAcme = config.enableAcme;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
sources ? import ../../../npins,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
../common/sharedOptions.nix
|
../common/sharedOptions.nix
|
||||||
../common/targetNode.nix
|
../common/targetNode.nix
|
||||||
"${sources.nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
|
"${modulesPath}/profiles/qemu-guest.nix"
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users = environment.config.resources."operator-environment".login-shell.apply {
|
users.users = environment.config.resources."operator-environment".login-shell.apply {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
system,
|
system,
|
||||||
|
modulesPath,
|
||||||
inputs,
|
inputs,
|
||||||
sources ? import ../../../npins,
|
sources ? import ../../../npins,
|
||||||
...
|
...
|
||||||
|
|
@ -9,7 +10,7 @@ let
|
||||||
inherit (sources) nixpkgs;
|
inherit (sources) nixpkgs;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (pkgs.callPackage ../common/utils.nix { }) mkNixosConfiguration;
|
inherit (pkgs.callPackage ../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration;
|
||||||
inherit (config)
|
inherit (config)
|
||||||
nodeName
|
nodeName
|
||||||
pathFromRoot
|
pathFromRoot
|
||||||
|
|
@ -17,7 +18,7 @@ let
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
(pkgs.callPackage ../../utils.nix { inherit inputs; }).evalModel (
|
(pkgs.callPackage ../../utils.nix { inherit inputs; }).evalModel (
|
||||||
{ config, ... }:
|
{ config, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ../common/model.nix ];
|
imports = [ ../common/model.nix ];
|
||||||
config = {
|
config = {
|
||||||
|
|
@ -44,10 +45,10 @@ in
|
||||||
nixos.module = {
|
nixos.module = {
|
||||||
imports = [
|
imports = [
|
||||||
(mkNixosConfiguration environment required-resources)
|
(mkNixosConfiguration environment required-resources)
|
||||||
"${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"
|
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = { inherit inputs sources modulesPath; };
|
||||||
inherit nodeName pathToRoot pathFromRoot;
|
inherit nodeName pathToRoot pathFromRoot;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
runNixOSTest,
|
runNixOSTest,
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
|
|
@ -11,7 +12,10 @@ runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
outputs =
|
outputs =
|
||||||
inputs:
|
inputs:
|
||||||
import ./mkFlake.nix inputs (
|
import ./mkFlake.nix inputs (
|
||||||
{ inputs, ... }:
|
{ inputs, modulesPath, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
in
|
in
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
nixops4Deployments.check-deployment-model =
|
nixops4Deployments.check-deployment-model =
|
||||||
(import ./deployment/check/data-model-nixops4/data-model.nix {
|
(import ./deployment/check/data-model-nixops4/data-model.nix {
|
||||||
inherit system inputs;
|
inherit system inputs modulesPath;
|
||||||
config = {
|
config = {
|
||||||
inherit (import ./deployment/check/data-model-nixops4/constants.nix) pathToRoot pathFromRoot;
|
inherit (import ./deployment/check/data-model-nixops4/constants.nix) pathToRoot pathFromRoot;
|
||||||
nodeName = "nixops4";
|
nodeName = "nixops4";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
system,
|
system,
|
||||||
|
modulesPath,
|
||||||
sources ? import ../../../npins,
|
sources ? import ../../../npins,
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
|
|
@ -8,7 +9,7 @@ let
|
||||||
inherit (sources) nixpkgs;
|
inherit (sources) nixpkgs;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (pkgs.callPackage ../common/utils.nix { }) mkNixosConfiguration;
|
inherit (pkgs.callPackage ../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration;
|
||||||
inherit (config)
|
inherit (config)
|
||||||
nodeName
|
nodeName
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
@ -17,7 +18,7 @@ let
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
(pkgs.callPackage ../../utils.nix { }).evalModel (
|
(pkgs.callPackage ../../utils.nix { }).evalModel (
|
||||||
{ config, ... }:
|
{ config, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ../common/model.nix ];
|
imports = [ ../common/model.nix ];
|
||||||
config = {
|
config = {
|
||||||
|
|
@ -34,7 +35,7 @@ in
|
||||||
nixos-configuration = {
|
nixos-configuration = {
|
||||||
imports = [
|
imports = [
|
||||||
(mkNixosConfiguration environment required-resources)
|
(mkNixosConfiguration environment required-resources)
|
||||||
"${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"
|
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
system = targetSystem;
|
system = targetSystem;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
runNixOSTest,
|
runNixOSTest,
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
|
|
@ -11,7 +12,10 @@ runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
@ -8,7 +9,7 @@ let
|
||||||
nodeName = "ssh";
|
nodeName = "ssh";
|
||||||
deploy =
|
deploy =
|
||||||
(import ./data-model.nix {
|
(import ./data-model.nix {
|
||||||
inherit system;
|
inherit system modulesPath;
|
||||||
config = {
|
config = {
|
||||||
inherit nodeName;
|
inherit nodeName;
|
||||||
inherit (import ./constants.nix) pathToRoot;
|
inherit (import ./constants.nix) pathToRoot;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,10 @@ pkgs.testers.runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
sources,
|
sources,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -17,7 +18,7 @@ let
|
||||||
# FIXME generate the image `nixos-generate` was to make, but now do it for a desired `-c configuration.nix` rather than whatever generic thing now
|
# FIXME generate the image `nixos-generate` was to make, but now do it for a desired `-c configuration.nix` rather than whatever generic thing now
|
||||||
template-deployment =
|
template-deployment =
|
||||||
(import ./setups/template.nix {
|
(import ./setups/template.nix {
|
||||||
inherit sources system;
|
inherit sources system modulesPath;
|
||||||
config = {
|
config = {
|
||||||
httpBackend = tfBackend "proxmox-test/upload";
|
httpBackend = tfBackend "proxmox-test/upload";
|
||||||
nodeName = "pve";
|
nodeName = "pve";
|
||||||
|
|
@ -28,7 +29,7 @@ let
|
||||||
}).default.tf-proxmox-template;
|
}).default.tf-proxmox-template;
|
||||||
vm-deployment =
|
vm-deployment =
|
||||||
(import ./setups/vm.nix {
|
(import ./setups/vm.nix {
|
||||||
inherit sources system;
|
inherit sources system modulesPath;
|
||||||
config = {
|
config = {
|
||||||
httpBackend = tfBackend "proxmox-test/nixos";
|
httpBackend = tfBackend "proxmox-test/nixos";
|
||||||
inherit (import ./constants.nix) pathToRoot;
|
inherit (import ./constants.nix) pathToRoot;
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,6 @@
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# systemd-repart
|
|
||||||
# ../../../../infra/common/nixos/repart.nix
|
|
||||||
# disko
|
|
||||||
"${sources.disko}/module.nix"
|
"${sources.disko}/module.nix"
|
||||||
../../../../infra/common/proxmox-qemu-vm.nix
|
../../../../infra/common/proxmox-qemu-vm.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
system,
|
system,
|
||||||
|
modulesPath,
|
||||||
sources ? import ../../../../npins,
|
sources ? import ../../../../npins,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -8,7 +9,7 @@ let
|
||||||
inherit (sources) nixpkgs;
|
inherit (sources) nixpkgs;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (pkgs.callPackage ../../common/utils.nix { inherit sources; }) mkNixosConfiguration;
|
inherit (pkgs.callPackage ../../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration;
|
||||||
inherit (config)
|
inherit (config)
|
||||||
nodeName
|
nodeName
|
||||||
targetSystem
|
targetSystem
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
system,
|
system,
|
||||||
|
modulesPath,
|
||||||
sources ? import ../../../../npins,
|
sources ? import ../../../../npins,
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
|
|
@ -8,7 +9,7 @@ let
|
||||||
inherit (sources) nixpkgs;
|
inherit (sources) nixpkgs;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (pkgs.callPackage ../../common/utils.nix { inherit sources; }) mkNixosConfiguration;
|
inherit (pkgs.callPackage ../../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration;
|
||||||
inherit (config)
|
inherit (config)
|
||||||
nodeName
|
nodeName
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,14 @@
|
||||||
config,
|
config,
|
||||||
system,
|
system,
|
||||||
sources ? import ../../../npins,
|
sources ? import ../../../npins,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
let
|
let
|
||||||
inherit (sources) nixpkgs;
|
inherit (sources) nixpkgs;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (pkgs.callPackage ../common/utils.nix { }) mkNixosConfiguration;
|
inherit (pkgs.callPackage ../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration;
|
||||||
inherit (config)
|
inherit (config)
|
||||||
nodeName
|
nodeName
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
@ -18,7 +19,7 @@ let
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
(pkgs.callPackage ../../utils.nix { }).evalModel (
|
(pkgs.callPackage ../../utils.nix { }).evalModel (
|
||||||
{ config, ... }:
|
{ config, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ../common/model.nix ];
|
imports = [ ../common/model.nix ];
|
||||||
config = {
|
config = {
|
||||||
|
|
@ -34,7 +35,7 @@ in
|
||||||
nixos-configuration = {
|
nixos-configuration = {
|
||||||
imports = [
|
imports = [
|
||||||
(mkNixosConfiguration environment required-resources)
|
(mkNixosConfiguration environment required-resources)
|
||||||
"${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"
|
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
system = targetSystem;
|
system = targetSystem;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,10 @@ pkgs.testers.runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
sources,
|
sources,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
@ -11,7 +12,7 @@ let
|
||||||
backendPort = builtins.toString 8080;
|
backendPort = builtins.toString 8080;
|
||||||
deploy =
|
deploy =
|
||||||
(import ./data-model.nix {
|
(import ./data-model.nix {
|
||||||
inherit system;
|
inherit system modulesPath;
|
||||||
config = {
|
config = {
|
||||||
inherit nodeName pathToRoot;
|
inherit nodeName pathToRoot;
|
||||||
targetSystem = system;
|
targetSystem = system;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
runNixOSTest,
|
runNixOSTest,
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
|
|
@ -9,7 +10,10 @@ runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
lib,
|
lib,
|
||||||
|
modulesPath,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
@ -15,7 +16,7 @@ let
|
||||||
|
|
||||||
makeTargetResource = nodeName: {
|
makeTargetResource = nodeName: {
|
||||||
imports = [ ../common/targetResource.nix ];
|
imports = [ ../common/targetResource.nix ];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = { inherit inputs sources modulesPath; };
|
||||||
inherit
|
inherit
|
||||||
nodeName
|
nodeName
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
lib,
|
lib,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
|
@ -19,7 +20,12 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
nixops4Deployments.check-deployment-panel = import ./deployment/check/panel/deployment.nix {
|
nixops4Deployments.check-deployment-panel = import ./deployment/check/panel/deployment.nix {
|
||||||
inherit inputs sources lib;
|
inherit
|
||||||
|
inputs
|
||||||
|
sources
|
||||||
|
lib
|
||||||
|
modulesPath
|
||||||
|
;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ runNixOSTest {
|
||||||
sources
|
sources
|
||||||
pkgs
|
pkgs
|
||||||
;
|
;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
};
|
};
|
||||||
imports = [
|
imports = [
|
||||||
./proxmoxTest.nix
|
./proxmoxTest.nix
|
||||||
|
|
|
||||||
|
|
@ -328,43 +328,15 @@ let
|
||||||
inherit (ssh)
|
inherit (ssh)
|
||||||
host
|
host
|
||||||
;
|
;
|
||||||
# machine = import nixos_conf;
|
|
||||||
machine = import ./nixos.nix {
|
machine = import ./nixos.nix {
|
||||||
inherit sources system;
|
inherit sources system;
|
||||||
configuration = tf-host.config.nixos-configuration;
|
configuration = tf-host.config.nixos-configuration;
|
||||||
# configuration = { ... }: {
|
|
||||||
# imports = [
|
|
||||||
# tf-host.config.nixos-configuration
|
|
||||||
# ../infra/common/nixos/repart.nix
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
# inherit (machine.config.boot.uki) name;
|
|
||||||
name = "monkey";
|
name = "monkey";
|
||||||
|
|
||||||
# # systemd-repart
|
|
||||||
# better for cross-compilation, worse for pre-/post-processing, doesn't support MBR: https://github.com/nix-community/disko/issues/550#issuecomment-2503736973
|
|
||||||
# raw = "${machine.config.system.build.image}/${name}.raw";
|
|
||||||
|
|
||||||
# disko
|
|
||||||
# worse for cross-compilation, better for pre-/post-processing, needs manual `imageSize`, random failures: https://github.com/nix-community/disko/issues/550#issuecomment-2503736973
|
# worse for cross-compilation, better for pre-/post-processing, needs manual `imageSize`, random failures: https://github.com/nix-community/disko/issues/550#issuecomment-2503736973
|
||||||
raw = "${machine.config.system.build.diskoImages}/main.raw";
|
raw = "${machine.config.system.build.diskoImages}/main.raw";
|
||||||
|
|
||||||
# # nixos-generators: note it can straight-up do qcow2 as well, if we settle for nixos-generators
|
|
||||||
# # `mount: /run/nixos-etc-metadata.J3iARWBtna: failed to setup loop device for /nix/store/14ka2bmx6lcnyr8ah2yl787sqcgxz5ni-etc-metadata.erofs.`
|
|
||||||
# # [`Error: Failed to parse os-release`](https://github.com/NixOS/nixpkgs/blob/5b1861820a3bc4ef2f60b0afcffb71ea43f5d000/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs#L151)
|
|
||||||
# raw = let
|
|
||||||
# # TODO parameterize things to let this flow into the terraform
|
|
||||||
# # btw qcow can be made by nixos-generators (qcow, qcow-efi) or by `image.repart`
|
|
||||||
# # wait, so i generate an image for the nixos config from the data model? how would i then propagate that to deploy?
|
|
||||||
# gen = import "${pkgs.nixos-generators}/share/nixos-generator/nixos-generate.nix" {
|
|
||||||
# inherit system formatConfig;
|
|
||||||
# inherit (sources) nixpkgs;
|
|
||||||
# configuration = tf-host.config.nixos-configuration;
|
|
||||||
# };
|
|
||||||
# in
|
|
||||||
# "${gen.config.system.build.${formatAttr}}/nixos${fileExtension}";
|
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
inherit
|
inherit
|
||||||
host
|
host
|
||||||
|
|
@ -384,8 +356,6 @@ let
|
||||||
(withPackages [
|
(withPackages [
|
||||||
pkgs.jq
|
pkgs.jq
|
||||||
pkgs.qemu
|
pkgs.qemu
|
||||||
pkgs.nixos-generators
|
|
||||||
pkgs.httpie
|
|
||||||
(pkgs.callPackage ./run/tf-proxmox-vm/tf.nix { })
|
(pkgs.callPackage ./run/tf-proxmox-vm/tf.nix { })
|
||||||
])
|
])
|
||||||
''
|
''
|
||||||
|
|
@ -573,8 +543,6 @@ let
|
||||||
(withPackages [
|
(withPackages [
|
||||||
pkgs.jq
|
pkgs.jq
|
||||||
pkgs.qemu
|
pkgs.qemu
|
||||||
pkgs.nixos-generators
|
|
||||||
pkgs.httpie
|
|
||||||
(pkgs.callPackage ./run/tf-proxmox-vm/tf.nix { })
|
(pkgs.callPackage ./run/tf-proxmox-vm/tf.nix { })
|
||||||
])
|
])
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -14,27 +14,27 @@
|
||||||
|
|
||||||
deployment-basic = import ./check/basic {
|
deployment-basic = import ./check/basic {
|
||||||
inherit (pkgs.testers) runNixOSTest;
|
inherit (pkgs.testers) runNixOSTest;
|
||||||
inherit inputs sources;
|
inherit pkgs inputs sources;
|
||||||
};
|
};
|
||||||
|
|
||||||
deployment-cli = import ./check/cli {
|
deployment-cli = import ./check/cli {
|
||||||
inherit (pkgs.testers) runNixOSTest;
|
inherit (pkgs.testers) runNixOSTest;
|
||||||
inherit inputs sources;
|
inherit pkgs inputs sources;
|
||||||
};
|
};
|
||||||
|
|
||||||
deployment-panel = import ./check/panel {
|
deployment-panel = import ./check/panel {
|
||||||
inherit (pkgs.testers) runNixOSTest;
|
inherit (pkgs.testers) runNixOSTest;
|
||||||
inherit inputs sources;
|
inherit pkgs inputs sources;
|
||||||
};
|
};
|
||||||
|
|
||||||
deployment-model-ssh = import ./check/data-model-ssh {
|
deployment-model-ssh = import ./check/data-model-ssh {
|
||||||
inherit (pkgs.testers) runNixOSTest;
|
inherit (pkgs.testers) runNixOSTest;
|
||||||
inherit inputs sources;
|
inherit pkgs inputs sources;
|
||||||
};
|
};
|
||||||
|
|
||||||
deployment-model-nixops4 = import ./check/data-model-nixops4 {
|
deployment-model-nixops4 = import ./check/data-model-nixops4 {
|
||||||
inherit (pkgs.testers) runNixOSTest;
|
inherit (pkgs.testers) runNixOSTest;
|
||||||
inherit inputs sources;
|
inherit pkgs inputs sources;
|
||||||
};
|
};
|
||||||
|
|
||||||
deployment-model-tf = import ./check/data-model-tf {
|
deployment-model-tf = import ./check/data-model-tf {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
(lib.evalModules {
|
(lib.evalModules {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit pkgs inputs;
|
inherit pkgs inputs;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./data-model.nix
|
./data-model.nix
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
# ./repart.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
|
||||||
|
|
@ -1,192 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
"${modulesPath}/image/repart.nix"
|
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems = {
|
|
||||||
# "/" = {
|
|
||||||
# fsType = "tmpfs";
|
|
||||||
# options = [
|
|
||||||
# "size=20%"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
"/" =
|
|
||||||
let
|
|
||||||
partConf = config.image.repart.partitions."root".repartConfig;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-partuuid/${partConf.UUID}";
|
|
||||||
fsType = partConf.Format;
|
|
||||||
};
|
|
||||||
|
|
||||||
# "/var" =
|
|
||||||
# let
|
|
||||||
# partConf = config.image.repart.partitions."var".repartConfig;
|
|
||||||
# in
|
|
||||||
# {
|
|
||||||
# device = "/dev/disk/by-partuuid/${partConf.UUID}";
|
|
||||||
# fsType = partConf.Format;
|
|
||||||
# };
|
|
||||||
|
|
||||||
"/boot" =
|
|
||||||
let
|
|
||||||
partConf = config.image.repart.partitions."esp".repartConfig;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-partuuid/${partConf.UUID}";
|
|
||||||
fsType = partConf.Format;
|
|
||||||
};
|
|
||||||
|
|
||||||
# "/nix/store" =
|
|
||||||
# let
|
|
||||||
# partConf = config.image.repart.partitions."store".repartConfig;
|
|
||||||
# in
|
|
||||||
# {
|
|
||||||
# device = "/dev/disk/by-partlabel/${partConf.Label}";
|
|
||||||
# fsType = partConf.Format;
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.uki.name = "monkey";
|
|
||||||
# fileSystems."/".device = "/dev/disk/by-label/nixos";
|
|
||||||
# https://nixos.org/manual/nixos/stable/#sec-image-repart
|
|
||||||
# https://x86.lol/generic/2024/08/28/systemd-sysupdate.html
|
|
||||||
image.repart =
|
|
||||||
let
|
|
||||||
efiArch = pkgs.stdenv.hostPlatform.efiArch;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
name = config.boot.uki.name;
|
|
||||||
# name = "image";
|
|
||||||
# split = true;
|
|
||||||
partitions = {
|
|
||||||
"esp" = {
|
|
||||||
# The contents to end up in the filesystem image.
|
|
||||||
contents = {
|
|
||||||
# "/EFI/BOOT/BOOTX64.EFI".source = "${pkgs.systemd}/lib/systemd/boot/efi/systemd-bootx64.efi";
|
|
||||||
"/EFI/BOOT/BOOT${lib.toUpper efiArch}.EFI".source =
|
|
||||||
"${pkgs.systemd}/lib/systemd/boot/efi/systemd-boot${efiArch}.efi";
|
|
||||||
|
|
||||||
"/EFI/Linux/${config.system.boot.loader.ukiFile}".source =
|
|
||||||
"${config.system.build.uki}/${config.system.boot.loader.ukiFile}";
|
|
||||||
|
|
||||||
# https://man.archlinux.org/man/loader.conf.5
|
|
||||||
"/loader/entries/loader.conf".source = pkgs.writeText "loader.conf" ''
|
|
||||||
timeout 0
|
|
||||||
editor yes
|
|
||||||
default *
|
|
||||||
logLevel=debug
|
|
||||||
'';
|
|
||||||
# "/loader/loader.conf".source = pkgs.writeText "loader.conf" ''
|
|
||||||
# timeout 0
|
|
||||||
# editor yes
|
|
||||||
# default *
|
|
||||||
# logLevel=debug
|
|
||||||
# '';
|
|
||||||
# nixos-*.conf
|
|
||||||
# "/loader/entries/nixos.conf".source = pkgs.writeText "nixos.conf" ''
|
|
||||||
# title NixOS
|
|
||||||
# linux /EFI/nixos/kernel.efi
|
|
||||||
# initrd /EFI/nixos/initrd.efi
|
|
||||||
# options init=/nix/store/.../init root=LABEL=nixos
|
|
||||||
# '';
|
|
||||||
|
|
||||||
# systemd-boot configuration
|
|
||||||
"/loader/loader.conf".source = (
|
|
||||||
pkgs.writeText "$out" ''
|
|
||||||
timeout 3
|
|
||||||
''
|
|
||||||
);
|
|
||||||
};
|
|
||||||
# https://www.man7.org/linux//man-pages/man5/repart.d.5.html
|
|
||||||
repartConfig = {
|
|
||||||
Priority = 1;
|
|
||||||
Type = "esp";
|
|
||||||
MountPoint = "/boot";
|
|
||||||
Format = "vfat";
|
|
||||||
UUID = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
|
|
||||||
SizeMinBytes = "500M";
|
|
||||||
SizeMaxBytes = "500M";
|
|
||||||
};
|
|
||||||
# repartConfig = {
|
|
||||||
# Type = "esp";
|
|
||||||
# UUID = "c12a7328-f81f-11d2-ba4b-00a0c93ec93b"; # Well known
|
|
||||||
# Format = "vfat";
|
|
||||||
# SizeMinBytes = "256M";
|
|
||||||
# SplitName = "-";
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
"root" = {
|
|
||||||
storePaths = [ config.system.build.toplevel ];
|
|
||||||
repartConfig = {
|
|
||||||
Priority = 2;
|
|
||||||
Type = "root";
|
|
||||||
Label = "nixos";
|
|
||||||
MountPoint = "/";
|
|
||||||
Format = "ext4";
|
|
||||||
UUID = "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb";
|
|
||||||
# populates the fs twice
|
|
||||||
Minimize = "guess";
|
|
||||||
# Minimize = "off";
|
|
||||||
# SizeMinBytes = "1G";
|
|
||||||
# SizeMaxBytes = "20G";
|
|
||||||
};
|
|
||||||
|
|
||||||
# "store" = {
|
|
||||||
# storePaths = [ config.system.build.toplevel ];
|
|
||||||
# stripNixStorePrefix = true;
|
|
||||||
# repartConfig = {
|
|
||||||
# Type = "linux-generic";
|
|
||||||
# Label = "store_${config.system.image.version}";
|
|
||||||
# Format = "squashfs";
|
|
||||||
# Minimize = "off";
|
|
||||||
# ReadOnly = "yes";
|
|
||||||
|
|
||||||
# SizeMinBytes = "1G";
|
|
||||||
# SizeMaxBytes = "1G";
|
|
||||||
# SplitName = "store";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
# # Placeholder for the second installed Nix store.
|
|
||||||
# "store-empty" = {
|
|
||||||
# repartConfig = {
|
|
||||||
# Type = "linux-generic";
|
|
||||||
# Label = "_empty";
|
|
||||||
# Minimize = "off";
|
|
||||||
# SizeMinBytes = "1G";
|
|
||||||
# SizeMaxBytes = "1G";
|
|
||||||
# SplitName = "-";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
# # Persistent storage
|
|
||||||
# "var" = {
|
|
||||||
# repartConfig = {
|
|
||||||
# Type = "var";
|
|
||||||
# UUID = "4d21b016-b534-45c2-a9fb-5c16e091fd2d"; # Well known
|
|
||||||
# Format = "xfs";
|
|
||||||
# Label = "nixos-persistent";
|
|
||||||
# Minimize = "off";
|
|
||||||
|
|
||||||
# # Has to be large enough to hold update files.
|
|
||||||
# SizeMinBytes = "2G";
|
|
||||||
# SizeMaxBytes = "2G";
|
|
||||||
# SplitName = "-";
|
|
||||||
|
|
||||||
# # Wiping this gives us a clean state.
|
|
||||||
# FactoryReset = "yes";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -30,13 +30,13 @@
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
|
|
||||||
partitions = {
|
partitions = {
|
||||||
mbr = {
|
MBR = {
|
||||||
priority = 0;
|
priority = 0;
|
||||||
size = "1M";
|
size = "1M";
|
||||||
type = "EF02";
|
type = "EF02";
|
||||||
};
|
};
|
||||||
|
|
||||||
esp = {
|
ESP = {
|
||||||
priority = 1;
|
priority = 1;
|
||||||
size = "500M";
|
size = "500M";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,8 @@ let
|
||||||
inputs = inputs';
|
inputs = inputs';
|
||||||
};
|
};
|
||||||
|
|
||||||
flake-parts-lib = import "${sources.flake-parts}/lib.nix" { inherit (nixpkgs) lib; };
|
inherit (nixpkgs) lib outPath;
|
||||||
|
flake-parts-lib = import "${sources.flake-parts}/lib.nix" { inherit lib; };
|
||||||
in
|
in
|
||||||
|
|
||||||
flakeModule:
|
flakeModule:
|
||||||
|
|
@ -41,6 +42,7 @@ flake-parts-lib.mkFlake
|
||||||
self = self';
|
self = self';
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit sources;
|
inherit sources;
|
||||||
|
modulesPath = "${builtins.toString outPath}/nixos/modules";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue