working on harmonia
This commit is contained in:
parent
1f466b63d3
commit
8dba8e7ce8
20 changed files with 556 additions and 90 deletions
|
|
@ -1,9 +1,7 @@
|
|||
{
|
||||
runCommand,
|
||||
}: runCommand "tests-basic-configuration-dot-nix" {
|
||||
}: runCommand "tests-gotosocial-configuration-dot-nix" {
|
||||
} ''
|
||||
set -euo pipefail
|
||||
mkdir -vp "$out/share/nixos"
|
||||
cp -rv ${./configuration.nix} "$out/share/nixos/configuration.nix"
|
||||
#cp -rv ${../../modules/dynamicism} "$out/share/nixos/dynamicism"
|
||||
install -Dm a=r ${./configuration.nix} "$out/share/nixos/configuration.nix"
|
||||
''
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ in
|
|||
system.switch.enable = true;
|
||||
documentation.enable = false;
|
||||
|
||||
networking.hostName = "machine";
|
||||
networking.hostName = "gotosocial-machine";
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
|
|
@ -47,7 +47,7 @@ in
|
|||
enable = true;
|
||||
setupPostgresqlDB = true;
|
||||
settings = {
|
||||
application-name = "gotosocial-for-${name}";
|
||||
application-name = "gotosocial-for-machine";
|
||||
host = "${name}.local";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ def run_log(machine: Machine, *commands: str, timeout: int | None = 60) -> str:
|
|||
def get_config_file() -> str:
|
||||
machine.wait_for_unit("gotosocial.service")
|
||||
gotosocial_pid = int(machine.get_unit_property("gotosocial.service", "MainPID"))
|
||||
print(f"{gotosocial_pid=}")
|
||||
|
||||
cmdline = machine.succeed(f"cat /proc/{gotosocial_pid}/cmdline")
|
||||
cmdline_args = cmdline.split("\0")
|
||||
|
|
@ -53,8 +52,7 @@ def get_config_file() -> str:
|
|||
machine.wait_for_unit("default.target")
|
||||
assert "lix" in machine.succeed("nix --version").lower()
|
||||
machine.log("INIT")
|
||||
|
||||
machine.succeed("nix profile install -vv $(realpath /run/current-system/sw/share/nixos/modules/dynix)")
|
||||
run_log(machine, "journalctl --no-pager -eu install-dynix.service")
|
||||
|
||||
machine.succeed("nixos-generate-config")
|
||||
machine.succeed("mkdir -vp /etc/nixos")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ dynix, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
name = "nixos-test-dynamicism-main";
|
||||
name = "nixos-test-dynamicism-gotosocial";
|
||||
|
||||
defaults = { ... }: { };
|
||||
|
||||
|
|
@ -9,27 +9,12 @@
|
|||
p.beartype
|
||||
];
|
||||
|
||||
nodes.machine = { pkgs, config, ... }: {
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
# NOTE: Anything in this `nodes.machine = ` module will not be included
|
||||
# in the VM's NixOS configuration once it does `nixos-rebuild switch`,
|
||||
# except for `./configuration.nix` which will be copied to `/etc/nixos/`.
|
||||
# dynix will also be statefully installed to root's user profile.
|
||||
imports = [
|
||||
./configuration.nix
|
||||
(toString dynix)
|
||||
];
|
||||
|
||||
system.includeBuildDependencies = true;
|
||||
system.switch.enable = true;
|
||||
|
||||
virtualisation.additionalPaths = [ config.system.build.toplevel ];
|
||||
virtualisation = {
|
||||
memorySize = 4096;
|
||||
cores = 4;
|
||||
writableStore = true;
|
||||
mountHostNixStore = true;
|
||||
installBootLoader = true;
|
||||
};
|
||||
imports = [ ./configuration.nix ];
|
||||
|
||||
environment.systemPackages = let
|
||||
configFileTree = pkgs.callPackage ./configuration-package.nix { };
|
||||
|
|
@ -38,7 +23,5 @@
|
|||
];
|
||||
};
|
||||
|
||||
# What's a little IFD between friends?
|
||||
testScript = ./test-script.py
|
||||
|> builtins.readFile;
|
||||
testScript = builtins.readFile ./test-script.py;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue