diff options
author | Cara Salter <cara@devcara.com> | 2022-06-08 14:14:24 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-06-08 14:14:46 -0400 |
commit | 6a777564a4319a3809a9e2872a3eaf1cc39b8b01 (patch) | |
tree | 1020d58993cfef64abc6b4b17ccefe9bd5ec4bf6 /flake.nix | |
parent | 64db5de9920c2668488693df02baaed41ee1340d (diff) | |
download | solard-6a777564a4319a3809a9e2872a3eaf1cc39b8b01.tar.gz solard-6a777564a4319a3809a9e2872a3eaf1cc39b8b01.zip |
meta: Complete project rename
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 46 |
1 files changed, 23 insertions, 23 deletions
@@ -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 ]; }; }; |