feat(nix): add rrv.sh module and enable for server

This commit is contained in:
Mohammad Rafiq 2025-07-09 03:50:34 +08:00
parent c026887236
commit 2710c71820
No known key found for this signature in database
4 changed files with 51 additions and 0 deletions

21
flake.lock generated
View file

@ -471,6 +471,7 @@
"nixpkgs": "nixpkgs",
"nur": "nur",
"nvf": "nvf",
"rrv-sh": "rrv-sh",
"rrvsh-nixpkgs": "rrvsh-nixpkgs",
"sops-nix": "sops-nix",
"stable-diffusion-webui-nix": "stable-diffusion-webui-nix",
@ -479,6 +480,26 @@
"text": "text"
}
},
"rrv-sh": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1751721838,
"narHash": "sha256-702c0fbgpUuEuQsduGJ9I5bSrCLYEG88SPuZXcSQqTs=",
"owner": "rrvsh",
"repo": "rrv.sh",
"rev": "e00c1c2607b55f43ef74b5f555f62838f4fe5963",
"type": "github"
},
"original": {
"owner": "rrvsh",
"repo": "rrv.sh",
"type": "github"
}
},
"rrvsh-nixpkgs": {
"locked": {
"lastModified": 1750146550,

View file

@ -102,6 +102,11 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "dedupe_flake-utils";
};
# my website :)
rrv-sh = {
url = "github:rrvsh/rrv.sh";
inputs.nixpkgs.follows = "nixpkgs";
};
### DEDUPE ###

View file

@ -73,6 +73,8 @@
domain = "git.rrv.sh";
openFirewall = true;
};
rrv-sh.enable = true;
rrv-sh.domain = "rrv.sh";
};
};
};

View file

@ -0,0 +1,23 @@
{ config, inputs, ... }:
let
inherit (config.flake.lib.services) mkWebApp;
in
{
flake.modules.nixos.default =
{ config, ... }:
let
cfg = config.server.web-apps.rrv-sh;
in
mkWebApp {
inherit config;
name = "rrv-sh";
defaultPort = 2309;
extraConfig.services.rrv-sh = {
enable = true;
inherit (cfg) port;
};
}
// {
imports = [ inputs.rrv-sh.nixosModules.default ];
};
}