-
Notifications
You must be signed in to change notification settings - Fork 0
/
overlays.nix
executable file
·68 lines (64 loc) · 1.84 KB
/
overlays.nix
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
{ inputs', inputs }:
# Go: https://github.com/NixOS/nixpkgs/issues/86349#issuecomment-624489806
# Rust:
(inputs.self.lib.genOverlays [
"fenix"
"nuenv"
"dae"
])
++ [
(
final: prev:
prev.lib.genAttrs [
"prismlauncher"
"resign"
"nix-direnv"
"radicle"
"nixd"
] (n: inputs'.${n}.packages.default)
# //
# GUI applications overlay. for stability
# prev.lib.genAttrs [ "hyprland" ] (n: (import inputs.nixpkgs-gui { inherit system; }).${n})
// {
# inherit
# (import inputs.nixpkgs-factorio {
# inherit (prev) system;
# config.allowUnfree = true;
# })
# factorio-headless-experimental
# ;
inherit (inputs'.browser-previews.packages) google-chrome-beta;
inherit (inputs'.nyx.packages) scx;
save-clipboard-to = prev.writeShellScriptBin "save-clipboard-to" ''
wl-paste > $HOME/Pictures/Screenshots/$(date +'shot_%Y-%m-%d-%H%M%S.png')
'';
switch-mute = final.nuenv.writeScriptBin {
name = "switch-mute";
script =
let
pamixer = prev.lib.getExe prev.pamixer;
in
''
${pamixer} --get-mute | str trim | if $in == "false" { ${pamixer} -m } else { ${pamixer} -u }
'';
};
systemd-run-app = prev.writeShellApplication {
name = "systemd-run-app";
text = ''
name=$(${final.uutils-coreutils-noprefix}/bin/basename "$1")
id=$(${final.openssl}/bin/openssl rand -hex 4)
exec systemd-run \
--user \
--scope \
--unit "$name-$id" \
--slice=app \
--same-dir \
--collect \
--property PartOf=graphical-session.target \
--property After=graphical-session.target \
-- "$@"
'';
};
}
)
]