Merge branch 'niri2'
This commit is contained in:
commit
6681ba5f93
26 changed files with 313 additions and 1125 deletions
|
|
@ -7,7 +7,7 @@ There may be some useful parts in the clusterfuck that I made and maybe I'll try
|
||||||
## My systems
|
## My systems
|
||||||
|
|
||||||
I have three active systems, my pc (lambdaOS), my laptop (muOS) and my server (nuOS).
|
I have three active systems, my pc (lambdaOS), my laptop (muOS) and my server (nuOS).
|
||||||
Both my pc and laptop are running mainly hyprland with plasma mostly just
|
Both my pc and laptop are running mainly niri with plasma mostly just
|
||||||
there because I didn't want to setup sddm themes myself.
|
there because I didn't want to setup sddm themes myself.
|
||||||
|
|
||||||
the server has some nginx helper functions so I can easily add more proxies for random websites I make.
|
the server has some nginx helper functions so I can easily add more proxies for random websites I make.
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,7 @@ in
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
../modules/applications
|
../modules
|
||||||
../modules/games
|
|
||||||
../modules/hyprland.nix
|
|
||||||
./nvim/nvim.nix
|
./nvim/nvim.nix
|
||||||
extraConfig
|
extraConfig
|
||||||
]
|
]
|
||||||
|
|
@ -73,6 +71,11 @@ in
|
||||||
yubico-piv-tool
|
yubico-piv-tool
|
||||||
|
|
||||||
libreoffice-qt6
|
libreoffice-qt6
|
||||||
|
|
||||||
|
# for niri
|
||||||
|
wl-clipboard
|
||||||
|
libnotify
|
||||||
|
playerctl
|
||||||
];
|
];
|
||||||
pointerCursor = lib.mkIf enableGraphical {
|
pointerCursor = lib.mkIf enableGraphical {
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
|
|
@ -90,24 +93,50 @@ in
|
||||||
TERM = "kitty";
|
TERM = "kitty";
|
||||||
}
|
}
|
||||||
// lib.mkIf enableGraphical {
|
// lib.mkIf enableGraphical {
|
||||||
|
DISPLAY = ":0";
|
||||||
GDK_BACKEND = "wayland,x11";
|
GDK_BACKEND = "wayland,x11";
|
||||||
QT_QPA_PLATFORM = "wayland;xcb";
|
QT_QPA_PLATFORM = "wayland;xcb";
|
||||||
CLUTTER_BACKEND = "wayland";
|
CLUTTER_BACKEND = "wayland";
|
||||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
XDG_CURRENT_DESKTOP = "niri";
|
||||||
XDG_SESSION_TYPE = "wayland";
|
XDG_SESSION_TYPE = "wayland";
|
||||||
XDG_SESSION_DESKTOP = "Hyprland";
|
XDG_SESSION_DESKTOP = "niri";
|
||||||
WLR_NO_HARDWARE_CURSORS = "1";
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
};
|
};
|
||||||
stateVersion = "23.11"; # Do not change :3
|
stateVersion = "23.11"; # Do not change :3
|
||||||
username = me.nickname;
|
username = me.nickname;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.configFile = lib.mkIf enableGraphical {
|
||||||
|
"niri/config.kdl".source = import ../packages/niri-config/default.nix {
|
||||||
|
inherit pkgs inputs displays;
|
||||||
|
self-pkgs = inputs.self.packages.${pkgs.system};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
hyprland = {
|
waybar = {
|
||||||
enable = enableGraphical;
|
modules = {
|
||||||
displays = displays;
|
left = [
|
||||||
|
"niri/workspaces"
|
||||||
|
"tray"
|
||||||
|
"niri/window"
|
||||||
|
];
|
||||||
|
center = [
|
||||||
|
"clock"
|
||||||
|
"custom/spotify"
|
||||||
|
];
|
||||||
|
right = [
|
||||||
|
"custom/vpn"
|
||||||
|
"wireplumber"
|
||||||
|
"network"
|
||||||
|
"cpu"
|
||||||
|
"memory"
|
||||||
|
"custom/poweroff"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
enable = lib.mkDefault enableGraphical;
|
||||||
};
|
};
|
||||||
games.enable = enableGraphical && enableGames;
|
games.enable = enableGraphical && enableGames;
|
||||||
apps = {
|
apps = {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
];
|
];
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://cosmic.cachix.org/"
|
"https://cosmic.cachix.org/"
|
||||||
"https://hyprland.cachix.org"
|
|
||||||
"https://cache.iog.io"
|
"https://cache.iog.io"
|
||||||
"https://cuda-maintainers.cachix.org"
|
"https://cuda-maintainers.cachix.org"
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
|
|
@ -20,7 +19,6 @@
|
||||||
];
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
|
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
||||||
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
|
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
|
||||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
|
|
||||||
467
flake.lock
generated
467
flake.lock
generated
|
|
@ -21,39 +21,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"aquamarine": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprutils": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprutils"
|
|
||||||
],
|
|
||||||
"hyprwayland-scanner": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprwayland-scanner"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731774881,
|
|
||||||
"narHash": "sha256-1Dxryiw8u2ejntxrrv3sMtIE8WHKxmlN4KeH+uMGbmc=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "aquamarine",
|
|
||||||
"rev": "b31a6a4da8199ae3489057db7d36069a70749a56",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "aquamarine",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automapaper": {
|
"automapaper": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
@ -228,7 +195,7 @@
|
||||||
},
|
},
|
||||||
"fenix_3": {
|
"fenix_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_9",
|
"nixpkgs": "nixpkgs_8",
|
||||||
"rust-analyzer-src": "rust-analyzer-src_3"
|
"rust-analyzer-src": "rust-analyzer-src_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -293,22 +260,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_4": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696426674,
|
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
|
|
@ -333,7 +284,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_4"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726560853,
|
"lastModified": 1726560853,
|
||||||
|
|
@ -372,28 +323,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gitignore": {
|
"gitignore": {
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"pre-commit-hooks",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1709087332,
|
|
||||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gitignore_2": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"lazy",
|
"lazy",
|
||||||
|
|
@ -494,245 +423,12 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hyprcursor": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprlang": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprlang"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1728669738,
|
|
||||||
"narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprcursor",
|
|
||||||
"rev": "0264e698149fcb857a66a53018157b41f8d97bb0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprcursor",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprland": {
|
|
||||||
"inputs": {
|
|
||||||
"aquamarine": "aquamarine",
|
|
||||||
"hyprcursor": "hyprcursor",
|
|
||||||
"hyprland-protocols": "hyprland-protocols",
|
|
||||||
"hyprlang": "hyprlang",
|
|
||||||
"hyprutils": "hyprutils",
|
|
||||||
"hyprwayland-scanner": "hyprwayland-scanner",
|
|
||||||
"nixpkgs": "nixpkgs_5",
|
|
||||||
"pre-commit-hooks": "pre-commit-hooks",
|
|
||||||
"systems": "systems_2",
|
|
||||||
"xdph": "xdph"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1732242702,
|
|
||||||
"narHash": "sha256-fJ+fGtTRLSMBdaz0q2yi2xlC0gMTo+4cGjcLlwtOGQk=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "Hyprland",
|
|
||||||
"rev": "b1003445953474b967464d4d0878955d37498647",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "Hyprland",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprland-protocols": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1728345020,
|
|
||||||
"narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprland-protocols",
|
|
||||||
"rev": "a7c183800e74f337753de186522b9017a07a8cee",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprland-protocols",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprlang": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprutils": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprutils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1728168612,
|
|
||||||
"narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprlang",
|
|
||||||
"rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprlang",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprpicker": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprutils": "hyprutils_2",
|
|
||||||
"hyprwayland-scanner": "hyprwayland-scanner_2",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": "systems_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731193353,
|
|
||||||
"narHash": "sha256-oiNuCxbwtfLOPGEoXjsojdVOXNEL5aFPtdELdaz65hw=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprpicker",
|
|
||||||
"rev": "4e8837ddabf669600c9571189e8a6a7937ba336a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprpicker",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprutils": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731702627,
|
|
||||||
"narHash": "sha256-+JeO9gevnXannQxMfR5xzZtF4sYmSlWkX/BPmPx0mWk=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprutils",
|
|
||||||
"rev": "e911361a687753bbbdfe3b6a9eab755ecaf1d9e1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprutils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprutils_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprpicker",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprpicker",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1727300645,
|
|
||||||
"narHash": "sha256-OvAtVLaSRPnbXzOwlR1fVqCXR7i+ICRX3aPMCdIiv+c=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprutils",
|
|
||||||
"rev": "3f5293432b6dc6a99f26aca2eba3876d2660665c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprutils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprwayland-scanner": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1726874836,
|
|
||||||
"narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprwayland-scanner",
|
|
||||||
"rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprwayland-scanner",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprwayland-scanner_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprpicker",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprpicker",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1726874836,
|
|
||||||
"narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprwayland-scanner",
|
|
||||||
"rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprwayland-scanner",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lanzaboote": {
|
"lanzaboote": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"crane": "crane",
|
"crane": "crane",
|
||||||
"flake-compat": "flake-compat_3",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": "nixpkgs_6",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
|
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
|
|
@ -759,7 +455,7 @@
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nixpkgs-stable": "nixpkgs-stable_4"
|
"nixpkgs-stable": "nixpkgs-stable_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730454453,
|
"lastModified": 1730454453,
|
||||||
|
|
@ -778,7 +474,7 @@
|
||||||
"mailserver": {
|
"mailserver": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blobs": "blobs",
|
"blobs": "blobs",
|
||||||
"flake-compat": "flake-compat_4",
|
"flake-compat": "flake-compat_3",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
|
|
@ -856,7 +552,7 @@
|
||||||
},
|
},
|
||||||
"nix-index-database": {
|
"nix-index-database": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_7"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729999765,
|
"lastModified": 1729999765,
|
||||||
|
|
@ -935,22 +631,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1730741070,
|
|
||||||
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-24.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable_3": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720386169,
|
"lastModified": 1720386169,
|
||||||
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
|
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
|
||||||
|
|
@ -966,7 +646,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_4": {
|
"nixpkgs-stable_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730137625,
|
"lastModified": 1730137625,
|
||||||
"narHash": "sha256-9z8oOgFZiaguj+bbi3k4QhAD6JabWrnv7fscC/mt0KE=",
|
"narHash": "sha256-9z8oOgFZiaguj+bbi3k4QhAD6JabWrnv7fscC/mt0KE=",
|
||||||
|
|
@ -1031,22 +711,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731676054,
|
|
||||||
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_6": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730025694,
|
"lastModified": 1730025694,
|
||||||
"narHash": "sha256-Isj+5RY86+N+JrotqpaXqi6hUAABcF6pIOlIWy2leC8=",
|
"narHash": "sha256-Isj+5RY86+N+JrotqpaXqi6hUAABcF6pIOlIWy2leC8=",
|
||||||
|
|
@ -1062,7 +726,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_7": {
|
"nixpkgs_6": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729665710,
|
"lastModified": 1729665710,
|
||||||
"narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=",
|
"narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=",
|
||||||
|
|
@ -1078,13 +742,13 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_8": {
|
"nixpkgs_7": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732257176,
|
"lastModified": 1732125482,
|
||||||
"narHash": "sha256-NwHxrhsP/dM/aPZZNqnW35KnuU+2/JPhJ7tM+BpBjkk=",
|
"narHash": "sha256-yO1VtH2bfyA197j+anHM4GVY+8X2gpZ4yLCwmyhEC2s=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "66c4e8d3e91f6a4121a055630e005d9c70019c13",
|
"rev": "b948c596aaa785cefdd19bd6acff6bac74c55256",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1094,7 +758,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_9": {
|
"nixpkgs_8": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729413321,
|
"lastModified": 1729413321,
|
||||||
"narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=",
|
"narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=",
|
||||||
|
|
@ -1130,30 +794,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pre-commit-hooks": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat_2",
|
|
||||||
"gitignore": "gitignore",
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731363552,
|
|
||||||
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "git-hooks.nix",
|
|
||||||
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "git-hooks.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pre-commit-hooks-nix": {
|
"pre-commit-hooks-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": [
|
"flake-compat": [
|
||||||
|
|
@ -1161,13 +801,13 @@
|
||||||
"lanzaboote",
|
"lanzaboote",
|
||||||
"flake-compat"
|
"flake-compat"
|
||||||
],
|
],
|
||||||
"gitignore": "gitignore_2",
|
"gitignore": "gitignore",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"lazy",
|
"lazy",
|
||||||
"lanzaboote",
|
"lanzaboote",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nixpkgs-stable": "nixpkgs-stable_3"
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729104314,
|
"lastModified": 1729104314,
|
||||||
|
|
@ -1192,13 +832,11 @@
|
||||||
"flurry": "flurry",
|
"flurry": "flurry",
|
||||||
"hardware": "hardware",
|
"hardware": "hardware",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"hyprland": "hyprland",
|
|
||||||
"hyprpicker": "hyprpicker",
|
|
||||||
"lazy": "lazy",
|
"lazy": "lazy",
|
||||||
"mailserver": "mailserver",
|
"mailserver": "mailserver",
|
||||||
"niri": "niri",
|
"niri": "niri",
|
||||||
"nix-colors": "nix-colors",
|
"nix-colors": "nix-colors",
|
||||||
"nixpkgs": "nixpkgs_8",
|
"nixpkgs": "nixpkgs_7",
|
||||||
"oxalica": "oxalica",
|
"oxalica": "oxalica",
|
||||||
"tsunami": "tsunami_2"
|
"tsunami": "tsunami_2"
|
||||||
}
|
}
|
||||||
|
|
@ -1313,36 +951,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_2": {
|
"systems_2": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1689347949,
|
|
||||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default-linux",
|
|
||||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default-linux",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1689347949,
|
|
||||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default-linux",
|
|
||||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default-linux",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems_4": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
|
@ -1396,47 +1004,6 @@
|
||||||
"repo": "tsunami",
|
"repo": "tsunami",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"xdph": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprland-protocols": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprland-protocols"
|
|
||||||
],
|
|
||||||
"hyprlang": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprlang"
|
|
||||||
],
|
|
||||||
"hyprutils": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprutils"
|
|
||||||
],
|
|
||||||
"hyprwayland-scanner": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprwayland-scanner"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731703417,
|
|
||||||
"narHash": "sha256-rheDc/7C+yI+QspYr9J2z9kQ5P9F4ATapI7qyFAe1XA=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
|
||||||
"rev": "8070f36deec723de71e7557441acb17e478204d3",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
||||||
11
flake.nix
11
flake.nix
|
|
@ -19,16 +19,6 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprland = {
|
|
||||||
url = "github:hyprwm/Hyprland?submodules=1";
|
|
||||||
#inputs.nixpkgs.follows = "nixpkgs"; # broken until libseat fix
|
|
||||||
};
|
|
||||||
|
|
||||||
hyprpicker = {
|
|
||||||
url = "github:hyprwm/hyprpicker";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
@ -89,7 +79,6 @@
|
||||||
nix-colors,
|
nix-colors,
|
||||||
automapaper,
|
automapaper,
|
||||||
disko,
|
disko,
|
||||||
hyprland,
|
|
||||||
lazy,
|
lazy,
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
|
|
|
||||||
|
|
@ -185,11 +185,10 @@
|
||||||
pinentryPackage = pkgs.pinentry-curses;
|
pinentryPackage = pkgs.pinentry-curses;
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprland = {
|
niri = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
package = inputs.niri.packages.${pkgs.system}.niri;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-ld.enable = true;
|
nix-ld.enable = true;
|
||||||
|
|
||||||
nix-ld.libraries = with pkgs; [
|
nix-ld.libraries = with pkgs; [
|
||||||
|
|
@ -271,16 +270,6 @@
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
};
|
};
|
||||||
fail2ban.enable = true;
|
fail2ban.enable = true;
|
||||||
greetd = {
|
|
||||||
enable = false;
|
|
||||||
settings = rec {
|
|
||||||
initial_session = {
|
|
||||||
command = "${pkgs.hyprland}/bin/Hyprland";
|
|
||||||
user = "noa";
|
|
||||||
};
|
|
||||||
default_session = initial_session;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
hardware = {
|
hardware = {
|
||||||
openrgb = {
|
openrgb = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -92,38 +92,6 @@
|
||||||
scale = "1";
|
scale = "1";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
extraConfig =
|
|
||||||
let
|
|
||||||
hconfig = config.home-manager.users.noa;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
xdg.configFile =
|
|
||||||
let
|
|
||||||
wpkgs = inputs.self.packages.${pkgs.system};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
"niri/config.kdl".source = pkgs.substituteAll {
|
|
||||||
src = ../../extra/niri.kdl;
|
|
||||||
env = {
|
|
||||||
kitty = "${pkgs.kitty}/bin/kitty";
|
|
||||||
launcher = "${wpkgs.wofi-launch}/bin/wofi-launch";
|
|
||||||
powermenu = "${wpkgs.wofi-power}/bin/wofi-power";
|
|
||||||
swaylock = "${pkgs.swaylock}/bin/swaylock";
|
|
||||||
automapaper = lib.strings.concatMapStringsSep "\n" (
|
|
||||||
command:
|
|
||||||
(
|
|
||||||
''spawn-at-startup "${(lib.strings.concatStringsSep ''" "'' (lib.strings.splitString " " command))}"''
|
|
||||||
)
|
|
||||||
) hconfig.modules.automapaper.startStrings;
|
|
||||||
spotify = "spotify";
|
|
||||||
keepass = "keepassxc";
|
|
||||||
thunderbird = "thunderbird";
|
|
||||||
appbar = "${pkgs.waybar}/bin/waybar";
|
|
||||||
extra = lib.strings.concatStringsSep "\nspawn-at-startup \"" [ "${pkgs.dunst}/bin/dunst\"" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
"root" = import ./root.nix;
|
"root" = import ./root.nix;
|
||||||
};
|
};
|
||||||
|
|
@ -160,11 +128,6 @@
|
||||||
pinentryPackage = pkgs.pinentry-curses;
|
pinentryPackage = pkgs.pinentry-curses;
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprland = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
|
||||||
};
|
|
||||||
|
|
||||||
niri = {
|
niri = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs.niri.packages.${pkgs.system}.niri;
|
package = inputs.niri.packages.${pkgs.system}.niri;
|
||||||
|
|
@ -233,7 +196,7 @@
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
displayManager = {
|
displayManager = {
|
||||||
defaultSession = "hyprland";
|
defaultSession = "niri";
|
||||||
sddm = {
|
sddm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland.enable = true;
|
wayland.enable = true;
|
||||||
|
|
@ -251,16 +214,6 @@
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
};
|
};
|
||||||
greetd = {
|
|
||||||
enable = false;
|
|
||||||
settings = rec {
|
|
||||||
initial_session = {
|
|
||||||
command = "${pkgs.hyprland}/bin/Hyprland";
|
|
||||||
user = "noa";
|
|
||||||
};
|
|
||||||
default_session = initial_session;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.PasswordAuthentication = false;
|
settings.PasswordAuthentication = false;
|
||||||
|
|
|
||||||
28
modules/automapaper/config.nix
Normal file
28
modules/automapaper/config.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
writeTextFile,
|
||||||
|
display,
|
||||||
|
init-shader,
|
||||||
|
state-shader,
|
||||||
|
display-shader,
|
||||||
|
horizontal,
|
||||||
|
vertical,
|
||||||
|
tps ? 30,
|
||||||
|
cycles ? horizontal,
|
||||||
|
frames_per_tick ? 1,
|
||||||
|
}:
|
||||||
|
writeTextFile {
|
||||||
|
name = "automapaper-config-${display}";
|
||||||
|
text = ''
|
||||||
|
[display]
|
||||||
|
name="${display}"
|
||||||
|
horizontal=${builtins.toString horizontal}
|
||||||
|
vertical=${builtins.toString vertical}
|
||||||
|
tps=${builtins.toString tps}
|
||||||
|
state_frag="${state-shader}"
|
||||||
|
init_frag="${init-shader}"
|
||||||
|
display_frag="${display-shader}"
|
||||||
|
cycles=${builtins.toString cycles}
|
||||||
|
frames_per_tick=${builtins.toString frames_per_tick}
|
||||||
|
'';
|
||||||
|
destination = "/config.toml";
|
||||||
|
}
|
||||||
|
|
@ -1,193 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
nix-colors,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.modules.automapaper;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.modules.automapaper = {
|
|
||||||
enable = lib.mkEnableOption "enable automapaper";
|
|
||||||
hyprland = lib.mkEnableOption "enable hyprland exec-once integration";
|
|
||||||
startStrings = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.str;
|
|
||||||
};
|
|
||||||
default-configuration = {
|
|
||||||
init = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "the shader executed to get the state for the initialisation, and re-initialisation steps";
|
|
||||||
default = ''
|
|
||||||
#version 310 es
|
|
||||||
precision highp float;
|
|
||||||
|
|
||||||
uniform float time;
|
|
||||||
uniform vec2 resolution;
|
|
||||||
|
|
||||||
out vec4 stateColor;
|
|
||||||
|
|
||||||
float PHI = 1.61803398874989484820459; // Φ = Golden Ratio
|
|
||||||
|
|
||||||
float gold_noise(in vec2 xy, in float seed){
|
|
||||||
return fract(tan(distance(xy*PHI, xy)*seed)*xy.x);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main( void ) {
|
|
||||||
|
|
||||||
vec2 position = gl_FragCoord.xy;
|
|
||||||
float color = gold_noise(position.xy, fract(time));
|
|
||||||
|
|
||||||
|
|
||||||
stateColor = vec4(step(0.3, color), 0,0,step(0.3, color));
|
|
||||||
}'';
|
|
||||||
};
|
|
||||||
state = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "the shader executed to increment the state to the next generation";
|
|
||||||
default = ''
|
|
||||||
#version 310 es
|
|
||||||
precision highp float;
|
|
||||||
|
|
||||||
uniform sampler2D state;
|
|
||||||
uniform vec2 scale;
|
|
||||||
|
|
||||||
out vec4 stateColor;
|
|
||||||
|
|
||||||
vec4 get(int x, int y) {
|
|
||||||
return texture(state, (gl_FragCoord.xy + vec2(x, y)) / scale);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
int sum = int(get(-1, -1).r +
|
|
||||||
get(-1, 0).r +
|
|
||||||
get(-1, 1).r +
|
|
||||||
get( 0, -1).r +
|
|
||||||
get( 0, 1).r +
|
|
||||||
get( 1, -1).r +
|
|
||||||
get( 1, 0).r +
|
|
||||||
get( 1, 1).r);
|
|
||||||
vec4 current = get(0,0);
|
|
||||||
if (sum == 3) {
|
|
||||||
stateColor.r = 1.0;
|
|
||||||
stateColor.g = 1.0;
|
|
||||||
} else if (sum == 2) {
|
|
||||||
stateColor = current;
|
|
||||||
if (current.r == 0.0) {
|
|
||||||
stateColor.g = max(current.g - 0.01, 0.0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
stateColor = vec4(0.0, max(current.g - 0.01, 0.0), 0.0, 1.0);
|
|
||||||
}
|
|
||||||
}'';
|
|
||||||
};
|
|
||||||
display = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "the shader executed to display the state to the monitor";
|
|
||||||
default = ''
|
|
||||||
#version 310 es
|
|
||||||
precision
|
|
||||||
highp
|
|
||||||
float;
|
|
||||||
|
|
||||||
uniform sampler2D tex2D;
|
|
||||||
uniform sampler2D old2D;
|
|
||||||
uniform ivec2 resolution;
|
|
||||||
uniform float frame_part;
|
|
||||||
|
|
||||||
in highp vec2 texCoords;
|
|
||||||
out vec4 stateColor;
|
|
||||||
|
|
||||||
const vec4 bgColor = ${nix-colors.lib.conversions.hexToGLSLVec config.colorScheme.palette.background_paper};
|
|
||||||
const vec4 fgColor = ${nix-colors.lib.conversions.hexToGLSLVec config.colorScheme.palette.foreground_paper};
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec2 canvasSize = vec2 (textureSize (tex2D, 0));
|
|
||||||
vec4 state = texture (tex2D, texCoords);
|
|
||||||
vec4 ostate = texture (old2D, texCoords);
|
|
||||||
|
|
||||||
vec2 localCoords = fract (gl_FragCoord.xy / vec2 (resolution) * canvasSize);
|
|
||||||
localCoords = localCoords - 0.5;
|
|
||||||
float dist = sqrt (dot (localCoords, localCoords));
|
|
||||||
|
|
||||||
float size = smoothstep (0.0, 1.0, pow(mix(ostate.g,state.g, frame_part), 3.0)) * 0.35;
|
|
||||||
float mask = 1.0 - step (size, dist);
|
|
||||||
|
|
||||||
float brightness = mix (ostate.r, state.r, frame_part) + 0.2 * pow(mix(ostate.g,state.g, frame_part), 3.0);
|
|
||||||
stateColor = mix (bgColor, fgColor, brightness * mask);
|
|
||||||
} '';
|
|
||||||
};
|
|
||||||
horizontal = lib.mkOption {
|
|
||||||
type = lib.types.int;
|
|
||||||
default = 10;
|
|
||||||
};
|
|
||||||
vertical = lib.mkOption {
|
|
||||||
type = lib.types.int;
|
|
||||||
default = 10;
|
|
||||||
};
|
|
||||||
tps = lib.mkOption {
|
|
||||||
type = lib.types.int;
|
|
||||||
description = "the target amount of ticks to simulate each second";
|
|
||||||
default = 30;
|
|
||||||
};
|
|
||||||
cycles = lib.mkOption {
|
|
||||||
type = lib.types.int;
|
|
||||||
description = "the amount of state increments before the init shader is called again";
|
|
||||||
default = 2500;
|
|
||||||
};
|
|
||||||
frames_per_tick = lib.mkOption {
|
|
||||||
type = lib.types.int;
|
|
||||||
description = "the amount of times to call the display shader for each iteration of the state shader";
|
|
||||||
default = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config =
|
|
||||||
let
|
|
||||||
mkDisplayConfig =
|
|
||||||
conf:
|
|
||||||
let
|
|
||||||
init = builtins.toFile "init.frag" conf.init;
|
|
||||||
state = builtins.toFile "state.frag" conf.state;
|
|
||||||
display = builtins.toFile "display.frag" conf.display;
|
|
||||||
in
|
|
||||||
''
|
|
||||||
[display]
|
|
||||||
name="${conf.name}"
|
|
||||||
horizontal=${builtins.toString conf.horizontal}
|
|
||||||
vertical=${builtins.toString conf.vertical}
|
|
||||||
tps=${builtins.toString conf.tps}
|
|
||||||
state_frag="${state}"
|
|
||||||
init_frag="${init}"
|
|
||||||
display_frag="${display}"
|
|
||||||
cycles=${builtins.toString conf.cycles}
|
|
||||||
frames_per_tick=${builtins.toString conf.frames_per_tick}
|
|
||||||
'';
|
|
||||||
confFile =
|
|
||||||
let
|
|
||||||
def = config.modules.automapaper.default-configuration;
|
|
||||||
in
|
|
||||||
conf:
|
|
||||||
builtins.toFile "${conf.name}.toml" (mkDisplayConfig {
|
|
||||||
name = conf.name;
|
|
||||||
horizontal = builtins.div conf.horizontal def.horizontal;
|
|
||||||
vertical = builtins.div conf.vertical def.vertical;
|
|
||||||
tps = def.tps;
|
|
||||||
state = def.state;
|
|
||||||
init = def.init;
|
|
||||||
display = def.display;
|
|
||||||
cycles = def.cycles;
|
|
||||||
frames_per_tick = def.frames_per_tick;
|
|
||||||
});
|
|
||||||
in
|
|
||||||
lib.mkIf cfg.enable rec {
|
|
||||||
modules.automapaper.startStrings = builtins.map (
|
|
||||||
conf: "${inputs.automapaper.packages.${pkgs.system}.default}/bin/automapaper -C ${confFile conf}"
|
|
||||||
) config.modules.hyprland.displays;
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.hyprland modules.automapaper.startStrings;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
31
modules/automapaper/display-with_vars.glsl
Normal file
31
modules/automapaper/display-with_vars.glsl
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
#version 310 es
|
||||||
|
precision
|
||||||
|
highp
|
||||||
|
float;
|
||||||
|
|
||||||
|
uniform sampler2D tex2D;
|
||||||
|
uniform sampler2D old2D;
|
||||||
|
uniform ivec2 resolution;
|
||||||
|
uniform float frame_part;
|
||||||
|
|
||||||
|
in highp vec2 texCoords;
|
||||||
|
out vec4 stateColor;
|
||||||
|
|
||||||
|
const vec4 bgColor = @background@ ;
|
||||||
|
const vec4 fgColor = @foreground@ ;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
vec2 canvasSize = vec2(textureSize(tex2D, 0));
|
||||||
|
vec4 state = texture(tex2D, texCoords);
|
||||||
|
vec4 ostate = texture(old2D, texCoords);
|
||||||
|
|
||||||
|
vec2 localCoords = fract(gl_FragCoord.xy / vec2(resolution) * canvasSize);
|
||||||
|
localCoords = localCoords - 0.5;
|
||||||
|
float dist = sqrt(dot(localCoords, localCoords));
|
||||||
|
|
||||||
|
float size = smoothstep(0.0, 1.0, pow(mix(ostate.g, state.g, frame_part), 3.0)) * 0.35;
|
||||||
|
float mask = 1.0 - step(size, dist);
|
||||||
|
|
||||||
|
float brightness = mix(ostate.r, state.r, frame_part) + 0.2 * pow(mix(ostate.g, state.g, frame_part), 3.0);
|
||||||
|
stateColor = mix(bgColor, fgColor, brightness * mask);
|
||||||
|
}
|
||||||
26
modules/automapaper/init.glsl
Normal file
26
modules/automapaper/init.glsl
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#version 310 es
|
||||||
|
precision highp float;
|
||||||
|
|
||||||
|
uniform float time;
|
||||||
|
uniform vec2 resolution;
|
||||||
|
|
||||||
|
out vec4 stateColor;
|
||||||
|
|
||||||
|
uint xxhash32(uvec2 p)
|
||||||
|
{
|
||||||
|
const uint PRIME32_2 = 2246822519U, PRIME32_3 = 3266489917U;
|
||||||
|
const uint PRIME32_4 = 668265263U, PRIME32_5 = 374761393U;
|
||||||
|
uint h32 = p.y + PRIME32_5 + p.x * PRIME32_3;
|
||||||
|
h32 = PRIME32_4 * ((h32 << 17) | (h32 >> (32 - 17)));
|
||||||
|
h32 = PRIME32_2 * (h32 ^ (h32 >> 15));
|
||||||
|
h32 = PRIME32_3 * (h32 ^ (h32 >> 13));
|
||||||
|
return h32 ^ (h32 >> 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main(void) {
|
||||||
|
vec2 position = gl_FragCoord.xy;
|
||||||
|
position += 100.0 * time;
|
||||||
|
uint hash = xxhash32(uvec2(position.x, position.y));
|
||||||
|
float value = float(hash) * (1.0 / float(0xffffffffu));
|
||||||
|
stateColor = vec4(step(0.3, value), 0, 0, step(0.3, value));
|
||||||
|
}
|
||||||
34
modules/automapaper/state-game_of_life.glsl
Normal file
34
modules/automapaper/state-game_of_life.glsl
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
#version 310 es
|
||||||
|
precision highp float;
|
||||||
|
|
||||||
|
uniform sampler2D state;
|
||||||
|
uniform vec2 scale;
|
||||||
|
|
||||||
|
out vec4 stateColor;
|
||||||
|
|
||||||
|
vec4 get(int x, int y) {
|
||||||
|
return texture(state, (gl_FragCoord.xy + vec2(x, y)) / scale);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
int sum = int(get(-1, -1).r +
|
||||||
|
get(-1, 0).r +
|
||||||
|
get(-1, 1).r +
|
||||||
|
get(0, -1).r +
|
||||||
|
get(0, 1).r +
|
||||||
|
get(1, -1).r +
|
||||||
|
get(1, 0).r +
|
||||||
|
get(1, 1).r);
|
||||||
|
vec4 current = get(0, 0);
|
||||||
|
if (sum == 3) {
|
||||||
|
stateColor.r = 1.0;
|
||||||
|
stateColor.g = 1.0;
|
||||||
|
} else if (sum == 2) {
|
||||||
|
stateColor = current;
|
||||||
|
if (current.r == 0.0) {
|
||||||
|
stateColor.g = max(current.g - 0.01, 0.0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
stateColor = vec4(0.0, max(current.g - 0.01, 0.0), 0.0, 1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hyprland.nix
|
./waybar
|
||||||
|
./applications
|
||||||
|
./games
|
||||||
|
./dunst.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,255 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.modules.hyprland;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.modules.hyprland = {
|
|
||||||
enable = lib.mkEnableOption "enable hyprland";
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.hyprland;
|
|
||||||
example = lib.literalExpression ''inputs.hyprland.packages.${pkgs.system}.hyprland'';
|
|
||||||
};
|
|
||||||
terminal = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.kitty;
|
|
||||||
description = "What terminal emulator should be used in hyprland";
|
|
||||||
};
|
|
||||||
wallpapers.automapaper = {
|
|
||||||
enable = lib.mkEnableOption "enable automapaper";
|
|
||||||
};
|
|
||||||
portalPackage = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.xdg-desktop-portal-hyprland;
|
|
||||||
};
|
|
||||||
displays = lib.mkOption {
|
|
||||||
type = lib.types.listOf (
|
|
||||||
lib.types.submodule {
|
|
||||||
options = {
|
|
||||||
name = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "the display identifier";
|
|
||||||
example = "DP-2";
|
|
||||||
};
|
|
||||||
horizontal = lib.mkOption {
|
|
||||||
type = lib.types.ints.positive;
|
|
||||||
description = "the horizontal resolution";
|
|
||||||
example = 1920;
|
|
||||||
};
|
|
||||||
vertical = lib.mkOption {
|
|
||||||
type = lib.types.ints.positive;
|
|
||||||
description = "the vertical resolution";
|
|
||||||
example = 1080;
|
|
||||||
};
|
|
||||||
horizontal-offset = lib.mkOption {
|
|
||||||
type = lib.types.ints.unsigned;
|
|
||||||
description = "the horizontal resolution";
|
|
||||||
example = 1920;
|
|
||||||
};
|
|
||||||
vertical-offset = lib.mkOption {
|
|
||||||
type = lib.types.ints.unsigned;
|
|
||||||
description = "the vertical resolution";
|
|
||||||
example = 0;
|
|
||||||
};
|
|
||||||
refresh-rate = lib.mkOption {
|
|
||||||
type = lib.types.ints.unsigned;
|
|
||||||
description = "the refresh rate of the monitor";
|
|
||||||
example = 60;
|
|
||||||
};
|
|
||||||
scale = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "the scale of the monitor";
|
|
||||||
default = "1";
|
|
||||||
example = "1.5";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
description = "the display layout to use";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./waybar/default.nix
|
|
||||||
./wofi.nix
|
|
||||||
./dunst.nix
|
|
||||||
./automapaper
|
|
||||||
];
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
modules = {
|
|
||||||
automapaper = {
|
|
||||||
enable = lib.mkDefault true;
|
|
||||||
hyprland = cfg.enable;
|
|
||||||
};
|
|
||||||
waybar = {
|
|
||||||
modules = {
|
|
||||||
left = [
|
|
||||||
"hyprland/workspaces"
|
|
||||||
"tray"
|
|
||||||
"hyprland/window"
|
|
||||||
];
|
|
||||||
center = [
|
|
||||||
"clock"
|
|
||||||
"custom/spotify"
|
|
||||||
];
|
|
||||||
right = [
|
|
||||||
"custom/vpn"
|
|
||||||
"wireplumber"
|
|
||||||
"network"
|
|
||||||
"cpu"
|
|
||||||
"memory"
|
|
||||||
"custom/poweroff"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
wofi.enable = lib.mkDefault true;
|
|
||||||
dunst.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
# these are necessary for the config to function correctly
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# I always want these with hyprland anyways
|
|
||||||
libnotify # to enable the notify-send command
|
|
||||||
wl-clipboard # wl-copy and wl-paste
|
|
||||||
|
|
||||||
playerctl
|
|
||||||
];
|
|
||||||
|
|
||||||
xdg.portal = {
|
|
||||||
extraPortals = [ cfg.portalPackage ];
|
|
||||||
config.common.default = "*";
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
|
|
||||||
hypridle = {
|
|
||||||
enable = true;
|
|
||||||
settings.listener = [
|
|
||||||
{
|
|
||||||
timeout = 330;
|
|
||||||
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
|
|
||||||
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
playerctld.enable = true;
|
|
||||||
};
|
|
||||||
wayland.windowManager.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
package = cfg.package;
|
|
||||||
settings =
|
|
||||||
let
|
|
||||||
make-display-string =
|
|
||||||
display:
|
|
||||||
"${display.name}, ${builtins.toString display.horizontal}x${builtins.toString display.vertical}@${builtins.toString display.refresh-rate}, ${builtins.toString display.horizontal-offset}x${builtins.toString display.vertical-offset}, ${display.scale}";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
monitor = builtins.map make-display-string cfg.displays;
|
|
||||||
windowrulev2 = [
|
|
||||||
"opacity 1.0 0.6,class:^(kitty)$"
|
|
||||||
"stayfocused,class:^(wofi)$"
|
|
||||||
];
|
|
||||||
env = [
|
|
||||||
"WLR_NO_HARDWARE_CURSORS,1"
|
|
||||||
];
|
|
||||||
exec-once = [
|
|
||||||
"${pkgs.waybar}/bin/waybar"
|
|
||||||
"${pkgs.dunst}/bin/dunst"
|
|
||||||
"${cfg.package}/bin/hyprctl dispatcher focusmonitor 1"
|
|
||||||
"${pkgs.keepassxc}/bin/keepassxc"
|
|
||||||
"${pkgs.spotify}/bin/spotify"
|
|
||||||
];
|
|
||||||
general = {
|
|
||||||
gaps_in = "2";
|
|
||||||
gaps_out = "3";
|
|
||||||
border_size = "3";
|
|
||||||
"col.active_border" = "0xff${config.colorScheme.palette.base01}";
|
|
||||||
"col.inactive_border" = "0xff${config.colorScheme.palette.base00}";
|
|
||||||
};
|
|
||||||
input = {
|
|
||||||
touchpad = {
|
|
||||||
clickfinger_behavior = 1;
|
|
||||||
disable_while_typing = 1;
|
|
||||||
natural_scroll = 1;
|
|
||||||
tap-to-click = 1;
|
|
||||||
scroll_factor = 0.3;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
misc = {
|
|
||||||
key_press_enables_dpms = true;
|
|
||||||
};
|
|
||||||
decoration = {
|
|
||||||
rounding = "6";
|
|
||||||
active_opacity = "1";
|
|
||||||
inactive_opacity = "1";
|
|
||||||
};
|
|
||||||
animations = {
|
|
||||||
enabled = "1";
|
|
||||||
animation = [
|
|
||||||
"windows,1,2,default"
|
|
||||||
"border,1,10,default"
|
|
||||||
"fade,0,5,default"
|
|
||||||
"workspaces,1,4,default"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"$mod" = "SUPER";
|
|
||||||
bind =
|
|
||||||
let
|
|
||||||
wpkgs = inputs.self.packages.${pkgs.system};
|
|
||||||
in
|
|
||||||
[
|
|
||||||
"$mod,Return,exec,${cfg.terminal}/bin/${cfg.terminal.pname}"
|
|
||||||
"$mod,tab,cyclenext"
|
|
||||||
"SUPERSHIFT,Q,killactive"
|
|
||||||
"$mod,SPACE,exec,${wpkgs.wofi-launch}/bin/wofi-launch"
|
|
||||||
"$mod,P,exec,${wpkgs.wofi-power}/bin/wofi-power"
|
|
||||||
"SUPERSHIFT,m,exit"
|
|
||||||
"$mod,H,movefocus,l"
|
|
||||||
"$mod,J,movefocus,u"
|
|
||||||
"$mod,K,movefocus,d"
|
|
||||||
"$mod,L,movefocus,r"
|
|
||||||
"SUPERSHIFT,H,movewindow,l"
|
|
||||||
"SUPERSHIFT,J,movewindow,u"
|
|
||||||
"SUPERSHIFT,K,movewindow,d"
|
|
||||||
"SUPERSHIFT,L,movewindow,r"
|
|
||||||
"$mod,F,togglefloating"
|
|
||||||
"$mod,X,togglespecialworkspace"
|
|
||||||
"SUPERSHIFT,X,movetoworkspace,special"
|
|
||||||
"SUPERSHIFT,S,exec,${pkgs.hyprshot}/bin/hyprshot -m region --clipboard-only"
|
|
||||||
"$mod,f11,fullscreen,0"
|
|
||||||
",XF86AudioLowerVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%-"
|
|
||||||
",XF86AudioRaiseVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%+"
|
|
||||||
",XF86AudioMute,exec,${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle"
|
|
||||||
",XF86AudioPlay,exec,${pkgs.playerctl}/bin/playerctl play-pause"
|
|
||||||
",XF86AudioPrev,exec,${pkgs.playerctl}/bin/playerctl previous"
|
|
||||||
",XF86AudioNext,exec,${pkgs.playerctl}/bin/playerctl next"
|
|
||||||
"$mod,mouse_up,workspace,r-1"
|
|
||||||
"$mod,mouse_down,workspace,r+1"
|
|
||||||
]
|
|
||||||
++ (builtins.concatLists (
|
|
||||||
builtins.genList (
|
|
||||||
x:
|
|
||||||
let
|
|
||||||
ws = builtins.toString (x);
|
|
||||||
in
|
|
||||||
[
|
|
||||||
"$mod,${ws},workspace,${ws}"
|
|
||||||
"ALT,${ws},movetoworkspace,${ws}"
|
|
||||||
]
|
|
||||||
) 10
|
|
||||||
));
|
|
||||||
bindm = [
|
|
||||||
"$mod,mouse:272,movewindow"
|
|
||||||
"$mod,mouse:273,resizewindow"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -16,7 +16,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services = {
|
services = {
|
||||||
desktopManager.plasma6.enable = true;
|
desktopManager.plasma6.enable = true;
|
||||||
displayManager.defaultSession = "hyprland";
|
displayManager.defaultSession = "niri";
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.portal.config.common.default = "*";
|
xdg.portal.config.common.default = "*";
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,8 @@ in
|
||||||
margin-top = 8;
|
margin-top = 8;
|
||||||
margin-left = 10;
|
margin-left = 10;
|
||||||
margin-right = 10;
|
margin-right = 10;
|
||||||
output = builtins.map (display: display.name) config.modules.hyprland.displays;
|
# TODO: find a new way to do outputs nicely
|
||||||
|
# output = builtins.map (display: display.name) config.modules.hyprland.displays;
|
||||||
modules-left = cfg.modules.left;
|
modules-left = cfg.modules.left;
|
||||||
modules-center = cfg.modules.center;
|
modules-center = cfg.modules.center;
|
||||||
modules-right = cfg.modules.right;
|
modules-right = cfg.modules.right;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ lib, config, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
name = "custom/poweroff";
|
name = "custom/poweroff";
|
||||||
in
|
in
|
||||||
|
|
@ -9,16 +15,12 @@ in
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
imports = [
|
|
||||||
../wofi.nix
|
|
||||||
];
|
|
||||||
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
modules.wofi.enable = true;
|
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
settings.mainBar."${name}" = {
|
settings.mainBar."${name}" = {
|
||||||
format = "";
|
format = "";
|
||||||
on-click = "wofi-power";
|
on-click = "${inputs.self.packages.${pkgs.system}.fuzzel-launch}";
|
||||||
on-click-right = "swaylock"; # TODO: change to whatever lock screen i want
|
on-click-right = "${pkgs.swaylock}/bin/swaylock"; # TODO: change to whatever lock screen i want
|
||||||
};
|
};
|
||||||
style = ''
|
style = ''
|
||||||
#custom-poweroff {
|
#custom-poweroff {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
let
|
let
|
||||||
name = "hyprland/window";
|
name = "niri/window";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar = {
|
options.modules.waybar = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
let
|
let
|
||||||
name = "hyprland/workspaces";
|
name = "niri/workspaces";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar = {
|
options.modules.waybar = {
|
||||||
|
|
|
||||||
105
modules/wofi.nix
105
modules/wofi.nix
|
|
@ -1,105 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.modules.wofi;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.modules.wofi = {
|
|
||||||
enable = lib.mkEnableOption "enable wofi app launcher";
|
|
||||||
};
|
|
||||||
imports = [
|
|
||||||
../common/colors.nix
|
|
||||||
];
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
home.packages =
|
|
||||||
let
|
|
||||||
wpkgs = inputs.self.packages.${pkgs.system};
|
|
||||||
in
|
|
||||||
[
|
|
||||||
wpkgs.wofi-launch
|
|
||||||
wpkgs.wofi-power
|
|
||||||
];
|
|
||||||
programs.wofi = {
|
|
||||||
enable = true;
|
|
||||||
settings = { };
|
|
||||||
style = ''
|
|
||||||
* {
|
|
||||||
outline: none;
|
|
||||||
outline-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window {
|
|
||||||
margin: 10px;
|
|
||||||
border: none;
|
|
||||||
background-color: #${config.colorScheme.palette.base01};
|
|
||||||
border-radius: 10px;
|
|
||||||
font-family:
|
|
||||||
JetBrains Mono NF,
|
|
||||||
monospace;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#outer-box {
|
|
||||||
margin: 10px;
|
|
||||||
border: 2px #${config.colorScheme.palette.base00};
|
|
||||||
border-radius: 10px;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
#input {
|
|
||||||
border: none;
|
|
||||||
border-radius: 10px;
|
|
||||||
margin-left: 2px;
|
|
||||||
color: #${config.colorScheme.palette.base05};
|
|
||||||
outline-style: none;
|
|
||||||
background-color: #${config.colorScheme.palette.base03};
|
|
||||||
}
|
|
||||||
|
|
||||||
#scroll {
|
|
||||||
border: 5px solid #${config.colorScheme.palette.base02};
|
|
||||||
border-radius: 10px;
|
|
||||||
/*padding-right: 10px;*/
|
|
||||||
outline: none;
|
|
||||||
background-color: #${config.colorScheme.palette.base00};
|
|
||||||
}
|
|
||||||
|
|
||||||
#inner-box {
|
|
||||||
border: none;
|
|
||||||
border-radius: 10px;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry {
|
|
||||||
border: none;
|
|
||||||
border-radius: 10px;
|
|
||||||
margin-right: 15px;
|
|
||||||
margin-left: 15px;
|
|
||||||
padding-right: 10px;
|
|
||||||
padding-left: 10px;
|
|
||||||
color: #${config.colorScheme.palette.base05};
|
|
||||||
background-color: #${config.colorScheme.palette.base00};
|
|
||||||
}
|
|
||||||
#entry:selected {
|
|
||||||
border: none;
|
|
||||||
background-color: #${config.colorScheme.palette.base02};
|
|
||||||
}
|
|
||||||
|
|
||||||
#text:selected {
|
|
||||||
border: none;
|
|
||||||
color: #${config.colorScheme.palette.base05};
|
|
||||||
}
|
|
||||||
|
|
||||||
#img {
|
|
||||||
background-color: transparent;
|
|
||||||
margin-right: 6px;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -22,7 +22,7 @@ forAllSystems (
|
||||||
call = path: import path { inherit pkgs system; };
|
call = path: import path { inherit pkgs system; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
wofi-launch = call ./wofi-launch.nix;
|
fuzzel-launch = call ./fuzzel-launch.nix;
|
||||||
wofi-power = call ./wofi-power.nix;
|
fuzzel-power = call ./fuzzel-power.nix;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
4
packages/fuzzel-launch.nix
Normal file
4
packages/fuzzel-launch.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
pkgs.writeShellScriptBin "fuzzel-launch" ''
|
||||||
|
${pkgs.fuzzel}/bin/fuzzel
|
||||||
|
''
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
pkgs.writeShellScriptBin "wofi-power" ''
|
pkgs.writeShellScriptBin "fuzzel-power" ''
|
||||||
lock="Lock"
|
lock="Lock"
|
||||||
poweroff="Poweroff"
|
poweroff="Poweroff"
|
||||||
reboot="Reboot"
|
reboot="Reboot"
|
||||||
sleep="Suspend"
|
sleep="Suspend"
|
||||||
logout="Log out"
|
logout="Log out"
|
||||||
selected_option=$(echo -e "$lock\n$sleep\n$reboot\n$logout\n$poweroff" | ${pkgs.wofi}/bin/wofi --dmenu -i -p "Powermenu")
|
selected_option=$(echo -e "$lock\n$sleep\n$reboot\n$logout\n$poweroff" | ${pkgs.fuzzel}/bin/fuzzel --dmenu -i -p "Powermenu")
|
||||||
|
|
||||||
if [ "$selected_option" == "$lock" ]
|
if [ "$selected_option" == "$lock" ]
|
||||||
then
|
then
|
||||||
|
|
@ -26,7 +26,7 @@ pkgs.writeShellScriptBin "wofi-power" ''
|
||||||
elif [ "$selected_option" == "$logout" ]
|
elif [ "$selected_option" == "$logout" ]
|
||||||
then
|
then
|
||||||
echo "logout"
|
echo "logout"
|
||||||
hyprctl dispatch exit
|
${pkgs.niri}/bin/niri msg action quit --skip-confirmation
|
||||||
else
|
else
|
||||||
echo "No match"
|
echo "No match"
|
||||||
fi
|
fi
|
||||||
98
packages/niri-config/default.nix
Normal file
98
packages/niri-config/default.nix
Normal file
|
|
@ -0,0 +1,98 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
self-pkgs,
|
||||||
|
inputs,
|
||||||
|
displays,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
terminal = "${pkgs.kitty}/bin/kitty";
|
||||||
|
launcher = "${self-pkgs.fuzzel-launch}/bin/fuzzel-launch";
|
||||||
|
power-menu = "${self-pkgs.fuzzel-power}/bin/fuzzel-power";
|
||||||
|
lockscreen = "${pkgs.swaylock}/bin/swaylock";
|
||||||
|
wallpapers =
|
||||||
|
let
|
||||||
|
automapaper-configs = builtins.map (
|
||||||
|
{
|
||||||
|
name,
|
||||||
|
horizontal,
|
||||||
|
vertical,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
display-shader = pkgs.substituteAll {
|
||||||
|
src = ../../modules/automapaper/display-with_vars.glsl;
|
||||||
|
background = inputs.nix-colors.lib.conversions.hexToGLSLVec "101012";
|
||||||
|
foreground = inputs.nix-colors.lib.conversions.hexToGLSLVec "192291";
|
||||||
|
};
|
||||||
|
state-shader = ../../modules/automapaper/state-game_of_life.glsl;
|
||||||
|
init-shader = ../../modules/automapaper/init.glsl;
|
||||||
|
|
||||||
|
# General configurations
|
||||||
|
cycles = 2000;
|
||||||
|
tps = 30;
|
||||||
|
horizontal-dot-size = 10;
|
||||||
|
vertical-dot-size = 10;
|
||||||
|
in
|
||||||
|
(import ../../modules/automapaper/config.nix {
|
||||||
|
inherit (pkgs) writeTextFile;
|
||||||
|
inherit
|
||||||
|
init-shader
|
||||||
|
state-shader
|
||||||
|
display-shader
|
||||||
|
tps
|
||||||
|
cycles
|
||||||
|
;
|
||||||
|
display = name;
|
||||||
|
horizontal = builtins.div horizontal horizontal-dot-size;
|
||||||
|
vertical = builtins.div vertical vertical-dot-size;
|
||||||
|
})
|
||||||
|
) displays;
|
||||||
|
in
|
||||||
|
pkgs.lib.strings.concatMapStringsSep "\n" (
|
||||||
|
file:
|
||||||
|
''spawn-at-startup "${
|
||||||
|
inputs.automapaper.packages.${pkgs.system}.automapaper
|
||||||
|
}/bin/automapaper" "-C" "${file}/config.toml"''
|
||||||
|
) automapaper-configs;
|
||||||
|
autostart-string =
|
||||||
|
"spawn-at-startup \""
|
||||||
|
+ pkgs.lib.strings.concatStringsSep "\nspawn-at-startup \"" [
|
||||||
|
"${pkgs.dunst}/bin/dunst\""
|
||||||
|
"${pkgs.xwayland-satellite}/bin/xwayland-satellite\""
|
||||||
|
"spotify\""
|
||||||
|
"keepassxc\""
|
||||||
|
"thunderbird\""
|
||||||
|
"${pkgs.waybar}/bin/waybar\""
|
||||||
|
];
|
||||||
|
|
||||||
|
displays-string = pkgs.lib.strings.concatMapStringsSep "\n" (
|
||||||
|
{
|
||||||
|
name,
|
||||||
|
horizontal,
|
||||||
|
vertical,
|
||||||
|
refresh-rate,
|
||||||
|
horizontal-offset,
|
||||||
|
scale,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
''
|
||||||
|
output "${name}" {
|
||||||
|
mode "${builtins.toString horizontal}x${builtins.toString vertical}@${builtins.toString refresh-rate}"
|
||||||
|
scale ${scale}
|
||||||
|
transform "normal"
|
||||||
|
position x=${builtins.toString horizontal-offset} y=0
|
||||||
|
}
|
||||||
|
''
|
||||||
|
) displays;
|
||||||
|
in
|
||||||
|
pkgs.substituteAll {
|
||||||
|
src = ./template.kdl;
|
||||||
|
terminal = terminal;
|
||||||
|
launcher = launcher;
|
||||||
|
power_menu = power-menu;
|
||||||
|
lockscreen = lockscreen;
|
||||||
|
wallpapers = wallpapers;
|
||||||
|
|
||||||
|
displays = displays-string;
|
||||||
|
autostart = autostart-string;
|
||||||
|
}
|
||||||
|
|
@ -23,13 +23,12 @@ input {
|
||||||
focus-follows-mouse max-scroll-amount="40%"
|
focus-follows-mouse max-scroll-amount="40%"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "eDP-1" {
|
environment {
|
||||||
mode "2256x1504@59.999"
|
DISPLAY ":0"
|
||||||
scale 1
|
|
||||||
transform "normal"
|
|
||||||
position x=0 y=0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@displays@
|
||||||
|
|
||||||
layout {
|
layout {
|
||||||
// Set gaps around windows in logical pixels.
|
// Set gaps around windows in logical pixels.
|
||||||
gaps 8
|
gaps 8
|
||||||
|
|
@ -120,10 +119,9 @@ layout {
|
||||||
// which may be more convenient to use.
|
// which may be more convenient to use.
|
||||||
// See the binds section below for more spawn examples.
|
// See the binds section below for more spawn examples.
|
||||||
// spawn-at-startup "alacritty" "-e" "fish"
|
// spawn-at-startup "alacritty" "-e" "fish"
|
||||||
@automapaper@
|
@wallpapers@
|
||||||
spawn-at-startup "@spotify@"
|
|
||||||
spawn-at-startup "@keepass@"
|
@autostart@
|
||||||
spawn-at-startup "@thunderbird@"
|
|
||||||
|
|
||||||
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
||||||
// If the client will specifically ask for CSD, the request will be honored.
|
// If the client will specifically ask for CSD, the request will be honored.
|
||||||
|
|
@ -163,12 +161,6 @@ window-rule {
|
||||||
open-on-workspace "media"
|
open-on-workspace "media"
|
||||||
}
|
}
|
||||||
|
|
||||||
window-rule {
|
|
||||||
match app-id=r#"^thunderbird$"#
|
|
||||||
|
|
||||||
open-on-workspace "utils"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Window rules let you adjust behavior for individual windows.
|
// Window rules let you adjust behavior for individual windows.
|
||||||
// Find more information on the wiki:
|
// Find more information on the wiki:
|
||||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
||||||
|
|
@ -201,6 +193,7 @@ window-rule {
|
||||||
|
|
||||||
window-rule {
|
window-rule {
|
||||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||||
|
match app-id=r#"^thunderbird$"#
|
||||||
block-out-from "screen-capture"
|
block-out-from "screen-capture"
|
||||||
open-on-workspace "utils"
|
open-on-workspace "utils"
|
||||||
}
|
}
|
||||||
|
|
@ -228,10 +221,10 @@ binds {
|
||||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||||
|
|
||||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||||
Mod+Return { spawn "@kitty@"; }
|
Mod+Return { spawn "@terminal@"; }
|
||||||
Mod+Space { spawn "@launcher@"; }
|
Mod+Space { spawn "@launcher@"; }
|
||||||
Mod+P { spawn "@powermenu@"; }
|
Mod+P { spawn "@power_menu@"; }
|
||||||
Super+Alt+L { spawn "@swaylock@"; }
|
Super+Alt+L { spawn "@lockscreen@"; }
|
||||||
|
|
||||||
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
|
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
|
||||||
// Note: the entire command goes as a single argument in the end.
|
// Note: the entire command goes as a single argument in the end.
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
pkgs.writeShellScriptBin "wofi-launch" ''
|
|
||||||
${pkgs.wofi}/bin/wofi --show drun
|
|
||||||
''
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue