This commit is contained in:
Shelvacu
2024-10-26 18:39:59 -07:00
parent 4b2a048ed7
commit 1916e9512e
8 changed files with 14 additions and 18 deletions

View File

@@ -3,6 +3,7 @@
pkgs,
lib,
inputs,
vacuModuleType ? null,
...
}:
let
@@ -21,7 +22,13 @@ in
./lib
./sops.nix
./dns
];
] ++ (
if vacuModuleType == "nixos" then [ ./nixos.nix ]
else if vacuModuleType == "nix-on-droid" then [ ./nix-on-droid.nix ]
else if vacuModuleType == "plain" then []
else if vacuModuleType != null then builtins.trace "warning: unrecognized vacuModuleType ${builtins.toString vacuModuleType}" []
else builtins.trace "warning: vacuModuleType not passed or is null" []
);
options = {
vacu.rootCAs = mkOption { type = types.listOf types.str; };
vacu.versionId = mkOption {

View File

@@ -17,7 +17,6 @@
./bluetooth.nix
./partitioning.nix
./padtype.nix
../common/nixos.nix
];
boot.loader.systemd-boot.enable = false;

View File

@@ -137,9 +137,10 @@
inherit (inputs) self;
};
inherit (inputs) dns;
vacuModuleType = "nixos";
};
inherit system;
modules = [ module ];
modules = [ ./common module ];
};
in
{
@@ -191,7 +192,7 @@
};
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
modules = [ ./nix-on-droid ];
modules = [ ./common ./nix-on-droid ];
extraSpecialArgs = {
inputs = {
inherit (inputs)
@@ -203,6 +204,7 @@
;
};
inherit (inputs) dns;
vacuNixosModuleType = "nix-on-droid";
};
pkgs = mkPkgs arm;
};
@@ -349,6 +351,7 @@
inherit pkgs;
inherit (pkgs) lib;
inherit (inputs) dns;
vacuModuleType = "plain";
};
};
in
@@ -371,6 +374,7 @@
lib.mapAttrsToList (k: v: "${v} ${k}") plain.config.vacu.ssh.authorizedKeys
)
);
vacuConfig = pkgs.writeText "vacu-config.json" (builtins.toJSON plain.config);
update-git-keys = pkgs.callPackage ./scripts/update-git-keys.nix { inherit (plain) config; };
inherit (plain.config.vacu) sopsConfig wrappedSops;
dns = import ./scripts/dns { inherit pkgs lib inputs; inherit (plain) config; };

View File

@@ -5,7 +5,6 @@
}:
{
imports = [
../common/nixos.nix
inputs.nixos-hardware.nixosModules.framework-16-7040-amd
./apex.nix
./android.nix

View File

@@ -1,6 +1,5 @@
{
config,
inputs,
modulesPath,
lib,
...
@@ -8,7 +7,6 @@
{
imports = [
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
./common/nixos.nix
];
# this is an installer image, created anew every time. There's no state we need to worry about messing up
system.stateVersion = config.system.nixos.version;
@@ -16,12 +14,4 @@
services.openssh.settings.PermitRootLogin = lib.mkForce "yes";
vacu.hostName = "vacuInstaller";
vacu.shell.color = "red";
# boot.kernelPatches = [{
# name = "foo";
# patch = null;
# extraStructuredConfig = {
# VIRTIO = lib.kernel.yes;
# VIRTIO_BLK = lib.kernel.yes;
# };
# }];
}

View File

@@ -8,7 +8,6 @@
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/virtualisation/digital-ocean-config.nix")
../common/nixos.nix
./nginx.nix
./sops.nix
./dovecot.nix

View File

@@ -1,7 +1,6 @@
{ config, pkgs, ... }:
{
imports = [
../common/nixos.nix
./hardware-config.nix
];

View File

@@ -1,7 +1,6 @@
{ config, pkgs, ... }:
{
imports = [
../common/nixos.nix
./hardware-configuration.nix
./awootrip.nix
./database.nix