tangled
alpha
login
or
join now
bwc9876.dev
/
nixos-config
1
fork
atom
Flake for my NixOS devices
1
fork
atom
overview
issues
pulls
pipelines
Fix bluetooth persistence, more fonts
bwc9876.dev
4 months ago
11b15522
954a8c04
verified
This commit was signed with the committer's
known signature
.
bwc9876.dev
SSH Key Fingerprint:
SHA256:DanMEP/RNlSC7pAVbnXO6wzQV00rqyKj053tz4uH5gQ=
+77
-55
8 changed files
expand all
collapse all
unified
split
homeModules
gdi.nix
qmplay2.nix
nixosConfigurations
installer.nix
nixosModules
base.nix
fonts.nix
gdi.nix
network.nix
res
bat_display.nu
+6
-34
homeModules/gdi.nix
···
44
44
in
45
45
lib.mkIf config.cow.gdi.enable {
46
46
home.packages = with pkgs; [
47
47
-
fira-code
48
48
-
fira-go
49
49
-
nerd-fonts.symbols-only
50
50
-
noto-fonts-color-emoji
51
51
-
unifont
52
52
-
liberation_ttf
53
53
-
54
47
alsa-utils
55
48
56
49
hyprCursorTheme
···
60
53
wezterm
61
54
62
55
# Shell Components
56
56
+
hyprpicker
63
57
hyprlock
64
58
hyprland-qtutils
65
59
···
82
76
hunspell
83
77
hunspellDicts.en_US-large
84
78
];
79
79
+
80
80
+
fonts.fontconfig.enable = false;
85
81
86
82
wayland.windowManager.hyprland = {
87
83
systemd.enable = false;
···
151
147
"4,swipe,move"
152
148
];
153
149
bind = let
154
154
-
powerMenu = "rofi -modi 'p:${pkgs.rofi-power-menu}/bin/rofi-power-menu' -show p --symbols-font \"FiraMono Nerd Font Mono\"";
150
150
+
powerMenu = "rofi -modi 'p:${pkgs.rofi-power-menu}/bin/rofi-power-menu' -show p";
155
151
screenshot = "${pkgs.nushell}/bin/nu ${../res/screenshot.nu}";
156
152
157
153
openTerminal = launchDesktopApp "org.wezfurlong.wezterm.desktop";
···
192
188
"SUPER SHIFT,left,movetoworkspace,r-1"
193
189
"SUPER SHIFT,right,movetoworkspace,r+1"
194
190
"SUPER,L,exec,pidof hyprlock || hyprlock --immediate"
195
195
-
"SUPER,S,exec,${runCmd "rofi -show drun -icon-theme \"candy-icons\" -show-icons"}"
191
191
+
"SUPER,S,exec,${runCmd "rofi -show drun -show-icons"}"
196
192
"SUPER SHIFT,E,exec,${runCmd "rofi -modi emoji -show emoji"}"
197
193
"SUPER SHIFT,D,exec,swaync-client -d"
198
194
"SUPER,Delete,exec,${runCmd powerMenu}"
···
341
337
}
342
338
{
343
339
monitor = "";
344
344
-
text = ''cmd[update:30000] echo " $(date +"%A, %B %-d | %I:%M %p") | $(${pkgs.nushell}/bin/nu ${../res/bat_display.nu}) "'';
340
340
+
text = ''cmd[update:30000] echo " $(date +"%A, %B %-d | %I:%M %p")$(${pkgs.nushell}/bin/nu ${../res/bat_display.nu}) "'';
345
341
color = "$text";
346
342
font_size = 20;
347
343
font_family = "sans-serif";
···
398
394
}/bin/wayland-mpris-idle-inhibit --ignore "kdeconnect" --ignore "playerctld"'';
399
395
Restart = "on-failure";
400
396
RestartSec = "10";
401
401
-
};
402
402
-
};
403
403
-
};
404
404
-
405
405
-
fonts = {
406
406
-
fontconfig = {
407
407
-
enable = true;
408
408
-
antialiasing = true;
409
409
-
defaultFonts = let
410
410
-
mainFonts = [
411
411
-
"FiraGO"
412
412
-
"Symbols Nerd Font"
413
413
-
];
414
414
-
in {
415
415
-
serif = mainFonts;
416
416
-
sansSerif = mainFonts;
417
417
-
monospace = [
418
418
-
"Fira Code"
419
419
-
"Symbols Nerd Font"
420
420
-
];
421
421
-
emoji = [
422
422
-
"Noto Color Emoji"
423
423
-
"Symbols Nerd Font"
424
424
-
];
425
397
};
426
398
};
427
399
};
+1
-1
homeModules/qmplay2.nix
···
301
301
Background = true;
302
302
BackgroundColor = ''@Variant(\0\0\0\x43\x1\x88\x88\0\0\0\0\0\0\0\0)'';
303
303
Bold = false;
304
304
-
FontName = "Fira Code";
304
304
+
FontName = "monospace";
305
305
FontSize = 24;
306
306
LeftMargin = 15;
307
307
Outline = 1;
+2
-2
nixosConfigurations/installer.nix
···
23
23
autologinUser = "root";
24
24
fonts = [
25
25
{
26
26
-
name = "FiraMono Nerd Font Mono";
27
27
-
package = pkgs.nerd-fonts.fira-mono;
26
26
+
name = "SauceCodePro Nerd Font Mono";
27
27
+
package = pkgs.nerd-fonts.sauce-code-pro;
28
28
}
29
29
];
30
30
};
+1
nixosModules/base.nix
···
24
24
programs.ssh.startAgent = true;
25
25
documentation.man.generateCaches = false;
26
26
services.upower.enable = true;
27
27
+
services.udisks2.enable = true;
27
28
28
29
boot.tmp.cleanOnBoot = lib.mkDefault true;
29
30
services.logind.settings.Login.RuntimeDirectorySize = lib.mkDefault "100M";
+52
nixosModules/fonts.nix
···
1
1
+
{...}: {
2
2
+
pkgs,
3
3
+
config,
4
4
+
lib,
5
5
+
...
6
6
+
}: {
7
7
+
options.cow.fonts.enable =
8
8
+
(lib.mkEnableOption "font management")
9
9
+
// {
10
10
+
default = config.cow.gdi.enable;
11
11
+
};
12
12
+
13
13
+
config = lib.mkIf config.cow.fonts.enable {
14
14
+
fonts = {
15
15
+
enableDefaultPackages = true;
16
16
+
packages = with pkgs; [
17
17
+
fira-code
18
18
+
fira-go
19
19
+
noto-fonts
20
20
+
noto-fonts-lgc-plus
21
21
+
noto-fonts-cjk-sans
22
22
+
noto-fonts-cjk-serif
23
23
+
nerd-fonts.symbols-only
24
24
+
noto-fonts-color-emoji
25
25
+
corefonts
26
26
+
unifont
27
27
+
liberation_ttf
28
28
+
];
29
29
+
fontconfig = {
30
30
+
enable = true;
31
31
+
defaultFonts = {
32
32
+
serif = [
33
33
+
"Noto Serif"
34
34
+
"Symbols Nerd Font"
35
35
+
];
36
36
+
sansSerif = [
37
37
+
"FiraGO"
38
38
+
"Symbols Nerd Font"
39
39
+
];
40
40
+
monospace = [
41
41
+
"Fira Code"
42
42
+
"Symbols Nerd Font"
43
43
+
];
44
44
+
emoji = [
45
45
+
"Noto Color Emoji"
46
46
+
"Symbols Nerd Font"
47
47
+
];
48
48
+
};
49
49
+
};
50
50
+
};
51
51
+
};
52
52
+
}
+13
-16
nixosModules/gdi.nix
···
12
12
13
13
config = lib.mkIf config.cow.gdi.enable {
14
14
environment = {
15
15
-
systemPackages = with pkgs; [
16
16
-
hyprpicker
17
17
-
uwsm
18
18
-
];
15
15
+
systemPackages = with pkgs;
16
16
+
lib.mkIf config.cow.gdi.showGreet [
17
17
+
uwsm
18
18
+
];
19
19
variables = {
20
20
NIXOS_OZONE_WL = "1";
21
21
_JAVA_AWT_WM_NONEREPARENTING = "1";
···
37
37
38
38
services.greetd = lib.mkIf config.cow.gdi.showGreet {
39
39
enable = true;
40
40
-
settings = {
41
41
-
default_session = let
42
42
-
greeting = ''--greeting "Authenticate into ${lib.toUpper config.networking.hostName}"'';
43
43
-
deCmd = pkgs.writeScript "start-session.sh" ''
44
44
-
#!/usr/bin/env sh
45
45
-
exec uwsm start ${pkgs.hyprland}/share/wayland-sessions/hyprland.desktop
46
46
-
'';
47
47
-
cmd = ''--cmd "systemd-inhibit --what=handle-power-key:handle-lid-switch ${deCmd}"'';
48
48
-
in {
49
49
-
command = "${pkgs.tuigreet}/bin/tuigreet --remember --time ${greeting} ${cmd}";
50
50
-
};
51
51
-
};
40
40
+
useTextGreeter = true;
41
41
+
settings.default_session.command = let
42
42
+
greeting = ''--greeting "Authenticate into ${lib.toUpper config.networking.hostName}"'';
43
43
+
deCmd = pkgs.writeScript "start-session.sh" ''
44
44
+
#!/usr/bin/env sh
45
45
+
exec uwsm start ${pkgs.hyprland}/share/wayland-sessions/hyprland.desktop
46
46
+
'';
47
47
+
cmd = ''--cmd "systemd-inhibit --what=handle-power-key:handle-lid-switch ${deCmd}"'';
48
48
+
in "${pkgs.tuigreet}/bin/tuigreet --time ${greeting} ${cmd}";
52
49
};
53
50
};
54
51
}
+1
-1
nixosModules/network.nix
···
19
19
};
20
20
21
21
cow.imperm.keepCache =
22
22
-
(lib.optional config.cow.network.bluetooth "/var/lib/bluetooh")
22
22
+
(lib.optional config.cow.network.bluetooth "/var/lib/bluetooth")
23
23
++ (lib.optional config.cow.network.wireless "/var/lib/iwd");
24
24
25
25
networking = lib.mkIf config.cow.network.wireless {
+1
-1
res/bat_display.nu
···
43
43
$icons | get "default" | get $idx
44
44
}
45
45
46
46
-
echo $"($icon) ($percent)"
46
46
+
echo $" | ($icon) ($percent)"