forked from fediversity/fediversity
Compare commits
14 commits
cbec8fa3fc
...
d836710cb6
| Author | SHA1 | Date | |
|---|---|---|---|
| d836710cb6 | |||
| c33107022b | |||
| 6257ad5bd1 | |||
| 167d38ab9a | |||
| 55912c0c35 | |||
| fb13af9260 | |||
| 9dca16d6b7 | |||
| 94a0e930e7 | |||
| e090884352 | |||
| 975cf8a200 | |||
| 33da4d6e46 | |||
| aa0e7e2a42 | |||
| a2f8527f83 | |||
| 0217b292c8 |
5 changed files with 22 additions and 74 deletions
|
|
@ -49,12 +49,16 @@ in
|
|||
substituters = mkForce [ ];
|
||||
hashed-mirrors = null;
|
||||
connect-timeout = 1;
|
||||
download-attempts = 1;
|
||||
extra-experimental-features = "flakes";
|
||||
};
|
||||
|
||||
system.extraDependencies =
|
||||
[
|
||||
inputs.nixops4
|
||||
inputs.nixops4-nixos
|
||||
inputs.nixpkgs
|
||||
|
||||
sources.flake-parts
|
||||
sources.nixpkgs
|
||||
|
||||
sources.flake-inputs
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ in
|
|||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
(modulesPath + "/../lib/testing/nixos-test-base.nix")
|
||||
./sharedOptions.nix
|
||||
../../../infra/common/nixos/users.nix
|
||||
];
|
||||
|
||||
config = mkMerge [
|
||||
|
|
@ -29,12 +28,11 @@ in
|
|||
system.switch.enable = true;
|
||||
|
||||
nix = {
|
||||
# short-cut network time-outs
|
||||
settings.download-attempts = 1;
|
||||
## Not used; save a large copy operation
|
||||
channel.enable = false;
|
||||
registry = lib.mkForce { };
|
||||
settings = {
|
||||
download-attempts = 1;
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
|
|
@ -42,46 +40,10 @@ in
|
|||
settings.PermitRootLogin = "yes";
|
||||
};
|
||||
|
||||
networking = {
|
||||
firewall.enable = false;
|
||||
enableIPv6 = false;
|
||||
};
|
||||
|
||||
services.getty.autologinUser = lib.mkForce "root";
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
## Test VMs don't have a bootloader by default.
|
||||
# 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
|
||||
];
|
||||
};
|
||||
boot.loader.grub.enable = false;
|
||||
}
|
||||
|
||||
(mkIf config.enableAcme {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
{
|
||||
inputs,
|
||||
# sources,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
# inherit (import ./constants.nix) targetMachines pathToRoot pathFromRoot;
|
||||
eval =
|
||||
module:
|
||||
(lib.evalModules {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ in
|
|||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
hello
|
||||
cowsay
|
||||
automake
|
||||
autoconf
|
||||
];
|
||||
|
|
@ -66,14 +65,6 @@ in
|
|||
|
||||
'
|
||||
let
|
||||
args = builtins.fromJSON "${
|
||||
lib.replaceStrings [ "\"" ] [ "\\\\\"" ] (
|
||||
lib.strings.toJSON {
|
||||
inherit sources;
|
||||
}
|
||||
)
|
||||
}";
|
||||
inherit (args) sources;
|
||||
configuration = { pkgs, config, ... }: {
|
||||
imports = [
|
||||
${pathToRoot}/deployment/check/common/sharedOptions.nix
|
||||
|
|
@ -90,24 +81,8 @@ in
|
|||
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
|
||||
# import "${pathToRoot}/deployment/nixos.nix" {}
|
||||
{
|
||||
drv_path = os.config.system.build.toplevel.drvPath;
|
||||
out_path = os.config.system.build.toplevel;
|
||||
}
|
||||
import ${pathToRoot}/deployment/nixos.nix { inherit configuration; }
|
||||
'
|
||||
)
|
||||
# instantiate the config in /nix/store
|
||||
|
|
|
|||
|
|
@ -4,11 +4,20 @@
|
|||
}:
|
||||
let
|
||||
sources = import ../npins;
|
||||
os = import "${sources.nixpkgs}/nixos" { inherit system configuration; };
|
||||
eval = import "${sources.nixpkgs}/nixos/lib/eval-config.nix" {
|
||||
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
|
||||
{
|
||||
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;
|
||||
out_path = os.config.system.build.toplevel;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue