tangled
alpha
login
or
join now
ladas552.me
/
Flake-ocean
0
fork
atom
My NixOS config Part 3: Flake-Parts Crusaders
nix.ladas552.me
hjem
nix
nixos
impermanence
flake-parts
nvfetcher
niri
noctalia
0
fork
atom
overview
issues
pulls
pipelines
run0 instead of sudo, looks kinda ugly when promted
ladas552.me
2 weeks ago
35711133
e56baaaf
verified
This commit was signed with the committer's
known signature
.
ladas552.me
SSH Key Fingerprint:
SHA256:0redZTrFxpDNqzo1nB3+1r0tUTqjJNLsKTW6QpfrRi0=
+32
4 changed files
expand all
collapse all
unified
split
modules
hosts
NixPort
imports.nix
NixToks
imports.nix
NixWool
imports.nix
nixosModules
run0.nix
+1
modules/hosts/NixPort/imports.nix
···
45
45
noct
46
46
xkb
47
47
zfs
48
48
+
run0
48
49
network-manager
49
50
fish
50
51
yt-dlp
+1
modules/hosts/NixToks/imports.nix
···
44
44
xkb
45
45
fish
46
46
yt-dlp-NixToks
47
47
+
run0
47
48
48
49
# temporary
49
50
# tangled
+1
modules/hosts/NixWool/imports.nix
···
30
30
fish
31
31
bluesky-pds
32
32
tangled
33
33
+
run0
33
34
# Users
34
35
root
35
36
ladas552
+29
modules/nixosModules/run0.nix
···
1
1
+
{
2
2
+
flake.modules.nixos.run0 = {
3
3
+
# Stolen from @Gerg
4
4
+
# https://github.com/Gerg-L/nixos/blob/96b7bbdb20bdfbeb9d7d733cee47eaac39cf5ec0/nixosModules/security.nix
5
5
+
environment.shellAliases = {
6
6
+
#make run0 use aliases
7
7
+
sudo = "run0 --background='' ";
8
8
+
};
9
9
+
services.dbus.implementation = "broker";
10
10
+
security = {
11
11
+
sudo.enable = false;
12
12
+
polkit = {
13
13
+
enable = true;
14
14
+
extraConfig = ''
15
15
+
polkit.addRule(function(action, subject) {
16
16
+
if (action.id == "org.freedesktop.policykit.exec"
17
17
+
|| action.id.indexOf("org.freedesktop.systemd1.") == 0) {
18
18
+
return polkit.Result.AUTH_ADMIN_KEEP;
19
19
+
}
20
20
+
});
21
21
+
'';
22
22
+
};
23
23
+
};
24
24
+
environment.etc."polkit-1/polkitd.conf".text = ''
25
25
+
[Polkitd]
26
26
+
ExpirationSeconds=60
27
27
+
'';
28
28
+
};
29
29
+
}