-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
125 lines (108 loc) · 3.56 KB
/
Copy pathdefault.nix
File metadata and controls
125 lines (108 loc) · 3.56 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
120
121
122
123
124
125
{
lib,
config,
inputs,
pkgs,
pkgs-unstable,
alnLib,
inventory,
ctx,
...
}:
let
# wrap in nixGL to fix OpenGL under nix in non-Nixos systems
dms-pkg = config.lib.nixGL.wrap inputs.dms.packages.${pkgs.stdenv.hostPlatform.system}.default;
in
{
imports = [
inputs.dms.homeModules.dank-material-shell
inputs.dms-plugin-registry.homeModules.default
];
config = lib.mkIf config.aln.de.enable {
programs.dank-material-shell = {
enable = true;
package = dms-pkg; # wait for this option to be changed in nixos stable
systemd = {
enable = true;
restartIfChanged = true;
};
enableVPN = true;
enableSystemMonitoring = true; # uses dms's dgop
dgop.package = pkgs-unstable.dgop;
enableDynamicTheming = true; # mutagen
enableAudioWavelength = true;
enableCalendarEvents = false; # khal ; need extra setup
enableClipboardPaste = false; # wtype ; use vicinae for this
settings = {
enableFprint = ctx.host.equals inventory.hosts.theseus; # TODO: refactor or keep track of this
maxFprintTries = 8;
loginctlLockIntegration = true;
lockBeforeSuspend = true;
fadeToLockEnabled = true; # fade to lock screen before locking
fadeToLockGracePeriod = 5; # sec
fadeToDpmsEnabled = true; # fade to lock screen before turning off monitors
fadeToDpmsGracePeriod = 5;
# automatic lock, turn off monitor, or suspend (sec)
batteryLockTimeout = 180;
batteryMonitorTimeout = 300;
batterySuspendTimeout = 600;
batterySuspendBehavior = 0; # 0: suspend, 1: hibernate, 2: suspend then hibernate
acLockTimeout = 300;
acMonitorTimeout = 600;
acSuspendTimeout = 1800;
acSuspendBehavior = 0;
powerMenuDefaultAction = "lock";
clipboardSettings.disabled = true;
displayNameMode = "model"; # recognize monitors by model rather than name
weatherEnabled = true;
useAutoLocation = true;
# popoutAnimationSpeed = 4; # custom
# popoutCustomAnimationDuration = 50;
niriOverviewOverlayEnabled = false; # disable dms launcher
appIdSubstitutions = [ ];
};
session = {
showThirdPartyPlugins = true;
wallpaperPath = alnLib.relToRoot "assets/wallpaper/the-wind-rises.jpg";
};
plugins = {
dankBatteryAlerts.enable = true;
displayMirror.enable = true;
ddcBrightness.enable = false; #ctx.user.inGroup.i2c;
};
# niri = {
# enableSpawn = false;
# enableKeybinds = false;
# includes.enable = false;
# };
};
home.packages = with pkgs; [
libnotify # dankBatteryAlerts
wl-mirror # displayMirror
];
# dms is ride or die for niri
systemd.user.services.dms = {
Unit = {
After = [ "niri.service" ];
BindsTo = [ "niri.service" ];
};
};
aln.niri = {
configFile."dms" = {
enable = true;
content = ''
include "${config.lib.file.mkOutOfStoreSymlink (alnLib.outOfStoreRelToRoot config.home.homeDirectory ./dms.kdl)}"
'';
};
# place below in config since the filepath is relative to niri's config.kdl
config = ''
include "dms/alttab.kdl"
include "dms/outputs.kdl" // displays
include "dms/wpblur.kdl" // blurring wallpaper settings
include "dms/colors.kdl" // niri colors managed by dms matugen theme
'';
};
};
}
# convert json kv row to nix
# :%s/"\([a-zA-z0-9]\+\)": \([^,]\+\),/\1 = \2;/