all repos — nixfiles @ e506a5256e32ff525514c5010eb524e9b91550df

System and user configuration, managed by nix and home-manager

system/roles/desktop.nix (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ pkgs, ... }:
{
  imports = [
    ./base.nix
  ];

  services.openssh.startWhenNeeded = true;
  systemd.services."ssh-no-sleep@" = {
    bindsTo = [ "sshd@%i.service" ];
    wantedBy = [ "sshd@.service" ];
    serviceConfig.ExecStart = "${pkgs.systemd}/bin/systemd-inhibit --mode block --what sleep --who 'ssh session '%I --why 'session still active' ${pkgs.coreutils}/bin/sleep infinity";
  };

  services.syncthing = {
    systemService = false;
    user = "alin";
    group = "users";
    dataDir = "/home/alan/.config/syncthing";
  };
  systemd.user.services.syncthing.environment = {
    LOGGER_DISCARD = "1";
  };
}