mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
refactor: indirections f. user,[home,flake,xdg]Dir
This commit is contained in:
parent
5c207050a3
commit
9c1df052a2
34 changed files with 416 additions and 281 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{ self, lib, pkgs, config, ... }:
|
||||
let
|
||||
owner = "swarsel";
|
||||
inherit (config.swarselsystems) mainUser homeDir xdgDir;
|
||||
owner = mainUser;
|
||||
sopsFile = self + /secrets/work/secrets.yaml;
|
||||
in
|
||||
{
|
||||
|
|
@ -26,7 +27,7 @@ in
|
|||
_1password.enable = true;
|
||||
_1password-gui = {
|
||||
enable = true;
|
||||
polkitPolicyOwners = [ "swarsel" ];
|
||||
polkitPolicyOwners = [ "${mainUser}" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -93,7 +94,7 @@ in
|
|||
openssh = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
'';
|
||||
'';
|
||||
};
|
||||
|
||||
syncthing = {
|
||||
|
|
@ -103,13 +104,36 @@ in
|
|||
};
|
||||
folders = {
|
||||
"Documents" = {
|
||||
path = "/home/swarsel/Documents";
|
||||
path = "${homeDir}/Documents";
|
||||
devices = [ "magicant" "winters" ];
|
||||
id = "hgr3d-pfu3w";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
udev.extraRules = ''
|
||||
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", TAG+="systemd", ENV{SYSTEMD_WANTS}="swarsel-screenshare.service"
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
systemd.services.swarsel-screenshare = {
|
||||
enable = true;
|
||||
description = "Screensharing service upon dongle plugin";
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.screenshare}/bin/screenshare";
|
||||
User = mainUser;
|
||||
Group = "users";
|
||||
Environment = [
|
||||
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/${mainUser}/bin"
|
||||
"XDG_RUNTIME_DIR=${xdgDir}"
|
||||
"WAYLAND_DISPLAY=wayland-1"
|
||||
];
|
||||
Type = "oneshot";
|
||||
StandardOutput = "journal";
|
||||
StandardError = "journal";
|
||||
};
|
||||
};
|
||||
|
||||
# cgroups v1 is required for centos7 dockers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue