-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathimalison.nix
More file actions
119 lines (106 loc) · 3.18 KB
/
Copy pathimalison.nix
File metadata and controls
119 lines (106 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
config,
pkgs,
...
}: let
session = import ./session-variables.nix;
in {
home-manager.users.imalison = {
imports = [
./emacs.nix
./dotfiles-links.nix
];
# The GTK file-chooser right-click context menu (Show Hidden Files, etc.)
# is unreliable under Hyprland/wlroots (upstream popup-focus bug,
# hyprwm/Hyprland#6426), so set these toggles as defaults instead of
# relying on the broken menu. Ctrl+H still toggles hidden files live.
dconf.settings."org/gtk/settings/file-chooser" = {
show-hidden = true;
sort-directories-first = true;
};
programs.git.enable = true;
programs.git.signing.format = "openpgp";
programs.gh = {
enable = true;
settings.git_protocol = "ssh";
};
# Rootless podman stores images/layers under ~/.local/share/containers.
# NixOS' `virtualisation.podman.autoPrune` only affects the rootful store,
# so we prune the per-user store with a user timer.
systemd.user.services.podman-auto-prune = {
Unit = {
Description = "Podman auto prune (rootless)";
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.podman}/bin/podman system prune -a -f";
};
};
systemd.user.timers.podman-auto-prune = {
Unit = {
Description = "Podman auto prune (rootless)";
};
Timer = {
OnCalendar = "daily";
Persistent = true;
RandomizedDelaySec = "1h";
};
Install = {
WantedBy = ["timers.target"];
};
};
systemd.user.services.hyprpaper = let
hyprpaperConf = pkgs.writeText "hyprpaper.conf" ''
ipc = true
splash = false
'';
hyprpaperPath = pkgs.lib.makeBinPath [
pkgs.coreutils
pkgs.findutils
pkgs.gnugrep
pkgs.gnused
pkgs.hyprpaper
pkgs.jq
];
in {
Unit = {
Description = "Hyprpaper (managed by home-manager)";
ConditionEnvironment = session.hyprland;
PartOf = ["hyprland-session.target"];
After = ["hyprland-session.target"];
};
Service = {
Environment = [
"HYPRPAPER_CONFIG=${hyprpaperConf}"
"HYPRCTL=/run/current-system/sw/bin/hyprctl"
"PATH=${hyprpaperPath}:/run/current-system/sw/bin"
"WALLPAPER_DIR=/var/lib/syncthing/sync/Wallpaper/use"
];
ExecStart = "${pkgs.bash}/bin/bash ${../dotfiles/lib/bin/start-hyprpaper}";
ExecStartPost = "${pkgs.bash}/bin/bash ${../dotfiles/lib/bin/set-hyprpaper-wallpaper}";
Restart = "on-failure";
RestartPreventExitStatus = 75;
RestartSec = 1;
};
Install = {
WantedBy = ["hyprland-session.target"];
};
};
systemd.user.services.tailscale-systray = {
Unit = {
Description = "Tailscale systray";
After = ["graphical-session.target" "tray.target"];
PartOf = ["graphical-session.target"];
Requires = ["tray.target"];
};
Service = {
ExecStart = "${pkgs.tailscale}/bin/tailscale systray";
Restart = "on-failure";
RestartSec = 3;
};
Install = {
WantedBy = ["graphical-session.target"];
};
};
};
}