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
Switch to Niri
bwc9876.dev
4 months ago
bf990e37
b33ea688
verified
This commit was signed with the committer's
known signature
.
bwc9876.dev
SSH Key Fingerprint:
SHA256:DanMEP/RNlSC7pAVbnXO6wzQV00rqyKj053tz4uH5gQ=
+570
-458
8 changed files
expand all
collapse all
unified
split
flake.lock
flake.nix
homeModules
gdi.nix
keepassxc.nix
waybar.nix
nixosConfigurations
aperture.nix
nixosModules
gdi.nix
user-bean.nix
+132
-26
flake.lock
···
202
202
]
203
203
},
204
204
"locked": {
205
205
-
"lastModified": 1762440070,
206
206
-
"narHash": "sha256-xxdepIcb39UJ94+YydGP221rjnpkDZUlykKuF54PsqI=",
205
205
+
"lastModified": 1762810396,
206
206
+
"narHash": "sha256-dxFVgQPG+R72dkhXTtqUm7KpxElw3u6E+YlQ2WaDgt8=",
207
207
"owner": "hercules-ci",
208
208
"repo": "flake-parts",
209
209
-
"rev": "26d05891e14c88eb4a5d5bee659c0db5afb609d8",
209
209
+
"rev": "0bdadb1b265fb4143a75bd1ec7d8c915898a9923",
210
210
"type": "github"
211
211
},
212
212
"original": {
···
283
283
]
284
284
},
285
285
"locked": {
286
286
-
"lastModified": 1762779084,
287
287
-
"narHash": "sha256-BkC7JdC5vBFAkRoM4xPCDqlVsEvoqhdw8rFIEJETXpQ=",
286
286
+
"lastModified": 1762844981,
287
287
+
"narHash": "sha256-Sghy+Gi+zcUDFfdDJuKyPMtF/klSTeWjmJZoQH7SwzA=",
288
288
"owner": "nix-community",
289
289
"repo": "flakelight",
290
290
-
"rev": "2772ecc2b9c6b7291d31a92cb85899418f29345e",
290
290
+
"rev": "faf9643dce373b7a556c77af8f8b961a75a066a4",
291
291
"type": "github"
292
292
},
293
293
"original": {
···
410
410
]
411
411
},
412
412
"locked": {
413
413
-
"lastModified": 1762721397,
414
414
-
"narHash": "sha256-E428EuouA4nFTNlLuqlL4lVR78X+EbBIqDqsBFnB79w=",
413
413
+
"lastModified": 1762787259,
414
414
+
"narHash": "sha256-t2U/GLLXHa2+kJkwnFNRVc2fEJ/lUfyZXBE5iKzJdcs=",
415
415
"owner": "nix-community",
416
416
"repo": "home-manager",
417
417
-
"rev": "b8645b18b0f5374127bbade6de7381ef0b3d5720",
417
417
+
"rev": "37a3d97f2873e0f68711117c34d04b7c7ead8f4e",
418
418
"type": "github"
419
419
},
420
420
"original": {
···
475
475
"nixpkgs"
476
476
],
477
477
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
478
478
-
"rust-overlay": [
479
479
-
"rust-overlay"
480
480
-
]
478
478
+
"rust-overlay": "rust-overlay"
481
479
},
482
480
"locked": {
483
481
"lastModified": 1762205063,
···
493
491
"type": "github"
494
492
}
495
493
},
494
494
+
"niri": {
495
495
+
"inputs": {
496
496
+
"niri-stable": "niri-stable",
497
497
+
"niri-unstable": "niri-unstable",
498
498
+
"nixpkgs": [
499
499
+
"nixpkgs"
500
500
+
],
501
501
+
"nixpkgs-stable": "nixpkgs-stable",
502
502
+
"xwayland-satellite-stable": "xwayland-satellite-stable",
503
503
+
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
504
504
+
},
505
505
+
"locked": {
506
506
+
"lastModified": 1762857797,
507
507
+
"narHash": "sha256-puoFJGlbL6khrQKozCO6Wgpq/IhA2Sfnz+ui/87lbQQ=",
508
508
+
"owner": "sodiboo",
509
509
+
"repo": "niri-flake",
510
510
+
"rev": "2ff3443b4226f6721a43b75e76b6ca59caa34fec",
511
511
+
"type": "github"
512
512
+
},
513
513
+
"original": {
514
514
+
"owner": "sodiboo",
515
515
+
"repo": "niri-flake",
516
516
+
"type": "github"
517
517
+
}
518
518
+
},
519
519
+
"niri-stable": {
520
520
+
"flake": false,
521
521
+
"locked": {
522
522
+
"lastModified": 1756556321,
523
523
+
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
524
524
+
"owner": "YaLTeR",
525
525
+
"repo": "niri",
526
526
+
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
527
527
+
"type": "github"
528
528
+
},
529
529
+
"original": {
530
530
+
"owner": "YaLTeR",
531
531
+
"ref": "v25.08",
532
532
+
"repo": "niri",
533
533
+
"type": "github"
534
534
+
}
535
535
+
},
536
536
+
"niri-unstable": {
537
537
+
"flake": false,
538
538
+
"locked": {
539
539
+
"lastModified": 1762854265,
540
540
+
"narHash": "sha256-iykTzCzU8hI7b8LvAquYY4Asl2xj3AcLzWZv6rm8MGY=",
541
541
+
"owner": "YaLTeR",
542
542
+
"repo": "niri",
543
543
+
"rev": "fb2f67c8a036f674e9101e15a7bb1cf61524ebde",
544
544
+
"type": "github"
545
545
+
},
546
546
+
"original": {
547
547
+
"owner": "YaLTeR",
548
548
+
"repo": "niri",
549
549
+
"type": "github"
550
550
+
}
551
551
+
},
496
552
"nix-index-db": {
497
553
"inputs": {
498
554
"nixpkgs": [
···
515
571
},
516
572
"nixos-hardware": {
517
573
"locked": {
518
518
-
"lastModified": 1762463231,
519
519
-
"narHash": "sha256-hv1mG5j5PTbnWbtHHomzTus77pIxsc4x8VrMjc7+/YE=",
574
574
+
"lastModified": 1762847253,
575
575
+
"narHash": "sha256-BWWnUUT01lPwCWUvS0p6Px5UOBFeXJ8jR+ZdLX8IbrU=",
520
576
"owner": "NixOS",
521
577
"repo": "nixos-hardware",
522
522
-
"rev": "52113c4f5cfd1e823001310e56d9c8d0699a6226",
578
578
+
"rev": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9",
523
579
"type": "github"
524
580
},
525
581
"original": {
···
544
600
"type": "github"
545
601
}
546
602
},
603
603
+
"nixpkgs-stable": {
604
604
+
"locked": {
605
605
+
"lastModified": 1762756533,
606
606
+
"narHash": "sha256-HiRDeUOD1VLklHeOmaKDzf+8Hb7vSWPVFcWwaTrpm+U=",
607
607
+
"owner": "NixOS",
608
608
+
"repo": "nixpkgs",
609
609
+
"rev": "c2448301fb856e351aab33e64c33a3fc8bcf637d",
610
610
+
"type": "github"
611
611
+
},
612
612
+
"original": {
613
613
+
"owner": "NixOS",
614
614
+
"ref": "nixos-25.05",
615
615
+
"repo": "nixpkgs",
616
616
+
"type": "github"
617
617
+
}
618
618
+
},
547
619
"nixvim": {
548
620
"inputs": {
549
621
"flake-parts": "flake-parts_2",
···
554
626
"systems": "systems_2"
555
627
},
556
628
"locked": {
557
557
-
"lastModified": 1762778675,
558
558
-
"narHash": "sha256-dUlfSvX3vOTwQ90fH2Chx29TQF5/F0KNIG7Jnhut2GA=",
629
629
+
"lastModified": 1762865386,
630
630
+
"narHash": "sha256-2hkqfvY2wH+78M85X/ZApyZURnFc926b2mAHiyHcGDE=",
559
631
"owner": "nix-community",
560
632
"repo": "nixvim",
561
561
-
"rev": "0f561db35c832ebabd3447f420662cb8753a2d8c",
633
633
+
"rev": "9e556e752505263eef8c0d0f982e2ab9029cc512",
562
634
"type": "github"
563
635
},
564
636
"original": {
···
697
769
"hm": "hm",
698
770
"imperm": "imperm",
699
771
"lanzaboote": "lanzaboote",
772
772
+
"niri": "niri",
700
773
"nix-index-db": "nix-index-db",
701
774
"nixos-hardware": "nixos-hardware",
702
775
"nixpkgs": "nixpkgs",
703
776
"nixvim": "nixvim",
704
777
"nu_plugin_dbus": "nu_plugin_dbus",
705
705
-
"rust-overlay": "rust-overlay",
706
778
"spoon": "spoon",
707
779
"wayland-mpris-idle-inhibit": "wayland-mpris-idle-inhibit"
708
780
}
···
744
816
"rust-overlay": {
745
817
"inputs": {
746
818
"nixpkgs": [
819
819
+
"lanzaboote",
747
820
"nixpkgs"
748
821
]
749
822
},
750
823
"locked": {
751
751
-
"lastModified": 1762742448,
752
752
-
"narHash": "sha256-XMxV0h13gg63s0sV6beihCIqdpcJhtbse6DHI743nvo=",
824
824
+
"lastModified": 1761791894,
825
825
+
"narHash": "sha256-myRIDh+PxaREz+z9LzbqBJF+SnTFJwkthKDX9zMyddY=",
753
826
"owner": "oxalica",
754
827
"repo": "rust-overlay",
755
755
-
"rev": "7f3556887e3375dc26ff1601b57c93ee286f2c5e",
828
828
+
"rev": "59c45eb69d9222a4362673141e00ff77842cd219",
756
829
"type": "github"
757
830
},
758
831
"original": {
···
779
852
]
780
853
},
781
854
"locked": {
782
782
-
"lastModified": 1762377373,
783
783
-
"narHash": "sha256-oc2sIniNQQwArQyASFCMtci2T88qtVgZEjgdVN3UzCY=",
855
855
+
"lastModified": 1762836691,
856
856
+
"narHash": "sha256-4g00XF3VcjC2WkX+DQHhsL6Sv7OHK3PzzGOjh2m1uPo=",
784
857
"ref": "refs/heads/main",
785
785
-
"rev": "04dfe79667923fccb4cf2a361af4a99f7af10f48",
786
786
-
"revCount": 286,
858
858
+
"rev": "06976dab800f19002798fe5be33733cb5a0ca835",
859
859
+
"revCount": 294,
787
860
"type": "git",
788
861
"url": "https://codeberg.org/spoonbaker/mono"
789
862
},
···
898
971
"original": {
899
972
"owner": "Bwc9876",
900
973
"repo": "wayland-mpris-idle-inhibit",
974
974
+
"type": "github"
975
975
+
}
976
976
+
},
977
977
+
"xwayland-satellite-stable": {
978
978
+
"flake": false,
979
979
+
"locked": {
980
980
+
"lastModified": 1755491097,
981
981
+
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
982
982
+
"owner": "Supreeeme",
983
983
+
"repo": "xwayland-satellite",
984
984
+
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
985
985
+
"type": "github"
986
986
+
},
987
987
+
"original": {
988
988
+
"owner": "Supreeeme",
989
989
+
"ref": "v0.7",
990
990
+
"repo": "xwayland-satellite",
991
991
+
"type": "github"
992
992
+
}
993
993
+
},
994
994
+
"xwayland-satellite-unstable": {
995
995
+
"flake": false,
996
996
+
"locked": {
997
997
+
"lastModified": 1762747449,
998
998
+
"narHash": "sha256-Z1TKiux8K09a93w4PFDFsj8HFugXNy3iCC3Z8MpR5Rk=",
999
999
+
"owner": "Supreeeme",
1000
1000
+
"repo": "xwayland-satellite",
1001
1001
+
"rev": "6338574bc5c036487486acde264f38f39ea15fad",
1002
1002
+
"type": "github"
1003
1003
+
},
1004
1004
+
"original": {
1005
1005
+
"owner": "Supreeeme",
1006
1006
+
"repo": "xwayland-satellite",
901
1007
"type": "github"
902
1008
}
903
1009
}
+24
-33
flake.nix
···
10
10
hm.url = "github:nix-community/home-manager";
11
11
hm.inputs.nixpkgs.follows = "nixpkgs";
12
12
nixos-hardware.url = "github:NixOS/nixos-hardware";
13
13
-
# lanzaboote.url = "github:nix-community/lanzaboote";
14
14
-
# lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
13
13
+
lanzaboote.url = "github:nix-community/lanzaboote";
14
14
+
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
15
15
wayland-mpris-idle-inhibit.url = "github:Bwc9876/wayland-mpris-idle-inhibit";
16
16
wayland-mpris-idle-inhibit.inputs.nixpkgs.follows = "nixpkgs";
17
17
fenix.url = "github:nix-community/fenix/monthly";
···
27
27
gh-grader-preview.inputs.nixpkgs.follows = "nixpkgs";
28
28
bingus.url = "github:Bwc9876/bingus-bot";
29
29
bingus.inputs.nixpkgs.follows = "nixpkgs";
30
30
-
31
31
-
lanzaboote = {
32
32
-
url = "github:nix-community/lanzaboote";
33
33
-
inputs = {
34
34
-
nixpkgs.follows = "nixpkgs";
35
35
-
rust-overlay.follows = "rust-overlay";
36
36
-
};
37
37
-
};
38
38
-
rust-overlay = {
39
39
-
url = "github:oxalica/rust-overlay";
40
40
-
inputs.nixpkgs.follows = "nixpkgs";
41
41
-
};
30
30
+
niri.url = "github:sodiboo/niri-flake";
31
31
+
niri.inputs.nixpkgs.follows = "nixpkgs";
42
32
43
33
spoon.url = "git+https://codeberg.org/spoonbaker/mono";
44
34
spoon.inputs = {
···
49
39
};
50
40
};
51
41
52
52
-
outputs = inputs @ {
53
53
-
self,
54
54
-
nixpkgs,
55
55
-
flakelight,
56
56
-
nix-index-db,
57
57
-
hm,
58
58
-
nixos-hardware,
59
59
-
lanzaboote,
60
60
-
wayland-mpris-idle-inhibit,
61
61
-
fenix,
62
62
-
catppuccin,
63
63
-
nixvim,
64
64
-
imperm,
65
65
-
nu_plugin_dbus,
66
66
-
bingus,
67
67
-
spoon,
68
68
-
gh-grader-preview,
69
69
-
rust-overlay,
70
70
-
}:
42
42
+
outputs =
43
43
+
inputs@{
44
44
+
self,
45
45
+
nixpkgs,
46
46
+
flakelight,
47
47
+
nix-index-db,
48
48
+
hm,
49
49
+
nixos-hardware,
50
50
+
lanzaboote,
51
51
+
wayland-mpris-idle-inhibit,
52
52
+
fenix,
53
53
+
catppuccin,
54
54
+
nixvim,
55
55
+
imperm,
56
56
+
nu_plugin_dbus,
57
57
+
bingus,
58
58
+
spoon,
59
59
+
gh-grader-preview,
60
60
+
niri,
61
61
+
}:
71
62
flakelight ./. {
72
63
imports = [
73
64
spoon.flakelightModules.repl
+381
-346
homeModules/gdi.nix
···
1
1
-
{inputs, ...}: {
1
1
+
{ inputs, ... }:
2
2
+
{
2
3
config,
3
4
lib,
4
5
pkgs,
5
6
...
6
6
-
}: {
7
7
+
}:
8
8
+
{
9
9
+
imports = [ inputs.niri.homeModules.niri ];
10
10
+
11
11
+
# TODO: Replace Hyprland with Niri, switch out gdi.nix for this
7
12
options.cow.gdi = {
8
8
-
enable = lib.mkEnableOption "Cow GDI, a 'DE' by ur favorite polish cow";
9
9
-
doIdle = lib.mkEnableOption "Screen locking and suspend with Hypridle";
10
10
-
useUWSM = lib.mkEnableOption "Use UWSM to launch apps";
13
13
+
enable = lib.mkEnableOption "Niri + Customizations";
14
14
+
doIdle = lib.mkEnableOption "Turn off screen, sleep, etc. from inactivity";
11
15
};
12
16
13
13
-
config = let
14
14
-
runCmd = cmd:
15
15
-
if config.cow.gdi.useUWSM
16
16
-
then "uwsm app -- ${cmd}"
17
17
-
else cmd;
18
18
-
launchDesktopApp = deskFile:
19
19
-
if config.cow.gdi.useUWSM
20
20
-
then "uwsm app -- ${deskFile}"
21
21
-
else "${pkgs.gtk3}/bin/gtk-launch ${deskFile}";
22
22
-
screenOffCmd = "hyprctl dispatch dpms off; ${pkgs.swaynotificationcenter}/bin/swaync-client --inhibitor-add \"timeout\"";
23
23
-
screenOnCmd = "hyprctl dispatch dpms on; ${pkgs.swaynotificationcenter}/bin/swaync-client --inhibitor-remove \"timeout\"";
24
24
-
iconTheme = {
25
25
-
name = "Tela-green";
26
26
-
package = pkgs.tela-icon-theme;
27
27
-
};
28
28
-
cursorTheme = {
29
29
-
name = "catppuccin-mocha-dark-cursors";
30
30
-
package = pkgs.catppuccin-cursors.mochaDark;
31
31
-
size = 24;
32
32
-
};
33
33
-
hyprThemeName = "${cursorTheme.name}-hypr";
34
34
-
hyprCursorTheme = let
35
35
-
utils = "${pkgs.hyprcursor}/bin/hyprcursor-util";
17
17
+
config =
18
18
+
let
19
19
+
iconTheme = {
20
20
+
name = "Tela-green";
21
21
+
package = pkgs.tela-icon-theme;
22
22
+
};
23
23
+
cursorTheme = {
24
24
+
name = "catppuccin-mocha-dark-cursors";
25
25
+
package = pkgs.catppuccin-cursors.mochaDark;
26
26
+
size = 24;
27
27
+
};
36
28
in
37
37
-
pkgs.runCommand hyprThemeName {} ''
38
38
-
export PATH="$PATH:${pkgs.xcur2png}/bin"
39
39
-
${utils} -x ${cursorTheme.package}/share/icons/${cursorTheme.name} --output .
40
40
-
mkdir -p $out/share/icons
41
41
-
${utils} -c ./extracted_${cursorTheme.name} --output .
42
42
-
cp -r "./theme_Extracted Theme" $out/share/icons/${hyprThemeName}
43
43
-
'';
44
44
-
in
45
29
lib.mkIf config.cow.gdi.enable {
30
30
+
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
31
31
+
32
32
+
# Me when I'm stupid and enable my preferred keyring unconditionally in a flake for a WM
33
33
+
services.gnome-keyring.enable = lib.mkForce false;
34
34
+
46
35
home.packages = with pkgs; [
47
36
alsa-utils
48
37
49
49
-
hyprCursorTheme
50
38
cursorTheme.package
51
39
iconTheme.package
52
40
53
41
wezterm
54
42
55
43
# Shell Components
56
56
-
hyprpicker
57
44
hyprlock
58
58
-
hyprland-qtutils
59
45
60
46
## Waybar
61
47
qt6.qttools # For component
···
67
53
grim
68
54
xdg-utils
69
55
grimblast
70
70
-
tesseract
71
56
swappy
72
57
libnotify
73
58
swaynotificationcenter
···
90
75
91
76
fonts.fontconfig.enable = false;
92
77
93
93
-
wayland.windowManager.hyprland = {
94
94
-
systemd.enable = false;
78
78
+
programs.niri = {
95
79
enable = true;
96
96
-
extraConfig = ''
97
97
-
bind = SUPER,M,submap,passthru
98
98
-
submap = passthru
99
99
-
bind = SUPER,ESCAPE,submap,reset
100
100
-
submap = reset
101
101
-
'';
102
80
settings = {
103
103
-
autogenerated = 0;
104
104
-
ecosystem = {
105
105
-
no_update_news = true;
106
106
-
no_donation_nag = true;
107
107
-
};
108
108
-
cursor = {
109
109
-
no_hardware_cursors = true;
110
110
-
enable_hyprcursor = false;
81
81
+
prefer-no-csd = true;
82
82
+
83
83
+
environment = {
84
84
+
NIXOS_OZONE_WL = "1";
111
85
};
112
112
-
monitor = [
113
113
-
",highres,auto,1"
86
86
+
87
87
+
screenshot-path = "~/Pictures/Screenshots/%Y%m%d_%H%M%S.png";
88
88
+
89
89
+
xwayland-satellite.path = lib.getExe pkgs.xwayland-satellite-unstable;
90
90
+
91
91
+
window-rules = [
92
92
+
{
93
93
+
geometry-corner-radius =
94
94
+
let
95
95
+
s = 10.0;
96
96
+
in
97
97
+
{
98
98
+
top-left = s;
99
99
+
top-right = s;
100
100
+
bottom-left = s;
101
101
+
bottom-right = s;
102
102
+
};
103
103
+
clip-to-geometry = true;
104
104
+
}
114
105
];
115
115
-
general = {
116
116
-
border_size = 2;
117
117
-
resize_on_border = true;
118
118
-
"col.active_border" = "$red $peach $yellow $green $sapphire $lavender $mauve 225deg";
119
119
-
};
120
120
-
decoration = {
121
121
-
rounding = 10;
106
106
+
107
107
+
hotkey-overlay = {
108
108
+
hide-not-bound = true;
109
109
+
skip-at-startup = true;
122
110
};
111
111
+
112
112
+
clipboard.disable-primary = true;
113
113
+
123
114
input = {
124
124
-
numlock_by_default = true;
125
125
-
kb_options = "caps:escape";
126
126
-
touchpad = {
127
127
-
natural_scroll = true;
115
115
+
focus-follows-mouse.enable = true;
116
116
+
keyboard.numlock = true;
117
117
+
# power-key-handling.enable = false;
118
118
+
touchpad.natural-scroll = true;
119
119
+
};
120
120
+
121
121
+
layout = {
122
122
+
default-column-width.proportion = 1.;
123
123
+
focus-ring.active.gradient = {
124
124
+
in' = "oklab";
125
125
+
angle = 135;
126
126
+
relative-to = "workspace-view";
127
127
+
from = "#74c7ec";
128
128
+
to = "#cba6f7";
128
129
};
129
130
};
130
130
-
xwayland = {
131
131
-
force_zero_scaling = true;
132
132
-
};
133
133
-
# debug = {
134
134
-
# disable_logs = false;
135
135
-
# };
136
136
-
misc = {
137
137
-
enable_swallow = true;
138
138
-
disable_hyprland_logo = true;
139
139
-
disable_splash_rendering = true;
140
140
-
focus_on_activate = true;
141
141
-
mouse_move_enables_dpms = true;
142
142
-
key_press_enables_dpms = true;
143
143
-
};
144
144
-
env = [
145
145
-
"TERMINAL,wezterm"
146
146
-
"GRIMBLAST_EDITOR,swappy -f "
147
147
-
"QT_QPA_PLATFORM,wayland;xcb"
148
148
-
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
149
149
-
"HYPRCURSOR_THEME,${hyprThemeName}"
150
150
-
"HYPRCURSOR_SIZE,${builtins.toJSON cursorTheme.size}"
151
151
-
];
152
152
-
windowrulev2 = [
153
153
-
"idleinhibit fullscreen,class:(.*),title:(.*)"
154
154
-
];
155
155
-
submap = "reset";
156
156
-
gesture = [
157
157
-
"3,horizontal,workspace"
158
158
-
"4,swipe,move"
159
159
-
];
160
160
-
bind = let
161
161
-
powerMenu = "rofi -modi 'p:${pkgs.rofi-power-menu}/bin/rofi-power-menu' -show p";
162
162
-
screenshot = "${pkgs.nushell}/bin/nu ${../res/screenshot.nu}";
163
131
164
164
-
openTerminal = launchDesktopApp "org.wezfurlong.wezterm.desktop";
165
165
-
forEachWorkspace = {
166
166
-
mod,
167
167
-
dispatch,
168
168
-
}:
169
169
-
builtins.genList (
170
170
-
i: let
171
171
-
num = builtins.toString i;
172
172
-
in "${mod},${num},${dispatch},${
173
173
-
if num == "0"
174
174
-
then "10"
175
175
-
else num
176
176
-
}"
177
177
-
)
178
178
-
10;
179
179
-
in
180
180
-
[
181
181
-
"SUPER,M,submap,passthru"
182
182
-
]
183
183
-
++ lib.optionals config.cow.firefox.enable [
184
184
-
"SUPER,Q,exec,${launchDesktopApp "firefox-devedition.desktop"}"
185
185
-
]
186
186
-
++ [
187
187
-
"SUPER,Z,exec,systemctl suspend"
188
188
-
",XF86AudioMedia,exec,${openTerminal}"
189
189
-
"SUPER,T,exec,${openTerminal}"
190
190
-
"SUPER ALT CTRL SHIFT,L,exec,xdg-open https://linkedin.com"
191
191
-
"SUPER,C,killactive,"
192
192
-
"SUPER,P,pseudo,"
193
193
-
"SUPER,R,togglefloating,"
194
194
-
"SUPER,F,fullscreen,1"
195
195
-
"SUPER SHIFT,F,fullscreen,0"
196
196
-
",XF86RFKill,exec,rfkill toggle wifi"
197
197
-
"SUPER,left,workspace,r-1"
198
198
-
"SUPER,right,workspace,r+1"
199
199
-
"SUPER SHIFT,left,movetoworkspace,r-1"
200
200
-
"SUPER SHIFT,right,movetoworkspace,r+1"
201
201
-
"SUPER,L,exec,pidof hyprlock || hyprlock --immediate"
202
202
-
"SUPER,S,exec,${runCmd "rofi -show drun -show-icons"}"
203
203
-
"SUPER SHIFT,E,exec,${runCmd "rofi -modi emoji -show emoji"}"
204
204
-
"SUPER SHIFT,D,exec,swaync-client -d"
205
205
-
"SUPER,Delete,exec,${runCmd powerMenu}"
206
206
-
",XF86PowerOff,exec,${runCmd powerMenu}"
207
207
-
"SUPER ALT,C,exec,${runCmd "rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | wl-copy\""}"
208
208
-
"SUPER,B,exec,${runCmd "${pkgs.rofi-bluetooth}/bin/rofi-bluetooth"}"
209
209
-
"SUPER,Tab,exec,${runCmd "rofi -show window -show-icons"}"
210
210
-
]
211
211
-
++ lib.optionals config.cow.yazi.enable ["SUPER,E,exec,${launchDesktopApp "yazi.desktop"}"]
212
212
-
++ [
213
213
-
"SUPER,N,exec,${runCmd "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"}"
214
214
-
"SUPER,A,exec,${runCmd "${pkgs.pavucontrol}/bin/pavucontrol --tab 5"}"
215
215
-
''SUPER,V,exec,cliphist list | sed -r 's/\[\[ binary data (.* .iB) (.*) (.*) \]\]/ \2 Image (\3, \1)/g' | rofi -dmenu -display-columns 2 -p Clipboard | cliphist decode | wl-copy''
216
216
-
"SUPER ALT,V,exec,echo -e \"Yes\\nNo\" | [[ $(rofi -dmenu -mesg \"Clear Clipboard History?\" -p Clear) == \"Yes\" ]] && cliphist wipe"
217
217
-
",Print,exec,${runCmd screenshot}"
218
218
-
"SUPER SHIFT,S,exec,${runCmd screenshot}"
219
219
-
"SUPER SHIFT,T,exec,${runCmd "${pkgs.nushell}/bin/nu ${../res/ocr.nu}"}"
220
220
-
"SUPER SHIFT,C,exec,${runCmd "${pkgs.hyprpicker}/bin/hyprpicker -a"}"
221
221
-
]
222
222
-
++ forEachWorkspace {
223
223
-
mod = "SUPER";
224
224
-
dispatch = "workspace";
225
225
-
}
226
226
-
++ forEachWorkspace {
227
227
-
mod = "SUPER SHIFT";
228
228
-
dispatch = "movetoworkspace";
132
132
+
binds =
133
133
+
with config.lib.niri.actions;
134
134
+
let
135
135
+
spawnPkg = p: spawn "${lib.getExe p}";
136
136
+
move-column-to-workspace = n: { move-column-to-workspace = [ n ]; };
137
137
+
terminal = pkgs.wezterm;
138
138
+
spawnTerm = spawnPkg terminal;
139
139
+
spawnNu = spawnPkg pkgs.nushell;
140
140
+
spawnPlayerctl = spawnPkg pkgs.playerctl;
141
141
+
spawnRofi = spawn "rofi";
142
142
+
spawnSh = spawn "sh" "-c";
143
143
+
spawnOsd = spawn "${pkgs.swayosd}/bin/swayosd-client";
144
144
+
launchDesktop = x: spawn "${pkgs.gtk3}/bin/gtk-launch" "${x}.desktop";
145
145
+
brightness = spawnOsd "--brightness";
146
146
+
volume = spawnOsd "--output-volume";
147
147
+
in
148
148
+
{
149
149
+
# Niri Stuff
150
150
+
151
151
+
## Basics
152
152
+
"Mod+X".action = quit;
153
153
+
"Mod+Tab".action = toggle-overview;
154
154
+
"Mod+Slash".action = show-hotkey-overlay;
155
155
+
"Mod+C".action = close-window;
156
156
+
157
157
+
"Mod+Left".action = focus-column-left;
158
158
+
"Mod+Down".action = focus-window-down;
159
159
+
"Mod+Up".action = focus-window-up;
160
160
+
"Mod+Right".action = focus-column-right;
161
161
+
162
162
+
"Mod+Shift+Left".action = move-column-left;
163
163
+
"Mod+Shift+Down".action = move-window-down;
164
164
+
"Mod+Shift+Up".action = move-window-up;
165
165
+
"Mod+Shift+Right".action = move-column-right;
166
166
+
167
167
+
"Mod+Home".action = focus-column-first;
168
168
+
"Mod+End".action = focus-column-last;
169
169
+
"Mod+Shift+Home".action = move-column-to-first;
170
170
+
"Mod+Shift+End".action = move-column-to-last;
171
171
+
172
172
+
"Mod+BracketLeft".action = consume-or-expel-window-left;
173
173
+
"Mod+BracketRight".action = consume-or-expel-window-right;
174
174
+
175
175
+
"Mod+F".action = maximize-column;
176
176
+
"Mod+Shift+F".action = fullscreen-window;
177
177
+
"Mod+Ctrl+F".action = expand-column-to-available-width;
178
178
+
"Mod+Ctrl+Shift+F".action = toggle-windowed-fullscreen;
179
179
+
180
180
+
"Mod+Page_Down".action = focus-workspace-down;
181
181
+
"Mod+Page_Up".action = focus-workspace-up;
182
182
+
"Mod+U".action = focus-workspace-down;
183
183
+
"Mod+I".action = focus-workspace-up;
184
184
+
"Mod+Shift+Page_Down".action = move-column-to-workspace-down;
185
185
+
"Mod+Shift+Page_Up".action = move-column-to-workspace-up;
186
186
+
"Mod+Shift+U".action = move-column-to-workspace-down;
187
187
+
"Mod+Shift+I".action = move-column-to-workspace-up;
188
188
+
189
189
+
"Mod+1".action = focus-workspace 1;
190
190
+
"Mod+2".action = focus-workspace 2;
191
191
+
"Mod+3".action = focus-workspace 3;
192
192
+
"Mod+4".action = focus-workspace 4;
193
193
+
"Mod+5".action = focus-workspace 5;
194
194
+
"Mod+6".action = focus-workspace 6;
195
195
+
"Mod+7".action = focus-workspace 7;
196
196
+
"Mod+8".action = focus-workspace 8;
197
197
+
"Mod+9".action = focus-workspace 9;
198
198
+
"Mod+Ctrl+1".action = move-column-to-workspace 1;
199
199
+
"Mod+Ctrl+2".action = move-column-to-workspace 2;
200
200
+
"Mod+Ctrl+3".action = move-column-to-workspace 3;
201
201
+
"Mod+Ctrl+4".action = move-column-to-workspace 4;
202
202
+
"Mod+Ctrl+5".action = move-column-to-workspace 5;
203
203
+
"Mod+Ctrl+6".action = move-column-to-workspace 6;
204
204
+
"Mod+Ctrl+7".action = move-column-to-workspace 7;
205
205
+
"Mod+Ctrl+8".action = move-column-to-workspace 8;
206
206
+
"Mod+Ctrl+9".action = move-column-to-workspace 9;
207
207
+
208
208
+
"Mod+Escape" = {
209
209
+
action = toggle-keyboard-shortcuts-inhibit;
210
210
+
allow-inhibiting = false;
211
211
+
};
212
212
+
213
213
+
"Mod+Shift+S".action = {
214
214
+
screenshot = [ ];
215
215
+
};
216
216
+
"Print".action = {
217
217
+
screenshot = [ ];
218
218
+
};
219
219
+
"Mod+L".action = spawnSh "pidof hyprlock || hyprlock --immediate";
220
220
+
"Mod+Z".action = spawn "systemctl" "suspend";
221
221
+
"Super+Alt+Ctrl+Shift+L".action = spawn "xdg-open" "https://linkedin.com";
222
222
+
223
223
+
# Terminal
224
224
+
"Mod+T".action = spawnTerm;
225
225
+
226
226
+
# Rofi
227
227
+
"Mod+S".action = spawnRofi "-show" "drun" "-show-icons";
228
228
+
"Mod+B".action = spawnPkg pkgs.rofi-bluetooth;
229
229
+
"Mod+Shift+E".action = spawnRofi "-modi" "emoji" "-show" "emoji";
230
230
+
"Mod+Alt+C".action =
231
231
+
spawnRofi "-show" "calc" "-modi" "calc" "-no-show-match" "-no-sort" "-calc-command"
232
232
+
"echo -n '{result}' | wl-copy";
233
233
+
"Mod+V".action =
234
234
+
spawnSh "cliphist list | sed -r 's/\[\[ binary data (.* .iB) (.*) (.*) \]\]/ \2 Image (\3, \1)/g' | rofi -dmenu -display-columns 2 -p Clipboard | cliphist decode | wl-copy";
235
235
+
"Mod+Alt+V".action =
236
236
+
spawnSh "echo -e \"Yes\\nNo\" | [[ $(rofi -dmenu -mesg \"Clear Clipboard History?\" -p Clear) == \"Yes\" ]] && cliphist wipe";
237
237
+
238
238
+
# Yazi
239
239
+
"Mod+E".action = lib.mkIf config.cow.yazi.enable (launchDesktop "yazi");
240
240
+
241
241
+
# Firefox
242
242
+
"Mod+Q".action = lib.mkIf config.cow.firefox.enable (launchDesktop "firefox-devedition");
243
243
+
244
244
+
# Pavucontrol
245
245
+
"Mod+A".action = spawnPkg pkgs.pavucontrol "--tab" "5";
246
246
+
247
247
+
# Brightness
248
248
+
"XF86MonBrightnessUp" = {
249
249
+
action = brightness "raise";
250
250
+
allow-when-locked = true;
251
251
+
};
252
252
+
"XF86MonBrightnessDown" = {
253
253
+
action = brightness "lower";
254
254
+
allow-when-locked = true;
255
255
+
};
256
256
+
257
257
+
# Volume
258
258
+
"XF86AudioRaiseVolume" = {
259
259
+
action = volume "raise";
260
260
+
allow-when-locked = true;
261
261
+
};
262
262
+
"XF86AudioLowerVolume" = {
263
263
+
action = volume "lower";
264
264
+
allow-when-locked = true;
265
265
+
};
266
266
+
"XF86AudioMute" = {
267
267
+
action = volume "mute-toggle";
268
268
+
allow-when-locked = true;
269
269
+
};
270
270
+
271
271
+
# Playerctl
272
272
+
"XF86AudioPlay" = {
273
273
+
action = spawnPlayerctl "play-pause";
274
274
+
allow-when-locked = true;
275
275
+
};
276
276
+
"XF86AudioPause" = {
277
277
+
action = spawnPlayerctl "pause";
278
278
+
allow-when-locked = true;
279
279
+
};
280
280
+
"XF86AudioStop" = {
281
281
+
action = spawnPlayerctl "stop";
282
282
+
allow-when-locked = true;
283
283
+
};
284
284
+
"XF86AudioNext" = {
285
285
+
action = spawnPlayerctl "next";
286
286
+
allow-when-locked = true;
287
287
+
};
288
288
+
"XF86AudioPrev" = {
289
289
+
action = spawnPlayerctl "previous";
290
290
+
allow-when-locked = true;
291
291
+
};
229
292
};
230
230
-
bindr = [
231
231
-
"SUPER SHIFT,R,exec,pkill wf-recorder --signal SIGINT ||${runCmd "${pkgs.nushell}/bin/nu ${../res/screenrec.nu}"}"
232
232
-
"CAPS,Caps_Lock,exec,swayosd-client --caps-lock"
233
233
-
",Scroll_Lock,exec,swayosd-client --scroll-lock"
234
234
-
",Num_Lock,exec,swayosd-client --num-lock"
235
235
-
];
236
236
-
bindl = [
237
237
-
",switch:on:Lid Switch,exec,${screenOffCmd}"
238
238
-
",switch:off:Lid Switch,exec,${screenOnCmd}"
239
239
-
",XF86AudioPlay,exec,playerctl play-pause"
240
240
-
",XF86AudioPause,exec,playerctl pause"
241
241
-
",XF86AudioStop,exec,playerctl stop"
242
242
-
",XF86AudioNext,exec,playerctl next"
243
243
-
",XF86AudioPrev,exec,playerctl previous"
244
244
-
];
245
245
-
bindel = [
246
246
-
",XF86MonBrightnessUp,exec,swayosd-client --brightness raise"
247
247
-
",XF86MonBrightnessDown,exec,swayosd-client --brightness lower"
248
248
-
",XF86AudioRaiseVolume,exec,swayosd-client --output-volume raise"
249
249
-
",XF86AudioLowerVolume,exec,swayosd-client --output-volume lower"
250
250
-
",XF86AudioMute,exec,swayosd-client --output-volume mute-toggle"
251
251
-
];
252
252
-
bindm = [
253
253
-
"SUPER,mouse:272,movewindow"
254
254
-
"SUPER,mouse:273,resizewindow"
255
255
-
];
256
293
};
257
294
};
258
295
···
364
401
365
402
catppuccin.rofi.enable = false;
366
403
367
367
-
systemd.user.services = let
368
368
-
target = config.wayland.systemd.target;
369
369
-
mkShellService = {
370
370
-
desc,
371
371
-
service,
372
372
-
}: {
373
373
-
Install = {
374
374
-
WantedBy = [target];
375
375
-
};
404
404
+
systemd.user.services =
405
405
+
let
406
406
+
target = config.wayland.systemd.target;
407
407
+
mkShellService =
408
408
+
{
409
409
+
desc,
410
410
+
service,
411
411
+
}:
412
412
+
{
413
413
+
Install = {
414
414
+
WantedBy = [ target ];
415
415
+
};
376
416
377
377
-
Unit = {
378
378
-
ConditionEnvironment = "WAYLAND_DISPLAY";
379
379
-
Description = desc;
380
380
-
After = [target];
381
381
-
PartOf = [target];
382
382
-
};
417
417
+
Unit = {
418
418
+
ConditionEnvironment = "WAYLAND_DISPLAY";
419
419
+
Description = desc;
420
420
+
After = [ target ];
421
421
+
PartOf = [ target ];
422
422
+
};
383
423
384
384
-
Service = service;
385
385
-
};
386
386
-
in {
387
387
-
battery-notif = mkShellService {
388
388
-
desc = "Battery Notification Service";
424
424
+
Service = service;
425
425
+
};
426
426
+
in
427
427
+
{
428
428
+
battery-notif = mkShellService {
429
429
+
desc = "Battery Notification Service";
389
430
390
390
-
service = {
391
391
-
ExecStart = "${pkgs.nushell}/bin/nu --plugins ${
392
392
-
inputs.nu_plugin_dbus.packages.${pkgs.system}.default
393
393
-
} ${../res/battery_notif.nu}";
394
394
-
Restart = "on-failure";
395
395
-
RestartSec = "10";
431
431
+
service = {
432
432
+
ExecStart = "${pkgs.nushell}/bin/nu --plugins ${
433
433
+
inputs.nu_plugin_dbus.packages.${pkgs.system}.default
434
434
+
} ${../res/battery_notif.nu}";
435
435
+
Restart = "on-failure";
436
436
+
RestartSec = "10";
437
437
+
};
396
438
};
397
397
-
};
439
439
+
440
440
+
swaybg = lib.mkIf config.cow.pictures.enable (mkShellService {
441
441
+
desc = "Sway Background Image";
442
442
+
service = {
443
443
+
ExecStart = "${lib.getExe pkgs.swaybg} --image ${config.cow.pictures.bg}";
444
444
+
Restart = "on-failure";
445
445
+
RestartSec = "10";
446
446
+
};
447
447
+
});
398
448
399
399
-
mpris-idle-inhibit = mkShellService {
400
400
-
desc = "MPRIS Idle Inhibitor";
449
449
+
mpris-idle-inhibit = mkShellService {
450
450
+
desc = "MPRIS Idle Inhibitor";
401
451
402
402
-
service = {
403
403
-
ExecStart = ''${
452
452
+
service = {
453
453
+
ExecStart = ''${
404
454
inputs.wayland-mpris-idle-inhibit.packages.${pkgs.system}.default
405
455
}/bin/wayland-mpris-idle-inhibit --ignore "kdeconnect" --ignore "playerctld"'';
406
406
-
Restart = "on-failure";
407
407
-
RestartSec = "10";
456
456
+
Restart = "on-failure";
457
457
+
RestartSec = "10";
458
458
+
};
408
459
};
409
460
};
410
410
-
};
411
461
412
462
qt = {
413
463
enable = true;
···
433
483
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
434
484
435
485
services = {
436
436
-
hyprpolkitagent.enable = true;
437
437
-
438
438
-
hyprpaper = {
439
439
-
enable = true;
440
440
-
settings = {
441
441
-
ipc = "on";
442
442
-
splash = false;
443
443
-
preload = ["${config.cow.pictures.bg}"];
444
444
-
wallpaper = [",${config.cow.pictures.bg}"];
445
445
-
};
446
446
-
};
447
447
-
448
486
swaync = {
449
487
enable = true;
450
488
settings = {
···
499
537
};
500
538
};
501
539
502
502
-
hypridle = lib.mkIf config.cow.gdi.doIdle {
503
503
-
enable = true;
504
504
-
settings = {
505
505
-
general = {
506
506
-
lock_cmd = "pidof hyprlock || hyprlock --grace 5";
507
507
-
unlock_cmd = "pkill hyprlock --signal SIGUSR1";
508
508
-
before_sleep_cmd = "loginctl lock-session";
509
509
-
after_sleep_cmd = screenOnCmd;
510
510
-
};
511
511
-
512
512
-
listener = let
513
513
-
lockTimeout = 120;
514
514
-
in [
540
540
+
swayidle =
541
541
+
let
542
542
+
lockCmd = args: "pidof hyprlock || ${lib.getExe pkgs.hyprlock} ${args}";
543
543
+
in
544
544
+
lib.mkIf config.cow.gdi.doIdle {
545
545
+
enable = false;
546
546
+
timeouts = [
515
547
{
516
516
-
timeout = lockTimeout; # Lock the screen after 2 minutes of inactivity
517
517
-
on-timeout = "loginctl lock-session";
548
548
+
timeout = 10;
549
549
+
command = lockCmd "--grace 5";
518
550
}
519
551
{
520
520
-
timeout = lockTimeout + 120; # Turn off the screen 2 minutes after locking
521
521
-
on-timeout = screenOffCmd;
522
522
-
on-resume = screenOnCmd;
552
552
+
timeout = 30;
553
553
+
command = "${pkgs.systemd}/bin/systemctl suspend";
523
554
}
555
555
+
];
556
556
+
events = [
524
557
{
525
525
-
timeout = lockTimeout + 600; # Suspend 10 minutes after locking
526
526
-
on-timeout = "systemctl suspend";
558
558
+
event = "before-sleep";
559
559
+
command = lockCmd "--immediate";
527
560
}
528
561
];
529
562
};
530
530
-
};
531
563
532
564
cliphist = {
533
565
enable = true;
···
572
604
rofi-pulse-select
573
605
];
574
606
};
575
575
-
theme = let
576
576
-
inherit (config.lib.formats.rasi) mkLiteral;
577
577
-
in {
578
578
-
"@import" = "${config.catppuccin.sources.rofi}/themes/catppuccin-${config.catppuccin.rofi.flavor}.rasi";
579
579
-
"*" =
580
580
-
(builtins.mapAttrs (name: value: mkLiteral "@${value}") {
581
581
-
"bg0" = "base";
582
582
-
"bg1" = "mantle";
583
583
-
"bg2" = "crust";
584
584
-
"bg3" = config.catppuccin.accent;
585
585
-
"fg0" = "subtext1";
586
586
-
"fg1" = "text";
587
587
-
"fg2" = "subtext0";
588
588
-
"fg3" = "overlay0";
589
589
-
"fg4" = "surface0";
590
590
-
})
591
591
-
// {
592
592
-
font = mkLiteral ''"Roboto 14"'';
607
607
+
theme =
608
608
+
let
609
609
+
inherit (config.lib.formats.rasi) mkLiteral;
610
610
+
in
611
611
+
{
612
612
+
"@import" =
613
613
+
"${config.catppuccin.sources.rofi}/themes/catppuccin-${config.catppuccin.rofi.flavor}.rasi";
614
614
+
"*" =
615
615
+
(builtins.mapAttrs (name: value: mkLiteral "@${value}") {
616
616
+
"bg0" = "base";
617
617
+
"bg1" = "mantle";
618
618
+
"bg2" = "crust";
619
619
+
"bg3" = config.catppuccin.accent;
620
620
+
"fg0" = "subtext1";
621
621
+
"fg1" = "text";
622
622
+
"fg2" = "subtext0";
623
623
+
"fg3" = "overlay0";
624
624
+
"fg4" = "surface0";
625
625
+
})
626
626
+
// {
627
627
+
font = mkLiteral ''"Roboto 14"'';
628
628
+
background-color = mkLiteral ''transparent'';
629
629
+
text-color = mkLiteral ''@fg0'';
630
630
+
margin = mkLiteral ''0px'';
631
631
+
padding = mkLiteral ''0px'';
632
632
+
spacing = mkLiteral ''0px'';
633
633
+
};
634
634
+
"window" = {
635
635
+
location = mkLiteral ''north'';
636
636
+
y-offset = mkLiteral ''calc(50% - 176px)'';
637
637
+
width = mkLiteral ''600'';
638
638
+
border-radius = mkLiteral ''24px'';
639
639
+
background-color = mkLiteral ''@bg0'';
640
640
+
};
641
641
+
"mainbox" = {
642
642
+
padding = mkLiteral ''12px'';
643
643
+
};
644
644
+
"inputbar" = {
645
645
+
background-color = mkLiteral ''@bg1'';
646
646
+
border-color = mkLiteral ''@bg3'';
647
647
+
border = mkLiteral ''2px'';
648
648
+
border-radius = mkLiteral ''16px'';
649
649
+
padding = mkLiteral ''8px 16px'';
650
650
+
spacing = mkLiteral ''8px'';
651
651
+
children = mkLiteral ''[ prompt, entry ]'';
652
652
+
};
653
653
+
"prompt" = {
654
654
+
text-color = mkLiteral ''@fg2'';
655
655
+
};
656
656
+
"entry" = {
657
657
+
placeholder = mkLiteral ''"Search"'';
658
658
+
placeholder-color = mkLiteral ''@fg3'';
659
659
+
};
660
660
+
"message" = {
661
661
+
margin = mkLiteral ''12px 0 0'';
662
662
+
border-radius = mkLiteral ''16px'';
663
663
+
border-color = mkLiteral ''@bg2'';
664
664
+
background-color = mkLiteral ''@bg2'';
665
665
+
};
666
666
+
"textbox" = {
667
667
+
padding = mkLiteral ''8px 24px'';
668
668
+
};
669
669
+
"listview" = {
593
670
background-color = mkLiteral ''transparent'';
594
594
-
text-color = mkLiteral ''@fg0'';
595
595
-
margin = mkLiteral ''0px'';
596
596
-
padding = mkLiteral ''0px'';
597
597
-
spacing = mkLiteral ''0px'';
671
671
+
margin = mkLiteral ''12px 0 0'';
672
672
+
lines = mkLiteral ''8'';
673
673
+
columns = mkLiteral ''2'';
674
674
+
fixed-height = mkLiteral ''false'';
598
675
};
599
599
-
"window" = {
600
600
-
location = mkLiteral ''north'';
601
601
-
y-offset = mkLiteral ''calc(50% - 176px)'';
602
602
-
width = mkLiteral ''600'';
603
603
-
border-radius = mkLiteral ''24px'';
604
604
-
background-color = mkLiteral ''@bg0'';
605
605
-
};
606
606
-
"mainbox" = {
607
607
-
padding = mkLiteral ''12px'';
608
608
-
};
609
609
-
"inputbar" = {
610
610
-
background-color = mkLiteral ''@bg1'';
611
611
-
border-color = mkLiteral ''@bg3'';
612
612
-
border = mkLiteral ''2px'';
613
613
-
border-radius = mkLiteral ''16px'';
614
614
-
padding = mkLiteral ''8px 16px'';
615
615
-
spacing = mkLiteral ''8px'';
616
616
-
children = mkLiteral ''[ prompt, entry ]'';
617
617
-
};
618
618
-
"prompt" = {
619
619
-
text-color = mkLiteral ''@fg2'';
620
620
-
};
621
621
-
"entry" = {
622
622
-
placeholder = mkLiteral ''"Search"'';
623
623
-
placeholder-color = mkLiteral ''@fg3'';
624
624
-
};
625
625
-
"message" = {
626
626
-
margin = mkLiteral ''12px 0 0'';
627
627
-
border-radius = mkLiteral ''16px'';
628
628
-
border-color = mkLiteral ''@bg2'';
629
629
-
background-color = mkLiteral ''@bg2'';
630
630
-
};
631
631
-
"textbox" = {
632
632
-
padding = mkLiteral ''8px 24px'';
633
633
-
};
634
634
-
"listview" = {
635
635
-
background-color = mkLiteral ''transparent'';
636
636
-
margin = mkLiteral ''12px 0 0'';
637
637
-
lines = mkLiteral ''8'';
638
638
-
columns = mkLiteral ''2'';
639
639
-
fixed-height = mkLiteral ''false'';
676
676
+
"element" = {
677
677
+
padding = mkLiteral ''8px 16px'';
678
678
+
spacing = mkLiteral ''8px'';
679
679
+
border-radius = mkLiteral ''16px'';
680
680
+
};
681
681
+
"element normal active" = {
682
682
+
text-color = mkLiteral ''@bg3'';
683
683
+
};
684
684
+
"element alternate active" = {
685
685
+
text-color = mkLiteral ''@bg3'';
686
686
+
};
687
687
+
"element selected normal, element selected active" = {
688
688
+
text-color = mkLiteral ''@fg4'';
689
689
+
background-color = mkLiteral ''@bg3'';
690
690
+
};
691
691
+
"element-icon" = {
692
692
+
size = mkLiteral ''1em'';
693
693
+
vertical-align = mkLiteral ''0.5'';
694
694
+
};
695
695
+
"element-text" = {
696
696
+
text-color = mkLiteral ''inherit'';
697
697
+
};
640
698
};
641
641
-
"element" = {
642
642
-
padding = mkLiteral ''8px 16px'';
643
643
-
spacing = mkLiteral ''8px'';
644
644
-
border-radius = mkLiteral ''16px'';
645
645
-
};
646
646
-
"element normal active" = {
647
647
-
text-color = mkLiteral ''@bg3'';
648
648
-
};
649
649
-
"element alternate active" = {
650
650
-
text-color = mkLiteral ''@bg3'';
651
651
-
};
652
652
-
"element selected normal, element selected active" = {
653
653
-
text-color = mkLiteral ''@fg4'';
654
654
-
background-color = mkLiteral ''@bg3'';
655
655
-
};
656
656
-
"element-icon" = {
657
657
-
size = mkLiteral ''1em'';
658
658
-
vertical-align = mkLiteral ''0.5'';
659
659
-
};
660
660
-
"element-text" = {
661
661
-
text-color = mkLiteral ''inherit'';
662
662
-
};
663
663
-
};
664
699
location = "center";
665
700
};
666
701
nushell.extraConfig = ''
+15
-16
homeModules/keepassxc.nix
···
1
1
-
{...}: {
1
1
+
{ ... }:
2
2
+
{
2
3
config,
3
4
lib,
4
5
pkgs,
5
6
...
6
6
-
}: {
7
7
+
}:
8
8
+
{
7
9
options.cow.keepassxc = {
8
10
enable = lib.mkEnableOption "KeePassXC + autolaunch";
9
11
dbPath = lib.mkOption {
···
14
16
};
15
17
16
18
config = lib.mkIf config.cow.keepassxc.enable {
17
17
-
cow.imperm.keepCache = [".config/keepassxc"];
19
19
+
cow.imperm.keepCache = [ ".config/keepassxc" ];
18
20
19
19
-
wayland.windowManager.hyprland.settings.exec-once =
21
21
+
programs.niri.settings.spawn-at-startup =
20
22
lib.optionals (config.cow.gdi.enable && config.cow.keepassxc.dbPath != null)
21
21
-
(
22
22
-
let
23
23
-
cmd = "keepassxc ${config.cow.keepassxc.dbPath}";
24
24
-
in [
25
25
-
(
26
26
-
if config.cow.gdi.useUWSM
27
27
-
then "uwsm app -- ${cmd}"
28
28
-
else cmd
29
29
-
)
30
30
-
]
31
31
-
);
32
32
-
home.packages = with pkgs; [keepassxc];
23
23
+
[
24
24
+
{
25
25
+
argv = [
26
26
+
"keepassxc"
27
27
+
config.cow.keepassxc.dbPath
28
28
+
];
29
29
+
}
30
30
+
];
31
31
+
home.packages = with pkgs; [ keepassxc ];
33
32
};
34
33
}
+2
-2
homeModules/waybar.nix
···
521
521
warning = 70;
522
522
};
523
523
};
524
524
-
modules-center = ["wlr/taskbar"];
525
525
-
modules-left = ["hyprland/workspaces"];
524
524
+
# modules-center = ["wlr/taskbar"];
525
525
+
# modules-left = ["hyprland/workspaces"];
526
526
modules-right = [
527
527
"temperature"
528
528
"cpu"
+2
nixosConfigurations/aperture.nix
···
35
35
};
36
36
};
37
37
38
38
+
home-manager.users.bean.programs.niri.settings.outputs."eDP-1".scale = 1;
39
39
+
38
40
programs.adb.enable = true;
39
41
40
42
cow = {
+14
-34
nixosModules/gdi.nix
···
1
1
-
{...}: {
1
1
+
{ ... }:
2
2
+
{
2
3
config,
3
4
lib,
4
5
pkgs,
5
6
...
6
6
-
}: {
7
7
+
}:
8
8
+
{
7
9
options.cow.gdi = {
8
10
enable = lib.mkEnableOption "Hyprland with graphical apps, etc.";
9
11
doIdle = lib.mkEnableOption "Idling the system";
10
10
-
showGreet = lib.mkEnableOption "Show a greeter interface that runs UWSM to launch a Wayland window manager";
12
12
+
showGreet = lib.mkEnableOption "Show a greeter interface that runs a Wayland window manager";
11
13
};
12
14
13
15
config = lib.mkIf config.cow.gdi.enable {
14
14
-
environment = {
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";
22
22
-
GDK_BACKEND = "wayland,x11";
23
23
-
ANKI_WAYLAND = "1";
24
24
-
MOZ_ENABLE_WAYLAND = "1";
25
25
-
XDG_SESSION_TYPE = "wayland";
26
26
-
SDL_VIDEODRIVER = "wayland";
27
27
-
CLUTTER_BACKEND = "wayland";
28
28
-
};
29
29
-
};
30
30
-
31
31
-
xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-gtk];
32
32
-
33
33
-
programs.hyprland = {
34
34
-
enable = true;
35
35
-
withUWSM = true;
36
36
-
};
16
16
+
environment.pathsToLink = [
17
17
+
"/share/applications"
18
18
+
"/share/xdg-desktop-portal"
19
19
+
];
37
20
38
21
services.greetd = lib.mkIf config.cow.gdi.showGreet {
39
22
enable = true;
40
23
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}";
24
24
+
settings.default_session.command =
25
25
+
let
26
26
+
greeting = ''--greeting "Authenticate into ${lib.toUpper config.networking.hostName}"'';
27
27
+
in
28
28
+
"${pkgs.tuigreet}/bin/tuigreet --time ${greeting} --cmd niri-session";
49
29
};
50
30
};
51
31
}
-1
nixosModules/user-bean.nix
···
28
28
cow.games.enable = config.cow.gaming.enable;
29
29
cow.gdi = {
30
30
inherit (config.cow.gdi) enable doIdle;
31
31
-
useUWSM = true;
32
31
};
33
32
};
34
33
};