forked from fediversity/fediversity
Compare commits
No commits in common. "d836710cb699f65195b35d2e35feb071c2fef910" and "cbec8fa3fc965205530c910fb15cfb04e315dcde" have entirely different histories.
d836710cb6
...
cbec8fa3fc
5 changed files with 74 additions and 22 deletions
|
|
@ -49,16 +49,12 @@ in
|
||||||
substituters = mkForce [ ];
|
substituters = mkForce [ ];
|
||||||
hashed-mirrors = null;
|
hashed-mirrors = null;
|
||||||
connect-timeout = 1;
|
connect-timeout = 1;
|
||||||
|
download-attempts = 1;
|
||||||
extra-experimental-features = "flakes";
|
extra-experimental-features = "flakes";
|
||||||
};
|
};
|
||||||
|
|
||||||
system.extraDependencies =
|
system.extraDependencies =
|
||||||
[
|
[
|
||||||
inputs.nixops4
|
|
||||||
inputs.nixops4-nixos
|
|
||||||
inputs.nixpkgs
|
|
||||||
|
|
||||||
sources.flake-parts
|
|
||||||
sources.nixpkgs
|
sources.nixpkgs
|
||||||
|
|
||||||
sources.flake-inputs
|
sources.flake-inputs
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ in
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
(modulesPath + "/../lib/testing/nixos-test-base.nix")
|
(modulesPath + "/../lib/testing/nixos-test-base.nix")
|
||||||
./sharedOptions.nix
|
./sharedOptions.nix
|
||||||
|
../../../infra/common/nixos/users.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
|
|
@ -28,11 +29,12 @@ in
|
||||||
system.switch.enable = true;
|
system.switch.enable = true;
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
# short-cut network time-outs
|
|
||||||
settings.download-attempts = 1;
|
|
||||||
## Not used; save a large copy operation
|
## Not used; save a large copy operation
|
||||||
channel.enable = false;
|
channel.enable = false;
|
||||||
registry = lib.mkForce { };
|
registry = lib.mkForce { };
|
||||||
|
settings = {
|
||||||
|
download-attempts = 1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
|
|
@ -40,10 +42,46 @@ in
|
||||||
settings.PermitRootLogin = "yes";
|
settings.PermitRootLogin = "yes";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
networking = {
|
||||||
|
firewall.enable = false;
|
||||||
|
enableIPv6 = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.getty.autologinUser = lib.mkForce "root";
|
||||||
|
|
||||||
## Test VMs don't have a bootloader by default.
|
## Test VMs don't have a bootloader by default.
|
||||||
boot.loader.grub.enable = false;
|
# boot.loader = {
|
||||||
|
# # GRUB enabled: installation of GRUB on /dev/disk/by-id/virtio-root failed: No such file or directory
|
||||||
|
# grub.enable = false;
|
||||||
|
# # systemd boot enabled: '/boot' is not a mounted partition. Is the path configured correctly?
|
||||||
|
# systemd-boot.enable = true;
|
||||||
|
# efi.canTouchEfiVariables = true;
|
||||||
|
# };
|
||||||
|
# # same issue as no bootloader
|
||||||
|
# boot.loader.generic-extlinux-compatible.enable = false;
|
||||||
|
# builds but won't boot back up
|
||||||
|
boot.loader.grub.forceInstall = true;
|
||||||
|
# # builds but won't boot back up
|
||||||
|
# # to be used with --no-bootloader, which i could only find for flakes
|
||||||
|
# boot.loader.grub.enable = false;
|
||||||
|
|
||||||
|
users.mutableUsers = false;
|
||||||
|
users.users.root = {
|
||||||
|
password = "password";
|
||||||
|
hashedPassword = null;
|
||||||
|
hashedPasswordFile = null;
|
||||||
|
openssh.authorizedKeys.keys =
|
||||||
|
let
|
||||||
|
keys = import ../../../keys;
|
||||||
|
in
|
||||||
|
lib.attrValues keys.contributors
|
||||||
|
++ [
|
||||||
|
# allow our panel vm access to the test machines
|
||||||
|
keys.panel
|
||||||
|
# allow continuous deployment access
|
||||||
|
keys.cd
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
(mkIf config.enableAcme {
|
(mkIf config.enableAcme {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
|
# sources,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
# inherit (import ./constants.nix) targetMachines pathToRoot pathFromRoot;
|
||||||
eval =
|
eval =
|
||||||
module:
|
module:
|
||||||
(lib.evalModules {
|
(lib.evalModules {
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ in
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
hello
|
hello
|
||||||
|
cowsay
|
||||||
automake
|
automake
|
||||||
autoconf
|
autoconf
|
||||||
];
|
];
|
||||||
|
|
@ -65,6 +66,14 @@ in
|
||||||
|
|
||||||
'
|
'
|
||||||
let
|
let
|
||||||
|
args = builtins.fromJSON "${
|
||||||
|
lib.replaceStrings [ "\"" ] [ "\\\\\"" ] (
|
||||||
|
lib.strings.toJSON {
|
||||||
|
inherit sources;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}";
|
||||||
|
inherit (args) sources;
|
||||||
configuration = { pkgs, config, ... }: {
|
configuration = { pkgs, config, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
${pathToRoot}/deployment/check/common/sharedOptions.nix
|
${pathToRoot}/deployment/check/common/sharedOptions.nix
|
||||||
|
|
@ -81,8 +90,24 @@ in
|
||||||
autoconf
|
autoconf
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
eval = import "${sources.nixpkgs}/nixos/lib/eval-config.nix" {
|
||||||
|
system = builtins.currentSystem;
|
||||||
|
specialArgs = {
|
||||||
|
inherit sources;
|
||||||
|
};
|
||||||
|
modules = [ configuration ];
|
||||||
|
};
|
||||||
|
os = {
|
||||||
|
inherit (eval) pkgs config options;
|
||||||
|
system = eval.config.system.build.toplevel;
|
||||||
|
inherit (eval.config.system.build) vm vmWithBootLoader;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
import ${pathToRoot}/deployment/nixos.nix { inherit configuration; }
|
# import "${pathToRoot}/deployment/nixos.nix" {}
|
||||||
|
{
|
||||||
|
drv_path = os.config.system.build.toplevel.drvPath;
|
||||||
|
out_path = os.config.system.build.toplevel;
|
||||||
|
}
|
||||||
'
|
'
|
||||||
)
|
)
|
||||||
# instantiate the config in /nix/store
|
# instantiate the config in /nix/store
|
||||||
|
|
|
||||||
|
|
@ -4,20 +4,11 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
sources = import ../npins;
|
sources = import ../npins;
|
||||||
eval = import "${sources.nixpkgs}/nixos/lib/eval-config.nix" {
|
os = import "${sources.nixpkgs}/nixos" { inherit system configuration; };
|
||||||
inherit system;
|
|
||||||
specialArgs = {
|
|
||||||
inherit sources;
|
|
||||||
};
|
|
||||||
modules = [ configuration ];
|
|
||||||
};
|
|
||||||
os = {
|
|
||||||
inherit (eval) pkgs config options;
|
|
||||||
system = eval.config.system.build.toplevel;
|
|
||||||
inherit (eval.config.system.build) vm vmWithBootLoader;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
substituters = builtins.concatStringsSep " " os.config.nix.settings.substituters;
|
||||||
|
trusted_public_keys = builtins.concatStringsSep " " os.config.nix.settings.trusted-public-keys;
|
||||||
drv_path = os.config.system.build.toplevel.drvPath;
|
drv_path = os.config.system.build.toplevel.drvPath;
|
||||||
out_path = os.config.system.build.toplevel;
|
out_path = os.config.system.build.toplevel;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue