2024-04-17 20:39:12 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
# WORK IN PROGRESS
|
|
|
|
# WORK IN PROGRESS
|
|
|
|
# WORK IN PROGRESS
|
|
|
|
# Shorter name to access final settings a
|
|
|
|
# user of hello.nix module HAS ACTUALLY SET.
|
|
|
|
# cfg is a typical convention.
|
2024-05-23 13:45:32 +02:00
|
|
|
cfg = config.services.tildefriends;
|
2024-04-17 20:39:12 +02:00
|
|
|
in {
|
|
|
|
# Declare what settings a user of this "hello.nix" module CAN SET.
|
2024-05-23 13:45:32 +02:00
|
|
|
options.services.tildefriends = {
|
|
|
|
enable = mkEnableOption "tildefriends service";
|
|
|
|
# greeter = mkOption {
|
|
|
|
# type = types.str;
|
|
|
|
# default = "world";
|
|
|
|
# };
|
2024-04-17 20:39:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# Define what other settings, services and resources should be active IF
|
|
|
|
# a user of this "hello.nix" module ENABLED this module
|
|
|
|
# by setting "services.hello.enable = true;".
|
|
|
|
config = mkIf cfg.enable {
|
2024-05-23 13:45:32 +02:00
|
|
|
systemd.services.tildefriends = {
|
|
|
|
after = ["network.target"];
|
2024-04-17 20:39:12 +02:00
|
|
|
wantedBy = ["multi-user.target"];
|
2024-05-23 13:45:32 +02:00
|
|
|
serviceConfig = {
|
|
|
|
WorkingDirectory = /home/tasia/Documents/tildefriends-db;
|
|
|
|
ExecStart = "${pkgs.tildefriends}/bin/tildefriends";
|
|
|
|
|
|
|
|
# ExecStart = "${pkgs.tmux}/bin/tmux -S /tmp/tmux.socket new-session -s my-session -d";
|
|
|
|
# ExecStop = "${pkgs.tmux}/bin/tmux -S /tmp/tmux.socket kill-session -t my-session";
|
|
|
|
# Type = "forking";
|
|
|
|
};
|
2024-04-17 20:39:12 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|