Compare commits
134 commits
add-cosmic
...
main
Author | SHA1 | Date | |
---|---|---|---|
558c12a420 | |||
98a319696f | |||
4e4a2d86e5 | |||
4abdc5e278 | |||
dd9833a199 | |||
cc10685f6d | |||
07fbc5de39 | |||
0e72c5f67d | |||
a3a3aa8231 | |||
cefaa9a11a | |||
5a0e7a92f4 | |||
d3bb2e0e57 | |||
54ae0fdd92 | |||
b84f8374cd | |||
55a3c1bce2 | |||
d049c9ce43 | |||
3748b6c433 | |||
d393b01634 | |||
c122cea302 | |||
2ee69adcd7 | |||
edd039947c | |||
d11fb3a0e2 | |||
174b6251e8 | |||
9ecbef95bf | |||
9774000f64 | |||
876153ba2c | |||
906ee6c1ed | |||
276bc305cf | |||
806a59d366 | |||
a3f40b2778 | |||
f5d16c5e87 | |||
8cdb458c0c | |||
9648fdf0a5 | |||
6129318685 | |||
2719bbada1 | |||
d14fc3c13d | |||
749de574a0 | |||
c5e559afc0 | |||
8569d84f5b | |||
76ee718615 | |||
6c27c49918 | |||
aa36a6eda9 | |||
b15f8de08f | |||
a6e1683060 | |||
b6d62c71fe | |||
a1ebf9d7fa | |||
ceac787218 | |||
6f4e01d8fa | |||
22a9c7e80b | |||
c0dda38da1 | |||
1a299516a3 | |||
f6fedf748f | |||
3540b0af76 | |||
c208306c96 | |||
46c78fe6e1 | |||
50ed7b7b4d | |||
8bd8c3f995 | |||
7a109c779e | |||
![]() |
4e6b2a1162 | ||
499973debf | |||
b67d532e24 | |||
dfc86765ff | |||
4dcf7a0890 | |||
7dcc38f6a2 | |||
ed3dde6c28 | |||
5e568693f6 | |||
dccea7f8c6 | |||
d9bcae7d25 | |||
a0f3b2b2d8 | |||
cdf775bb8a | |||
befd97efe5 | |||
fddfda5787 | |||
2b85d48a32 | |||
7e2602becd | |||
aaa060915a | |||
95d6d0cc32 | |||
ef4a5c8ae6 | |||
f71dd9c197 | |||
8078f7b853 | |||
00d1d7cad5 | |||
fabbd78476 | |||
5216978270 | |||
5f90b9194f | |||
9426ccfc1d | |||
4f3e57eeef | |||
45f8e26757 | |||
9e65cad8fc | |||
8c64859dab | |||
107729a57a | |||
dec28d2d6e | |||
f2e7539501 | |||
79a5f87dce | |||
86f91b9ca9 | |||
3152fb01ee | |||
0c97bb510b | |||
b8aba304d9 | |||
c953ba9371 | |||
87b908311c | |||
daffd82cdb | |||
2f14eb0526 | |||
bc6404817e | |||
739f6506f4 | |||
fefb76e1cf | |||
c39c540a3f | |||
0007b9be66 | |||
51d1e95ee6 | |||
7cf0fbc18e | |||
aab4e171f1 | |||
52d5aaf340 | |||
54542a1b85 | |||
3ed8addd90 | |||
2ede974607 | |||
77b9b09d12 | |||
4a6b8edd73 | |||
1c12cf34ad | |||
1fb4a2ec9c | |||
61821dcf20 | |||
b416ae7660 | |||
4a419ae083 | |||
ba2e8b4ad3 | |||
a718648ca7 | |||
767ef7b903 | |||
948f46e401 | |||
c06a16c8d7 | |||
6d7509521f | |||
d8a86714d8 | |||
38fa12f409 | |||
43bc4fe2a5 | |||
58301019f3 | |||
6a1d960485 | |||
3015496b7d | |||
762634f489 | |||
f304048421 | |||
61372c7e34 |
154 changed files with 3538 additions and 5717 deletions
28
README.md
28
README.md
|
@ -6,23 +6,14 @@
|
||||||
|
|
||||||
My NixOS configurations, using flakes.
|
My NixOS configurations, using flakes.
|
||||||
|
|
||||||
# </> Software I use
|
|
||||||
|
|
||||||
- Wayland compositor: [Hyprland](https://github.com/hyprwm/Hyprland)
|
|
||||||
- Text editor: [neovim](https://github.com/neovim/neovim)
|
|
||||||
- Shell: [fish](https://github.com/fish-shell/fish-shell)
|
|
||||||
|
|
||||||
Additionally using a lot of other software you can find in the configuration files.
|
|
||||||
|
|
||||||
# 🛠️ Structure
|
# 🛠️ Structure
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
| ----------------- | ------------------------------------------------------------- |
|
| ------------------- | ---------------------------------------------------------------- |
|
||||||
| [assets](assets/) | Resources used throughout the system (images etc.) |
|
| [assets](assets/) | Resources used throughout the system (images etc.) |
|
||||||
| [config](config/) | System configuration (separated between NixOS / home-manager) |
|
| [hosts](hosts/) | Host-specific |
|
||||||
| [hosts](hosts/) | Host-specific |
|
| [modules](modules/) | Local module system (where the bulk of the configurations lives) |
|
||||||
| [lib](lib/) | Helper functions |
|
| [shared](shared/) | Exported components (packages and NixOS modules) |
|
||||||
| [shared](shared/) | Re-used components (internal modules, custom derivations) |
|
|
||||||
|
|
||||||
My configuration is structured based on the following principles:
|
My configuration is structured based on the following principles:
|
||||||
|
|
||||||
|
@ -30,9 +21,9 @@ My configuration is structured based on the following principles:
|
||||||
2. Abstractions should be avoided as much as possible.
|
2. Abstractions should be avoided as much as possible.
|
||||||
3. Setting up theming should be as simple as changing one or two options.
|
3. Setting up theming should be as simple as changing one or two options.
|
||||||
|
|
||||||
The main configuration can be found in [config](config/), which declares most of my programs, with re-usable modules and derivations in [shared](shared/), to provide a way to globally set themes, usernames and more.
|
The main configuration can be found in [modules](modules/), which declares most of my programs and services.
|
||||||
|
|
||||||
My hosts can then pick and choose the programs and configurations that they need from the other directories. If the need arises for a more modular setup for a specific piece of software (ie. having different flavors of Firefox per host), I will write a custom module for it. This helps to avoid unnecessarily abstracting my configuration, as I don't find it necessary for the most part, and I would also like it to remain as simple as possible.
|
My hosts can then pick and choose the programs and configurations that they need from the local module system, which have its options declared in [modules/options](modules/options/) for easy reference.
|
||||||
|
|
||||||
# 👥 Credits
|
# 👥 Credits
|
||||||
|
|
||||||
|
@ -42,5 +33,6 @@ People / repositories I have copied / learned from:
|
||||||
- [jacekpoz/nixos](https://git.jacekpoz.pl/poz/niksos) for learning how NixOS modules work
|
- [jacekpoz/nixos](https://git.jacekpoz.pl/poz/niksos) for learning how NixOS modules work
|
||||||
- [sodiboo](https://github.com/sodiboo) for helping me a whole lot with Niri-specific issues
|
- [sodiboo](https://github.com/sodiboo) for helping me a whole lot with Niri-specific issues
|
||||||
- [llakala](https://github.com/llakala) for being very thorough and helpful when cleaning up my code and general structure.
|
- [llakala](https://github.com/llakala) for being very thorough and helpful when cleaning up my code and general structure.
|
||||||
|
- [Lunarnovaa](https://github.com/Lunarnovaa) for her [hjem](https://github.com/feel-co/hjem) configuration and functions, that I used when switching away from home-manager.
|
||||||
|
|
||||||
Some bits have also been borrowed from within the configuration, and credit has been given where its due.
|
Some bits have also been borrowed from within the configuration, and credit has been given where its due.
|
||||||
|
|
3
assets/icons/my-caffeine-off-symbolic.svg
Normal file
3
assets/icons/my-caffeine-off-symbolic.svg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
|
||||||
|
<path style="fill:#dfdfdf" d="M 4,6 C 1.7909,6 0,7.79 0,10 0,12.21 1.7909,14 4,14 4.2425,14 4.4843,13.98 4.7227,13.93 5.462,15.48 6.958,16 10,16 16,16 16,14 16,6 Z M 4,8 H 4.0078 C 4.0194,9.6 4.06,10.94 4.2031,11.99 4.1357,11.99 4.0679,12 4,12 2.8954,12 2,11.1 2,10 2,8.9 2.8954,8 4,8 Z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 376 B |
3
assets/icons/my-caffeine-on-symbolic.svg
Normal file
3
assets/icons/my-caffeine-on-symbolic.svg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
|
||||||
|
<path style="fill:#dfdfdf" d="M 7.1934,0 C 6.0952,1.38 5.766,1.57 6.1621,2.45 6.5212,3.25 7.449,3.15 6.9824,5 7.7488,4.1 8.3577,3.46 7.7559,2.54 7.1437,1.6 6.8084,1.53 7.1934,0 Z M 10.193,0 C 9.0952,1.38 8.766,1.57 9.1621,2.45 9.5212,3.25 10.449,3.15 9.9824,5 10.749,4.1 11.358,3.46 10.756,2.54 10.144,1.6 9.8084,1.53 10.193,0 Z M 13.193,0 C 12.095,1.38 11.766,1.57 12.162,2.45 12.521,3.25 13.449,3.15 12.982,5 13.749,4.1 14.358,3.46 13.756,2.54 13.144,1.6 12.808,1.53 13.193,0 Z M 4,6 C 1.7909,6 0,7.79 0,10 0,12.21 1.7909,14 4,14 4.2425,14 4.4843,13.98 4.7227,13.93 5.462,15.48 6.958,16 10,16 16,16 16,14 16,6 Z M 4,8 H 4.0078 C 4.0194,9.6 4.06,10.94 4.2031,11.99 4.1357,11.99 4.0679,12 4,12 2.8954,12 2,11.1 2,10 2,8.9 2.8954,8 4,8 Z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 826 B |
3403
flake.lock
generated
3403
flake.lock
generated
File diff suppressed because it is too large
Load diff
130
flake.nix
130
flake.nix
|
@ -9,10 +9,17 @@
|
||||||
treefmt-nix,
|
treefmt-nix,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
eachSystem = f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: f nixpkgs.legacyPackages.${system});
|
supportedSystems = nixpkgs.lib.singleton "x86_64-linux";
|
||||||
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
|
|
||||||
|
forAllSystems = function:
|
||||||
|
nixpkgs.lib.genAttrs
|
||||||
|
supportedSystems
|
||||||
|
(system: function nixpkgs.legacyPackages.${system});
|
||||||
|
treefmtEval = forAllSystems (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
|
||||||
in {
|
in {
|
||||||
devShells = eachSystem (pkgs: {
|
checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||||
|
deploy.nodes = import ./nodes.nix {inherit inputs;};
|
||||||
|
devShells = forAllSystems (pkgs: {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = [
|
packages = [
|
||||||
pkgs.alejandra
|
pkgs.alejandra
|
||||||
|
@ -22,25 +29,16 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
formatter = forAllSystems (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||||
nixosConfigurations = import ./hosts {inherit self inputs;};
|
nixosConfigurations = import ./hosts {inherit self inputs;};
|
||||||
packages = eachSystem (pkgs: import ./shared/pkgs {inherit inputs pkgs;});
|
nixosModules.hjemModules = import ./shared/modules/hjem/nixos.nix {inherit (nixpkgs) lib;};
|
||||||
deploy.nodes = import ./nodes.nix {inherit inputs;};
|
packages = forAllSystems (pkgs: import ./shared/pkgs {inherit inputs pkgs;});
|
||||||
checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
|
||||||
};
|
};
|
||||||
inputs = {
|
inputs = {
|
||||||
# nix related
|
# nix related
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
lanzaboote = {
|
nix-index-database = {
|
||||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
nix-index-db = {
|
|
||||||
url = "github:nix-community/nix-index-database";
|
url = "github:nix-community/nix-index-database";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
@ -49,30 +47,42 @@
|
||||||
agenix = {
|
agenix = {
|
||||||
url = "github:ryantm/agenix";
|
url = "github:ryantm/agenix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.systems.follows = "systems";
|
||||||
};
|
};
|
||||||
anyrun = {
|
anyrun = {
|
||||||
url = "github:anyrun-org/anyrun";
|
url = "github:anyrun-org/anyrun";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
systems.follows = "systems";
|
||||||
|
flake-parts.follows = "flake-parts";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
basix.url = "github:notashelf/basix";
|
basix = {
|
||||||
deploy-rs.url = "github:serokell/deploy-rs";
|
url = "github:notashelf/basix";
|
||||||
firefox-addons = {
|
|
||||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.flake-parts.follows = "flake-parts";
|
||||||
|
};
|
||||||
|
deploy-rs = {
|
||||||
|
url = "github:serokell/deploy-rs";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
inputs.utils.follows = "flake-utils"; # Yes, it's actually called `utils`, not a typo
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland = {
|
||||||
hyprland-qtutils = {
|
url = "github:hyprwm/Hyprland";
|
||||||
url = "github:hyprwm/hyprland-qtutils";
|
inputs.systems.follows = "systems";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
hypridle = {
|
hypridle = {
|
||||||
url = "github:hyprwm/hypridle";
|
url = "github:hyprwm/hypridle";
|
||||||
inputs = {
|
inputs = {
|
||||||
hyprlang.follows = "hyprland/hyprlang";
|
hyprlang.follows = "hyprland/hyprlang";
|
||||||
hyprutils.follows = "hyprland/hyprutils";
|
hyprutils.follows = "hyprland/hyprutils";
|
||||||
|
hyprwayland-scanner.follows = "hyprland/hyprwayland-scanner";
|
||||||
|
hyprland-protocols.follows = "hyprland/hyprland-protocols";
|
||||||
|
|
||||||
nixpkgs.follows = "hyprland/nixpkgs";
|
nixpkgs.follows = "hyprland/nixpkgs";
|
||||||
systems.follows = "hyprland/systems";
|
systems.follows = "systems";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hyprlock = {
|
hyprlock = {
|
||||||
|
@ -80,8 +90,11 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
hyprlang.follows = "hyprland/hyprlang";
|
hyprlang.follows = "hyprland/hyprlang";
|
||||||
hyprutils.follows = "hyprland/hyprutils";
|
hyprutils.follows = "hyprland/hyprutils";
|
||||||
|
hyprgraphics.follows = "hyprland/hyprgraphics";
|
||||||
|
hyprwayland-scanner.follows = "hyprland/hyprwayland-scanner";
|
||||||
|
|
||||||
nixpkgs.follows = "hyprland/nixpkgs";
|
nixpkgs.follows = "hyprland/nixpkgs";
|
||||||
systems.follows = "hyprland/systems";
|
systems.follows = "systems";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hyprpaper = {
|
hyprpaper = {
|
||||||
|
@ -89,38 +102,75 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
hyprlang.follows = "hyprland/hyprlang";
|
hyprlang.follows = "hyprland/hyprlang";
|
||||||
hyprutils.follows = "hyprland/hyprutils";
|
hyprutils.follows = "hyprland/hyprutils";
|
||||||
|
hyprgraphics.follows = "hyprland/hyprgraphics";
|
||||||
|
hyprwayland-scanner.follows = "hyprland/hyprwayland-scanner";
|
||||||
|
|
||||||
nixpkgs.follows = "hyprland/nixpkgs";
|
nixpkgs.follows = "hyprland/nixpkgs";
|
||||||
systems.follows = "hyprland/systems";
|
systems.follows = "systems";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hyprwm-contrib = {
|
hyprwm-contrib = {
|
||||||
url = "github:hyprwm/contrib";
|
url = "github:hyprwm/contrib";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
# TODO: change to upstream once https://github.com/feel-co/hjem/pull/16 gets merged
|
||||||
niri.url = "github:sodiboo/niri-flake";
|
hjem = {
|
||||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.5.0";
|
url = "github:nezia1/hjem/implement-environment-variables";
|
||||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
|
||||||
nvf.url = "github:notashelf/nvf";
|
|
||||||
plasma-manager = {
|
|
||||||
url = "github:nix-community/plasma-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.home-manager.follows = "home-manager";
|
|
||||||
};
|
};
|
||||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
|
||||||
walker.url = "github:abenz1267/walker";
|
# TODO: change to upstream once https://github.com/snugnug/hjem-rum/pull/14 gets merged
|
||||||
nezia_dev.url = "github:nezia1/nezia.dev";
|
hjem-rum = {
|
||||||
|
url = "github:nezia1/hjem-rum/add-hyprland";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
morewaita = {
|
||||||
|
url = "github:somepaulo/MoreWaita";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nix-gaming = {
|
||||||
|
url = "github:fufexan/nix-gaming";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.flake-parts.follows = "flake-parts";
|
||||||
|
};
|
||||||
|
nvf = {
|
||||||
|
url = "github:notashelf/nvf";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
systems.follows = "systems";
|
||||||
|
flake-utils.follows = "flake-utils";
|
||||||
|
flake-parts.follows = "flake-parts";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
treefmt-nix = {
|
||||||
|
url = "github:numtide/treefmt-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nezia_dev = {
|
||||||
|
url = "github:nezia1/nezia.dev";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Dependency pinning to prevent duplicate versions
|
||||||
|
systems.url = "github:nix-systems/default";
|
||||||
|
flake-utils = {
|
||||||
|
url = "github:numtide/flake-utils";
|
||||||
|
inputs.systems.follows = "systems";
|
||||||
|
};
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
};
|
};
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
# use nixos cache first
|
# use nixos cache first
|
||||||
"https://cache.nixos.org?priority=10"
|
"https://cache.nixos.org?priority=10"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
"https://hyprland.cachix.org"
|
"https://hyprland.cachix.org"
|
||||||
"https://nix-gaming.cachix.org"
|
"https://nix-gaming.cachix.org"
|
||||||
"https://anyrun.cachix.org"
|
"https://anyrun.cachix.org"
|
||||||
];
|
];
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||||
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{inputs, ...}: let
|
{inputs, ...}: {
|
||||||
system = "${inputs.self}/system";
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./networking.nix # generated at runtime by nixos-infect
|
./networking.nix # generated at runtime by nixos-infect
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
{inputs, ...}: let
|
{
|
||||||
lib' = import ../shared/lib inputs.nixpkgs.lib;
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
lib' = import ../lib inputs.nixpkgs.lib;
|
||||||
mkSystem = args:
|
mkSystem = args:
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs lib';};
|
specialArgs = {inherit self inputs lib';};
|
||||||
modules = (args.modules or []) ++ [../modules];
|
modules =
|
||||||
|
(args.modules or [])
|
||||||
|
++ [../modules];
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
vamos = mkSystem {
|
vamos = mkSystem {
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
{config, ...}: {
|
|
||||||
hardware.graphics.enable = true;
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
hardware.nvidia = {
|
|
||||||
open = false;
|
|
||||||
modesetting.enable = true;
|
|
||||||
powerManagement.enable = true;
|
|
||||||
nvidiaSettings = true;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
|
||||||
};
|
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Nvidia/#suspendwakeup-issues
|
|
||||||
boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"];
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
_: {
|
_: {
|
||||||
imports = [./hardware-configuration.nix ./config/theme.nix ./config/nvidia.nix];
|
imports = [./hardware-configuration.nix ./config/theme.nix];
|
||||||
|
|
||||||
local = {
|
local = {
|
||||||
systemVars = {
|
systemVars = {
|
||||||
|
@ -9,6 +9,7 @@ _: {
|
||||||
homeVars = {
|
homeVars = {
|
||||||
fullName = "Anthony Rodriguez";
|
fullName = "Anthony Rodriguez";
|
||||||
email = "anthony@nezia.dev";
|
email = "anthony@nezia.dev";
|
||||||
|
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEzs7SQH0Vjt9JHoXXmWy9fPU1I3rrRWV5magZFrI5al nezia@solaire";
|
||||||
};
|
};
|
||||||
|
|
||||||
profiles = {
|
profiles = {
|
||||||
|
@ -18,8 +19,7 @@ _: {
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
|
nvidia.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.variables.FLAKE = "/home/nezia/.dotfiles";
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ _: {
|
||||||
homeVars = {
|
homeVars = {
|
||||||
fullName = "Anthony Rodriguez";
|
fullName = "Anthony Rodriguez";
|
||||||
email = "anthony@nezia.dev";
|
email = "anthony@nezia.dev";
|
||||||
|
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHKEPlN/GU9nJZPleA77HH5NA+6vyhhM84fTSjEwnEgq nezia@vamos";
|
||||||
};
|
};
|
||||||
|
|
||||||
profiles = {
|
profiles = {
|
||||||
|
@ -24,6 +25,4 @@ _: {
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.variables.FLAKE = "/home/nezia/.dotfiles";
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,10 +67,11 @@ with lib; let
|
||||||
else (pow' base (exponent - 1) (value * base));
|
else (pow' base (exponent - 1) (value * base));
|
||||||
in
|
in
|
||||||
base: exponent: pow' base exponent base;
|
base: exponent: pow' base exponent base;
|
||||||
generateGtkColors = lib: palette: (lib.concatLines
|
generateGtkColors = palette: (concatLines
|
||||||
(lib.mapAttrsToList
|
(mapAttrsToList
|
||||||
(name: color: "@define-color ${name} ${color};")
|
(name: color: "@define-color ${name} ${color};")
|
||||||
palette));
|
palette));
|
||||||
in {
|
in {
|
||||||
inherit blurImage generateGtkColors rgba;
|
inherit blurImage generateGtkColors rgba;
|
||||||
|
generators = import ./generators lib;
|
||||||
}
|
}
|
4
lib/generators/default.nix
Normal file
4
lib/generators/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
lib: {
|
||||||
|
toHyprConf = import ./tohyprconf.nix lib;
|
||||||
|
gtk = import ./gtk.nix lib;
|
||||||
|
}
|
31
lib/generators/gtk.nix
Normal file
31
lib/generators/gtk.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
lib: let
|
||||||
|
# toGtk3Ini , formatGtk2Option , and finalGtk2Text are all taken from https://github.com/nix-community/home-manager, with some minor modifications to their function.
|
||||||
|
# All of the gtk generator functions are available under the MIT License.
|
||||||
|
inherit (lib) generators isBool boolToString mapAttrsToList concatMapStrings isString escape;
|
||||||
|
formatGtk2Option = n: v: let
|
||||||
|
v' =
|
||||||
|
if isBool v
|
||||||
|
then boolToString v
|
||||||
|
else if isString v
|
||||||
|
then ''"${v}"''
|
||||||
|
else toString v;
|
||||||
|
in "${escape ["="] n} = ${v'}";
|
||||||
|
in {
|
||||||
|
toGtk3Ini = generators.toINI {
|
||||||
|
mkKeyValue = key: value: let
|
||||||
|
value' =
|
||||||
|
if isBool value
|
||||||
|
then boolToString value
|
||||||
|
else toString value;
|
||||||
|
in "${escape ["="] key}=${value'}";
|
||||||
|
};
|
||||||
|
formatGtk2Option = n: v: let
|
||||||
|
v' =
|
||||||
|
if isBool v
|
||||||
|
then boolToString v
|
||||||
|
else if isString v
|
||||||
|
then ''"${v}"''
|
||||||
|
else toString v;
|
||||||
|
in "${escape ["="] n} = ${v'}";
|
||||||
|
finalGtk2Text = {attrs}: concatMapStrings (l: l + "\n") (mapAttrsToList formatGtk2Option attrs);
|
||||||
|
}
|
63
lib/generators/tohyprconf.nix
Normal file
63
lib/generators/tohyprconf.nix
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
lib: {
|
||||||
|
attrs,
|
||||||
|
indentLevel ? 0,
|
||||||
|
importantPrefixes ? ["$" "bezier" "name"],
|
||||||
|
}: let
|
||||||
|
inherit
|
||||||
|
(lib)
|
||||||
|
all
|
||||||
|
concatMapStringsSep
|
||||||
|
concatStrings
|
||||||
|
concatStringsSep
|
||||||
|
filterAttrs
|
||||||
|
foldl
|
||||||
|
generators
|
||||||
|
hasPrefix
|
||||||
|
isAttrs
|
||||||
|
isList
|
||||||
|
mapAttrsToList
|
||||||
|
replicate
|
||||||
|
;
|
||||||
|
|
||||||
|
initialIndent = concatStrings (replicate indentLevel " ");
|
||||||
|
|
||||||
|
toHyprconf' = indent: attrs: let
|
||||||
|
sections =
|
||||||
|
filterAttrs (_: v: isAttrs v || (isList v && all isAttrs v)) attrs;
|
||||||
|
|
||||||
|
mkSection = n: attrs:
|
||||||
|
if lib.isList attrs
|
||||||
|
then (concatMapStringsSep "\n" (a: mkSection n a) attrs)
|
||||||
|
else ''
|
||||||
|
${indent}${n} {
|
||||||
|
${toHyprconf' " ${indent}" attrs}${indent}}
|
||||||
|
'';
|
||||||
|
|
||||||
|
mkFields = generators.toKeyValue {
|
||||||
|
listsAsDuplicateKeys = true;
|
||||||
|
inherit indent;
|
||||||
|
};
|
||||||
|
|
||||||
|
allFields =
|
||||||
|
filterAttrs (_: v: !(isAttrs v || (isList v && all isAttrs v)))
|
||||||
|
attrs;
|
||||||
|
|
||||||
|
isImportantField = n: _:
|
||||||
|
foldl (acc: prev:
|
||||||
|
if hasPrefix prev n
|
||||||
|
then true
|
||||||
|
else acc)
|
||||||
|
false
|
||||||
|
importantPrefixes;
|
||||||
|
|
||||||
|
importantFields = filterAttrs isImportantField allFields;
|
||||||
|
|
||||||
|
fields =
|
||||||
|
builtins.removeAttrs allFields
|
||||||
|
(mapAttrsToList (n: _: n) importantFields);
|
||||||
|
in
|
||||||
|
mkFields importantFields
|
||||||
|
+ concatStringsSep "\n" (mapAttrsToList mkSection sections)
|
||||||
|
+ mkFields fields;
|
||||||
|
in
|
||||||
|
toHyprconf' initialIndent attrs
|
39
modules/core/boot.nix
Normal file
39
modules/core/boot.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (config.local.profiles) server;
|
||||||
|
in {
|
||||||
|
config = mkIf (!server.enable) {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
timeout = 0;
|
||||||
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
consoleMode = "2";
|
||||||
|
};
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
plymouth = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
[Daemon]
|
||||||
|
DeviceScale=2
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
consoleLogLevel = 0;
|
||||||
|
initrd.systemd.enable = true;
|
||||||
|
initrd.verbose = false;
|
||||||
|
|
||||||
|
kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"systemd.show_status=auto"
|
||||||
|
"rd.udev.log_level=3"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
./home-manager.nix
|
|
||||||
./locales.nix
|
./locales.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./nix.nix
|
./nix.nix
|
13
modules/core/hardware/bluetooth.nix
Normal file
13
modules/core/hardware/bluetooth.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (config.local.profiles) desktop;
|
||||||
|
in {
|
||||||
|
config = mkIf desktop.enable {
|
||||||
|
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
||||||
|
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,9 +1,10 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./bluetooth.nix
|
||||||
./fprintd.nix
|
./fprintd.nix
|
||||||
./fwupd.nix
|
./fwupd.nix
|
||||||
|
./nvidia.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
./uni-sync.nix
|
|
||||||
./via.nix
|
./via.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
25
modules/core/hardware/nvidia.nix
Normal file
25
modules/core/hardware/nvidia.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
in {
|
||||||
|
config = mkIf config.local.modules.nvidia.enable {
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
hardware.nvidia = {
|
||||||
|
open = false;
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = true;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
|
};
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Nvidia/#suspendwakeup-issues
|
||||||
|
boot.kernelParams = [
|
||||||
|
"nvidia_drm.fbdev=1"
|
||||||
|
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,4 +1,8 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.lix;
|
package = pkgs.lix;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -11,14 +15,7 @@
|
||||||
"flakes"
|
"flakes"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||||
|
|
||||||
programs.nh = {
|
|
||||||
enable = true;
|
|
||||||
clean = {
|
|
||||||
enable = true;
|
|
||||||
extraArgs = "--keep-since 30d --keep 3";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
43
modules/core/security.nix
Normal file
43
modules/core/security.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||||
|
security = {
|
||||||
|
polkit.enable = true;
|
||||||
|
polkit = {
|
||||||
|
extraConfig = ''
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (
|
||||||
|
subject.isInGroup("users")
|
||||||
|
&& (
|
||||||
|
action.id == "org.freedesktop.login1.reboot" ||
|
||||||
|
action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
|
||||||
|
action.id == "org.freedesktop.login1.power-off" ||
|
||||||
|
action.id == "org.freedesktop.login1.power-off-multiple-sessions"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
||||||
|
description = "polkit-gnome-authentication-agent-1";
|
||||||
|
wantedBy = ["graphical-session.target"];
|
||||||
|
wants = ["graphical-session.target"];
|
||||||
|
after = ["graphical-session.target"];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 1;
|
||||||
|
TimeoutStopSec = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
38
modules/core/users.nix
Normal file
38
modules/core/users.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (config.local.systemVars) username;
|
||||||
|
inherit (config.local.homeVars) fullName;
|
||||||
|
inherit (config.local.profiles) desktop;
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
inputs.hjem.nixosModules.default
|
||||||
|
inputs.hjem-rum.nixosModules.default
|
||||||
|
self.outputs.nixosModules.hjemModules
|
||||||
|
];
|
||||||
|
users.users.${username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = fullName;
|
||||||
|
extraGroups = mkIf desktop.enable [
|
||||||
|
"networkmanager"
|
||||||
|
"audio"
|
||||||
|
"video"
|
||||||
|
"wheel"
|
||||||
|
"plugdev"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
hjem = mkIf desktop.enable {
|
||||||
|
clobberByDefault = true;
|
||||||
|
users.${username} = {
|
||||||
|
enable = true;
|
||||||
|
directory = "/home/${username}";
|
||||||
|
user = "${username}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./core
|
||||||
./options
|
./options
|
||||||
./nix
|
./programs
|
||||||
|
./services
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
styleCfg = osConfig.local.style;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
./programs
|
|
||||||
./services
|
|
||||||
];
|
|
||||||
|
|
||||||
home.pointerCursor = lib.mkIf styleCfg.enable {
|
|
||||||
inherit (styleCfg.cursorTheme) name package size;
|
|
||||||
x11.enable = true;
|
|
||||||
gtk.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,110 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkIf;
|
|
||||||
anyrunPkgs = inputs.anyrun.packages.${pkgs.system};
|
|
||||||
in {
|
|
||||||
imports = [inputs.anyrun.homeManagerModules.default];
|
|
||||||
config = mkIf osConfig.local.modules.hyprland.enable {
|
|
||||||
programs.anyrun = {
|
|
||||||
enable = true;
|
|
||||||
config = {
|
|
||||||
x.fraction = 0.5;
|
|
||||||
y.fraction = 0.3;
|
|
||||||
width.fraction = 0.5;
|
|
||||||
hideIcons = false;
|
|
||||||
ignoreExclusiveZones = false;
|
|
||||||
layer = "overlay";
|
|
||||||
hidePluginInfo = false;
|
|
||||||
closeOnClick = true;
|
|
||||||
showResultsImmediately = true;
|
|
||||||
maxEntries = null;
|
|
||||||
|
|
||||||
plugins = with anyrunPkgs; [
|
|
||||||
applications
|
|
||||||
symbols
|
|
||||||
randr
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
extraCss =
|
|
||||||
/*
|
|
||||||
css
|
|
||||||
*/
|
|
||||||
''
|
|
||||||
#window {
|
|
||||||
background-color: rgba(0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
box#main {
|
|
||||||
border-radius: 10px;
|
|
||||||
background-color: @theme_bg_color;
|
|
||||||
}
|
|
||||||
|
|
||||||
list#main {
|
|
||||||
background-color: rgba(0, 0, 0, 0);
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
list#plugin {
|
|
||||||
background-color: rgba(0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
label#match-desc {
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
label#plugin {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
extraConfigFiles = {
|
|
||||||
"applications.ron".text = ''
|
|
||||||
Config(
|
|
||||||
// Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf
|
|
||||||
desktop_actions: false,
|
|
||||||
max_entries: 5,
|
|
||||||
// The terminal used for running terminal based desktop entries, if left as `None` a static list of terminals is used
|
|
||||||
// to determine what terminal to use.
|
|
||||||
terminal: Some(Terminal(
|
|
||||||
// The main terminal command
|
|
||||||
command: "foot",
|
|
||||||
// What arguments should be passed to the terminal process to run the command correctly
|
|
||||||
// {} is replaced with the command in the desktop entry
|
|
||||||
args: "uwsm app -- {}",
|
|
||||||
)),
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
|
|
||||||
"symbols.ron".text = ''
|
|
||||||
Config(
|
|
||||||
// The prefix that the search needs to begin with to yield symbol results
|
|
||||||
prefix: ":s",
|
|
||||||
|
|
||||||
// Custom user defined symbols to be included along the unicode symbols
|
|
||||||
symbols: {
|
|
||||||
// "name": "text to be copied"
|
|
||||||
"shrug": "¯\\_(ツ)_/¯",
|
|
||||||
"tableflip": "(╯°□°)╯︵ ┻━┻",
|
|
||||||
"unflip": "┬─┬ノ( º _ ºノ)",
|
|
||||||
},
|
|
||||||
|
|
||||||
// The number of entries to be displayed
|
|
||||||
max_entries: 5,
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
"randr.ron".text = ''
|
|
||||||
Config(
|
|
||||||
prefix: ":d",
|
|
||||||
max_entries: 5,
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
imports = [./firefox.nix];
|
|
||||||
}
|
|
|
@ -1,116 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
lib',
|
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib') rgba;
|
|
||||||
styleCfg = osConfig.local.style;
|
|
||||||
in {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
home.packages = [pkgs.vesktop];
|
|
||||||
xdg.configFile."vesktop/themes/midnight-base16.css".text = with styleCfg.scheme.palette;
|
|
||||||
lib.mkIf styleCfg.enable ''
|
|
||||||
/**
|
|
||||||
* @name Midnight-base16
|
|
||||||
* @description A dark, rounded discord theme. Updated to use base16 colors.
|
|
||||||
* @author refact0r
|
|
||||||
* @version 1.6.2
|
|
||||||
* @invite nz87hXyvcy
|
|
||||||
* @website https://github.com/refact0r/midnight-discord
|
|
||||||
* @source https://github.com/refact0r/midnight-discord/blob/master/midnight.theme.css
|
|
||||||
* @authorId 508863359777505290
|
|
||||||
* @authorLink https://www.refact0r.dev
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* IMPORTANT: make sure to enable dark mode in discord settings for the theme to apply properly!!! */
|
|
||||||
|
|
||||||
@import url('https://refact0r.github.io/midnight-discord/midnight.css');
|
|
||||||
|
|
||||||
/* customize things here */
|
|
||||||
:root {
|
|
||||||
/* font, change to 'gg sans' for default discord font*/
|
|
||||||
--font: 'gg sans';
|
|
||||||
|
|
||||||
/* top left corner text */
|
|
||||||
--corner-text: '${styleCfg.scheme.name}';
|
|
||||||
|
|
||||||
/* color of status indicators and window controls */
|
|
||||||
--online-indicator: ${base0B}; /* change to #23a55a for default green */
|
|
||||||
--dnd-indicator: ${base08}; /* change to #f13f43 for default red */
|
|
||||||
--idle-indicator: ${base0A}; /* change to #f0b232 for default yellow */
|
|
||||||
--streaming-indicator: ${base0E}; /* change to #593695 for default purple */
|
|
||||||
|
|
||||||
/* accent colors */
|
|
||||||
--accent-1: ${base0D}; /* links */
|
|
||||||
--accent-2: ${base0E}; /* general unread/mention elements, some icons when active */
|
|
||||||
--accent-3: ${base0E}; /* accent buttons */
|
|
||||||
--accent-4: ${base03}; /* accent buttons when hovered */
|
|
||||||
--accent-5: ${base07}; /* accent buttons when clicked */
|
|
||||||
--mention: ${rgba base0E 0.1}; /* mentions & mention messages */
|
|
||||||
--mention-hover: ${rgba base0E 0.05}; /* mentions & mention messages when hovered */
|
|
||||||
|
|
||||||
/* text colors */
|
|
||||||
--text-0: var(--bg-4); /* text on colored elements */
|
|
||||||
--text-1: ${base06}; /* other normally white text */
|
|
||||||
--text-2: ${base06}; /* headings and important text */
|
|
||||||
--text-3: ${base05}; /* normal text */
|
|
||||||
--text-4: ${base05}; /* icon buttons and channels */
|
|
||||||
--text-5: ${base04}; /* muted channels/chats and timestamps */
|
|
||||||
|
|
||||||
/* background and dark colors */
|
|
||||||
--bg-1: ${base03}; /* dark buttons when clicked */
|
|
||||||
--bg-2: ${base02}; /* dark buttons */
|
|
||||||
--bg-3: ${base01}; /* spacing, secondary elements */
|
|
||||||
--bg-4: ${base00}; /* main background color */
|
|
||||||
--hover: ${rgba base03 0.1}; /* channels and buttons when hovered */
|
|
||||||
--active: ${rgba base03 0.2}; /* channels and buttons when clicked or selected */
|
|
||||||
--message-hover: ${rgba base00 0.1}; /* messages when hovered */
|
|
||||||
|
|
||||||
/* amount of spacing and padding */
|
|
||||||
--spacing: 12px;
|
|
||||||
|
|
||||||
/* animations */
|
|
||||||
/* ALL ANIMATIONS CAN BE DISABLED WITH REDUCED MOTION IN DISCORD SETTINGS */
|
|
||||||
--list-item-transition: 0.2s ease; /* channels/members/settings hover transition */
|
|
||||||
--unread-bar-transition: 0.2s ease; /* unread bar moving into view transition */
|
|
||||||
--moon-spin-transition: 0.4s ease; /* moon icon spin */
|
|
||||||
--icon-spin-transition: 1s ease; /* round icon button spin (settings, emoji, etc.) */
|
|
||||||
|
|
||||||
/* corner roundness (border-radius) */
|
|
||||||
--roundness-xl: 22px; /* roundness of big panel outer corners */
|
|
||||||
--roundness-l: 20px; /* popout panels */
|
|
||||||
--roundness-m: 16px; /* smaller panels, images, embeds */
|
|
||||||
--roundness-s: 12px; /* members, settings inputs */
|
|
||||||
--roundness-xs: 10px; /* channels, buttons */
|
|
||||||
--roundness-xxs: 8px; /* searchbar, small elements */
|
|
||||||
|
|
||||||
/* direct messages moon icon */
|
|
||||||
/* change to block to show, none to hide */
|
|
||||||
--discord-icon: none; /* discord icon */
|
|
||||||
--moon-icon: block; /* moon icon */
|
|
||||||
--moon-icon-url: url('https://upload.wikimedia.org/wikipedia/commons/c/c4/Font_Awesome_5_solid_moon.svg'); /* custom icon url */
|
|
||||||
--moon-icon-size: auto;
|
|
||||||
|
|
||||||
/* filter uncolorable elements to fit theme */
|
|
||||||
/* (just set to none, they're too much work to configure) */
|
|
||||||
--login-bg-filter: saturate(0.3) hue-rotate(-15deg) brightness(0.4); /* login background artwork */
|
|
||||||
--green-to-accent-3-filter: hue-rotate(56deg) saturate(1.43); /* add friend page explore icon */
|
|
||||||
--blurple-to-accent-3-filter: hue-rotate(304deg) saturate(0.84) brightness(1.2); /* add friend page school icon */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Selected chat/friend text */
|
|
||||||
.selected_f5eb4b,
|
|
||||||
.selected_f6f816 .link_d8bfb3 {
|
|
||||||
color: var(--text-0) !important;
|
|
||||||
background: var(--accent-3) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selected_f6f816 .link_d8bfb3 * {
|
|
||||||
color: var(--text-0) !important;
|
|
||||||
fill: var(--text-0) !important;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./helix.nix
|
|
||||||
./neovim.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,64 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
programs.helix = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
theme = "catppuccin_macchiato";
|
|
||||||
editor = {
|
|
||||||
line-number = "relative";
|
|
||||||
lsp.display-messages = true;
|
|
||||||
auto-format = true;
|
|
||||||
auto-completion = true;
|
|
||||||
completion-timeout = 5;
|
|
||||||
color-modes = true;
|
|
||||||
completion-trigger-len = 1;
|
|
||||||
completion-replace = true;
|
|
||||||
cursorline = true;
|
|
||||||
cursor-shape = {
|
|
||||||
insert = "bar";
|
|
||||||
normal = "block";
|
|
||||||
select = "underline";
|
|
||||||
};
|
|
||||||
indent-guides.render = true;
|
|
||||||
lsp.display-inlay-hints = true;
|
|
||||||
statusline.center = ["position-percentage"];
|
|
||||||
true-color = true;
|
|
||||||
whitespace.characters = {
|
|
||||||
newline = "↴";
|
|
||||||
tab = "⇥";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
keys.normal = {
|
|
||||||
space = {
|
|
||||||
space = "file_picker";
|
|
||||||
w = ":w";
|
|
||||||
q = ":q";
|
|
||||||
};
|
|
||||||
esc = ["collapse_selection" "keep_primary_selection"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
languages = {
|
|
||||||
language = [
|
|
||||||
{
|
|
||||||
name = "nix";
|
|
||||||
auto-format = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
language-server = {
|
|
||||||
nil = {
|
|
||||||
command = lib.getExe pkgs.nil;
|
|
||||||
config.nil.formatting.command = ["${lib.getExe pkgs.alejandra}" "-q"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.gaming.enable {
|
|
||||||
home.packages = [
|
|
||||||
pkgs.mangohud
|
|
||||||
pkgs.bolt-launcher
|
|
||||||
pkgs.ankama-launcher
|
|
||||||
pkgs.lutris
|
|
||||||
pkgs.qbittorrent
|
|
||||||
pkgs.protonplus
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
dconf = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
"org/gnome/desktop/wm/preferences" = {
|
|
||||||
button-layout = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,58 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
|
||||||
services.hypridle = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
package = inputs.hypridle.packages.${pkgs.system}.hypridle;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
lock_cmd = "pidof hyprlock || hyprlock";
|
|
||||||
unlock_cmd = "pkill --signal SIGUSR1 hyprlock";
|
|
||||||
before_sleep_cmd = "loginctl lock-session";
|
|
||||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
|
||||||
};
|
|
||||||
|
|
||||||
listener = [
|
|
||||||
{
|
|
||||||
timeout = 300; # 5m
|
|
||||||
on-timeout = "loginctl lock-session";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
timeout = 330; # 5.5m
|
|
||||||
on-timeout = "hyprctl dipsatch dpms off";
|
|
||||||
on-resume = "hyprctl dispatch dpms on";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
timeout = 600; # 10m
|
|
||||||
on-timeout = "systemctl suspend";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# needed when using uwsm as the session manager
|
|
||||||
systemd.user.services."hypridle" = lib.mkForce {
|
|
||||||
Unit = {
|
|
||||||
Description = "Hyprland's Idle Daemon";
|
|
||||||
After = "graphical-session.target";
|
|
||||||
X-Restart-Triggers = ["${config.xdg.configFile."hypr/hypridle.conf".source}"];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "exec";
|
|
||||||
ExecStart = lib.getExe pkgs.hypridle;
|
|
||||||
Restart = "on-failure";
|
|
||||||
Slice = "background-graphical.slice";
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = ["graphical-session.target"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,85 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
# thanks https://github.com/fufexan/dotfiles/blob/c0b3c77d95ce1f574a87e7f7ead672ca0d951245/home/programs/wayland/hyprland/binds.nix#L16-L20
|
|
||||||
toggle = program: uwsm: let
|
|
||||||
prog = builtins.substring 0 14 program;
|
|
||||||
in "pkill ${prog} || ${lib.optionalString uwsm "uwsm app -- "} ${program}";
|
|
||||||
runOnce = program: "pgrep ${program} || uwsm app -- ${program}";
|
|
||||||
run = program: "uwsm app -- ${program}";
|
|
||||||
in {
|
|
||||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
|
||||||
wayland.windowManager.hyprland.settings = {
|
|
||||||
"$mod" = "SUPER";
|
|
||||||
bindr = [
|
|
||||||
"$mod, SUPER_L, exec, ${toggle "anyrun" true}"
|
|
||||||
];
|
|
||||||
bind = [
|
|
||||||
"$mod, Return, exec, ${run "ghostty"}"
|
|
||||||
"$mod, n, exec, ${run "neovide"}"
|
|
||||||
"$mod, w, exec, ${run "firefox"}"
|
|
||||||
", Print, exec, ${runOnce "grimblast"} --notify --cursor copysave output"
|
|
||||||
"$mod, q, killactive"
|
|
||||||
"$mod SHIFT, q, exec, loginctl terminate-user ''"
|
|
||||||
"$mod, period, exec, ${toggle "anyrun-symbols" true}"
|
|
||||||
"CTRL, Print, exec, ${runOnce "grimblast"} --notify --cursor --freeze copysave area"
|
|
||||||
|
|
||||||
"$mod, h, movefocus, l"
|
|
||||||
"$mod, j, movefocus, d"
|
|
||||||
"$mod, k, movefocus, u"
|
|
||||||
"$mod, l, movefocus, r"
|
|
||||||
|
|
||||||
"$mod SHIFT, h, movewindow, l"
|
|
||||||
"$mod SHIFT, j, movewindow, d"
|
|
||||||
"$mod SHIFT, k, movewindow, u"
|
|
||||||
"$mod SHIFT, l, movewindow, r"
|
|
||||||
|
|
||||||
"$mod, 1, workspace, 1"
|
|
||||||
"$mod, 2, workspace, 2"
|
|
||||||
"$mod, 3, workspace, 3"
|
|
||||||
"$mod, 4, workspace, 4"
|
|
||||||
"$mod, 5, workspace, 5"
|
|
||||||
"$mod, 6, workspace, 6"
|
|
||||||
"$mod, 7, workspace, 7"
|
|
||||||
"$mod, 8, workspace, 8"
|
|
||||||
"$mod, 9, workspace, 9"
|
|
||||||
"$mod, 0, workspace, 10"
|
|
||||||
|
|
||||||
"$mod SHIFT, 1, movetoworkspacesilent, 1"
|
|
||||||
"$mod SHIFT, 2, movetoworkspacesilent, 2"
|
|
||||||
"$mod SHIFT, 3, movetoworkspacesilent, 3"
|
|
||||||
"$mod SHIFT, 4, movetoworkspacesilent, 4"
|
|
||||||
"$mod SHIFT, 5, movetoworkspacesilent, 5"
|
|
||||||
"$mod SHIFT, 6, movetoworkspacesilent, 6"
|
|
||||||
"$mod SHIFT, 7, movetoworkspacesilent, 7"
|
|
||||||
"$mod SHIFT, 8, movetoworkspacesilent, 8"
|
|
||||||
"$mod SHIFT, 9, movetoworkspacesilent, 9"
|
|
||||||
"$mod SHIFT, 0, movetoworkspacesilent, 10"
|
|
||||||
|
|
||||||
"$mod, t, togglefloating"
|
|
||||||
", F11, fullscreen, 0"
|
|
||||||
"$mod, f, fullscreen, 1"
|
|
||||||
|
|
||||||
"$mod, e, togglespecialworkspace, file_manager_tui"
|
|
||||||
"$mod SHIFT, e, togglespecialworkspace, file_manager_gui"
|
|
||||||
|
|
||||||
", XF86PowerOff, exec, ${toggle "wlogout" true}"
|
|
||||||
];
|
|
||||||
|
|
||||||
bindel = [
|
|
||||||
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
|
||||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
|
||||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
|
||||||
|
|
||||||
", XF86MonBrightnessUp, exec, brillo -q -u 300000 -A 5"
|
|
||||||
", XF86MonBrightnessDown, exec, brillo -q -u 300000 -U 5"
|
|
||||||
", XF86AudioMedia, exec, XDG_CURRENT_DESKTOP=gnome gnome-control-center"
|
|
||||||
];
|
|
||||||
binde = [
|
|
||||||
"$mod Alt, l, exec, loginctl lock-session"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,140 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (builtins) toString;
|
|
||||||
styleCfg = osConfig.local.style;
|
|
||||||
in {
|
|
||||||
imports = [./binds.nix];
|
|
||||||
|
|
||||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
|
||||||
home.packages = [
|
|
||||||
inputs.hyprwm-contrib.packages.${pkgs.system}.grimblast
|
|
||||||
# disable unused panels - https://github.com/maydayv7/dotfiles/blob/4de45008a6915753834aa7e1cbafbacfff8b7adc/modules/gui/desktop/hyprland/apps/utilities.nix#L42-L57
|
|
||||||
(pkgs.gnome-control-center.overrideAttrs (old: {
|
|
||||||
postInstall =
|
|
||||||
old.postInstall
|
|
||||||
+ ''
|
|
||||||
dir=$out/share/applications
|
|
||||||
for panel in $dir/*
|
|
||||||
do
|
|
||||||
[ "$panel" = "$dir/gnome-network-panel.desktop" ] && continue
|
|
||||||
[ "$panel" = "$dir/gnome-bluetooth-panel.desktop" ] && continue
|
|
||||||
[ "$panel" = "$dir/gnome-wifi-panel.desktop" ] && continue
|
|
||||||
[ "$panel" = "$dir/gnome-wwan-panel.desktop" ] && continue
|
|
||||||
[ "$panel" = "$dir/gnome-sharing-panel.desktop" ] && continue
|
|
||||||
[ "$panel" = "$dir/gnome-wacom-panel.desktop" ] && continue
|
|
||||||
rm "$panel"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
}))
|
|
||||||
];
|
|
||||||
wayland.windowManager.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
|
|
||||||
systemd.enable = false;
|
|
||||||
|
|
||||||
settings = lib.mkMerge [
|
|
||||||
{
|
|
||||||
xwayland = {
|
|
||||||
force_zero_scaling = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
env = [
|
|
||||||
"GDK_SCALE,1"
|
|
||||||
];
|
|
||||||
|
|
||||||
cursor = {
|
|
||||||
no_hardware_cursors = 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
monitor = [
|
|
||||||
"eDP-1, preferred, auto, 1.33"
|
|
||||||
];
|
|
||||||
workspace = [
|
|
||||||
"special:terminal, on-created-empty:foot"
|
|
||||||
"special:mixer_gui, on-created-empty:pavucontrol"
|
|
||||||
"special:file_manager_gui, on-created-empty:nautilus"
|
|
||||||
"special:file_manager_tui, on-created-empty:foot -- yazi"
|
|
||||||
];
|
|
||||||
|
|
||||||
windowrulev2 = [
|
|
||||||
# fixes fullscreen windows (mostly games)
|
|
||||||
"stayfocused, initialtitle:^()$, initialclass:^(steam)$"
|
|
||||||
"minsize 1 1, initialtitle:^()$, initialclass:^(steam)$"
|
|
||||||
"maximize, initialtitle:^(\S+)$, initialclass:^(steamwebhelper)$"
|
|
||||||
|
|
||||||
"immediate, initialclass:^(steam_app_)(.*)$"
|
|
||||||
"fullscreen, initialclass:^(steam_app_)(.*)$"
|
|
||||||
|
|
||||||
# inhibit idle on every fullscreen app except games
|
|
||||||
"idleinhibit fullscreen,class:.*"
|
|
||||||
];
|
|
||||||
|
|
||||||
render = {
|
|
||||||
explicit_sync = 1;
|
|
||||||
explicit_sync_kms = 1;
|
|
||||||
expand_undersized_textures = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
animations = {
|
|
||||||
enabled = true;
|
|
||||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.1";
|
|
||||||
animation = [
|
|
||||||
"windows, 1, 5, myBezier"
|
|
||||||
"windowsOut, 1, 5, default, popin 80%"
|
|
||||||
"windowsMove, 1, 5, default, popin 80%"
|
|
||||||
"fade, 1, 5, default"
|
|
||||||
"border, 1, 5, default"
|
|
||||||
"borderangle, 0, 8, default"
|
|
||||||
"workspaces, 0"
|
|
||||||
"specialWorkspace, 0"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
input = {
|
|
||||||
kb_options = "compose:ralt";
|
|
||||||
touchpad = {
|
|
||||||
natural_scroll = true;
|
|
||||||
scroll_factor = 0.8;
|
|
||||||
tap-to-click = true;
|
|
||||||
clickfinger_behavior = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
gestures = {
|
|
||||||
workspace_swipe = true;
|
|
||||||
workspace_swipe_direction_lock = false;
|
|
||||||
workspace_swipe_cancel_ratio = 0.15;
|
|
||||||
};
|
|
||||||
|
|
||||||
misc = {
|
|
||||||
force_default_wallpaper = 0;
|
|
||||||
disable_hyprland_logo = true;
|
|
||||||
middle_click_paste = false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
(lib.mkIf styleCfg.enable {
|
|
||||||
env = [
|
|
||||||
"HYPRCURSOR_THEME,${styleCfg.cursorTheme.name}"
|
|
||||||
"HYPRCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
|
|
||||||
"XCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
|
|
||||||
];
|
|
||||||
general = {
|
|
||||||
border_size = 4;
|
|
||||||
"col.active_border" = "rgb(${lib.removePrefix "#" styleCfg.scheme.palette.base0E})";
|
|
||||||
};
|
|
||||||
decoration = {
|
|
||||||
rounding = 10;
|
|
||||||
blur.enabled = true;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,114 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
lib',
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
styleCfg = osConfig.local.style;
|
|
||||||
rgbaPalette = builtins.mapAttrs (_: c: (lib'.rgba c 1)) styleCfg.scheme.palette;
|
|
||||||
in {
|
|
||||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
|
||||||
programs.hyprlock = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.hyprlock.packages.${pkgs.system}.hyprlock;
|
|
||||||
|
|
||||||
settings = lib.mkMerge [
|
|
||||||
{
|
|
||||||
general = {
|
|
||||||
disable_loading_bar = true;
|
|
||||||
hide_cursor = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
(with rgbaPalette;
|
|
||||||
lib.mkIf styleCfg.enable {
|
|
||||||
background = [
|
|
||||||
{
|
|
||||||
path = "screenshot";
|
|
||||||
blur_passes = 3;
|
|
||||||
blur_size = 8;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
label = [
|
|
||||||
{
|
|
||||||
monitor = "";
|
|
||||||
text = "Layout: $LAYOUT";
|
|
||||||
font_size = 25;
|
|
||||||
color = base05;
|
|
||||||
|
|
||||||
position = "30, -30";
|
|
||||||
halign = "left";
|
|
||||||
valign = "top";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
monitor = "";
|
|
||||||
text = "$TIME";
|
|
||||||
font_size = 90;
|
|
||||||
color = base05;
|
|
||||||
|
|
||||||
position = "-30, 0";
|
|
||||||
halign = "right";
|
|
||||||
valign = "top";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
monitor = "";
|
|
||||||
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
|
|
||||||
font_size = 25;
|
|
||||||
color = base05;
|
|
||||||
|
|
||||||
position = "-30, -150";
|
|
||||||
halign = "right";
|
|
||||||
valign = "top";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
image = {
|
|
||||||
monitor = "";
|
|
||||||
path = "${styleCfg.avatar}"; # Replace with your avatar path
|
|
||||||
size = 100;
|
|
||||||
border_color = base0D;
|
|
||||||
|
|
||||||
position = "0, 75";
|
|
||||||
halign = "center";
|
|
||||||
valign = "center";
|
|
||||||
};
|
|
||||||
|
|
||||||
input-field = [
|
|
||||||
{
|
|
||||||
monitor = "";
|
|
||||||
|
|
||||||
size = "300, 60";
|
|
||||||
outline_thickness = 4;
|
|
||||||
dots_size = 0.2;
|
|
||||||
dots_spacing = 0.2;
|
|
||||||
dots_center = true;
|
|
||||||
|
|
||||||
outer_color = base0D;
|
|
||||||
inner_color = base02;
|
|
||||||
font_color = base05;
|
|
||||||
|
|
||||||
fade_on_empty = false;
|
|
||||||
|
|
||||||
# the span elements still use #RRGGBB, so we use scheme directly
|
|
||||||
placeholder_text = "<span foreground=\"#${styleCfg.scheme.palette.base05}\"><i> Logged in as </i><span foreground=\"#${styleCfg.scheme.palette.base0D}\">$USER</span></span>";
|
|
||||||
|
|
||||||
hide_input = false;
|
|
||||||
check_color = base0D;
|
|
||||||
fail_color = base08;
|
|
||||||
|
|
||||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
|
||||||
capslock_color = base0E;
|
|
||||||
|
|
||||||
position = "0, -47";
|
|
||||||
halign = "center";
|
|
||||||
valign = "center";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
|
||||||
services.hyprpaper = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.hyprpaper.packages.${pkgs.system}.default;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
preload = ["${osConfig.local.style.wallpaper}"];
|
|
||||||
wallpaper = [", ${osConfig.local.style.wallpaper}"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.hyprpaper.Unit.After = lib.mkForce "graphical-session.target";
|
|
||||||
systemd.user.services.hyprpaper.Service.Slice = "background-graphical.slice";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,196 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
styleCfg = osConfig.local.style;
|
|
||||||
in {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
home.packages = [pkgs.tidal-hifi];
|
|
||||||
# based on https://github.com/rose-pine/tidal. adapted to work with base16 colors.
|
|
||||||
xdg.configFile."tidal-hifi/themes/base16.css".text = with styleCfg.scheme.palette;
|
|
||||||
lib.mkIf styleCfg.enable ''
|
|
||||||
:root {
|
|
||||||
--glass-white-1: ${base05};
|
|
||||||
--glass-white-1-hover: ${base06};
|
|
||||||
--glass-white-2: ${base07};
|
|
||||||
--glass-white-2-hover: ${base08};
|
|
||||||
--glass-white-3: ${base07};
|
|
||||||
--glass-white-4: ${base04};
|
|
||||||
--glass-white-5: ${base04};
|
|
||||||
--glass-white-6: ${base05};
|
|
||||||
--snow-white: ${base07};
|
|
||||||
--snow-white-hover: ${base08};
|
|
||||||
--gray-4: ${base00};
|
|
||||||
--gray-5: ${base02};
|
|
||||||
--gray-6: ${base03};
|
|
||||||
--gray-7: ${base04};
|
|
||||||
--cyan-blue: ${base0D};
|
|
||||||
--cyan-blue-hover: ${base0C};
|
|
||||||
--glass-cyan-1: ${base04};
|
|
||||||
--glass-cyan-2: ${base05};
|
|
||||||
--glass-cyan-3: ${base06};
|
|
||||||
--master-gold: ${base0E};
|
|
||||||
--master-gold-hover: ${base08};
|
|
||||||
--glass-master-gold: ${base05};
|
|
||||||
--glass-master-gold-2: ${base06};
|
|
||||||
--raspberry-pink: ${base08};
|
|
||||||
--raspberry-pink-lighter: ${base09};
|
|
||||||
--black: ${base00};
|
|
||||||
--midnight-black: ${base00};
|
|
||||||
--controls-overlay: ${base03};
|
|
||||||
--duration-overlay: ${base02};
|
|
||||||
--background-dark: ${base00};
|
|
||||||
--hoverLighten: brightness(130%);
|
|
||||||
--hoverDarken: brightness(70%);
|
|
||||||
--hoverTransition: filter 0.15s ease;
|
|
||||||
--scrollbar-track: ${base03};
|
|
||||||
--scrollbar-thumb: ${base00};
|
|
||||||
--lighten-25: ${base01};
|
|
||||||
--red-alert: ${base08};
|
|
||||||
--user-profile-linear-gradient: linear-gradient(160deg,${base0D} 1.22%,${base0C} 40.51%,${base00} 79.07%);
|
|
||||||
--wave-border-radius--none: 0px;
|
|
||||||
--wave-border-radius--extra-small: 4px;
|
|
||||||
--wave-border-radius--small: 8px;
|
|
||||||
--wave-border-radius--regular: 12px;
|
|
||||||
--wave-border-radius--full: 1000px;
|
|
||||||
--wave-color-material-dark: ${base00}80;
|
|
||||||
--wave-color-material-light: ${base04}33;
|
|
||||||
--wave-color-opacity-accent-dark-ultra-thick: ${base0C}cc;
|
|
||||||
--wave-color-opacity-accent-darkest-ultra-thick: ${base01};
|
|
||||||
--wave-color-opacity-accent-fill-regular: ${base0C}66;
|
|
||||||
--wave-color-opacity-accent-fill-thin: ${base0C}33;
|
|
||||||
--wave-color-opacity-accent-fill-ultra-thick: ${base0C}cc;
|
|
||||||
--wave-color-opacity-accent-fill-ultra-thin: ${base0C}1a;
|
|
||||||
--wave-color-opacity-base-bright-thick: ${base00}99;
|
|
||||||
--wave-color-opacity-base-bright-thin: ${base00}33;
|
|
||||||
--wave-color-opacity-base-bright-transparent: ${base00};
|
|
||||||
--wave-color-opacity-base-bright-ultra-thick: ${base00}cc;
|
|
||||||
--wave-color-opacity-base-brighter-ultra-thick: ${base01}cc;
|
|
||||||
--wave-color-opacity-base-brightest-regular: ${base02}66;
|
|
||||||
--wave-color-opacity-base-brightest-thin: ${base02}33;
|
|
||||||
--wave-color-opacity-base-brightest-ultra-thin: ${base02}1a;
|
|
||||||
--wave-color-opacity-base-fill-regular: ${base00}66;
|
|
||||||
--wave-color-opacity-base-fill-thick: ${base00}99;
|
|
||||||
--wave-color-opacity-base-fill-thin: ${base00}33;
|
|
||||||
--wave-color-opacity-base-fill-transparent: #000;
|
|
||||||
--wave-color-opacity-base-fill-ultra-thick: ${base00}cc;
|
|
||||||
--wave-color-opacity-base-fill-ultra-thin: ${base00}1a;
|
|
||||||
--wave-color-opacity-contrast-fill-regular: ${base07}66;
|
|
||||||
--wave-color-opacity-contrast-fill-thick: ${base07}99;
|
|
||||||
--wave-color-opacity-contrast-fill-thin: ${base07}33;
|
|
||||||
--wave-color-opacity-contrast-fill-transparent: #fff;
|
|
||||||
--wave-color-opacity-contrast-fill-ultra-thick: ${base07}cc;
|
|
||||||
--wave-color-opacity-contrast-fill-ultra-thin: ${base07}1a;
|
|
||||||
--wave-color-opacity-rainbow-blue-thin: ${base0D}33;
|
|
||||||
--wave-color-opacity-rainbow-yellow-fill-regular: ${base0E}66;
|
|
||||||
--wave-color-opacity-rainbow-yellow-fill-thin: ${base0E}33;
|
|
||||||
--wave-color-opacity-rainbow-yellow-fill-ultra-thick: ${base0E}cc;
|
|
||||||
--wave-color-opacity-rainbow-yellow-fill-ultra-thin: ${base0E}1a;
|
|
||||||
--wave-color-opacity-special-fill-regular: ${base0E}66;
|
|
||||||
--wave-color-opacity-special-fill-thin: ${base0E}33;
|
|
||||||
--wave-color-opacity-special-fill-ultra-thick: ${base0E}cc;
|
|
||||||
--wave-color-opacity-special-fill-ultra-thin: ${base0E}1a;
|
|
||||||
--wave-color-services-facebook: ${base0D};
|
|
||||||
--wave-color-services-instagram-red: ${base08};
|
|
||||||
--wave-color-services-mtn: ${base0E};
|
|
||||||
--wave-color-services-musix-orange: ${base09};
|
|
||||||
--wave-color-services-musix-pink: ${base0E};
|
|
||||||
--wave-color-services-play: ${base0C};
|
|
||||||
--wave-color-services-plus: ${base0B};
|
|
||||||
--wave-color-services-snapchat: ${base0A};
|
|
||||||
--wave-color-services-sprint: ${base0A};
|
|
||||||
--wave-color-services-t-mobile: ${base08};
|
|
||||||
--wave-color-services-tik-tok-blue: ${base0D};
|
|
||||||
--wave-color-services-tik-tok-red: ${base08};
|
|
||||||
--wave-color-services-twitter: ${base0D};
|
|
||||||
--wave-color-services-viacom-1: ${base0D};
|
|
||||||
--wave-color-services-viacom-2: ${base0E};
|
|
||||||
--wave-color-services-viacom-3: ${base08};
|
|
||||||
--wave-color-services-viacom-4: ${base09};
|
|
||||||
--wave-color-services-viacom-5: ${base0E};
|
|
||||||
--wave-color-services-vivo: ${base0E};
|
|
||||||
--wave-color-services-vodafone: ${base08};
|
|
||||||
--wave-color-services-waze: ${base0D};
|
|
||||||
--wave-color-solid-accent-bright: ${base0D};
|
|
||||||
--wave-color-solid-accent-brighter: ${base0D};
|
|
||||||
--wave-color-solid-accent-dark: ${base0C};
|
|
||||||
--wave-color-solid-accent-darker: ${base01};
|
|
||||||
--wave-color-solid-accent-darkest: ${base00};
|
|
||||||
--wave-color-solid-accent-fill: ${base0D};
|
|
||||||
--wave-color-solid-base-bright: ${base00};
|
|
||||||
--wave-color-solid-base-brighter: ${base01};
|
|
||||||
--wave-color-solid-base-brightest: ${base02};
|
|
||||||
--wave-color-solid-base-fill: ${base00};
|
|
||||||
--wave-color-solid-contrast-dark: ${base07};
|
|
||||||
--wave-color-solid-contrast-darker: ${base06};
|
|
||||||
--wave-color-solid-contrast-darkest: ${base05};
|
|
||||||
--wave-color-solid-contrast-fill: ${base07};
|
|
||||||
--wave-color-solid-rainbow-blue-fill: ${base0D};
|
|
||||||
--wave-color-solid-rainbow-green-brighter: ${base0D};
|
|
||||||
--wave-color-solid-rainbow-green-dark: ${base0C};
|
|
||||||
--wave-color-solid-rainbow-green-darker: ${base0C};
|
|
||||||
--wave-color-solid-rainbow-green-darkest: ${base01};
|
|
||||||
--wave-color-solid-rainbow-green-fill: ${base0D};
|
|
||||||
--wave-color-solid-rainbow-orange-fill: ${base09};
|
|
||||||
--wave-color-solid-rainbow-purple-fill: ${base0E};
|
|
||||||
--wave-color-solid-rainbow-red-bright: ${base08};
|
|
||||||
--wave-color-solid-rainbow-red-brighter: ${base08};
|
|
||||||
--wave-color-solid-rainbow-red-dark: ${base09};
|
|
||||||
--wave-color-solid-rainbow-red-darker: ${base01};
|
|
||||||
--wave-color-solid-rainbow-red-darkest: ${base00};
|
|
||||||
--wave-color-solid-rainbow-red-fill: ${base08};
|
|
||||||
--wave-color-solid-rainbow-yellow-bright: ${base0A};
|
|
||||||
--wave-color-solid-rainbow-yellow-brighter: ${base06};
|
|
||||||
--wave-color-solid-rainbow-yellow-dark: ${base09};
|
|
||||||
--wave-color-solid-rainbow-yellow-darker: ${base01};
|
|
||||||
--wave-color-solid-rainbow-yellow-darkest: ${base00};
|
|
||||||
--wave-color-solid-rainbow-yellow-fill: ${base0A};
|
|
||||||
--wave-color-solid-special-bright: ${base09};
|
|
||||||
--wave-color-solid-special-brighter: ${base06};
|
|
||||||
--wave-color-solid-special-dark: ${base09};
|
|
||||||
--wave-color-solid-special-darker: ${base09};
|
|
||||||
--wave-color-solid-special-darkest: ${base00};
|
|
||||||
--wave-color-solid-special-fill: ${base0E};
|
|
||||||
--wave-color-solid-warning-bright: ${base08};
|
|
||||||
--wave-color-solid-warning-brighter: ${base09};
|
|
||||||
--wave-color-solid-warning-dark: ${base09};
|
|
||||||
--wave-color-solid-warning-darker: ${base01};
|
|
||||||
--wave-color-solid-warning-darkest: ${base00};
|
|
||||||
--wave-color-solid-warning-fill: ${base08};
|
|
||||||
--wave-color-text-disabled: ${base02};
|
|
||||||
--wave-color-text-link: ${base0D};
|
|
||||||
--wave-color-text-main: ${base07};
|
|
||||||
--wave-color-text-placeholder: ${base02};
|
|
||||||
--wave-color-text-secondary: ${base06};
|
|
||||||
--wave-color-text-tertiary: ${base05};
|
|
||||||
--wave-font-weight--bold: 700;
|
|
||||||
--wave-font-weight--demi: 600;
|
|
||||||
--wave-font-weight--medium: 500;
|
|
||||||
--wave-opacity--ultra-thin: .05;
|
|
||||||
--wave-opacity--thin: .1;
|
|
||||||
--wave-opacity--regular: .4;
|
|
||||||
--wave-opacity--thick: .6;
|
|
||||||
--wave-opacity--ultra-thick: .8;
|
|
||||||
--wave-spacing--extra-extra-large: 64px;
|
|
||||||
--wave-spacing--extra-large: 40px;
|
|
||||||
--wave-spacing--large: 24px;
|
|
||||||
--wave-spacing--medium: 20px;
|
|
||||||
--wave-spacing--regular: 16px;
|
|
||||||
--wave-spacing--small: 12px;
|
|
||||||
--wave-spacing--extra-small: 8px;
|
|
||||||
--wave-spacing--extra-extra-small: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wave-text-caption-demi, .tidal-ui__v-stack {
|
|
||||||
color: var(--wave-color-solid-accent-bright) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tidal-ui__icon {
|
|
||||||
fill: var(--wave-color-solid-rainbow-purple-fill) !important;
|
|
||||||
stroke: var(--wave-color-solid-rainbow-purple-fill) !important;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
programs.zathura = {
|
|
||||||
enable = true;
|
|
||||||
options = {
|
|
||||||
font = "Inter 12";
|
|
||||||
selection-notification = true;
|
|
||||||
|
|
||||||
selection-clipboard = "clipboard";
|
|
||||||
adjust-open = "best-fit";
|
|
||||||
pages-per-row = "1";
|
|
||||||
scroll-page-aware = "true";
|
|
||||||
scroll-full-overlap = "0.01";
|
|
||||||
scroll-step = "100";
|
|
||||||
zoom-min = "10";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# miscellaneous programs that do not need to be configured
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
cinny-desktop
|
|
||||||
entr
|
|
||||||
fractal
|
|
||||||
geary
|
|
||||||
imhex
|
|
||||||
logisim-evolution
|
|
||||||
mission-center
|
|
||||||
nautilus
|
|
||||||
obsidian
|
|
||||||
playerctl
|
|
||||||
proton-pass
|
|
||||||
simple-scan
|
|
||||||
wl-clipboard
|
|
||||||
];
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
fzf.enable = true;
|
|
||||||
fastfetch.enable = true;
|
|
||||||
hyfetch = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
preset = "nonbinary";
|
|
||||||
mode = "rgb";
|
|
||||||
backend = "fastfetch";
|
|
||||||
color_align.mode = "horizontal";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
./emulators
|
|
||||||
./programs
|
|
||||||
./shell
|
|
||||||
];
|
|
||||||
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,54 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
styleCfg = osConfig.local.style;
|
|
||||||
# because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b
|
|
||||||
palette = builtins.mapAttrs (_: color: lib.removePrefix "#" color) styleCfg.scheme.palette;
|
|
||||||
in {
|
|
||||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
|
||||||
programs.foot = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
main = {
|
|
||||||
term = "xterm-256color";
|
|
||||||
font = "monospace:size=14";
|
|
||||||
shell = "${lib.getExe config.programs.fish.package}";
|
|
||||||
};
|
|
||||||
|
|
||||||
colors = with palette;
|
|
||||||
lib.mkIf styleCfg.enable {
|
|
||||||
background = base00;
|
|
||||||
foreground = base05;
|
|
||||||
|
|
||||||
regular0 = base00;
|
|
||||||
regular1 = base08;
|
|
||||||
regular2 = base0B;
|
|
||||||
regular3 = base0A;
|
|
||||||
regular4 = base0D;
|
|
||||||
regular5 = base0E;
|
|
||||||
regular6 = base0C;
|
|
||||||
regular7 = base05;
|
|
||||||
|
|
||||||
bright0 = base02;
|
|
||||||
bright1 = base08;
|
|
||||||
bright2 = base0B;
|
|
||||||
bright3 = base0A;
|
|
||||||
bright4 = base0D;
|
|
||||||
bright5 = base0E;
|
|
||||||
bright6 = base0C;
|
|
||||||
bright7 = base07;
|
|
||||||
|
|
||||||
"16" = base09;
|
|
||||||
"17" = base0F;
|
|
||||||
"18" = base01;
|
|
||||||
"19" = base02;
|
|
||||||
"20" = base04;
|
|
||||||
"21" = base06;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,109 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mapAttrs mkIf optionalAttrs removePrefix;
|
|
||||||
styleCfg = osConfig.local.style;
|
|
||||||
|
|
||||||
prefix = "ctrl+a";
|
|
||||||
|
|
||||||
mkGhosttyTheme = palette: let
|
|
||||||
colors = mapAttrs (_: value: removePrefix "#" value) palette;
|
|
||||||
in {
|
|
||||||
palette = [
|
|
||||||
"0=#${colors.base00}"
|
|
||||||
"1=#${colors.base08}"
|
|
||||||
"2=#${colors.base0B}"
|
|
||||||
"3=#${colors.base0A}"
|
|
||||||
"4=#${colors.base0D}"
|
|
||||||
"5=#${colors.base0E}"
|
|
||||||
"6=#${colors.base0C}"
|
|
||||||
"7=#${colors.base05}"
|
|
||||||
"8=#${colors.base02}"
|
|
||||||
"9=#${colors.base08}"
|
|
||||||
"10=#${colors.base0B}"
|
|
||||||
"11=#${colors.base0A}"
|
|
||||||
"12=#${colors.base0D}"
|
|
||||||
"13=#${colors.base0E}"
|
|
||||||
"14=#${colors.base0C}"
|
|
||||||
"15=#${colors.base07}"
|
|
||||||
"16=#${colors.base09}"
|
|
||||||
"17=#${colors.base0F}"
|
|
||||||
"18=#${colors.base01}"
|
|
||||||
"19=#${colors.base02}"
|
|
||||||
"20=#${colors.base04}"
|
|
||||||
"21=#${colors.base06}"
|
|
||||||
];
|
|
||||||
background = colors.base00;
|
|
||||||
foreground = colors.base05;
|
|
||||||
cursor-color = colors.base06;
|
|
||||||
selection-background = colors.base02;
|
|
||||||
selection-foreground = colors.base05;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
programs.ghostty = lib.mkMerge [
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
font-family = ["monospace" "Symbols Nerd Font"];
|
|
||||||
font-size = 14;
|
|
||||||
gtk-single-instance = true;
|
|
||||||
gtk-adwaita = false;
|
|
||||||
confirm-close-surface = false;
|
|
||||||
|
|
||||||
keybind = [
|
|
||||||
"${prefix}>c=new_tab"
|
|
||||||
"${prefix}>p=move_tab:-1"
|
|
||||||
"${prefix}>n=move_tab:1"
|
|
||||||
|
|
||||||
"${prefix}>\\=new_split:right"
|
|
||||||
"${prefix}>-=new_split:down"
|
|
||||||
"${prefix}>h=goto_split:left"
|
|
||||||
"${prefix}>j=goto_split:bottom"
|
|
||||||
"${prefix}>k=goto_split:top"
|
|
||||||
"${prefix}>l=goto_split:right"
|
|
||||||
"${prefix}>shift+h=resize_split:left,10"
|
|
||||||
"${prefix}>shift+j=resize_split:down,10"
|
|
||||||
"${prefix}>shift+k=resize_split:up,10"
|
|
||||||
"${prefix}>shift+l=resize_split:right,10"
|
|
||||||
"${prefix}>z=toggle_split_zoom"
|
|
||||||
];
|
|
||||||
|
|
||||||
adw-toolbar-style = "flat";
|
|
||||||
gtk-tabs-location = "bottom";
|
|
||||||
gtk-wide-tabs = false;
|
|
||||||
window-decoration = false;
|
|
||||||
|
|
||||||
linux-cgroup = "always";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
(optionalAttrs styleCfg.enable {
|
|
||||||
settings.theme = "base16";
|
|
||||||
themes.base16 = mkIf styleCfg.enable (mkGhosttyTheme styleCfg.scheme.palette);
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.user.services.ghosttyd = {
|
|
||||||
Unit = {
|
|
||||||
Description = "ghosttyd™";
|
|
||||||
PartOf = "graphical-session.target";
|
|
||||||
After = "graphical-session.target";
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${pkgs.ghostty}/bin/ghostty --initial-window=false --quit-after-last-window-closed=false";
|
|
||||||
Slice = "background-graphical.slice";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
|
|
||||||
Install = {
|
|
||||||
WantedBy = ["graphical-session.target"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
programs.bat = {
|
|
||||||
enable = true;
|
|
||||||
config.theme = "base16";
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
|
||||||
sessionVariables = {
|
|
||||||
MANPAGER = "sh -c 'col -bx | bat --language man' ";
|
|
||||||
MANROFFOPT = "-c";
|
|
||||||
};
|
|
||||||
|
|
||||||
packages = with pkgs.bat-extras; [
|
|
||||||
batman
|
|
||||||
];
|
|
||||||
|
|
||||||
shellAliases.man = "batman";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
programs = {
|
|
||||||
direnv = {
|
|
||||||
enable = true;
|
|
||||||
nix-direnv.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "Anthony Rodriguez";
|
|
||||||
userEmail = "anthony@nezia.dev";
|
|
||||||
signing = {
|
|
||||||
signByDefault = true;
|
|
||||||
key = "EE3BE97C040A86CE";
|
|
||||||
};
|
|
||||||
extraConfig = {
|
|
||||||
push.autoSetupRemote = true;
|
|
||||||
init = {
|
|
||||||
defaultBranch = "main";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.lazygit = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.shellAliases = {
|
|
||||||
lg = "lazygit";
|
|
||||||
g = "git";
|
|
||||||
gs = "git status";
|
|
||||||
gsh = "git show HEAD";
|
|
||||||
gshs = "DELTA_FEATURES=+side-by-side git show HEAD";
|
|
||||||
ga = "git add";
|
|
||||||
gaa = "git add :/";
|
|
||||||
gap = "git add -p";
|
|
||||||
gc = "git commit";
|
|
||||||
gca = "git commit --amend";
|
|
||||||
gcm = "git commit --message";
|
|
||||||
gcf = "git commit --fixup";
|
|
||||||
gk = "git checkout";
|
|
||||||
gkp = "git checkout -p";
|
|
||||||
gd = "git diff";
|
|
||||||
gds = "DELTA_FEATURES=+side-by-side git diff";
|
|
||||||
gdc = "git diff --cached";
|
|
||||||
gdcs = "DELTA_FEATURES=+side-by-side git diff --cached";
|
|
||||||
gf = "git fetch";
|
|
||||||
gl = "git log";
|
|
||||||
glp = "git log -p";
|
|
||||||
glps = "DELTA_FEATURES=+side-by-side git log -p";
|
|
||||||
gp = "git push";
|
|
||||||
gpf = "git push --force-with-lease";
|
|
||||||
gr = "git reset";
|
|
||||||
gra = "git reset :/";
|
|
||||||
grp = "git reset -p";
|
|
||||||
gt = "git stash";
|
|
||||||
gtp = "git stash pop";
|
|
||||||
gu = "git pull";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
programs.gpg.enable = true;
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# archives
|
|
||||||
zip
|
|
||||||
unzip
|
|
||||||
unrar
|
|
||||||
|
|
||||||
# utils
|
|
||||||
fd
|
|
||||||
file
|
|
||||||
ripgrep
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [inputs.nix-index-db.hmModules.nix-index];
|
|
||||||
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
programs = {
|
|
||||||
nix-index = {
|
|
||||||
enable = true;
|
|
||||||
symlinkToCacheHome = true; # needed for comma
|
|
||||||
};
|
|
||||||
command-not-found.enable = false;
|
|
||||||
nix-index-database.comma.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
|
||||||
programs.yazi = let
|
|
||||||
# https://github.com/iynaix/dotfiles/blob/8bb1568019ea26f034ac1af9c499b3ff102391a5/home-manager/shell/yazi.nix#L9-L11
|
|
||||||
mkYaziPlugin = name: text: {
|
|
||||||
"${name}" = toString (pkgs.writeTextDir "${name}.yazi/init.lua" text) + "/${name}.yazi";
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
plugins = mkYaziPlugin "smart-enter" ''
|
|
||||||
return {
|
|
||||||
entry = function()
|
|
||||||
local h = cx.active.current.hovered
|
|
||||||
ya.manager_emit(h and h.cha.is_dir and "enter" or "open", { hovered = true })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
keymap.manager.prepend_keymap = [
|
|
||||||
{
|
|
||||||
on = "l";
|
|
||||||
run = "plugin --sync smart-enter";
|
|
||||||
desc = "Enter the child directory, or open the file";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./fish.nix
|
|
||||||
./starship.nix
|
|
||||||
./zoxide.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,88 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
starshipTransient = lib.strings.optionalString config.programs.starship.enableTransience ''
|
|
||||||
function starship_transient_prompt_func
|
|
||||||
starship module character
|
|
||||||
end
|
|
||||||
|
|
||||||
function starship_transient_rprompt_func
|
|
||||||
starship module cmd_duration
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
styleCfg = osConfig.local.style;
|
|
||||||
in {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
interactiveShellInit =
|
|
||||||
starshipTransient
|
|
||||||
+ ''
|
|
||||||
set fish_greeting # Disable greeting
|
|
||||||
fish_vi_key_bindings # Enable Vi mode
|
|
||||||
|
|
||||||
''
|
|
||||||
+ lib.optionalString styleCfg.enable
|
|
||||||
''
|
|
||||||
set fish_cursor_default block blink
|
|
||||||
set fish_cursor_insert line blink
|
|
||||||
set fish_cursor_replace_one underscore blink
|
|
||||||
set fish_cursor_visual block
|
|
||||||
|
|
||||||
set -x fish_color_autosuggestion brblack
|
|
||||||
set -x fish_color_cancel -r
|
|
||||||
set -x fish_color_command brgreen
|
|
||||||
set -x fish_color_comment brmagenta
|
|
||||||
set -x fish_color_cwd green
|
|
||||||
set -x fish_color_cwd_root red
|
|
||||||
set -x fish_color_end brmagenta
|
|
||||||
set -x fish_color_error brred
|
|
||||||
set -x fish_color_escape brcyan
|
|
||||||
set -x fish_color_history_current --bold
|
|
||||||
set -x fish_color_host normal
|
|
||||||
set -x fish_color_host_remote yellow
|
|
||||||
set -x fish_color_match --background=brblue
|
|
||||||
set -x fish_color_normal normal
|
|
||||||
set -x fish_color_operator cyan
|
|
||||||
set -x fish_color_param brblue
|
|
||||||
set -x fish_color_quote yellow
|
|
||||||
set -x fish_color_redirection bryellow
|
|
||||||
set -x fish_color_search_match 'bryellow' '--background=brblack'
|
|
||||||
set -x fish_color_selection 'white' '--bold' '--background=brblack'
|
|
||||||
set -x fish_color_status red
|
|
||||||
set -x fish_color_user brgreen
|
|
||||||
set -x fish_color_valid_path --underline
|
|
||||||
set -x fish_pager_color_completion normal
|
|
||||||
set -x fish_pager_color_description yellow
|
|
||||||
set -x fish_pager_color_prefix 'white' '--bold' '--underline'
|
|
||||||
set -x fish_pager_color_progress 'brwhite' '--background=cyan'
|
|
||||||
'';
|
|
||||||
|
|
||||||
plugins = [
|
|
||||||
{
|
|
||||||
name = "fzf";
|
|
||||||
inherit (pkgs.fishPlugins.fzf) src;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "autopair";
|
|
||||||
inherit (pkgs.fishPlugins.autopair) src;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bash = {
|
|
||||||
enable = true;
|
|
||||||
initExtra = ''
|
|
||||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
|
||||||
then
|
|
||||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
|
||||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
programs.starship = {
|
|
||||||
enable = true;
|
|
||||||
enableTransience = true;
|
|
||||||
settings = {
|
|
||||||
add_newline = true;
|
|
||||||
|
|
||||||
directory = {
|
|
||||||
style = "bold yellow";
|
|
||||||
};
|
|
||||||
character = {
|
|
||||||
format = "$symbol ";
|
|
||||||
success_symbol = "[➜](bold green)";
|
|
||||||
error_symbol = "[✗](bold red)";
|
|
||||||
vicmd_symbol = "[](bold green)";
|
|
||||||
};
|
|
||||||
cmd_duration = {
|
|
||||||
style = "yellow";
|
|
||||||
format = "[ $duration]($style)";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
programs.zoxide = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,184 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
styleCfg = osConfig.local.style;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
inputs.walker.homeManagerModules.default
|
|
||||||
];
|
|
||||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
|
||||||
programs.walker = {
|
|
||||||
enable = true;
|
|
||||||
runAsService = true;
|
|
||||||
# All options from the config.json can be used here.
|
|
||||||
config = {
|
|
||||||
list = {
|
|
||||||
height = 200;
|
|
||||||
};
|
|
||||||
app_launch_prefix = "uwsm app -- ";
|
|
||||||
websearch.prefix = "?";
|
|
||||||
switcher.prefix = "/";
|
|
||||||
};
|
|
||||||
|
|
||||||
theme = with styleCfg.scheme.palette;
|
|
||||||
lib.mkIf styleCfg.enable {
|
|
||||||
style = ''
|
|
||||||
@define-color foreground ${base05};
|
|
||||||
@define-color background ${base00};
|
|
||||||
@define-color accent ${base0E};
|
|
||||||
|
|
||||||
#window,
|
|
||||||
#box,
|
|
||||||
#aiScroll,
|
|
||||||
#aiList,
|
|
||||||
#search,
|
|
||||||
#password,
|
|
||||||
#input,
|
|
||||||
#prompt,
|
|
||||||
#clear,
|
|
||||||
#typeahead,
|
|
||||||
#list,
|
|
||||||
child,
|
|
||||||
scrollbar,
|
|
||||||
slider,
|
|
||||||
#item,
|
|
||||||
#text,
|
|
||||||
#label,
|
|
||||||
#bar,
|
|
||||||
#sub,
|
|
||||||
#activationlabel {
|
|
||||||
all: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cfgerr {
|
|
||||||
background: rgba(255, 0, 0, 0.4);
|
|
||||||
margin-top: 20px;
|
|
||||||
padding: 8px;
|
|
||||||
font-size: 1.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window {
|
|
||||||
color: @foreground;
|
|
||||||
}
|
|
||||||
|
|
||||||
#box {
|
|
||||||
border-radius: 2px;
|
|
||||||
background: @background;
|
|
||||||
padding: 32px;
|
|
||||||
border: 1px solid ${base01};
|
|
||||||
box-shadow:
|
|
||||||
0 19px 38px rgba(0, 0, 0, 0.3),
|
|
||||||
0 15px 12px rgba(0, 0, 0, 0.22);
|
|
||||||
}
|
|
||||||
|
|
||||||
#search {
|
|
||||||
box-shadow:
|
|
||||||
0 1px 3px rgba(0, 0, 0, 0.1),
|
|
||||||
0 1px 2px rgba(0, 0, 0, 0.22);
|
|
||||||
background: ${base01};
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#prompt {
|
|
||||||
margin-left: 4px;
|
|
||||||
margin-right: 12px;
|
|
||||||
color: @foreground;
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clear {
|
|
||||||
color: @foreground;
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
#password,
|
|
||||||
#input,
|
|
||||||
#typeahead {
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#input {
|
|
||||||
background: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#spinner {
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#typeahead {
|
|
||||||
color: @foreground;
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
#input placeholder {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
child {
|
|
||||||
padding: 8px;
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
child:selected,
|
|
||||||
child:hover {
|
|
||||||
background: alpha(@accent, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
#icon {
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#label {
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
#sub {
|
|
||||||
opacity: 0.5;
|
|
||||||
font-size: 0.8em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aiItem {
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 2px;
|
|
||||||
color: @foreground;
|
|
||||||
background: @background;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aiItem.assistant {
|
|
||||||
background: ${base02};
|
|
||||||
}
|
|
||||||
|
|
||||||
.aiItem:hover {
|
|
||||||
background: alpha(@accent, 0.2);
|
|
||||||
color: ${base00};
|
|
||||||
}
|
|
||||||
|
|
||||||
#activationlabel {
|
|
||||||
color: @accent;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
layout = {
|
|
||||||
ui.window.box = {
|
|
||||||
v_align = "center";
|
|
||||||
orientation = "vertical";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.walker = {
|
|
||||||
Unit = {
|
|
||||||
PartOf = lib.mkForce [];
|
|
||||||
After = lib.mkForce ["graphical-session.target"];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Slice = lib.mkForce "background-graphical.slice";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,69 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
|
||||||
programs.wlogout = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
layout = let
|
|
||||||
systemd = let
|
|
||||||
systemd = lib.getExe' pkgs.systemd;
|
|
||||||
in {
|
|
||||||
loginctl = systemd "loginctl";
|
|
||||||
systemctl = systemd "systemctl";
|
|
||||||
};
|
|
||||||
in [
|
|
||||||
{
|
|
||||||
action = "${systemd.loginctl} lock-session";
|
|
||||||
keybind = "l";
|
|
||||||
label = "lock";
|
|
||||||
text = "Lock";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
action = "${systemd.systemctl} hibernate";
|
|
||||||
keybind = "h";
|
|
||||||
label = "hibernate";
|
|
||||||
text = "Hibernate";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
action = "${
|
|
||||||
systemd.loginctl
|
|
||||||
} terminate-user ${
|
|
||||||
config.home.username
|
|
||||||
}";
|
|
||||||
|
|
||||||
keybind = "q";
|
|
||||||
label = "logout";
|
|
||||||
text = "Logout";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
action = "${systemd.systemctl} poweroff";
|
|
||||||
keybind = "p";
|
|
||||||
label = "shutdown";
|
|
||||||
text = "Shutdown";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
action = "${systemd.systemctl} suspend";
|
|
||||||
keybind = "s";
|
|
||||||
label = "suspend";
|
|
||||||
text = "Suspend";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
action = "${systemd.systemctl} reboot";
|
|
||||||
keybind = "r";
|
|
||||||
label = "reboot";
|
|
||||||
text = "Reboot";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
xdg = {
|
|
||||||
enable = true;
|
|
||||||
cacheHome = config.home.homeDirectory + "/.local/cache";
|
|
||||||
|
|
||||||
mimeApps = {
|
|
||||||
enable = true;
|
|
||||||
defaultApplications = {
|
|
||||||
"default-web-browser" = ["firefox.desktop"];
|
|
||||||
"text/html" = ["firefox.desktop"];
|
|
||||||
"x-scheme-handler/http" = ["firefox.desktop"];
|
|
||||||
"x-scheme-handler/https" = ["firefox.desktop"];
|
|
||||||
"x-scheme-handler/about" = ["firefox.desktop"];
|
|
||||||
"x-scheme-handler/unknown" = ["firefox.desktop"];
|
|
||||||
"x-scheme-handler/chrome" = ["chromium-browser.desktop"];
|
|
||||||
"inode/directory" = ["yazi.desktop"];
|
|
||||||
"application/pdf" = ["org.pwmt.zathura-pdf-mupdf.desktop"];
|
|
||||||
"image/png" = ["org.gnome.gThumb.desktop"];
|
|
||||||
"image/svg" = [" org.gnome.gThumb.desktop"];
|
|
||||||
"image/jpeg" = ["org.gnome.gThumb.desktop"];
|
|
||||||
"image/gif" = [" org.gnome.gThumb.desktop"];
|
|
||||||
"video/mp4" = ["io.github.celluloid_player.Celluloid.desktop"];
|
|
||||||
"video/avi" = ["io.github.celluloid_player.Celluloid.desktop"];
|
|
||||||
"video/mkv" = ["io.github.celluloid_player.Celluloid.desktop"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
userDirs = {
|
|
||||||
enable = true;
|
|
||||||
createDirectories = true;
|
|
||||||
extraConfig = {
|
|
||||||
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./gammastep.nix
|
|
||||||
./gtk.nix
|
|
||||||
./syncthing.nix
|
|
||||||
./swaync
|
|
||||||
./udiskie.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
services.gammastep = {
|
|
||||||
enable = true;
|
|
||||||
tray = true;
|
|
||||||
provider = "geoclue2";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.gammastep = {
|
|
||||||
Unit = {
|
|
||||||
PartOf = lib.mkForce [];
|
|
||||||
After = lib.mkForce ["graphical-session.target"];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Slice = lib.mkForce "background-graphical.slice";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
styleCfg = osConfig.local.style;
|
|
||||||
in {
|
|
||||||
config = with styleCfg;
|
|
||||||
lib.mkIf styleCfg.enable {
|
|
||||||
gtk = rec {
|
|
||||||
enable = true;
|
|
||||||
iconTheme = {
|
|
||||||
inherit (gtk.iconTheme) name package;
|
|
||||||
};
|
|
||||||
theme = {
|
|
||||||
inherit (gtk.theme) name package;
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk3.extraConfig = {
|
|
||||||
gtk-application-prefer-dark-theme = scheme.variant == "dark";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-${scheme.variant}";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
lib',
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
styleCfg = osConfig.local.style;
|
|
||||||
in {
|
|
||||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
|
||||||
services.swaync = lib.mkMerge [
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
positionX = "right";
|
|
||||||
positionY = "top";
|
|
||||||
layer = "overlay";
|
|
||||||
control-center-layer = "top";
|
|
||||||
layer-shell = true;
|
|
||||||
cssPriority = "application";
|
|
||||||
control-center-margin-top = 0;
|
|
||||||
control-center-margin-bottom = 0;
|
|
||||||
control-center-margin-right = 0;
|
|
||||||
control-center-margin-left = 0;
|
|
||||||
notification-2fa-action = true;
|
|
||||||
notification-inline-replies = false;
|
|
||||||
notification-icon-size = 64;
|
|
||||||
notification-body-image-height = 100;
|
|
||||||
notification-body-image-width = 200;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
(lib.mkIf styleCfg.enable {
|
|
||||||
style =
|
|
||||||
lib'.generateGtkColors lib styleCfg.scheme.palette
|
|
||||||
+ builtins.readFile ./style.css;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce "";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
services.syncthing = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
|
||||||
services.udiskie.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
timeout = 0;
|
|
||||||
systemd-boot = {
|
|
||||||
enable = true;
|
|
||||||
consoleMode = "2";
|
|
||||||
};
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
plymouth = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = ''
|
|
||||||
[Daemon]
|
|
||||||
DeviceScale=2
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
consoleLogLevel = 0;
|
|
||||||
initrd.systemd.enable = true;
|
|
||||||
initrd.verbose = false;
|
|
||||||
|
|
||||||
kernelParams = [
|
|
||||||
"quiet"
|
|
||||||
"systemd.show_status=auto"
|
|
||||||
"rd.udev.log_level=3"
|
|
||||||
];
|
|
||||||
|
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.local.profiles.gaming.enable {
|
|
||||||
hardware.uni-sync = {
|
|
||||||
enable = true;
|
|
||||||
devices = [
|
|
||||||
{
|
|
||||||
device_id = "VID:3314/PID:41218/SN:6243168001";
|
|
||||||
sync_rgb = true;
|
|
||||||
channels = [
|
|
||||||
{
|
|
||||||
mode = "Manual";
|
|
||||||
speed = 60;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "Manual";
|
|
||||||
speed = 60;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "Manual";
|
|
||||||
speed = 60;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "Manual";
|
|
||||||
speed = 60;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.uni-sync = {
|
|
||||||
enable = true;
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${pkgs.uni-sync}/bin/uni-sync";
|
|
||||||
};
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (config.local.systemVars) username;
|
|
||||||
lib' = import ../../../shared/lib inputs.nixpkgs.lib;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
inputs.home-manager.nixosModules.default
|
|
||||||
];
|
|
||||||
|
|
||||||
config = lib.mkIf (!config.local.profiles.server.enable) {
|
|
||||||
home-manager = {
|
|
||||||
backupFileExtension = "backup";
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
|
|
||||||
extraSpecialArgs = {inherit inputs lib';};
|
|
||||||
sharedModules = [../../hm];
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${username} = {
|
|
||||||
home = {
|
|
||||||
homeDirectory = "/home/${username}";
|
|
||||||
stateVersion = "24.05";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
# make HM-managed GTK stuff work
|
|
||||||
dconf.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf (!config.local.profiles.server.enable) {
|
|
||||||
users.users.${config.local.systemVars.username} = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = config.local.homeVars.fullName or "User";
|
|
||||||
extraGroups = [
|
|
||||||
"networkmanager"
|
|
||||||
"audio"
|
|
||||||
"video"
|
|
||||||
"wheel"
|
|
||||||
"plugdev"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hyprland.nix
|
|
||||||
./games.nix
|
|
||||||
./xdg.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.local.profiles.gaming.enable {
|
|
||||||
programs = {
|
|
||||||
steam = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
gamemode.enable = true;
|
|
||||||
gamescope.enable = true;
|
|
||||||
|
|
||||||
coolercontrol = {
|
|
||||||
enable = true;
|
|
||||||
nvidiaSupport = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.local.modules.hyprland.enable {
|
|
||||||
environment.systemPackages = [
|
|
||||||
inputs.hyprland-qtutils.packages.${pkgs.system}.default
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
|
||||||
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
|
||||||
withUWSM = true;
|
|
||||||
systemd.setPath.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# copied from https://github.com/linyinfeng/dotfiles/blob/91b0363b093303f57885cbae9da7f8a99bbb4432/nixos/profiles/graphical/niri/default.nix#L17-L29
|
|
||||||
security.pam.services.hyprlock.text = lib.mkIf config.services.fprintd.enable ''
|
|
||||||
account required pam_unix.so
|
|
||||||
|
|
||||||
# check passwork before fprintd
|
|
||||||
auth sufficient pam_unix.so try_first_pass likeauth
|
|
||||||
auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
|
||||||
auth required pam_deny.so
|
|
||||||
|
|
||||||
password sufficient pam_unix.so nullok yescrypt
|
|
||||||
|
|
||||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
|
||||||
session required pam_unix.so
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
xdgOpenUsePortal = true;
|
|
||||||
config = {
|
|
||||||
common.default = ["gtk"];
|
|
||||||
hyprland.default = ["gtk" "hyprland"];
|
|
||||||
};
|
|
||||||
|
|
||||||
extraPortals = [
|
|
||||||
pkgs.xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
|
||||||
services = {
|
|
||||||
syncthing = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true"; # Don't create default ~/Sync folder
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -11,13 +11,17 @@ in {
|
||||||
fullName = mkOption {
|
fullName = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
description = "your full name (used for git commits and user description)";
|
description = "your full name (used for git commits and user description)";
|
||||||
default = null;
|
default = "User";
|
||||||
};
|
};
|
||||||
email = mkOption {
|
email = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
description = "your email (used for git commits)";
|
description = "your email (used for git commits)";
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
signingKey = mkOption {
|
||||||
|
type = str;
|
||||||
|
description = "your ssh public key (used for signing git commits)";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.assertions = mkIf (!config.local.profiles.server.enable) [
|
config.assertions = mkIf (!config.local.profiles.server.enable) [
|
||||||
|
@ -27,5 +31,8 @@ in {
|
||||||
{
|
{
|
||||||
assertion = options.local.homeVars.email.isDefined;
|
assertion = options.local.homeVars.email.isDefined;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
assertion = options.local.homeVars.signingKey.isDefined;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [./hyprland.nix];
|
imports = [
|
||||||
|
./hyprland.nix
|
||||||
|
./nvidia.nix
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
7
modules/options/modules/nvidia.nix
Normal file
7
modules/options/modules/nvidia.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib) mkEnableOption;
|
||||||
|
in {
|
||||||
|
options.local.modules.nvidia = {
|
||||||
|
enable = mkEnableOption "nvidia";
|
||||||
|
};
|
||||||
|
}
|
|
@ -8,6 +8,7 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) attrNames mkEnableOption mkOption pathExists;
|
inherit (lib) attrNames mkEnableOption mkOption pathExists;
|
||||||
inherit (lib.types) attrs bool enum package path str;
|
inherit (lib.types) attrs bool enum package path str;
|
||||||
|
inherit (lib.lists) singleton;
|
||||||
|
|
||||||
cfg = config.local.style;
|
cfg = config.local.style;
|
||||||
in {
|
in {
|
||||||
|
@ -80,15 +81,13 @@ in {
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
description = "Name for the GTK theme";
|
description = "Name for the GTK theme";
|
||||||
default = "Catppuccin-GTK-Purple-Dark";
|
default = "adw-gtk3-dark";
|
||||||
};
|
};
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = package;
|
type = package;
|
||||||
description = "Package providing the GTK theme";
|
description = "Package providing the GTK theme";
|
||||||
|
|
||||||
default = pkgs.magnetic-catppuccin-gtk.override {
|
default = pkgs.adw-gtk3;
|
||||||
accent = ["purple"];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -96,15 +95,41 @@ in {
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
description = "The name for the icon theme that will be used for GTK programs";
|
description = "The name for the icon theme that will be used for GTK programs";
|
||||||
default = "Papirus-Dark";
|
default = "MoreWaita";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = package;
|
type = package;
|
||||||
description = "The GTK icon theme to be used";
|
description = "The GTK icon theme to be used";
|
||||||
default = pkgs.catppuccin-papirus-folders.override {
|
default = pkgs.morewaita-icon-theme.overrideAttrs {
|
||||||
flavor = "mocha";
|
src = inputs.morewaita;
|
||||||
accent = "lavender";
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
install -d $out/share/icons/MoreWaita
|
||||||
|
cp -r . $out/share/icons/MoreWaita
|
||||||
|
cp ${../../assets/icons/my-caffeine-on-symbolic.svg} $out/share/icons/MoreWaita/symbolic/status/my-caffeine-on-symbolic.svg
|
||||||
|
cp ${../../assets/icons/my-caffeine-off-symbolic.svg} $out/share/icons/MoreWaita/symbolic/status/my-caffeine-off-symbolic.svg
|
||||||
|
gtk-update-icon-cache -f -t $out/share/icons/MoreWaita && xdg-desktop-menu forceupdate
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
/*
|
||||||
|
a patch is needed because MoreWaita expects a `meson.build` file in the directory, containing the
|
||||||
|
name of every icon.
|
||||||
|
*/
|
||||||
|
patches = singleton (pkgs.writeText "add-caffeine-icons.patch" ''
|
||||||
|
diff --git a/symbolic/status/meson.build b/symbolic/status/meson.build
|
||||||
|
index 4e5bfc5..3bbf989 100644
|
||||||
|
--- a/symbolic/status/meson.build
|
||||||
|
+++ b/symbolic/status/meson.build
|
||||||
|
@@ -17,2 +17,4 @@ regular_files = [
|
||||||
|
'keepassxc-unlocked.svg',
|
||||||
|
+ 'my-caffeine-off-symbolic.svg',
|
||||||
|
+ 'my-caffeine-on-symbolic.svg',
|
||||||
|
'pamac-tray-no-update.svg',
|
||||||
|
'');
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -121,8 +146,20 @@ in {
|
||||||
${toString themePath} set by the GTK module does not exist!
|
${toString themePath} set by the GTK module does not exist!
|
||||||
|
|
||||||
To suppress this message, make sure that
|
To suppress this message, make sure that
|
||||||
`config.modules.theme.gtk.theme.package` contains
|
`config.local.theme.gtk.theme.package` contains
|
||||||
the path `${cfg.theme.name}`
|
the path `${cfg.gtk.theme.name}`
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
(let
|
||||||
|
iconPath = cfg.gtk.iconTheme.package + /share/icons + "/${cfg.gtk.iconTheme.name}";
|
||||||
|
in {
|
||||||
|
assertion = cfg.gtk.enable -> pathExists iconPath;
|
||||||
|
message = ''
|
||||||
|
${toString iconPath} set by the GTK module does not exist!
|
||||||
|
|
||||||
|
To suppress this message, make sure that
|
||||||
|
`config.local.theme.gtk.iconTheme.package` contains
|
||||||
|
the path `${cfg.gtk.iconTheme.name}`
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@ in {
|
||||||
username = mkOption {
|
username = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
description = "username for the home directory";
|
description = "username for the home directory";
|
||||||
default = null;
|
default = "user";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
32
modules/programs/anyrun/config.ron
Normal file
32
modules/programs/anyrun/config.ron
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
Config(
|
||||||
|
// Position/size fields use an enum for the value, it can be either:
|
||||||
|
// Absolute(n): The absolute value in pixels
|
||||||
|
// Fraction(n): A fraction of the width or height of the full screen (depends on exclusive zones and the settings related to them) window respectively
|
||||||
|
|
||||||
|
// The horizontal position, adjusted so that Relative(0.5) always centers the runner
|
||||||
|
x: Fraction(0.5),
|
||||||
|
|
||||||
|
// The vertical position, works the same as `x`
|
||||||
|
y: Fraction(0.2),
|
||||||
|
|
||||||
|
// Hide match and plugin info icons
|
||||||
|
hide_icons: false,
|
||||||
|
|
||||||
|
// ignore exclusive zones, f.e. Waybar
|
||||||
|
ignore_exclusive_zones: false,
|
||||||
|
|
||||||
|
// Layer shell layer: Background, Bottom, Top, Overlay
|
||||||
|
layer: Overlay,
|
||||||
|
|
||||||
|
// Hide the plugin info panel
|
||||||
|
hide_plugin_info: false,
|
||||||
|
|
||||||
|
// Close window when a click outside the main box is received
|
||||||
|
close_on_click: true,
|
||||||
|
|
||||||
|
// Show search results immediately when Anyrun starts
|
||||||
|
show_results_immediately: true,
|
||||||
|
|
||||||
|
// Limit amount of entries shown in total
|
||||||
|
max_entries: Some(10),
|
||||||
|
)
|
56
modules/programs/anyrun/default.nix
Normal file
56
modules/programs/anyrun/default.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
inherit (config.local.systemVars) username;
|
||||||
|
in {
|
||||||
|
config = mkIf config.local.modules.hyprland.enable {
|
||||||
|
hjem.users.${username} = {
|
||||||
|
packages = [inputs.anyrun.packages.${pkgs.system}.anyrun-with-all-plugins];
|
||||||
|
files = {
|
||||||
|
".config/anyrun/config.ron".source = ./config.ron;
|
||||||
|
".config/anyrun/applications.ron".text = ''
|
||||||
|
Config(
|
||||||
|
// Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf
|
||||||
|
desktop_actions: false,
|
||||||
|
max_entries: 5,
|
||||||
|
// The terminal used for running terminal based desktop entries, if left as `None` a static list of terminals is used
|
||||||
|
// to determine what terminal to use.
|
||||||
|
terminal: Some(Terminal(
|
||||||
|
// The main terminal command
|
||||||
|
command: "ghostty -e",
|
||||||
|
// What arguments should be passed to the terminal process to run the command correctly
|
||||||
|
// {} is replaced with the command in the desktop entry
|
||||||
|
args: "uwsm app -- {}",
|
||||||
|
)),
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
".config/anyrun/symbols.ron".text = ''
|
||||||
|
Config(
|
||||||
|
prefix: ":s",
|
||||||
|
symbols: {
|
||||||
|
"shrug": "¯\\_(ツ)_/¯",
|
||||||
|
},
|
||||||
|
max_entries: 5,
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
".config/anyrun/shell.ron".text = ''
|
||||||
|
Config(
|
||||||
|
prefix: ">"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
".config/anyrun/randr.ron".text = ''
|
||||||
|
Config(
|
||||||
|
prefi: ":dp",
|
||||||
|
max_entries: 5,
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
".config/anyrun/style.css".source = ./style.css;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
25
modules/programs/anyrun/style.css
Normal file
25
modules/programs/anyrun/style.css
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#window {
|
||||||
|
background-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
box#main {
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: @theme_bg_color;
|
||||||
|
}
|
||||||
|
|
||||||
|
list#main {
|
||||||
|
background-color: rgba(0, 0, 0, 0);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
list#plugin {
|
||||||
|
background-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
label#match-desc {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
label#plugin {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
14
modules/programs/comma.nix
Normal file
14
modules/programs/comma.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (config.local.profiles) desktop;
|
||||||
|
in {
|
||||||
|
imports = [inputs.nix-index-database.nixosModules.nix-index];
|
||||||
|
config = mkIf desktop.enable {
|
||||||
|
programs.nix-index-database.comma.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,16 +1,19 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./browsers
|
./anyrun
|
||||||
./editors
|
./editors
|
||||||
./hypr
|
./hypr
|
||||||
./media
|
./media
|
||||||
./terminal
|
./terminal
|
||||||
|
|
||||||
./anyrun.nix
|
./comma.nix
|
||||||
./discord.nix
|
./discord.nix
|
||||||
|
./fastfetch.nix
|
||||||
|
./firefox.nix
|
||||||
./games.nix
|
./games.nix
|
||||||
./gnome.nix
|
|
||||||
./misc.nix
|
./misc.nix
|
||||||
|
./nh.nix
|
||||||
|
./pcmanfm.nix
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
./wlogout.nix
|
./wlogout.nix
|
||||||
./xdg.nix
|
./xdg.nix
|
123
modules/programs/discord.nix
Normal file
123
modules/programs/discord.nix
Normal file
|
@ -0,0 +1,123 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
inherit (config.local.systemVars) username;
|
||||||
|
styleCfg = config.local.style;
|
||||||
|
# TODO remove override when https://github.com/NixOS/nixpkgs/issues/380429 gets merged
|
||||||
|
discord = pkgs.vesktop.override {
|
||||||
|
electron = pkgs.electron_33;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
config = mkIf config.local.profiles.desktop.enable {
|
||||||
|
hjem.users.${username} = {
|
||||||
|
packages = [discord];
|
||||||
|
autostart.programs = [discord];
|
||||||
|
files.".config/vesktop/themes/midnight-base16.css".text = with styleCfg.scheme.palette;
|
||||||
|
mkIf styleCfg.enable ''
|
||||||
|
/**
|
||||||
|
* @name Midnight-base16
|
||||||
|
* @description A dark, rounded discord theme. Updated to use base16 colors.
|
||||||
|
* @author refact0r
|
||||||
|
* @version 1.6.2
|
||||||
|
* @invite nz87hXyvcy
|
||||||
|
* @website https://github.com/refact0r/midnight-discord
|
||||||
|
* @source https://github.com/refact0r/midnight-discord/blob/master/midnight.theme.css
|
||||||
|
* @authorId 508863359777505290
|
||||||
|
* @authorLink https://www.refact0r.dev
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* IMPORTANT: make sure to enable dark mode in discord settings for the theme to apply properly!!! */
|
||||||
|
|
||||||
|
@import url('https://refact0r.github.io/midnight-discord/midnight.css');
|
||||||
|
|
||||||
|
/* customize things here */
|
||||||
|
:root {
|
||||||
|
/* font, change to 'gg sans' for default discord font*/
|
||||||
|
--font: 'gg sans';
|
||||||
|
|
||||||
|
/* top left corner text */
|
||||||
|
--corner-text: '${styleCfg.scheme.name}';
|
||||||
|
|
||||||
|
/* color of status indicators and window controls */
|
||||||
|
--online-indicator: ${base0B}; /* change to #23a55a for default green */
|
||||||
|
--dnd-indicator: ${base08}; /* change to #f13f43 for default red */
|
||||||
|
--idle-indicator: ${base0A}; /* change to #f0b232 for default yellow */
|
||||||
|
--streaming-indicator: ${base0E}; /* change to #593695 for default purple */
|
||||||
|
|
||||||
|
/* accent colors */
|
||||||
|
--accent-1: ${base0D}; /* links */
|
||||||
|
--accent-2: ${base0E}; /* general unread/mention elements, some icons when active */
|
||||||
|
--accent-3: ${base0E}; /* accent buttons */
|
||||||
|
--accent-4: ${base03}; /* accent buttons when hovered */
|
||||||
|
--accent-5: ${base07}; /* accent buttons when clicked */
|
||||||
|
--mention: ${base00}1a; /* mentions & mention messages */
|
||||||
|
--mention-hover: ${base00}0d; /* mentions & mention messages when hovered */
|
||||||
|
|
||||||
|
/* text colors */
|
||||||
|
--text-0: var(--bg-4); /* text on colored elements */
|
||||||
|
--text-1: ${base06}; /* other normally white text */
|
||||||
|
--text-2: ${base06}; /* headings and important text */
|
||||||
|
--text-3: ${base05}; /* normal text */
|
||||||
|
--text-4: ${base05}; /* icon buttons and channels */
|
||||||
|
--text-5: ${base04}; /* muted channels/chats and timestamps */
|
||||||
|
|
||||||
|
/* background and dark colors */
|
||||||
|
--bg-1: ${base0E}; /* dark buttons when clicked */
|
||||||
|
--bg-2: ${base02}; /* dark buttons */
|
||||||
|
--bg-3: ${base01}; /* spacing, secondary elements */
|
||||||
|
--bg-4: ${base00}; /* main background color */
|
||||||
|
--hover: ${base03}1a; /* channels and buttons when hovered */
|
||||||
|
--active: ${base03}33; /* channels and buttons when clicked or selected */
|
||||||
|
--message-hover: #0000001a; /* messages when hovered */
|
||||||
|
|
||||||
|
/* amount of spacing and padding */
|
||||||
|
--spacing: 12px;
|
||||||
|
|
||||||
|
/* animations */
|
||||||
|
/* ALL ANIMATIONS CAN BE DISABLED WITH REDUCED MOTION IN DISCORD SETTINGS */
|
||||||
|
--list-item-transition: 0.2s ease; /* channels/members/settings hover transition */
|
||||||
|
--unread-bar-transition: 0.2s ease; /* unread bar moving into view transition */
|
||||||
|
--moon-spin-transition: 0.4s ease; /* moon icon spin */
|
||||||
|
--icon-spin-transition: 1s ease; /* round icon button spin (settings, emoji, etc.) */
|
||||||
|
|
||||||
|
/* corner roundness (border-radius) */
|
||||||
|
--roundness-xl: 22px; /* roundness of big panel outer corners */
|
||||||
|
--roundness-l: 20px; /* popout panels */
|
||||||
|
--roundness-m: 16px; /* smaller panels, images, embeds */
|
||||||
|
--roundness-s: 12px; /* members, settings inputs */
|
||||||
|
--roundness-xs: 10px; /* channels, buttons */
|
||||||
|
--roundness-xxs: 8px; /* searchbar, small elements */
|
||||||
|
|
||||||
|
/* direct messages moon icon */
|
||||||
|
/* change to block to show, none to hide */
|
||||||
|
--discord-icon: none; /* discord icon */
|
||||||
|
--moon-icon: block; /* moon icon */
|
||||||
|
--moon-icon-url: url('https://upload.wikimedia.org/wikipedia/commons/c/c4/Font_Awesome_5_solid_moon.svg'); /* custom icon url */
|
||||||
|
--moon-icon-size: auto;
|
||||||
|
|
||||||
|
/* filter uncolorable elements to fit theme */
|
||||||
|
/* (just set to none, they're too much work to configure) */
|
||||||
|
--login-bg-filter: saturate(0.3) hue-rotate(-15deg) brightness(0.4); /* login background artwork */
|
||||||
|
--green-to-accent-3-filter: hue-rotate(56deg) saturate(1.43); /* add friend page explore icon */
|
||||||
|
--blurple-to-accent-3-filter: hue-rotate(304deg) saturate(0.84) brightness(1.2); /* add friend page school icon */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Selected chat/friend text */
|
||||||
|
.selected_f5eb4b,
|
||||||
|
.selected_f6f816 .link_d8bfb3 {
|
||||||
|
color: var(--text-0) !important;
|
||||||
|
background: var(--accent-3) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected_f6f816 .link_d8bfb3 * {
|
||||||
|
color: var(--text-0) !important;
|
||||||
|
fill: var(--text-0) !important;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
27
modules/programs/editors/default.nix
Normal file
27
modules/programs/editors/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
inherit (config.local.systemVars) username;
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
./neovim
|
||||||
|
];
|
||||||
|
|
||||||
|
config = mkIf config.local.profiles.desktop.enable {
|
||||||
|
/*
|
||||||
|
we don't want the default NixOS EDITOR value, which is nano and will override the `environment.d` setting.
|
||||||
|
we have to unset it like this so that our systemd user variable will take precedence:
|
||||||
|
*/
|
||||||
|
environment.extraInit = ''
|
||||||
|
unset -v EDITOR
|
||||||
|
'';
|
||||||
|
hjem.users.${username} = {
|
||||||
|
environment.sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
15
modules/programs/editors/neovim/basedpyright-fix.nix
Normal file
15
modules/programs/editors/neovim/basedpyright-fix.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# thanks https://gitlab.com/fazzi/nixohess/-/blob/3e0544761d7f0361e7a8ac7b15714515e7fd5e7c/overlays/basedpyright-fix.nix
|
||||||
|
_: {
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(_: prev: {
|
||||||
|
basedpyright = prev.basedpyright.overrideAttrs (old: {
|
||||||
|
postInstall =
|
||||||
|
old.postInstall
|
||||||
|
+ ''
|
||||||
|
# Remove dangling symlinks created during installation (remove -delete to just see the files, or -print '%l\n' to see the target
|
||||||
|
find -L $out -type l -print -delete
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
|
@ -2,17 +2,16 @@
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
osConfig,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
styleCfg = osConfig.local.style;
|
inherit (config.local.systemVars) username;
|
||||||
in {
|
styleCfg = config.local.style;
|
||||||
imports = [inputs.nvf.homeManagerModules.default];
|
|
||||||
|
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
customNeovim = inputs.nvf.lib.neovimConfiguration {
|
||||||
programs.nvf = {
|
inherit pkgs;
|
||||||
enable = true;
|
modules = lib.singleton {
|
||||||
settings.vim = lib.mkMerge [
|
config.vim = lib.mkMerge [
|
||||||
{
|
{
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
|
@ -28,6 +27,15 @@ in {
|
||||||
vim.opt.formatoptions:remove('c')
|
vim.opt.formatoptions:remove('c')
|
||||||
vim.opt.formatoptions:remove('r')
|
vim.opt.formatoptions:remove('r')
|
||||||
vim.opt.formatoptions:remove('o')
|
vim.opt.formatoptions:remove('o')
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "nix",
|
||||||
|
callback = function(opts)
|
||||||
|
local bo = vim.bo[opts.buf]
|
||||||
|
bo.tabstop = 2
|
||||||
|
bo.shiftwidth = 2
|
||||||
|
end
|
||||||
|
})
|
||||||
'';
|
'';
|
||||||
|
|
||||||
maps = {
|
maps = {
|
||||||
|
@ -45,9 +53,21 @@ in {
|
||||||
|
|
||||||
ui = {
|
ui = {
|
||||||
noice.enable = true;
|
noice.enable = true;
|
||||||
|
smartcolumn = {
|
||||||
|
enable = true;
|
||||||
|
setupOpts = {
|
||||||
|
custom_colorcolumn = {
|
||||||
|
nix = "110";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
notify.nvim-notify.enable = true;
|
|
||||||
|
|
||||||
|
mini = {
|
||||||
|
comment.enable = true;
|
||||||
|
notify.enable = true;
|
||||||
|
surround.enable = true;
|
||||||
|
};
|
||||||
statusline = {
|
statusline = {
|
||||||
lualine = {
|
lualine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -151,11 +171,13 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
git.enable = true;
|
git = {
|
||||||
|
enable = true;
|
||||||
|
gitsigns.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
utility = {
|
utility = {
|
||||||
vim-wakatime.enable = true;
|
vim-wakatime.enable = true;
|
||||||
surround.enable = true;
|
|
||||||
motion.leap = {
|
motion.leap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
@ -196,7 +218,10 @@ in {
|
||||||
enableLSP = true;
|
enableLSP = true;
|
||||||
enableTreesitter = true;
|
enableTreesitter = true;
|
||||||
|
|
||||||
nix.enable = true;
|
nix = {
|
||||||
|
enable = true;
|
||||||
|
lsp.server = "nixd";
|
||||||
|
};
|
||||||
clang.enable = true;
|
clang.enable = true;
|
||||||
python.enable = true;
|
python.enable = true;
|
||||||
ts.enable = true;
|
ts.enable = true;
|
||||||
|
@ -229,27 +254,12 @@ in {
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
programs.neovide = {
|
in {
|
||||||
enable = true;
|
imports = [./basedpyright-fix.nix];
|
||||||
settings = {
|
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||||
fork = false;
|
hjem.users.${username} = {
|
||||||
frame = "full";
|
packages = [customNeovim.neovim];
|
||||||
idle = true;
|
|
||||||
maximized = false;
|
|
||||||
no-multigrid = false;
|
|
||||||
srgb = false;
|
|
||||||
tabs = true;
|
|
||||||
theme = "auto";
|
|
||||||
title-hidden = true;
|
|
||||||
vsync = true;
|
|
||||||
wsl = false;
|
|
||||||
|
|
||||||
font = {
|
|
||||||
normal = [];
|
|
||||||
size = 14.0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
123
modules/programs/fastfetch.nix
Normal file
123
modules/programs/fastfetch.nix
Normal file
|
@ -0,0 +1,123 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (config.local.systemVars) username;
|
||||||
|
logo = builtins.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/gytis-ivaskevicius/high-quality-nix-content/refs/heads/master/emoji/nix-owo-transparent.png";
|
||||||
|
sha256 = "137k3i7z4va68v4rvrazy26szc7p2w59h7bc2h8japzjyj6xjs71";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||||
|
hjem.users.${username} = {
|
||||||
|
packages = [pkgs.fastfetch];
|
||||||
|
files = {
|
||||||
|
".config/fastfetch/config.jsonc".text = builtins.toJSON {
|
||||||
|
logo = {
|
||||||
|
source = logo;
|
||||||
|
type = "kitty";
|
||||||
|
width = 33;
|
||||||
|
};
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
{
|
||||||
|
type = "title";
|
||||||
|
color = {
|
||||||
|
user = "35";
|
||||||
|
host = "36";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "separator";
|
||||||
|
string = "▔";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "os";
|
||||||
|
key = "╭─ ";
|
||||||
|
format = "{3} ({12})";
|
||||||
|
keyColor = "32";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "host";
|
||||||
|
key = "├─ ";
|
||||||
|
keyColor = "32";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "kernel";
|
||||||
|
key = "├─ ";
|
||||||
|
format = "{1} {2}";
|
||||||
|
keyColor = "32";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "shell";
|
||||||
|
key = "├─$ ";
|
||||||
|
format = "{1} {4}";
|
||||||
|
keyColor = "32";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "packages";
|
||||||
|
key = "├─ ";
|
||||||
|
keyColor = "32";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "uptime";
|
||||||
|
key = "╰─ ";
|
||||||
|
keyColor = "32";
|
||||||
|
}
|
||||||
|
"break"
|
||||||
|
{
|
||||||
|
type = "display";
|
||||||
|
key = "╭─ ";
|
||||||
|
keyColor = "33";
|
||||||
|
compactType = "original";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "de";
|
||||||
|
key = "├─ ";
|
||||||
|
keyColor = "33";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "wm";
|
||||||
|
key = "├─ ";
|
||||||
|
keyColor = "33";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "theme";
|
||||||
|
key = "├─ ";
|
||||||
|
keyColor = "33";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "icons";
|
||||||
|
key = "├─ ";
|
||||||
|
keyColor = "33";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "cursor";
|
||||||
|
key = "├─ ";
|
||||||
|
keyColor = "33";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "font";
|
||||||
|
key = "├─ ";
|
||||||
|
format = "{2}";
|
||||||
|
keyColor = "33";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "terminal";
|
||||||
|
key = "╰─ ";
|
||||||
|
format = "{3}";
|
||||||
|
keyColor = "33";
|
||||||
|
}
|
||||||
|
"break"
|
||||||
|
{
|
||||||
|
type = "colors";
|
||||||
|
symbol = "block";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,10 +1,12 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
osConfig,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (builtins) readFile;
|
||||||
|
inherit (config.local.systemVars) username;
|
||||||
|
|
||||||
betterfox = pkgs.fetchFromGitHub {
|
betterfox = pkgs.fetchFromGitHub {
|
||||||
owner = "yokoffing";
|
owner = "yokoffing";
|
||||||
repo = "betterfox";
|
repo = "betterfox";
|
||||||
|
@ -12,11 +14,13 @@
|
||||||
hash = "sha256-hpkEO5BhMVtINQG8HN4xqfas/R6q5pYPZiFK8bilIDs=";
|
hash = "sha256-hpkEO5BhMVtINQG8HN4xqfas/R6q5pYPZiFK8bilIDs=";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||||
programs.firefox = {
|
hjem.users.${username} = {
|
||||||
enable = true;
|
programs.firefox = {
|
||||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
enable = true;
|
||||||
extraPolicies = {
|
inherit username;
|
||||||
|
|
||||||
|
policies = {
|
||||||
DisableTelemetry = true;
|
DisableTelemetry = true;
|
||||||
DisablePocket = true;
|
DisablePocket = true;
|
||||||
DisableFeedbackCommands = true;
|
DisableFeedbackCommands = true;
|
||||||
|
@ -25,6 +29,60 @@ in {
|
||||||
OffertosaveloginsDefault = false;
|
OffertosaveloginsDefault = false;
|
||||||
PasswordManagerEnabled = false;
|
PasswordManagerEnabled = false;
|
||||||
SearchSuggestEnabled = true;
|
SearchSuggestEnabled = true;
|
||||||
|
FirefoxHome = {
|
||||||
|
Pocket = false;
|
||||||
|
Snippets = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
SearchEngines.Default = "SearxNG";
|
||||||
|
SearchEngines.Add = [
|
||||||
|
{
|
||||||
|
Name = "SearxNG";
|
||||||
|
URLTemplate = "https://search.nezia.dev/search?q={searchTerms}";
|
||||||
|
Method = "GET";
|
||||||
|
SuggestURLTemplate = "https://search.nezia.dev/autocompleter?q={searchTerms}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Name = "Nix Packages";
|
||||||
|
Alias = "@np";
|
||||||
|
URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
|
||||||
|
Method = "GET";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Name = "Nix Options";
|
||||||
|
Alias = "@no";
|
||||||
|
URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
|
||||||
|
Method = "GET";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Name = "NixOS Wiki";
|
||||||
|
Alias = "@nw";
|
||||||
|
URLTemplate = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
|
||||||
|
Method = "GET";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Name = "Home Manager Options";
|
||||||
|
Alias = "@hmo";
|
||||||
|
URLTemplate = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master";
|
||||||
|
Method = "GET";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Name = "ProtonDB";
|
||||||
|
Alias = "@pdb";
|
||||||
|
URLTemplate = "https://www.protondb.com/search?q={searchTerms}";
|
||||||
|
Method = "GET";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Name = "Noogle";
|
||||||
|
Alias = "@ng";
|
||||||
|
URLTemplate = "https://noogle.dev/q?term={searchTerms}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Name = "GitHub Nix";
|
||||||
|
Alias = "@ghn";
|
||||||
|
URLTemplate = "https://github.com/search?q=language:nix NOT is:fork {searchTerms}&type=code";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# https://github.com/Sly-Harvey/NixOS/blob/f9da2691ea46565256ad757959cfc26ec6cee10d/modules/programs/browser/firefox/default.nix#L58-L163
|
# https://github.com/Sly-Harvey/NixOS/blob/f9da2691ea46565256ad757959cfc26ec6cee10d/modules/programs/browser/firefox/default.nix#L58-L163
|
||||||
"3rdparty".Extensions = {
|
"3rdparty".Extensions = {
|
||||||
|
@ -94,82 +152,14 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
profiles = {
|
|
||||||
nezia = {
|
|
||||||
settings = {
|
|
||||||
"browser.search.suggest.enabled" = true;
|
|
||||||
"ui.key.menuAccessKeyFocuses" = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
|
extraConfig = builtins.concatStringsSep "\n" [
|
||||||
darkreader
|
(readFile "${betterfox}/user.js")
|
||||||
proton-pass
|
(readFile "${betterfox}/Securefox.js")
|
||||||
shinigami-eyes
|
(readFile "${betterfox}/Fastfox.js")
|
||||||
stylus
|
(readFile "${betterfox}/Peskyfox.js")
|
||||||
ublock-origin
|
(readFile "${betterfox}/Smoothfox.js")
|
||||||
violentmonkey
|
];
|
||||||
];
|
|
||||||
# https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix
|
|
||||||
search = {
|
|
||||||
force = true;
|
|
||||||
default = "SearxNG";
|
|
||||||
engines = {
|
|
||||||
"SearxNG" = {
|
|
||||||
urls = [
|
|
||||||
{
|
|
||||||
rels = ["results"];
|
|
||||||
template = "https://search.nezia.dev/search";
|
|
||||||
params = [
|
|
||||||
{
|
|
||||||
name = "q";
|
|
||||||
value = "{searchTerms}";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
rels = ["suggestions"];
|
|
||||||
template = "https://search.nezia.dev/autocompleter";
|
|
||||||
params = [
|
|
||||||
{
|
|
||||||
name = "q";
|
|
||||||
value = "{searchTerms}";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
"type" = "application/x-suggestions+json";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"MyNixOS" = {
|
|
||||||
urls = [{template = "https://mynixos.com/search?q={searchTerms}";}];
|
|
||||||
iconUpdateURL = "https://mynixos.com/favicon.ico";
|
|
||||||
updateInterval = 24 * 60 * 60 * 1000;
|
|
||||||
definedAliases = ["@nx"];
|
|
||||||
};
|
|
||||||
"Noogle" = {
|
|
||||||
urls = [{template = "https://noogle.dev/q?term={searchTerms}";}];
|
|
||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
||||||
definedAliases = ["@ng"];
|
|
||||||
};
|
|
||||||
"GitHub Nix" = {
|
|
||||||
# https://github.com/search?q=language%3Anix+NOT+is%3Afork+programs.neovim&type=code
|
|
||||||
urls = [{template = "https://github.com/search?q=language:nix NOT is:fork {searchTerms}&type=code";}];
|
|
||||||
iconUpdateURL = "https://github.com/favicon.ico";
|
|
||||||
updateInterval = 24 * 60 * 60 * 1000;
|
|
||||||
definedAliases = ["@ghn"];
|
|
||||||
};
|
|
||||||
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# https://github.com/oddlama/nix-config/blob/main/users/myuser/graphical/firefox.nix#L53-L57
|
|
||||||
extraConfig = builtins.concatStringsSep "\n" [
|
|
||||||
(builtins.readFile "${betterfox}/user.js")
|
|
||||||
(builtins.readFile "${betterfox}/Securefox.js")
|
|
||||||
(builtins.readFile "${betterfox}/Fastfox.js")
|
|
||||||
(builtins.readFile "${betterfox}/Peskyfox.js")
|
|
||||||
(builtins.readFile "${betterfox}/Smoothfox.js")
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
37
modules/programs/games.nix
Normal file
37
modules/programs/games.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
inherit (config.local.systemVars) username;
|
||||||
|
in {
|
||||||
|
config = mkIf config.local.profiles.gaming.enable {
|
||||||
|
hjem.users.${username} = {
|
||||||
|
packages = [
|
||||||
|
pkgs.mangohud
|
||||||
|
pkgs.bolt-launcher
|
||||||
|
pkgs.lutris
|
||||||
|
pkgs.qbittorrent
|
||||||
|
pkgs.protonplus
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
gamemode.enable = true;
|
||||||
|
gamescope.enable = true;
|
||||||
|
|
||||||
|
coolercontrol = {
|
||||||
|
enable = true;
|
||||||
|
nvidiaSupport = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.hardware.openrgb.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
_: {
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./land
|
./land
|
||||||
|
|
||||||
./idle.nix
|
./idle.nix
|
||||||
./lock.nix
|
./lock.nix
|
||||||
./paper.nix
|
./paper.nix
|
62
modules/programs/hypr/idle.nix
Normal file
62
modules/programs/hypr/idle.nix
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
lib',
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib'.generators) toHyprConf;
|
||||||
|
inherit (config.local.systemVars) username;
|
||||||
|
inherit (inputs.hypridle.packages.${pkgs.system}) hypridle;
|
||||||
|
|
||||||
|
hyprlock = "${inputs.hyprlock.packages.${pkgs.system}.hyprlock}/bin/hyprlock";
|
||||||
|
in {
|
||||||
|
config = lib.mkIf config.local.modules.hyprland.enable {
|
||||||
|
hjem.users.${username} = {
|
||||||
|
packages = [hypridle];
|
||||||
|
files = {
|
||||||
|
".config/hypr/hypridle.conf".text = toHyprConf {
|
||||||
|
attrs = {
|
||||||
|
general = {
|
||||||
|
lock_cmd = "pidof ${hyprlock} || ${hyprlock}";
|
||||||
|
unlock_cmd = "pkill --signal SIGUSR1 ${hyprlock}";
|
||||||
|
before_sleep_cmd = "loginctl lock-session";
|
||||||
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||||
|
};
|
||||||
|
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = 300; # 5m
|
||||||
|
on-timeout = "loginctl lock-session";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 330; # 5.5m
|
||||||
|
on-timeout = "hyprctl dipsatch dpms off";
|
||||||
|
on-resume = "hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 600; # 10m
|
||||||
|
on-timeout = "systemctl suspend";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# needed when using uwsm as the session manager
|
||||||
|
systemd.user.services.hypridle = {
|
||||||
|
name = "hypridle";
|
||||||
|
after = ["graphical-session.target"];
|
||||||
|
description = "Hyprland's Idle Daemon";
|
||||||
|
wantedBy = ["graphical-session.target"];
|
||||||
|
restartTriggers = ["${config.hjem.users.${username}.files.".config/hypr/hypridle.conf".text}"];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${hypridle}/bin/hypridle";
|
||||||
|
Restart = "on-failure";
|
||||||
|
Slice = "background-graphical.slice";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
79
modules/programs/hypr/land/binds.nix
Normal file
79
modules/programs/hypr/land/binds.nix
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
lib: let
|
||||||
|
# thanks https://github.com/fufexan/dotfiles/blob/c0b3c77d95ce1f574a87e7f7ead672ca0d951245/home/programs/wayland/hyprland/binds.nix#L16-L20
|
||||||
|
toggle = program: uwsm: let
|
||||||
|
prog = builtins.substring 0 14 program;
|
||||||
|
in "pkill ${prog} || ${lib.optionalString uwsm "uwsm app -- "} ${program}";
|
||||||
|
runOnce = program: "pgrep ${program} || uwsm app -- ${program}";
|
||||||
|
run = program: "uwsm app -- ${program}";
|
||||||
|
in {
|
||||||
|
"$mod" = "SUPER";
|
||||||
|
bindr = [
|
||||||
|
"$mod, SUPER_L, exec, ${toggle "anyrun" true}"
|
||||||
|
];
|
||||||
|
bind = [
|
||||||
|
"$mod, Return, exec, ${run "ghostty"}"
|
||||||
|
"$mod, n, exec, ${run "neovide"}"
|
||||||
|
"$mod, w, exec, ${run "firefox"}"
|
||||||
|
", Print, exec, ${runOnce "grimblast"} --notify copysave output"
|
||||||
|
"$mod, q, killactive"
|
||||||
|
"$mod SHIFT, q, exec, loginctl terminate-user ''"
|
||||||
|
"$mod, period, exec, ${toggle "walker -m emojis" false}" # not using uwsm as it already runs as a service
|
||||||
|
"CTRL, Print, exec, ${runOnce "grimblast"} --notify --freeze copysave area"
|
||||||
|
|
||||||
|
"$mod, h, movefocus, l"
|
||||||
|
"$mod, j, movefocus, d"
|
||||||
|
"$mod, k, movefocus, u"
|
||||||
|
"$mod, l, movefocus, r"
|
||||||
|
|
||||||
|
"$mod SHIFT, h, movewindow, l"
|
||||||
|
"$mod SHIFT, j, movewindow, d"
|
||||||
|
"$mod SHIFT, k, movewindow, u"
|
||||||
|
"$mod SHIFT, l, movewindow, r"
|
||||||
|
|
||||||
|
"$mod, 1, workspace, 1"
|
||||||
|
"$mod, 2, workspace, 2"
|
||||||
|
"$mod, 3, workspace, 3"
|
||||||
|
"$mod, 4, workspace, 4"
|
||||||
|
"$mod, 5, workspace, 5"
|
||||||
|
"$mod, 6, workspace, 6"
|
||||||
|
"$mod, 7, workspace, 7"
|
||||||
|
"$mod, 8, workspace, 8"
|
||||||
|
"$mod, 9, workspace, 9"
|
||||||
|
"$mod, 0, workspace, 10"
|
||||||
|
|
||||||
|
"$mod SHIFT, 1, movetoworkspacesilent, 1"
|
||||||
|
"$mod SHIFT, 2, movetoworkspacesilent, 2"
|
||||||
|
"$mod SHIFT, 3, movetoworkspacesilent, 3"
|
||||||
|
"$mod SHIFT, 4, movetoworkspacesilent, 4"
|
||||||
|
"$mod SHIFT, 5, movetoworkspacesilent, 5"
|
||||||
|
"$mod SHIFT, 6, movetoworkspacesilent, 6"
|
||||||
|
"$mod SHIFT, 7, movetoworkspacesilent, 7"
|
||||||
|
"$mod SHIFT, 8, movetoworkspacesilent, 8"
|
||||||
|
"$mod SHIFT, 9, movetoworkspacesilent, 9"
|
||||||
|
"$mod SHIFT, 0, movetoworkspacesilent, 10"
|
||||||
|
|
||||||
|
"$mod, t, togglefloating"
|
||||||
|
", F11, fullscreen, 0"
|
||||||
|
"$mod, f, fullscreen, 1"
|
||||||
|
|
||||||
|
"$mod, e, togglespecialworkspace, file_manager_gui"
|
||||||
|
"$mod SHIFT, e, togglespecialworkspace, file_manager_tui"
|
||||||
|
"$mod , c, togglespecialworkspace, calculator_gui"
|
||||||
|
"$mod, m, togglespecialworkspace, mixer_gui"
|
||||||
|
|
||||||
|
", XF86PowerOff, exec, ${toggle "wlogout" true}"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindel = [
|
||||||
|
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
|
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
|
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
|
|
||||||
|
", XF86MonBrightnessUp, exec, brillo -q -u 300000 -A 5"
|
||||||
|
", XF86MonBrightnessDown, exec, brillo -q -u 300000 -U 5"
|
||||||
|
", XF86AudioMedia, exec, XDG_CURRENT_DESKTOP=gnome gnome-control-center"
|
||||||
|
];
|
||||||
|
binde = [
|
||||||
|
"$mod Alt, l, exec, loginctl lock-session"
|
||||||
|
];
|
||||||
|
}
|
179
modules/programs/hypr/land/default.nix
Normal file
179
modules/programs/hypr/land/default.nix
Normal file
|
@ -0,0 +1,179 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
lib',
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf mkMerge optionalAttrs;
|
||||||
|
inherit (lib'.generators) toHyprConf;
|
||||||
|
inherit (config.local.systemVars) username;
|
||||||
|
|
||||||
|
styleCfg = config.local.style;
|
||||||
|
|
||||||
|
gnomeControlCenter = pkgs.gnome-control-center.overrideAttrs (old: {
|
||||||
|
postInstall =
|
||||||
|
old.postInstall
|
||||||
|
+ ''
|
||||||
|
dir=$out/share/applications
|
||||||
|
for panel in $dir/*
|
||||||
|
do
|
||||||
|
[ "$panel" = "$dir/gnome-network-panel.desktop" ] && continue
|
||||||
|
[ "$panel" = "$dir/gnome-bluetooth-panel.desktop" ] && continue
|
||||||
|
[ "$panel" = "$dir/gnome-wifi-panel.desktop" ] && continue
|
||||||
|
[ "$panel" = "$dir/gnome-wwan-panel.desktop" ] && continue
|
||||||
|
[ "$panel" = "$dir/gnome-sharing-panel.desktop" ] && continue
|
||||||
|
[ "$panel" = "$dir/gnome-wacom-panel.desktop" ] && continue
|
||||||
|
rm "$panel"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
in {
|
||||||
|
config = mkIf config.local.modules.hyprland.enable {
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||||
|
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||||
|
withUWSM = true;
|
||||||
|
systemd.setPath.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# copied from https://github.com/linyinfeng/dotfiles/blob/91b0363b093303f57885cbae9da7f8a99bbb4432/nixos/profiles/graphical/niri/default.nix#L17-L29
|
||||||
|
security.pam.services.hyprlock.text = mkIf config.services.fprintd.enable ''
|
||||||
|
account required pam_unix.so
|
||||||
|
|
||||||
|
# check passwork before fprintd
|
||||||
|
auth sufficient pam_unix.so try_first_pass likeauth
|
||||||
|
auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
||||||
|
auth required pam_deny.so
|
||||||
|
|
||||||
|
password sufficient pam_unix.so nullok yescrypt
|
||||||
|
|
||||||
|
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||||
|
session required pam_unix.so
|
||||||
|
'';
|
||||||
|
|
||||||
|
hjem.users.${username} = {
|
||||||
|
packages = [
|
||||||
|
inputs.hyprwm-contrib.packages.${pkgs.system}.grimblast
|
||||||
|
gnomeControlCenter
|
||||||
|
];
|
||||||
|
|
||||||
|
rum.programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
settings =
|
||||||
|
{
|
||||||
|
xwayland = {
|
||||||
|
force_zero_scaling = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
env = [
|
||||||
|
];
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
no_hardware_cursors = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
monitor = [
|
||||||
|
"eDP-1, preferred, auto, 1.33"
|
||||||
|
"Unknown-1,disabled"
|
||||||
|
];
|
||||||
|
workspace = [
|
||||||
|
"special:terminal, on-created-empty:ghostty"
|
||||||
|
"special:file_manager_gui, on-created-empty:pcmanfm"
|
||||||
|
"special:file_manager_tui, on-created-empty:ghostty -e yazi"
|
||||||
|
|
||||||
|
"special:calculator_gui, on-created-empty:qalculate-gtk"
|
||||||
|
"special:mixer_gui, on-created-empty:pavucontrol"
|
||||||
|
];
|
||||||
|
|
||||||
|
windowrulev2 = [
|
||||||
|
# fixes fullscreen windows (mostly games)
|
||||||
|
"stayfocused, initialtitle:^()$, initialclass:^(steam)$"
|
||||||
|
"minsize 1 1, initialtitle:^()$, initialclass:^(steam)$"
|
||||||
|
"maximize, initialtitle:^(\S+)$, initialclass:^(steamwebhelper)$"
|
||||||
|
|
||||||
|
"immediate, initialclass:^(steam_app_)(.*)$"
|
||||||
|
"fullscreen, initialclass:^(steam_app_)(.*)$"
|
||||||
|
|
||||||
|
# inhibit idle on fullscreen apps (avoids going idle on games when playing with gamepad)
|
||||||
|
"idleinhibit always, fullscreen:1"
|
||||||
|
];
|
||||||
|
|
||||||
|
render = {
|
||||||
|
explicit_sync = 1;
|
||||||
|
explicit_sync_kms = 1;
|
||||||
|
expand_undersized_textures = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
bezier = "overshot, 0.05, 0.9, 0.1, 1.1";
|
||||||
|
|
||||||
|
animations = {
|
||||||
|
enabled = true;
|
||||||
|
animation = [
|
||||||
|
"windows, 1, 5, overshot"
|
||||||
|
"windowsOut, 1, 5, default, popin 80%"
|
||||||
|
"windowsMove, 1, 5, default, popin 80%"
|
||||||
|
"fade, 1, 5, default"
|
||||||
|
"border, 1, 5, default"
|
||||||
|
"borderangle, 0, 8, default"
|
||||||
|
"workspaces, 0"
|
||||||
|
"specialWorkspace, 0"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
input = {
|
||||||
|
kb_options = "compose:ralt";
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = true;
|
||||||
|
scroll_factor = 0.8;
|
||||||
|
tap-to-click = true;
|
||||||
|
clickfinger_behavior = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gestures = {
|
||||||
|
workspace_swipe = true;
|
||||||
|
workspace_swipe_direction_lock = false;
|
||||||
|
workspace_swipe_cancel_ratio = 0.15;
|
||||||
|
};
|
||||||
|
|
||||||
|
misc = {
|
||||||
|
force_default_wallpaper = 0;
|
||||||
|
disable_hyprland_logo = true;
|
||||||
|
middle_click_paste = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// optionalAttrs styleCfg.enable {
|
||||||
|
general = {
|
||||||
|
border_size = 4;
|
||||||
|
"col.active_border" = "rgb(${lib.removePrefix "#" styleCfg.scheme.palette.base0E})";
|
||||||
|
};
|
||||||
|
decoration = {
|
||||||
|
rounding = 10;
|
||||||
|
blur.enabled = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// import ./binds.nix lib;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.sessionVariables = mkMerge [
|
||||||
|
{
|
||||||
|
GDK_SCALE = 1;
|
||||||
|
}
|
||||||
|
(mkIf styleCfg.enable {
|
||||||
|
HYPRCURSOR_THEME = styleCfg.cursorTheme.name;
|
||||||
|
HYPRCURSOR_SIZE = styleCfg.cursorTheme.size;
|
||||||
|
XCURSOR_SIZE = styleCfg.cursorTheme.size;
|
||||||
|
})
|
||||||
|
(mkIf config.local.modules.nvidia.enable {
|
||||||
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
GBM_BACKEND = "nvidia-drm";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue