mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 23:29:08 +01:00
Rename modules directory system to nixos
This commit is contained in:
parent
653a6f310b
commit
1c1b9221fc
48 changed files with 1 additions and 1 deletions
|
|
@ -1,52 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.custom.services.atuin;
|
||||
dataDir = "/var/lib/atuin";
|
||||
in
|
||||
{
|
||||
options.custom.services.atuin = {
|
||||
enable = lib.mkEnableOption "";
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
};
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 8849;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.atuin = {
|
||||
enable = true;
|
||||
inherit (cfg) port;
|
||||
openRegistration = true;
|
||||
database = {
|
||||
createLocally = false;
|
||||
uri = "sqlite://${dataDir}/atuin.db";
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
users.atuin = {
|
||||
isSystemUser = true;
|
||||
group = config.users.groups.atuin.name;
|
||||
};
|
||||
groups.atuin = { };
|
||||
};
|
||||
|
||||
systemd.services.atuin.serviceConfig = {
|
||||
DynamicUser = lib.mkForce false;
|
||||
User = config.users.users.atuin.name;
|
||||
Group = config.users.groups.atuin.name;
|
||||
StateDirectory = "atuin";
|
||||
StateDirectoryMode = "0700";
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
persistence.directories = [ dataDir ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue