aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix46
1 files changed, 23 insertions, 23 deletions
diff --git a/flake.nix b/flake.nix
index 9963206..714b863 100644
--- a/flake.nix
+++ b/flake.nix
@@ -15,61 +15,61 @@
in
rec {
# `nix build`
- packages.waifud = naersk-lib.buildPackage {
- pname = "waifud";
+ packages.solard = naersk-lib.buildPackage {
+ pname = "solard";
root = ./.;
nativeBuildInputs = deps;
buildInputs = deps;
};
- defaultPackage = packages.waifud;
+ defaultPackage = packages.solard;
# `nix run`
- apps.waifud = flake-utils.lib.mkApp {
- drv = packages.waifud;
+ apps.solard = flake-utils.lib.mkApp {
+ drv = packages.solard;
};
- defaultApp = apps.waifud;
+ defaultApp = apps.solard;
- nixosModules.waifud = { config, lib, ... }: {
+ nixosModules.solard = { config, lib, ... }: {
options = with lib; {
- cara.services.waifud.enable = mkEnableOption "enable waifud";
- cara.services.waifud.environmentFileLocation = mkOption {
+ cara.services.solard.enable = mkEnableOption "enable solard";
+ cara.services.solard.environmentFileLocation = mkOption {
type = types.str;
- default = "/var/lib/waifud/.env";
+ default = "/var/lib/solard/.env";
description = "The location of the environment file";
};
- cara.services.waifud.port = mkOption {
+ cara.services.solard.port = mkOption {
type = types.port;
default = 3000;
description = "port to bind to";
};
};
- config = lib.mkIf config.cara.services.waifud.enable {
- users.groups.waifud = {
- members = [ "waifud" ];
+ config = lib.mkIf config.cara.services.solard.enable {
+ users.groups.solard = {
+ members = [ "solard" ];
};
- users.users.waifud = {
+ users.users.solard = {
createHome = true;
isSystemUser = true;
- home = "/var/lib/waifud";
- group = "waifud";
+ home = "/var/lib/solard";
+ group = "solard";
extraGroups = [ "libvirtd" ];
};
- systemd.services.waifud = {
+ systemd.services.solard = {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
- User = "waifud";
- Group = "waifud";
+ User = "solard";
+ Group = "solard";
Restart = "always";
WorkingDirectory = "${defaultPackage}";
- ExecStart = "${defaultPackage}/bin/waifud";
- EnvironmentFIle = "${config.cara.services.waifud.environmentFileLocation}";
+ ExecStart = "${defaultPackage}/bin/solard";
+ EnvironmentFIle = "${config.cara.services.solard.environmentFileLocation}";
};
};
- networking.firewall.allowedTCPPorts = [ config.cara.services.waifud.port ];
+ networking.firewall.allowedTCPPorts = [ config.cara.services.solard.port ];
};
};