Skip to content
Merged
2 changes: 1 addition & 1 deletion config/mempalace/config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"palace": "/home/ubuntu/ghq/github.com/shunkakinoki/wiki"
"palace_path": "__HOME_DIR__/ghq/github.com/shunkakinoki/wiki"
}
10 changes: 8 additions & 2 deletions config/mempalace/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
_: {
{config, ...}: let
homeDir = config.home.homeDirectory;
configText = builtins.replaceStrings
["__HOME_DIR__"]
[homeDir]
(builtins.readFile ./config.json);
in {
home.file.".mempalace/config.json" = {
source = ./config.json;
text = configText;
force = true;
};
}
2 changes: 1 addition & 1 deletion config/paperclip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let
database_mode = if host.isKyber then "postgres" else "embedded-postgres";
database_connection_string = "";
deployment_mode = if host.isKyber then "authenticated" else "local_trusted";
host = "127.0.0.1";
host = if host.isKyber then "0.0.0.0" else "127.0.0.1";
allowed_hostname = if host.isKyber then "paperclip.shunkakinoki.com" else "";
is_kyber = if host.isKyber then "true" else "false";
};
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
};
kyber = import ./named-hosts/kyber {
inherit inputs;
username = "ubuntu";
username = "shunkakinoki";
system = "x86_64-linux";
};
};
Expand Down
2 changes: 1 addition & 1 deletion home-manager/services/paperclip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ lib.mkIf host.isKyber {
RestartSec = "5s";
Environment = [
"HOME=${homeDir}"
"HOST=127.0.0.1"
"HOST=0.0.0.0"
"PAPERCLIP_DEPLOYMENT_MODE=authenticated"
"PAPERCLIP_ALLOWED_HOSTNAMES=paperclip.shunkakinoki.com,172.17.0.1"
"PATH=${homeDir}/.local/bin:${homeDir}/.bun/bin:${homeDir}/.nix-profile/bin:${homeDir}/.local/share/pnpm:${homeDir}/.local/share/fnm/current/bin:${homeDir}/.npm-global/bin:/usr/local/bin:/usr/bin:/bin"
Expand Down
2 changes: 1 addition & 1 deletion named-hosts/kyber/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kyber - Ubuntu Linux server configuration
{
inputs,
username ? "ubuntu",
username ? "shunkakinoki",
system ? "x86_64-linux",
}:
let
Expand Down
Loading