Set up intray server setup + change catgirl config
This commit is contained in:
parent
ff97c8886b
commit
e37b3bc363
|
@ -177,7 +177,7 @@
|
|||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.${user} = import ./home/${hostname}.nix;
|
||||
home-manager.extraSpecialArgs = specialArgs system;
|
||||
home-manager.extraSpecialArgs = specialArgs system // { inherit hostname; };
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
stylix.homeManagerIntegration.followSystem = false;
|
||||
|
@ -220,7 +220,7 @@
|
|||
mkHomeConfig = { system, hostname }:
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = specialArgs system;
|
||||
extraSpecialArgs = specialArgs system // { inherit hostname; };
|
||||
modules = [ ./home/${hostname}.nix ];
|
||||
};
|
||||
in
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# Catgirl is a terminal based irc client
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, hostname ? "hermes", ... }:
|
||||
let
|
||||
mkCatgirlNetwork = network: ''
|
||||
host = ${network}.irc.moonythm.dev
|
||||
save = ${network}
|
||||
user = ${hostname}
|
||||
port = 6697
|
||||
'';
|
||||
in
|
||||
|
|
|
@ -14,7 +14,6 @@ let
|
|||
# {{{ self management
|
||||
# NOTE: using `pkgs.system` before `module.options` is evaluated
|
||||
# leads to infinite recursion!
|
||||
inputs.intray.nixosModules.x86_64-linux.default
|
||||
inputs.smos.nixosModules.x86_64-linux.default
|
||||
inputs.tickler.nixosModules.x86_64-linux.default
|
||||
# }}}
|
||||
|
|
|
@ -7,4 +7,8 @@
|
|||
dnsProvider = "porkbun";
|
||||
environmentFile = config.sops.secrets.porkbun_secrets.path;
|
||||
};
|
||||
|
||||
environment.persistence."/persist/state".directories = [
|
||||
"/var/lib/acme"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
./services/syncthing.nix
|
||||
./services/whoogle.nix
|
||||
./services/pounce.nix
|
||||
./services/intray.nix
|
||||
./filesystems
|
||||
./hardware
|
||||
];
|
||||
|
|
49
hosts/nixos/lapetus/services/intray.nix
Normal file
49
hosts/nixos/lapetus/services/intray.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
username = "prescientmoon";
|
||||
apiHost = "api.intray.moonythm.dev";
|
||||
apiPort = 8402;
|
||||
webHost = "intray.moonythm.dev";
|
||||
webPort = 8403;
|
||||
in
|
||||
{
|
||||
# {{{ Import intray module
|
||||
imports = [
|
||||
# We patch out the `intray` module to allow manual configuration for nginx
|
||||
a:
|
||||
# NOTE: using `pkgs.system` before `module.options` is evaluated
|
||||
# leads to infinite recursion!
|
||||
let m = inputs.intray.nixosModules.x86_64-linux.default a;
|
||||
in
|
||||
{
|
||||
inherit (m) options;
|
||||
config = { inherit (m.config) systemd; };
|
||||
}
|
||||
];
|
||||
# }}}
|
||||
# {{{ Configure intray
|
||||
services.intray.production = {
|
||||
enable = true;
|
||||
api-server = {
|
||||
enable = true;
|
||||
hosts = [ apiHost ];
|
||||
port = apiPort;
|
||||
admins = [ username ];
|
||||
};
|
||||
web-server = {
|
||||
enable = true;
|
||||
hosts = [ webHost ];
|
||||
port = webPort;
|
||||
api-url = "https://${apiHost}";
|
||||
};
|
||||
};
|
||||
# }}}
|
||||
# {{{ Networking & storage
|
||||
services.nginx.virtualHosts.${apiHost} = config.satellite.proxy apiPort;
|
||||
services.nginx.virtualHosts.${webHost} = config.satellite.proxy webPort;
|
||||
|
||||
environment.persistence."/persist/state".directories = [
|
||||
"/www/intray/production/data"
|
||||
];
|
||||
# }}}
|
||||
}
|
|
@ -27,7 +27,4 @@ in
|
|||
};
|
||||
|
||||
services.nginx.virtualHosts."search.moonythm.dev" = config.satellite.proxy port;
|
||||
environment.persistence."/persist/state".directories = [
|
||||
"/var/lib/acme"
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue