feat: testing vm recipe
what i'm still figuring out is port forward (and how to target dns resolution?), otherwise i'd need to add graphical session and a browser into vm
This commit is contained in:
parent
f279f8ae05
commit
42b24b3e14
|
@ -3,3 +3,4 @@
|
|||
/dump.rdb
|
||||
/result
|
||||
/routes/static/out.css
|
||||
/nixos.qcow2
|
||||
|
|
33
flake.nix
33
flake.nix
|
@ -38,7 +38,40 @@
|
|||
${pkgs.nodePackages.tailwindcss}/bin/tailwindcss -i routes/in.css -o routes/static/out.css
|
||||
'';
|
||||
};
|
||||
|
||||
default = some-automoderation;
|
||||
|
||||
# for testing whole deployment locally
|
||||
# nixos-rebuild build-vm --flake .#test-container
|
||||
nixosConfigurations.test-container = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
nixosModules.some-automoderation-module
|
||||
({ ... }: {
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
networking.firewall.enable = false;
|
||||
users.groups.test = {};
|
||||
users.mutableUsers = false;
|
||||
users.users.test = {
|
||||
isNormalUser = true;
|
||||
password = "test";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
group = "test";
|
||||
};
|
||||
services.some-automoderation = {
|
||||
enable = true;
|
||||
host = "some-automoderation.sunshine.industries";
|
||||
useNginx = false;
|
||||
port = 9090;
|
||||
redisPort = 9999;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
nixosModules.some-automoderation-module = { lib, pkgs, config, ... }:
|
||||
let
|
||||
|
|
Loading…
Reference in New Issue