Compare commits
74 commits
main
...
add-cosmic
Author | SHA1 | Date | |
---|---|---|---|
fc876b2ea5 | |||
51e295caf2 | |||
76dbbd715b | |||
35f03cf90f | |||
559f99cfde | |||
d10986e1ac | |||
b819cfc631 | |||
4bd08afc91 | |||
2b573c28cd | |||
35f686107a | |||
151e85344d | |||
693471833c | |||
4fcc82722b | |||
a762326b79 | |||
d71cf19f63 | |||
2fb09d12d6 | |||
0599562807 | |||
69a2405840 | |||
d9b7345c88 | |||
45bb7fad8d | |||
a65a622d50 | |||
80f06b097f | |||
30548fd17e | |||
7f110e40fc | |||
a94fc434cd | |||
49c75ab62d | |||
2a2e3abdd3 | |||
4a38e90dfa | |||
b8e696e17b | |||
c1dab8459e | |||
909433b25c | |||
1f4f83a641 | |||
9506714dd0 | |||
c7fbdb2a3f | |||
b73a64cb52 | |||
e8473ec65e | |||
c277227e1a | |||
ce261b292d | |||
6aeca28f86 | |||
9cb997e662 | |||
317dfc0b4a | |||
a51ca01822 | |||
b47f0095f0 | |||
83f8c32991 | |||
6ea4799042 | |||
c8f87c05dc | |||
d4c8a0e93d | |||
ada02bd3ef | |||
c9419c8f9c | |||
30ed3a55e7 | |||
056968f086 | |||
62a748d571 | |||
84eeb6ef6c | |||
b2f958e681 | |||
38c387aade | |||
fb5ed25b58 | |||
080e3fb0db | |||
774b73ecfd | |||
5b40018e66 | |||
02ae326468 | |||
93d12da62b | |||
f1353b550c | |||
c2566571ab | |||
a9a07fea6d | |||
d0242089e2 | |||
01520df7ab | |||
250b8b0694 | |||
a28174f516 | |||
00b3302880 | |||
71d3ad25df | |||
439a837c9a | |||
feed3b7561 | |||
8df739598c | |||
6ab835555c |
149 changed files with 3932 additions and 3456 deletions
28
README.md
28
README.md
|
@ -6,23 +6,14 @@
|
|||
|
||||
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
|
||||
|
||||
| Name | Description |
|
||||
| ----------------- | ------------------------------------------------------------- |
|
||||
| [assets](assets/) | Resources used throughout the system (images etc.) |
|
||||
| [config](config/) | System configuration (separated between NixOS / home-manager) |
|
||||
| [hosts](hosts/) | Host-specific |
|
||||
| [lib](lib/) | Helper functions |
|
||||
| [shared](shared/) | Re-used components (internal modules, custom derivations) |
|
||||
| Name | Description |
|
||||
| ------------------- | ---------------------------------------------------------------- |
|
||||
| [assets](assets/) | Resources used throughout the system (images etc.) |
|
||||
| [hosts](hosts/) | Host-specific |
|
||||
| [modules](modules/) | Local module system (where the bulk of the configurations lives) |
|
||||
| [shared](shared/) | Exported components (so far only packages) |
|
||||
|
||||
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.
|
||||
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
|
||||
|
||||
|
@ -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
|
||||
- [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.
|
||||
- [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.
|
||||
|
|
1777
flake.lock
generated
1777
flake.lock
generated
File diff suppressed because it is too large
Load diff
76
flake.nix
76
flake.nix
|
@ -9,10 +9,15 @@
|
|||
treefmt-nix,
|
||||
...
|
||||
} @ inputs: let
|
||||
eachSystem = f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: f nixpkgs.legacyPackages.${system});
|
||||
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
|
||||
supportedSystems = nixpkgs.lib.singleton "x86_64-linux";
|
||||
|
||||
forAllSystems = function:
|
||||
nixpkgs.lib.genAttrs
|
||||
supportedSystems
|
||||
(system: function nixpkgs.legacyPackages.${system});
|
||||
treefmtEval = forAllSystems (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
|
||||
in {
|
||||
devShells = eachSystem (pkgs: {
|
||||
devShells = forAllSystems (pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.alejandra
|
||||
|
@ -22,24 +27,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;};
|
||||
packages = eachSystem (pkgs: import ./shared/pkgs {inherit inputs pkgs;});
|
||||
packages = forAllSystems (pkgs: import ./shared/pkgs {inherit inputs pkgs;});
|
||||
deploy.nodes = import ./nodes.nix {inherit inputs;};
|
||||
checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||
};
|
||||
inputs = {
|
||||
# nix related
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
lanzaboote = {
|
||||
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";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -54,18 +51,20 @@
|
|||
url = "github:anyrun-org/anyrun";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
basix.url = "github:notashelf/basix";
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
firefox-addons = {
|
||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||
basix = {
|
||||
url = "github:notashelf/basix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixos-cosmic = {
|
||||
url = "github:lilyinstarlight/nixos-cosmic";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
deploy-rs = {
|
||||
url = "github:serokell/deploy-rs";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprland-qtutils = {
|
||||
url = "github:hyprwm/hyprland-qtutils";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
hypridle = {
|
||||
url = "github:hyprwm/hypridle";
|
||||
inputs = {
|
||||
|
@ -97,33 +96,44 @@
|
|||
url = "github:hyprwm/contrib";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
niri.url = "github:sodiboo/niri-flake";
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.5.0";
|
||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||
nvf.url = "github:notashelf/nvf";
|
||||
plasma-manager = {
|
||||
url = "github:nix-community/plasma-manager";
|
||||
hjem = {
|
||||
url = "github:nezia1/hjem/implement-environment-variables"; # TODO: change to github:feel-co/hjem if env var PR gets in
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-gaming = {
|
||||
url = "github:fufexan/nix-gaming";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nvf = {
|
||||
url = "github:notashelf/nvf";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
treefmt-nix = {
|
||||
url = "github:numtide/treefmt-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nezia_dev = {
|
||||
url = "github:nezia1/nezia.dev";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
walker.url = "github:abenz1267/walker";
|
||||
nezia_dev.url = "github:nezia1/nezia.dev";
|
||||
};
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
# use nixos cache first
|
||||
"https://cache.nixos.org?priority=10"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-gaming.cachix.org"
|
||||
"https://anyrun.cachix.org"
|
||||
"https://cosmic.cachix.org/"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
||||
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
{inputs, ...}: let
|
||||
system = "${inputs.self}/system";
|
||||
in {
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./networking.nix # generated at runtime by nixos-infect
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
{inputs, ...}: let
|
||||
lib' = import ../shared/lib inputs.nixpkgs.lib;
|
||||
lib' = import ../lib inputs.nixpkgs.lib;
|
||||
mkSystem = args:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs lib';};
|
||||
modules = (args.modules or []) ++ [../modules];
|
||||
modules =
|
||||
(args.modules or [])
|
||||
++ [
|
||||
../modules
|
||||
inputs.hjem.nixosModules.default
|
||||
];
|
||||
};
|
||||
in {
|
||||
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,25 +1,24 @@
|
|||
_: {
|
||||
imports = [./hardware-configuration.nix ./config/theme.nix ./config/nvidia.nix];
|
||||
imports = [./hardware-configuration.nix ./config/theme.nix];
|
||||
|
||||
local = {
|
||||
systemVars = {
|
||||
hostName = "solaire";
|
||||
username = "nezia";
|
||||
desktop = "Hyprland";
|
||||
};
|
||||
homeVars = {
|
||||
fullName = "Anthony Rodriguez";
|
||||
email = "anthony@nezia.dev";
|
||||
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEzs7SQH0Vjt9JHoXXmWy9fPU1I3rrRWV5magZFrI5al nezia@solaire";
|
||||
};
|
||||
|
||||
profiles = {
|
||||
desktop.enable = true;
|
||||
gaming.enable = true;
|
||||
};
|
||||
|
||||
modules = {
|
||||
hyprland.enable = true;
|
||||
nvidia.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables.FLAKE = "/home/nezia/.dotfiles";
|
||||
}
|
||||
|
|
|
@ -8,22 +8,17 @@ _: {
|
|||
systemVars = {
|
||||
hostName = "vamos";
|
||||
username = "nezia";
|
||||
desktop = "Hyprland";
|
||||
};
|
||||
|
||||
homeVars = {
|
||||
fullName = "Anthony Rodriguez";
|
||||
email = "anthony@nezia.dev";
|
||||
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHKEPlN/GU9nJZPleA77HH5NA+6vyhhM84fTSjEwnEgq nezia@vamos";
|
||||
};
|
||||
|
||||
profiles = {
|
||||
desktop.enable = true;
|
||||
laptop.enable = true;
|
||||
};
|
||||
|
||||
modules = {
|
||||
hyprland.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables.FLAKE = "/home/nezia/.dotfiles";
|
||||
}
|
||||
|
|
|
@ -67,10 +67,11 @@ with lib; let
|
|||
else (pow' base (exponent - 1) (value * base));
|
||||
in
|
||||
base: exponent: pow' base exponent base;
|
||||
generateGtkColors = lib: palette: (lib.concatLines
|
||||
(lib.mapAttrsToList
|
||||
generateGtkColors = palette: (concatLines
|
||||
(mapAttrsToList
|
||||
(name: color: "@define-color ${name} ${color};")
|
||||
palette));
|
||||
in {
|
||||
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
|
|
@ -26,7 +26,5 @@
|
|||
"systemd.show_status=auto"
|
||||
"rd.udev.log_level=3"
|
||||
];
|
||||
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
}
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
./boot.nix
|
||||
./fonts.nix
|
||||
./home-manager.nix
|
||||
./locales.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
|
@ -4,7 +4,7 @@
|
|||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
config = lib.mkIf (config.local.systemVars.desktop != "none") {
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
packages = [
|
|
@ -2,8 +2,8 @@
|
|||
imports = [
|
||||
./fprintd.nix
|
||||
./fwupd.nix
|
||||
./nvidia.nix
|
||||
./printing.nix
|
||||
./uni-sync.nix
|
||||
./via.nix
|
||||
];
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
config = lib.mkIf (config.local.systemVars.desktop != "none") {
|
||||
services.fwupd.enable = true;
|
||||
};
|
||||
}
|
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"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
config = lib.mkIf (config.local.systemVars.desktop != "none") {
|
||||
services = {
|
||||
# setup printing service
|
||||
printing.enable = true;
|
|
@ -1,4 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
nix = {
|
||||
package = pkgs.lix;
|
||||
settings = {
|
||||
|
@ -11,14 +16,7 @@
|
|||
"flakes"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean = {
|
||||
enable = true;
|
||||
extraArgs = "--keep-since 30d --keep 3";
|
||||
};
|
||||
nixPath = ["nixpkgs=${inputs.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.systemVars.desktop != "none") {
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
33
modules/core/users.nix
Normal file
33
modules/core/users.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.local.systemVars) desktop username;
|
||||
inherit (config.local.homeVars) fullName;
|
||||
in {
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = fullName;
|
||||
extraGroups = mkIf (desktop != "none") [
|
||||
"networkmanager"
|
||||
"audio"
|
||||
"video"
|
||||
"wheel"
|
||||
"plugdev"
|
||||
];
|
||||
};
|
||||
|
||||
hjem = mkIf (desktop != "none") {
|
||||
clobberByDefault = true;
|
||||
users.${username} = {
|
||||
enable = true;
|
||||
directory = "/home/${username}";
|
||||
user = "${username}";
|
||||
environment = {
|
||||
forceOverride = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./core
|
||||
./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,176 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
betterfox = pkgs.fetchFromGitHub {
|
||||
owner = "yokoffing";
|
||||
repo = "betterfox";
|
||||
rev = "e026ed7d3a763c5d3f96c2680d7bc3340831af4f";
|
||||
hash = "sha256-hpkEO5BhMVtINQG8HN4xqfas/R6q5pYPZiFK8bilIDs=";
|
||||
};
|
||||
in {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
extraPolicies = {
|
||||
DisableTelemetry = true;
|
||||
DisablePocket = true;
|
||||
DisableFeedbackCommands = true;
|
||||
DisableFirefoxStudies = true;
|
||||
OfferToSaveLogins = false;
|
||||
OffertosaveloginsDefault = false;
|
||||
PasswordManagerEnabled = false;
|
||||
SearchSuggestEnabled = true;
|
||||
|
||||
# https://github.com/Sly-Harvey/NixOS/blob/f9da2691ea46565256ad757959cfc26ec6cee10d/modules/programs/browser/firefox/default.nix#L58-L163
|
||||
"3rdparty".Extensions = {
|
||||
"addon@darkreader.org" = {
|
||||
permissions = ["internal:privateBrowsingAllowed"];
|
||||
enabled = true;
|
||||
automation = {
|
||||
enabled = true;
|
||||
behavior = "OnOff";
|
||||
mode = "system";
|
||||
};
|
||||
detectDarkTheme = true;
|
||||
enabledByDefault = true;
|
||||
changeBrowserTheme = false;
|
||||
enableForProtectedPages = true;
|
||||
fetchNews = false;
|
||||
previewNewDesign = true;
|
||||
};
|
||||
"uBlock0@raymondhill.net" = {
|
||||
permissions = ["internal:privateBrowsingAllowed"];
|
||||
advancedSettings = [
|
||||
[
|
||||
"userResourcesLocation"
|
||||
"https://raw.githubusercontent.com/pixeltris/TwitchAdSolutions/master/video-swap-new/video-swap-new-ublock-origin.js"
|
||||
]
|
||||
];
|
||||
adminSettings = {
|
||||
userSettings = {
|
||||
uiTheme = "dark";
|
||||
advancedUserEnabled = true;
|
||||
userFiltersTrusted = true;
|
||||
importedLists = [
|
||||
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
|
||||
];
|
||||
selectedFilterLists = [
|
||||
"FRA-0"
|
||||
"adguard-cookies"
|
||||
"adguard-mobile-app-banners"
|
||||
"adguard-other-annoyances"
|
||||
"adguard-popup-overlays"
|
||||
"adguard-social"
|
||||
"adguard-spyware-url"
|
||||
"adguard-widgets"
|
||||
"easylist"
|
||||
"easylist-annoyances"
|
||||
"easylist-chat"
|
||||
"easylist-newsletters"
|
||||
"easylist-notifications"
|
||||
"easyprivacy"
|
||||
"fanboy-cookiemonster"
|
||||
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
|
||||
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||||
"plowe-0"
|
||||
"ublock-annoyances"
|
||||
"ublock-badware"
|
||||
"ublock-cookies-adguard"
|
||||
"ublock-cookies-easylist"
|
||||
"ublock-filters"
|
||||
"ublock-privacy"
|
||||
"ublock-quick-fixes"
|
||||
"ublock-unbreak"
|
||||
"urlhaus-1"
|
||||
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
profiles = {
|
||||
nezia = {
|
||||
settings = {
|
||||
"browser.search.suggest.enabled" = true;
|
||||
"ui.key.menuAccessKeyFocuses" = false;
|
||||
};
|
||||
|
||||
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
|
||||
darkreader
|
||||
proton-pass
|
||||
shinigami-eyes
|
||||
stylus
|
||||
ublock-origin
|
||||
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")
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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,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,12 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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
|
||||
};
|
||||
}
|
|
@ -4,20 +4,31 @@
|
|||
options,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkOption;
|
||||
inherit (lib) mkOption;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.types) str;
|
||||
in {
|
||||
options.local.homeVars = {
|
||||
fullName = mkOption {
|
||||
type = str;
|
||||
description = "your full name (used for git commits and user description)";
|
||||
default = null;
|
||||
description = ''
|
||||
your full name (used for git commits and user description)
|
||||
'';
|
||||
default = "User";
|
||||
};
|
||||
email = mkOption {
|
||||
type = str;
|
||||
description = "your email (used for git commits)";
|
||||
description = ''
|
||||
your email (used for git commits)
|
||||
'';
|
||||
default = null;
|
||||
};
|
||||
signingKey = mkOption {
|
||||
type = str;
|
||||
description = ''
|
||||
your ssh public key (used for signing git commits)"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config.assertions = mkIf (!config.local.profiles.server.enable) [
|
||||
|
@ -27,5 +38,8 @@ in {
|
|||
{
|
||||
assertion = options.local.homeVars.email.isDefined;
|
||||
}
|
||||
{
|
||||
assertion = options.local.homeVars.signingKey.isDefined;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{
|
||||
imports = [./hyprland.nix];
|
||||
imports = [
|
||||
./nvidia.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
options.local.modules.hyprland = {
|
||||
enable = mkEnableOption "Hyprland modules";
|
||||
};
|
||||
}
|
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";
|
||||
};
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./desktop.nix
|
||||
./gaming.nix
|
||||
./laptop.nix
|
||||
./server.nix
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
options = {
|
||||
local.profiles.desktop.enable = mkEnableOption "the desktop profile";
|
||||
};
|
||||
|
||||
config.assertions = lib.mkIf config.local.profiles.desktop.enable [
|
||||
{
|
||||
assertion = !config.local.profiles.server.enable;
|
||||
message = "The desktop profile cannot be enabled if `local.profiles.server.enable` is set to true.";
|
||||
}
|
||||
];
|
||||
}
|
|
@ -11,7 +11,7 @@ in {
|
|||
|
||||
config.assertions = lib.mkIf config.local.profiles.server.enable [
|
||||
{
|
||||
assertion = !config.local.profiles.desktop.enable;
|
||||
assertion = !(config.local.systemVars.desktop != "none");
|
||||
message = "The server profile cannot be enabled if `local.profiles.desktop.enable` is set to true.";
|
||||
}
|
||||
|
||||
|
|
|
@ -80,15 +80,13 @@ in {
|
|||
name = mkOption {
|
||||
type = str;
|
||||
description = "Name for the GTK theme";
|
||||
default = "Catppuccin-GTK-Purple-Dark";
|
||||
default = "adw-gtk3";
|
||||
};
|
||||
package = mkOption {
|
||||
type = package;
|
||||
description = "Package providing the GTK theme";
|
||||
|
||||
default = pkgs.magnetic-catppuccin-gtk.override {
|
||||
accent = ["purple"];
|
||||
};
|
||||
default = pkgs.adw-gtk3;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -4,18 +4,29 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib) mkOption;
|
||||
inherit (lib.types) str;
|
||||
inherit (lib.types) enum str;
|
||||
in {
|
||||
options.local.systemVars = {
|
||||
hostName = mkOption {
|
||||
type = str;
|
||||
description = "hostname for the current host";
|
||||
description = ''
|
||||
hostname for the current host
|
||||
'';
|
||||
default = null;
|
||||
};
|
||||
username = mkOption {
|
||||
type = str;
|
||||
description = "username for the home directory";
|
||||
default = null;
|
||||
description = ''
|
||||
username for the home directory
|
||||
'';
|
||||
default = "user";
|
||||
};
|
||||
desktop = mkOption {
|
||||
type = enum ["none" "Hyprland" "cosmic"];
|
||||
default = "none";
|
||||
description = ''
|
||||
the desktop environment to be used
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -26,5 +37,8 @@ in {
|
|||
{
|
||||
assertion = options.local.systemVars.username.isDefined;
|
||||
}
|
||||
{
|
||||
assertion = options.local.systemVars.desktop.isDefined;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
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.systemVars.desktop == "Hyprland") {
|
||||
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;
|
||||
}
|
|
@ -1,16 +1,18 @@
|
|||
{
|
||||
imports = [
|
||||
./browsers
|
||||
./anyrun
|
||||
./discord
|
||||
./editors
|
||||
./hypr
|
||||
./media
|
||||
./terminal
|
||||
|
||||
./anyrun.nix
|
||||
./discord.nix
|
||||
./fastfetch.nix
|
||||
./firefox.nix
|
||||
./games.nix
|
||||
./gnome.nix
|
||||
./misc.nix
|
||||
./nh.nix
|
||||
./thunar.nix
|
||||
./waybar.nix
|
||||
./wlogout.nix
|
||||
./xdg.nix
|
132
modules/programs/discord/default.nix
Normal file
132
modules/programs/discord/default.nix
Normal file
|
@ -0,0 +1,132 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.local.systemVars) username;
|
||||
styleCfg = config.local.style;
|
||||
discord = pkgs.discord-canary.override {
|
||||
withOpenASAR = true;
|
||||
withVencord = true;
|
||||
};
|
||||
|
||||
# run once with krisp-patcher ~/.config/discordcanary/*/modules/discord_krisp/discord_krisp.node
|
||||
krisp-patcher = pkgs.writers.writePython3Bin "krisp-patcher" {
|
||||
libraries = with pkgs.python3Packages; [capstone pyelftools];
|
||||
flakeIgnore = [
|
||||
"E501" # line too long (82 > 79 characters)
|
||||
"F403" # ‘from module import *’ used; unable to detect undefined names
|
||||
"F405" # name may be undefined, or defined from star imports: module
|
||||
];
|
||||
} (builtins.readFile ./krisp-patcher.py);
|
||||
in {
|
||||
config = mkIf (config.local.systemVars.desktop != "none") {
|
||||
hjem.users.${username} = {
|
||||
packages = [discord krisp-patcher];
|
||||
files.".config/Vencord/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;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
91
modules/programs/discord/krisp-patcher.py
Normal file
91
modules/programs/discord/krisp-patcher.py
Normal file
|
@ -0,0 +1,91 @@
|
|||
import sys
|
||||
import shutil
|
||||
|
||||
from elftools.elf.elffile import ELFFile
|
||||
from capstone import *
|
||||
from capstone.x86 import *
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print(f"Usage: {sys.argv[0]} [path to discord_krisp.node]")
|
||||
# "Unix programs generally use 2 for command line syntax errors and 1 for all other kind of errors."
|
||||
sys.exit(2)
|
||||
|
||||
executable = sys.argv[1]
|
||||
|
||||
elf = ELFFile(open(executable, "rb"))
|
||||
symtab = elf.get_section_by_name(".symtab")
|
||||
|
||||
krisp_initialize_address = symtab.get_symbol_by_name(
|
||||
"_ZN7discordL17DoKrispInitializeEv"
|
||||
)[0].entry.st_value
|
||||
isSignedByDiscord_address = symtab.get_symbol_by_name(
|
||||
"_ZN7discord4util17IsSignedByDiscordERKNSt4__Cr12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE"
|
||||
)[0].entry.st_value
|
||||
|
||||
text = elf.get_section_by_name(".text")
|
||||
text_start = text["sh_addr"]
|
||||
text_start_file = text["sh_offset"]
|
||||
# This seems to always be zero (.text starts at the right offset in the file). Do it just in case?
|
||||
address_to_file = text_start_file - text_start
|
||||
|
||||
# Done with the ELF now.
|
||||
# elf.close()
|
||||
|
||||
krisp_initialize_offset = krisp_initialize_address - address_to_file
|
||||
isSignedByDiscord_offset = krisp_initialize_address - address_to_file
|
||||
|
||||
f = open(executable, "rb")
|
||||
f.seek(krisp_initialize_offset)
|
||||
krisp_initialize = f.read(256)
|
||||
f.close()
|
||||
|
||||
# States
|
||||
found_issigned_by_discord_call = False
|
||||
found_issigned_by_discord_test = False
|
||||
found_issigned_by_discord_je = False
|
||||
found_already_patched = False
|
||||
je_location = None
|
||||
je_size = 0
|
||||
|
||||
# We are looking for a call to IsSignedByDiscord, followed by a test, followed by a je.
|
||||
# Then we replace the je with nops.
|
||||
|
||||
md = Cs(CS_ARCH_X86, CS_MODE_64)
|
||||
md.detail = True
|
||||
for i in md.disasm(krisp_initialize, krisp_initialize_address):
|
||||
if i.id == X86_INS_CALL:
|
||||
if i.operands[0].type == X86_OP_IMM:
|
||||
if i.operands[0].imm == isSignedByDiscord_address:
|
||||
found_issigned_by_discord_call = True
|
||||
|
||||
if i.id == X86_INS_TEST:
|
||||
if found_issigned_by_discord_call:
|
||||
found_issigned_by_discord_test = True
|
||||
|
||||
if i.id == X86_INS_JE:
|
||||
if found_issigned_by_discord_test:
|
||||
found_issigned_by_discord_je = True
|
||||
je_location = i.address
|
||||
je_size = len(i.bytes)
|
||||
break
|
||||
|
||||
if i.id == X86_INS_NOP:
|
||||
if found_issigned_by_discord_test:
|
||||
found_already_patched = True
|
||||
break
|
||||
|
||||
if je_location:
|
||||
print(f"Found patch location: 0x{je_location:x}")
|
||||
|
||||
shutil.copyfile(executable, executable + ".orig")
|
||||
f = open(executable, "rb+")
|
||||
f.seek(je_location - address_to_file)
|
||||
f.write(
|
||||
b"\x90" * je_size
|
||||
) # je can be larger than 2 bytes given a large enough displacement :(
|
||||
f.close()
|
||||
else:
|
||||
if found_already_patched:
|
||||
print("Couldn't find patch location - already patched.")
|
||||
else:
|
||||
print("Couldn't find patch location - review manually. Sorry.")
|
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.nix
|
||||
];
|
||||
|
||||
config = mkIf (config.local.systemVars.desktop != "none") {
|
||||
/*
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,17 +2,16 @@
|
|||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
styleCfg = osConfig.local.style;
|
||||
in {
|
||||
imports = [inputs.nvf.homeManagerModules.default];
|
||||
inherit (config.local.systemVars) username;
|
||||
styleCfg = config.local.style;
|
||||
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
settings.vim = lib.mkMerge [
|
||||
customNeovim = inputs.nvf.lib.neovimConfiguration {
|
||||
inherit pkgs;
|
||||
modules = lib.singleton {
|
||||
config.vim = lib.mkMerge [
|
||||
{
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
@ -28,6 +27,15 @@ in {
|
|||
vim.opt.formatoptions:remove('c')
|
||||
vim.opt.formatoptions:remove('r')
|
||||
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 = {
|
||||
|
@ -229,27 +237,11 @@ in {
|
|||
})
|
||||
];
|
||||
};
|
||||
|
||||
programs.neovide = {
|
||||
enable = true;
|
||||
settings = {
|
||||
fork = false;
|
||||
frame = "full";
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
config = lib.mkIf (config.local.systemVars.desktop != "none") {
|
||||
hjem.users.${username} = {
|
||||
packages = [customNeovim.neovim];
|
||||
};
|
||||
};
|
||||
}
|
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.systemVars.desktop != "none") {
|
||||
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";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
170
modules/programs/firefox.nix
Normal file
170
modules/programs/firefox.nix
Normal file
|
@ -0,0 +1,170 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
toINI = lib.generators.toINI {};
|
||||
|
||||
betterfox = pkgs.fetchFromGitHub {
|
||||
owner = "yokoffing";
|
||||
repo = "betterfox";
|
||||
rev = "e026ed7d3a763c5d3f96c2680d7bc3340831af4f";
|
||||
hash = "sha256-hpkEO5BhMVtINQG8HN4xqfas/R6q5pYPZiFK8bilIDs=";
|
||||
};
|
||||
|
||||
firefox = pkgs.wrapFirefox pkgs.firefox-esr-128-unwrapped {
|
||||
extraPolicies = {
|
||||
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";
|
||||
}
|
||||
];
|
||||
DisableTelemetry = true;
|
||||
DisablePocket = true;
|
||||
DisableFeedbackCommands = true;
|
||||
DisableFirefoxStudies = true;
|
||||
OfferToSaveLogins = false;
|
||||
OffertosaveloginsDefault = false;
|
||||
PasswordManagerEnabled = false;
|
||||
SearchSuggestEnabled = true;
|
||||
|
||||
# https://github.com/Sly-Harvey/NixOS/blob/f9da2691ea46565256ad757959cfc26ec6cee10d/modules/programs/browser/firefox/default.nix#L58-L163
|
||||
"3rdparty".Extensions = {
|
||||
"addon@darkreader.org" = {
|
||||
permissions = ["internal:privateBrowsingAllowed"];
|
||||
enabled = true;
|
||||
automation = {
|
||||
enabled = true;
|
||||
behavior = "OnOff";
|
||||
mode = "system";
|
||||
};
|
||||
detectDarkTheme = true;
|
||||
enabledByDefault = true;
|
||||
changeBrowserTheme = false;
|
||||
enableForProtectedPages = true;
|
||||
fetchNews = false;
|
||||
previewNewDesign = true;
|
||||
};
|
||||
"uBlock0@raymondhill.net" = {
|
||||
permissions = ["internal:privateBrowsingAllowed"];
|
||||
advancedSettings = [
|
||||
[
|
||||
"userResourcesLocation"
|
||||
"https://raw.githubusercontent.com/pixeltris/TwitchAdSolutions/master/video-swap-new/video-swap-new-ublock-origin.js"
|
||||
]
|
||||
];
|
||||
adminSettings = {
|
||||
userSettings = {
|
||||
uiTheme = "dark";
|
||||
advancedUserEnabled = true;
|
||||
userFiltersTrusted = true;
|
||||
importedLists = [
|
||||
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
|
||||
];
|
||||
selectedFilterLists = [
|
||||
"FRA-0"
|
||||
"adguard-cookies"
|
||||
"adguard-mobile-app-banners"
|
||||
"adguard-other-annoyances"
|
||||
"adguard-popup-overlays"
|
||||
"adguard-social"
|
||||
"adguard-spyware-url"
|
||||
"adguard-widgets"
|
||||
"easylist"
|
||||
"easylist-annoyances"
|
||||
"easylist-chat"
|
||||
"easylist-newsletters"
|
||||
"easylist-notifications"
|
||||
"easyprivacy"
|
||||
"fanboy-cookiemonster"
|
||||
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
|
||||
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||||
"plowe-0"
|
||||
"ublock-annoyances"
|
||||
"ublock-badware"
|
||||
"ublock-cookies-adguard"
|
||||
"ublock-cookies-easylist"
|
||||
"ublock-filters"
|
||||
"ublock-privacy"
|
||||
"ublock-quick-fixes"
|
||||
"ublock-unbreak"
|
||||
"urlhaus-1"
|
||||
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
config = lib.mkIf (config.local.systemVars.desktop != "none") {
|
||||
hjem.users.${username} = {
|
||||
packages = [firefox];
|
||||
files = {
|
||||
".mozilla/firefox/profiles.ini".text = toINI {
|
||||
Profile0 = {
|
||||
# creates lunarnova profile and sets it as default
|
||||
Name = "${username}";
|
||||
IsRelative = 1;
|
||||
Path = "${username}";
|
||||
Default = 1;
|
||||
};
|
||||
};
|
||||
".mozilla/firefox/${username}/user.js".text = 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")
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
38
modules/programs/games.nix
Normal file
38
modules/programs/games.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
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.ankama-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 = [
|
||||
./land
|
||||
|
||||
./idle.nix
|
||||
./lock.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.systemVars.desktop == "Hyprland") {
|
||||
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 = "exec";
|
||||
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" false}"
|
||||
];
|
||||
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 "walker -m emojis" false}" # not using uwsm as it already runs as a service
|
||||
"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_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"
|
||||
];
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue