From 6a777564a4319a3809a9e2872a3eaf1cc39b8b01 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Wed, 8 Jun 2022 14:14:24 -0400 Subject: meta: Complete project rename --- flake.nix | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'flake.nix') 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 ]; }; }; -- cgit v1.2.3