Compare commits
171 Commits
866a43b360
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
cec5ec5493
|
|||
|
5833dff19e
|
|||
|
7b4c2df7af
|
|||
|
1643f30906
|
|||
|
79c617cc91
|
|||
|
474a8badf4
|
|||
|
17368396cf
|
|||
|
e61b989cc0
|
|||
|
1f79a64804
|
|||
|
fbfc7236a1
|
|||
|
35c1419b4d
|
|||
|
2903639dc0
|
|||
|
c3c767df44
|
|||
|
8757503465
|
|||
|
69ae299cc1
|
|||
|
f010ff758a
|
|||
|
769f0a2487
|
|||
|
0d3521466c
|
|||
|
9582b05b43
|
|||
|
4421fe8bad
|
|||
|
4396c6b84f
|
|||
|
517dd2c077
|
|||
|
a03410bee7
|
|||
|
f28fdfabca
|
|||
|
a9c55ead9b
|
|||
|
3b4a02a08a
|
|||
|
59c55886a3
|
|||
|
195a821b86
|
|||
|
b294789609
|
|||
|
dad0f892dc
|
|||
|
6cd1020c18
|
|||
|
bdb2f39716
|
|||
|
dffb768411
|
|||
|
4871f3ef05
|
|||
|
aa2c3f218a
|
|||
|
f32a7f59a1
|
|||
|
a6c24c1f81
|
|||
|
2c9f10dad5
|
|||
|
dc02fc5ac2
|
|||
|
41415c944b
|
|||
|
f44863c4e6
|
|||
|
d7b6d097e9
|
|||
|
402db869d4
|
|||
|
f4f429e619
|
|||
|
cc43c758c5
|
|||
|
82079f2079
|
|||
|
4ab5dc57fc
|
|||
|
829f959ce3
|
|||
|
7d9d6c5c6d
|
|||
|
d03f6592d1
|
|||
|
54a9cc34fe
|
|||
|
1ceed08cbf
|
|||
|
91b774d9e6
|
|||
|
6020e99197
|
|||
|
0980fe5297
|
|||
|
84d93f3968
|
|||
|
281d53d7bc
|
|||
|
a557a639a4
|
|||
|
13aec0311a
|
|||
|
428b96ff07
|
|||
|
a27dc9859b
|
|||
|
a9a7115774
|
|||
|
df93b8f1f4
|
|||
|
28d0196a25
|
|||
|
67e4951f7d
|
|||
|
3f69658e49
|
|||
|
ab039be574
|
|||
|
dcd3293ee8
|
|||
|
5a2bd01894
|
|||
|
9824a769c1
|
|||
|
c3863c568f
|
|||
|
da4297c3d9
|
|||
|
39e608fac8
|
|||
|
dbb39fa40f
|
|||
|
2777ad7823
|
|||
|
7f98459009
|
|||
|
a98912e252
|
|||
|
248379a9cd
|
|||
|
e3c58ee2bf
|
|||
|
a3178137d3
|
|||
|
9d96d54d48
|
|||
|
2c44e6cee2
|
|||
|
e174d547a7
|
|||
|
359cf544a9
|
|||
|
0b6ebd9c85
|
|||
|
f9c31deb9f
|
|||
|
882ee908e4
|
|||
|
8d63f6f649
|
|||
|
5d16ec4968
|
|||
|
f97bcc4222
|
|||
|
c36df8ed30
|
|||
|
d7efa501fc
|
|||
|
8d2cd352a1
|
|||
|
3f3c2d322d
|
|||
|
9b178ceb70
|
|||
|
58570f7ba4
|
|||
|
5f5ccc7e38
|
|||
|
9bbd7c1ff8
|
|||
|
19cd84e81d
|
|||
|
6d61a62d36
|
|||
|
879378f39d
|
|||
|
5b830f1840
|
|||
|
3cad24be23
|
|||
|
39f9ef8ba7
|
|||
|
9be0ac7814
|
|||
|
6167efb4c1
|
|||
|
3e74e42940
|
|||
|
6c38eb1e3d
|
|||
|
95f2523d9e
|
|||
|
2b39602e74
|
|||
|
eb2dfc0b68
|
|||
|
ad23ecd374
|
|||
|
b340e16edd
|
|||
|
6503d33fc5
|
|||
|
69a685774d
|
|||
|
815387a87e
|
|||
|
3c93a7e549
|
|||
|
e677a74c41
|
|||
|
a0d6bb0ab7
|
|||
|
03cf08f0d4
|
|||
|
c977589fde
|
|||
|
7af7980e07
|
|||
|
c47ca40705
|
|||
|
ebd19812a2
|
|||
|
844561a87c
|
|||
|
206d34adb2
|
|||
|
fa0a8f6901
|
|||
|
6db7efe71b
|
|||
|
1418e62598
|
|||
|
59075d1619
|
|||
|
db8ada4360
|
|||
|
6951525a3b
|
|||
|
295651262a
|
|||
|
83fcdd9710
|
|||
|
262b8913eb
|
|||
|
32a3205604
|
|||
|
914e011081
|
|||
|
94017ce4c9
|
|||
|
4af0783c14
|
|||
|
ee677b5c4c
|
|||
|
e65fbecd3c
|
|||
|
62584588f5
|
|||
|
638b0c9366
|
|||
|
b005336b02
|
|||
|
2412129204
|
|||
|
cc77467709
|
|||
|
596fd0016b
|
|||
|
198367a5e6
|
|||
|
2b84b026c1
|
|||
|
01f8cbe77c
|
|||
|
99d39f1978
|
|||
|
a5da6ec253
|
|||
|
f3b10df7c3
|
|||
|
23295e29d0
|
|||
|
5ccd110efd
|
|||
|
c8cd4cc8b6
|
|||
|
3b485b4a35
|
|||
|
0242e01c6f
|
|||
|
31cbdcf5b3
|
|||
|
9e092d6319
|
|||
|
8e575112ad
|
|||
|
f1c9ba7318
|
|||
|
9b83f10365
|
|||
|
5faf52836b
|
|||
|
da88b7dea8
|
|||
|
9e125d3a79
|
|||
|
e50cd44ffe
|
|||
|
181d21581f
|
|||
|
20e9cb7e2d
|
|||
|
16e60f65cf
|
|||
|
f52c071f21
|
BIN
Btop.png
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.2 MiB |
BIN
FastFetch.png
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 2.0 MiB |
BIN
NeoVim.png
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 2.0 MiB |
18
README.md
@ -1,14 +1,19 @@
|
|||||||
# NixOS Configuration
|
# NixOS Configuration
|
||||||
|
|
||||||
Modular NixOS configuration, using Hyprland for a lightweight desktop.
|
Modular NixOS configuration, using Hyprland (yikes) or Niri for a tiling/scrolling desktop.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|
<p float="left" align="middle">
|
||||||
|
<img src="/NeoVim.png" width="33%" />
|
||||||
|
<img src="/Rmpc.png" width="33%" />
|
||||||
|
<img src="/Btop.png" width="33%" />
|
||||||
|
</p>
|
||||||
|
|
||||||
 
|

|
||||||
|
|
||||||
To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
|
To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
|
||||||
|
Alternatively, use `nh os switch` or `nh os boot`.
|
||||||
|
|
||||||
## NixFlake/system
|
## NixFlake/system
|
||||||
|
|
||||||
@ -17,6 +22,7 @@ Contains all the system configurations.
|
|||||||
- There is a common configuration used for all systems: `NixFlake/system/default.nix`
|
- There is a common configuration used for all systems: `NixFlake/system/default.nix`
|
||||||
- Every system has its own special configuration: `NixFlake/system/<hostname>/default.nix`
|
- Every system has its own special configuration: `NixFlake/system/<hostname>/default.nix`
|
||||||
- System modules are located in `NixFlake/system/modules`
|
- System modules are located in `NixFlake/system/modules`
|
||||||
|
- Hosted services are located in `NixFlake/system/services`
|
||||||
|
|
||||||
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
|
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
|
||||||
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
||||||
@ -39,6 +45,6 @@ Each derivation is loaded into `NixFlake/derivations/default.nix`.
|
|||||||
|
|
||||||
## NixFlake/overlays
|
## NixFlake/overlays
|
||||||
|
|
||||||
Contains (not at the moment) all overlays.
|
Contains all overlays, e.g. package version overrides.
|
||||||
The `NixFlake/overlays/default.nix` imports all of the overlays and all of the derivations.
|
The `NixFlake/overlays/default.nix` imports all overlays and all derivations.
|
||||||
It is then imported by the toplevel `NixFlake/flake.nix`, to make everything available to the system/home configurations.
|
It is then imported by the top-level `NixFlake/flake.nix`, to make everything available to the system/home configurations.
|
||||||
|
|||||||
BIN
Rmpc.png
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 2.3 MiB |
BIN
config/face.jpeg
Normal file
|
After Width: | Height: | Size: 70 KiB |
@ -34,11 +34,28 @@ rec {
|
|||||||
# Define custom dependencies
|
# Define custom dependencies
|
||||||
# ===========================================================================================
|
# ===========================================================================================
|
||||||
|
|
||||||
|
# Python package example
|
||||||
|
# typed-ffmpeg = pkgs.python313Packages.buildPythonPackage rec {
|
||||||
|
# pname = "typed_ffmpeg";
|
||||||
|
# version = "3.6";
|
||||||
|
#
|
||||||
|
# src = pkgs.python313Packages.fetchPypi {
|
||||||
|
# inherit pname version;
|
||||||
|
# hash = "sha256-YPspq/lqI/jx/9FCQntmQPw4lrPIsdxtHTUg0F0QbrM=";
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# pyproject = true;
|
||||||
|
# build-system = [
|
||||||
|
# pkgs.python313Packages.setuptools
|
||||||
|
# pkgs.python313Packages.setuptools-scm
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
# python = pkgs.python313.withPackages (p:
|
# python = pkgs.python313.withPackages (p:
|
||||||
# with p; [
|
# with p; [
|
||||||
# # numpy
|
# # numpy
|
||||||
# # matplotlib
|
# # matplotlib
|
||||||
# # ffmpeg-python
|
# # typed-ffmpeg
|
||||||
# # pyside6
|
# # pyside6
|
||||||
# ]);
|
# ]);
|
||||||
|
|
||||||
@ -210,6 +227,9 @@ rec {
|
|||||||
# Set PYTHONPATH
|
# Set PYTHONPATH
|
||||||
# PYTHONPATH = ".";
|
# PYTHONPATH = ".";
|
||||||
|
|
||||||
|
# Set matplotlib backend
|
||||||
|
# MPLBACKEND = "TkAgg";
|
||||||
|
|
||||||
# =========================================================================================
|
# =========================================================================================
|
||||||
# Define shell environment
|
# Define shell environment
|
||||||
# =========================================================================================
|
# =========================================================================================
|
||||||
|
|||||||
@ -200,6 +200,16 @@ $ file: eza -1
|
|||||||
sudo chattr -R -i <file>
|
sudo chattr -R -i <file>
|
||||||
$ file: eza -1
|
$ file: eza -1
|
||||||
|
|
||||||
|
% dos2unix
|
||||||
|
# Convert line endings to unix format
|
||||||
|
dos2unix <file>
|
||||||
|
$ file: eza -1
|
||||||
|
|
||||||
|
% unix2dos
|
||||||
|
Convert line endings to dos format
|
||||||
|
unix2dos <file>
|
||||||
|
$ file: eza -1
|
||||||
|
|
||||||
; ===========================
|
; ===========================
|
||||||
; SECRETS
|
; SECRETS
|
||||||
; ===========================
|
; ===========================
|
||||||
|
|||||||
@ -7,5 +7,6 @@
|
|||||||
|
|
||||||
monolisa = pkgs.callPackage ./monolisa {};
|
monolisa = pkgs.callPackage ./monolisa {};
|
||||||
msty = pkgs.callPackage ./msty {};
|
msty = pkgs.callPackage ./msty {};
|
||||||
|
unityhub = pkgs.callPackage ./unityhub {};
|
||||||
tidal-dl-ng = pkgs.callPackage ./tidal-dl-ng {};
|
tidal-dl-ng = pkgs.callPackage ./tidal-dl-ng {};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,82 +6,95 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
}: let
|
}: let
|
||||||
#
|
#
|
||||||
# Dependencies
|
# Custom Dependencies
|
||||||
#
|
#
|
||||||
requests_2_32_4 = pkgs.python3Packages.requests.overridePythonAttrs (old: {
|
pythonPkgs = pkgs.python313Packages.overrideScope (self: super: {
|
||||||
version = "2.32.4";
|
typer = super.typer.overridePythonAttrs (old: {
|
||||||
src = pkgs.python3Packages.fetchPypi {
|
version = "0.20.0";
|
||||||
|
src = super.fetchPypi {
|
||||||
inherit (old) pname;
|
inherit (old) pname;
|
||||||
version = "2.32.4";
|
version = "0.20.0";
|
||||||
sha256 = "sha256-J9AxZoLIopg00yZIIAJLYqNpQgg9Usry8UwFkTNtNCI=";
|
sha256 = "sha256-Gq9klAMXk+SHb7C6z6apErVRz0PB5jyADfixqGZyDDc=";
|
||||||
};
|
|
||||||
patches =
|
|
||||||
builtins.filter (
|
|
||||||
p: !pkgs.lib.strings.hasInfix "CVE-2024-47081" (toString p)
|
|
||||||
)
|
|
||||||
old.patches;
|
|
||||||
});
|
|
||||||
|
|
||||||
pycryptodome_3_23_0 = pkgs.python3Packages.pycryptodome.overridePythonAttrs (old: {
|
|
||||||
version = "3.23.0";
|
|
||||||
src = pkgs.python3Packages.fetchPypi {
|
|
||||||
inherit (old) pname;
|
|
||||||
version = "3.23.0";
|
|
||||||
sha256 = "sha256-RHcAplcYLWAzi6sJ/bJ1GPiFauzYCuTGvd22f/XaRO8=";
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
pathvalidate_3_3_1 = pkgs.python3Packages.pathvalidate.overridePythonAttrs (old: {
|
rich = super.rich.overridePythonAttrs (old: {
|
||||||
version = "3.3.1";
|
version = "14.2.0";
|
||||||
src = pkgs.python3Packages.fetchPypi {
|
src = super.fetchPypi {
|
||||||
inherit (old) pname;
|
inherit (old) pname;
|
||||||
version = "3.3.1";
|
version = "14.2.0";
|
||||||
sha256 = "sha256-sYwHISv+rWJDRbuOHWFBzc8Vo5c2mU6guUA1rSsboXc=";
|
sha256 = "sha256-c/9Qx8DBx3yCQweSg/Tts3bw9kQkM67LjOfm0LktH+Q=";
|
||||||
};
|
};
|
||||||
|
doCheck = false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
typer_0_16_0 = pkgs.python3Packages.typer.overridePythonAttrs (old: {
|
# typer_0_20_0 = pkgs.python313Packages.typer.overridePythonAttrs (old: {
|
||||||
version = "0.16.0";
|
# version = "0.20.0";
|
||||||
src = pkgs.python3Packages.fetchPypi {
|
# src = pkgs.python313Packages.fetchPypi {
|
||||||
inherit (old) pname;
|
# inherit (old) pname;
|
||||||
version = "0.16.0";
|
# version = "0.20.0";
|
||||||
sha256 = "sha256-rzd/+u4dvjeulEDLTo8RaG6lzk6brgG4SufGO4fx3Ts=";
|
# sha256 = "sha256-Gq9klAMXk+SHb7C6z6apErVRz0PB5jyADfixqGZyDDc=";
|
||||||
};
|
# };
|
||||||
});
|
# });
|
||||||
|
#
|
||||||
|
# rich_14_2_0 = pkgs.python313Packages.rich.overridePythonAttrs (old: {
|
||||||
|
# version = "14.2.0";
|
||||||
|
# src = pkgs.python313Packages.fetchPypi {
|
||||||
|
# inherit (old) pname;
|
||||||
|
# version = "14.2.0";
|
||||||
|
# sha256 = "sha256-c/9Qx8DBx3yCQweSg/Tts3bw9kQkM67LjOfm0LktH+Q=";
|
||||||
|
# };
|
||||||
|
# doCheck = false;
|
||||||
|
# });
|
||||||
|
|
||||||
tidalDlNg = pkgs.python3Packages.buildPythonApplication rec {
|
# rich_14_2_0 = pkgs.python313Packages.rich.overridePythonAttrs (old: {
|
||||||
|
# version = "14.2.0";
|
||||||
|
# src = pkgs.fetchFromGitHub {
|
||||||
|
# owner = "Textualize";
|
||||||
|
# repo = "rich";
|
||||||
|
# tag = "v14.2.0";
|
||||||
|
# hash = "sha256-oQbxRbZnVr/Ln+i/hpBw5FlpUp3gcp/7xsxi6onPkn8=";
|
||||||
|
# };
|
||||||
|
# });
|
||||||
|
|
||||||
|
tidalDlNg = pythonPkgs.buildPythonApplication rec {
|
||||||
pname = "tidal-dl-ng";
|
pname = "tidal-dl-ng";
|
||||||
version = "0.26.2";
|
version = "0.31.3";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "exislow";
|
owner = "exislow";
|
||||||
repo = "tidal-dl-ng";
|
repo = "tidal-dl-ng";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-9C7IpLKeR08/nMbePltwGrzIgXfdaVfyOeFQnfCwMKg=";
|
sha256 = "sha256-PUT0anx1yivgXwW21jah7Rv1/BabOT+KPoW446NFNyg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
catchConflicts = false;
|
catchConflicts = false;
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs.python3Packages; [poetry-core setuptools];
|
nativeBuildInputs = with pythonPkgs; [poetry-core setuptools];
|
||||||
|
|
||||||
propagatedBuildInputs = with pkgs.python3Packages; [
|
# https://github.com/exislow/tidal-dl-ng/blob/master/pyproject.toml
|
||||||
requests_2_32_4
|
propagatedBuildInputs = with pythonPkgs; [
|
||||||
coloredlogs
|
# Nixpkgs
|
||||||
dataclasses-json
|
requests
|
||||||
m3u8
|
|
||||||
mpegdash
|
|
||||||
mutagen
|
mutagen
|
||||||
pathvalidate_3_3_1
|
dataclasses-json
|
||||||
pycryptodome_3_23_0
|
pathvalidate
|
||||||
python-ffmpeg
|
m3u8
|
||||||
rich
|
coloredlogs
|
||||||
tidalapi
|
|
||||||
toml
|
|
||||||
typer_0_16_0
|
|
||||||
pyside6
|
pyside6
|
||||||
pyqtdarktheme
|
pyqtdarktheme
|
||||||
|
toml
|
||||||
|
pycryptodome
|
||||||
|
tidalapi
|
||||||
|
python-ffmpeg
|
||||||
|
ansi2html
|
||||||
|
|
||||||
|
# Custom Deps
|
||||||
|
typer
|
||||||
|
rich
|
||||||
];
|
];
|
||||||
|
|
||||||
# pythonOutputDistPhase = ''
|
# pythonOutputDistPhase = ''
|
||||||
@ -118,7 +131,7 @@
|
|||||||
|
|
||||||
tidal-dl-ng-gui-desktopfile = pkgs.stdenv.mkDerivation {
|
tidal-dl-ng-gui-desktopfile = pkgs.stdenv.mkDerivation {
|
||||||
pname = "tdng";
|
pname = "tdng";
|
||||||
version = "0.26.2";
|
version = "0.31.3";
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
|
||||||
nativeBuildInputs = [pkgs.makeWrapper];
|
nativeBuildInputs = [pkgs.makeWrapper];
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
# Taken from pull/422785
|
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
@ -47,7 +46,15 @@ stdenv.mkDerivation rec {
|
|||||||
++ extraPkgs pkgs;
|
++ extraPkgs pkgs;
|
||||||
|
|
||||||
multiPkgs = pkgs:
|
multiPkgs = pkgs:
|
||||||
with pkgs;
|
with pkgs; let
|
||||||
|
libxml2-legacy = libxml2.overrideAttrs (previousAttrs: rec {
|
||||||
|
version = "2.13.8";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://gnome/sources/libxml2/${lib.versions.majorMinor version}/libxml2-${version}.tar.xz";
|
||||||
|
hash = "sha256-J3KUyzMRmrcbK8gfL0Rem8lDW4k60VuyzSsOhZoO6Eo=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
in
|
||||||
[
|
[
|
||||||
# Unity Hub ldd dependencies
|
# Unity Hub ldd dependencies
|
||||||
cups
|
cups
|
||||||
@ -94,7 +101,7 @@ stdenv.mkDerivation rec {
|
|||||||
xorg.libXcursor
|
xorg.libXcursor
|
||||||
glib
|
glib
|
||||||
gdk-pixbuf
|
gdk-pixbuf
|
||||||
libxml2
|
libxml2-legacy
|
||||||
zlib
|
zlib
|
||||||
clang
|
clang
|
||||||
git # for git-based packages in unity package manager
|
git # for git-based packages in unity package manager
|
||||||
1285
flake.lock
generated
114
flake.nix
@ -12,6 +12,9 @@
|
|||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
hardware.url = "github:nixos/nixos-hardware";
|
hardware.url = "github:nixos/nixos-hardware";
|
||||||
|
|
||||||
|
# NOTE: Update this after May and November
|
||||||
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||||
|
|
||||||
# Home Manager
|
# Home Manager
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -28,6 +31,10 @@
|
|||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Secure boot
|
||||||
|
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.3";
|
||||||
|
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Nix User Repository (e.g. Firefox addons)
|
# Nix User Repository (e.g. Firefox addons)
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
nur.inputs.nixpkgs.follows = "nixpkgs";
|
nur.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -38,7 +45,56 @@
|
|||||||
|
|
||||||
# Run unpatched binaries on NixOS
|
# Run unpatched binaries on NixOS
|
||||||
nix-alien.url = "github:thiagokokada/nix-alien";
|
nix-alien.url = "github:thiagokokada/nix-alien";
|
||||||
nix-alien.inputs.nixpkgs.follows = "nixpkgs";
|
# Don't follow nixpkgs:
|
||||||
|
# https://github.com/thiagokokada/nix-alien#user-content-nixos-installation-with-flakes
|
||||||
|
# nix-alien.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Niri
|
||||||
|
niri.url = "github:sodiboo/niri-flake";
|
||||||
|
niri.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Quickshell
|
||||||
|
quickshell.url = "github:quickshell-mirror/quickshell";
|
||||||
|
quickshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Noctalia shell
|
||||||
|
noctalia.url = "github:noctalia-dev/noctalia-shell";
|
||||||
|
noctalia.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# noctalia.inputs.quickshell.follows = "quickshell";
|
||||||
|
|
||||||
|
# Lol
|
||||||
|
waifu-cursors.url = "github:kagurazakei/waifu-cursors";
|
||||||
|
|
||||||
|
# Caelestia shell
|
||||||
|
caelestia.url = "github:caelestia-dots/shell";
|
||||||
|
caelestia.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
caelestia.inputs.quickshell.follows = "quickshell";
|
||||||
|
# caelestia-cli.url = "github:caelestia-dots/cli";
|
||||||
|
# caelestia-cli.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# DankMaterialShell
|
||||||
|
dgop.url = "github:AvengeMedia/dgop";
|
||||||
|
dgop.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# dms-cli.url = "github:AvengeMedia/danklinux";
|
||||||
|
# dms-cli.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
dankMaterialShell.url = "github:AvengeMedia/DankMaterialShell";
|
||||||
|
dankMaterialShell.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
dankMaterialShell.inputs.dgop.follows = "dgop";
|
||||||
|
|
||||||
|
# Hyprland (use flake so plugins are not built from source)
|
||||||
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# HyprPlugins
|
||||||
|
hyprland-plugins.url = "github:hyprwm/hyprland-plugins";
|
||||||
|
hyprland-plugins.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
hyprland-plugins.inputs.hyprland.follows = "hyprland";
|
||||||
|
hypr-dynamic-cursors.url = "github:VirtCode/hypr-dynamic-cursors";
|
||||||
|
hypr-dynamic-cursors.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
hypr-dynamic-cursors.inputs.hyprland.follows = "hyprland";
|
||||||
|
hyprspace.url = "github:KZDKM/Hyprspace";
|
||||||
|
# hyprspace.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
hyprspace.inputs.hyprland.follows = "hyprland";
|
||||||
|
|
||||||
# NeoVim <3
|
# NeoVim <3
|
||||||
nixvim.url = "github:nix-community/nixvim";
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
@ -48,23 +104,17 @@
|
|||||||
# emacs-overlay.url = "github:nix-community/emacs-overlay";
|
# emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||||
# emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
# emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Firefox theme
|
||||||
|
textfox.url = "github:adriankarlen/textfox";
|
||||||
|
textfox.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Declarative Flatpak
|
# Declarative Flatpak
|
||||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||||
# nix-flatpak.inputs.nixpkgs.follows = "nixpkgs"; # nix-flatpak doesn't have this
|
# nix-flatpak.inputs.nixpkgs.follows = "nixpkgs"; # nix-flatpak doesn't have this
|
||||||
|
|
||||||
# HyprPlugins
|
|
||||||
# hyprland-plugins.url = "github:hyprwm/hyprland-plugins";
|
|
||||||
# hyprland-plugins.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
# hypr-dynamic-cursors.url = "github:VirtCode/hypr-dynamic-cursors";
|
|
||||||
# hypr-dynamic-cursors.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
# Realtime audio
|
# Realtime audio
|
||||||
# musnix.url = "github:musnix/musnix";
|
# musnix.url = "github:musnix/musnix";
|
||||||
# musnix.inputs.nixpkgs.follows = "nixpkgs";
|
# musnix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Pinned versions
|
|
||||||
# v4l2loopback-pinned.url = "github:nixos/nixpkgs/4684fd6b0c01e4b7d99027a34c93c2e09ecafee2";
|
|
||||||
# unityhub-pinned.url = "github:huantianad/nixpkgs/9542b0bc7701e173a10e6977e57bbba68bb3051f";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Outputs is a function that takes the inputs as arguments.
|
# Outputs is a function that takes the inputs as arguments.
|
||||||
@ -98,23 +148,25 @@
|
|||||||
# firefox = prev.firefox.override { ... };
|
# firefox = prev.firefox.override { ... };
|
||||||
# myBrowser = final.firefox;
|
# myBrowser = final.firefox;
|
||||||
# }
|
# }
|
||||||
overlays = [
|
overlays = let
|
||||||
|
# Maintain additional stable pkgs.
|
||||||
|
# This is supposed to provide a backup for packages in case they
|
||||||
|
# stop building on the unstable branch.
|
||||||
|
# It should otherwise not be mixed with this configuration,
|
||||||
|
# so don't even pass it to the modules.
|
||||||
|
pkgs-stable = import inputs.nixpkgs-stable {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
config.allowUnfreePredicate = pkg: true;
|
||||||
|
};
|
||||||
|
in [
|
||||||
inputs.devshell.overlays.default
|
inputs.devshell.overlays.default
|
||||||
inputs.nur.overlays.default
|
inputs.nur.overlays.default
|
||||||
|
inputs.niri.overlays.niri
|
||||||
# inputs.emacs-overlay.overlay
|
# inputs.emacs-overlay.overlay
|
||||||
|
|
||||||
# Overriding specific packages from a different nixpkgs (e.g. a pull request)
|
# All my own overlays (derivations + modifications)
|
||||||
# can be done like this. Note that this creates an additional nixpkgs instance.
|
(import ./overlays {inherit inputs nixpkgs pkgs-stable;})
|
||||||
# https://github.com/NixOS/nixpkgs/issues/418451
|
|
||||||
# (final: prev: {
|
|
||||||
# unityhub_pinned_3_13 = import inputs.unityhub-pinned {
|
|
||||||
# config.allowUnfree = true;
|
|
||||||
# localSystem = {inherit (prev) system;};
|
|
||||||
# };
|
|
||||||
# })
|
|
||||||
|
|
||||||
# All my own overlays
|
|
||||||
(import ./overlays {inherit nixpkgs inputs;})
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -146,8 +198,12 @@
|
|||||||
# HM modules are passed through home/modules/default.nix instead.
|
# HM modules are passed through home/modules/default.nix instead.
|
||||||
commonModules = [
|
commonModules = [
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.disko.nixosModules.disko
|
|
||||||
inputs.impermanence.nixosModules.impermanence
|
inputs.impermanence.nixosModules.impermanence
|
||||||
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
|
|
||||||
|
# We need the niri module also on the headless hosts
|
||||||
|
# so nix can parse the config (although it is disabled...)
|
||||||
|
inputs.niri.nixosModules.niri # This also imports the HM module
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
# Local shell for NixFlake directory
|
# Local shell for NixFlake directory
|
||||||
@ -173,7 +229,9 @@
|
|||||||
username = "christoph";
|
username = "christoph";
|
||||||
headless = false;
|
headless = false;
|
||||||
extraModules =
|
extraModules =
|
||||||
[]
|
[
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
|
]
|
||||||
++ commonModules;
|
++ commonModules;
|
||||||
};
|
};
|
||||||
nixtop = mylib.nixos.mkNixosConfigWithHomeManagerModule {
|
nixtop = mylib.nixos.mkNixosConfigWithHomeManagerModule {
|
||||||
@ -181,9 +239,7 @@
|
|||||||
hostname = "nixtop";
|
hostname = "nixtop";
|
||||||
username = "christoph";
|
username = "christoph";
|
||||||
headless = false;
|
headless = false;
|
||||||
extraModules =
|
extraModules = [] ++ commonModules;
|
||||||
[]
|
|
||||||
++ commonModules;
|
|
||||||
};
|
};
|
||||||
servenix = mylib.nixos.mkNixosConfigWithHomeManagerModule {
|
servenix = mylib.nixos.mkNixosConfigWithHomeManagerModule {
|
||||||
inherit system mylib publicKeys;
|
inherit system mylib publicKeys;
|
||||||
|
|||||||
@ -14,11 +14,13 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
headless,
|
headless,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
# This is a HM module.
|
inherit (config.modules) color;
|
||||||
# Because no imports/options/config is defined explicitly, everything is treated as config:
|
in
|
||||||
# { inputs, lib, ... }: { ... } gets turned into { inputs, lib, ... }: { config = { ... }; } implicitly.
|
# This is a HM module.
|
||||||
{
|
# Because no imports/options/config is defined explicitly, everything is treated as config:
|
||||||
|
# { inputs, lib, ... }: { ... } gets turned into { inputs, lib, ... }: { config = { ... }; } implicitly.
|
||||||
|
{
|
||||||
# Every module is a nix expression, specifically a function { inputs, lib, ... }: { ... }.
|
# Every module is a nix expression, specifically a function { inputs, lib, ... }: { ... }.
|
||||||
# Every module (/function) is called with the same arguments as this module.
|
# Every module (/function) is called with the same arguments as this module.
|
||||||
# Arguments with matching names are "plugged in" into the right slots,
|
# Arguments with matching names are "plugged in" into the right slots,
|
||||||
@ -41,8 +43,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
# TODO: Reenable after build-failure on 2025-07-18
|
beets.enable = !headless;
|
||||||
beets.enable = false; # !headless;
|
|
||||||
|
|
||||||
btop.enable = true;
|
btop.enable = true;
|
||||||
|
|
||||||
@ -52,14 +53,28 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
color = {
|
color = {
|
||||||
scheme = "catppuccin-mocha";
|
installPackages = !headless;
|
||||||
font = builtins.head nixosConfig.fonts.fontconfig.defaultFonts.monospace;
|
extraPackages = with pkgs; [
|
||||||
wallpaper = "Windows";
|
papirus-icon-theme
|
||||||
|
bibata-cursors
|
||||||
|
inputs.waifu-cursors.packages.${pkgs.stdenv.hostPlatform.system}.all
|
||||||
|
];
|
||||||
|
|
||||||
|
cursor = "Bibata-Modern-Classic";
|
||||||
|
cursorSize = 24;
|
||||||
|
cursorPackage = pkgs.bibata-cursors;
|
||||||
|
|
||||||
|
iconTheme = "Papirus";
|
||||||
|
iconPackage = pkgs.papirus-icon-theme;
|
||||||
|
|
||||||
|
scheme = "catppuccin-mocha";
|
||||||
accent = "mauve";
|
accent = "mauve";
|
||||||
accentHl = "pink";
|
accentHl = "pink";
|
||||||
accentDim = "lavender";
|
accentDim = "lavender";
|
||||||
accentText = "base";
|
accentText = "base";
|
||||||
|
|
||||||
|
wallpaper = "Windows";
|
||||||
|
font = builtins.head nixosConfig.fonts.fontconfig.defaultFonts.monospace;
|
||||||
};
|
};
|
||||||
|
|
||||||
docs.enable = !headless;
|
docs.enable = !headless;
|
||||||
@ -68,6 +83,7 @@
|
|||||||
enable = !headless;
|
enable = !headless;
|
||||||
wayland = true;
|
wayland = true;
|
||||||
vaapi = true;
|
vaapi = true;
|
||||||
|
textfox = true;
|
||||||
disableTabBar = true;
|
disableTabBar = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -82,13 +98,37 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = !headless;
|
enable = false;
|
||||||
dunst.enable = !config.modules.hyprpanel.enable; # Disable for hyprpanel
|
dunst.enable = !config.modules.hyprpanel.enable; # Disable for hyprpanel
|
||||||
|
bars.enable = false;
|
||||||
|
dynamicCursor.enable = false;
|
||||||
|
trails.enable = true;
|
||||||
|
hyprspace.enable = false; # Always broken
|
||||||
|
hyprpanel.enable = true;
|
||||||
|
caelestia.enable = false;
|
||||||
|
|
||||||
keybindings = {
|
keybindings = {
|
||||||
main-mod = "SUPER";
|
main-mod = "SUPER";
|
||||||
|
|
||||||
bindings = {
|
bindings = lib.mergeAttrsList [
|
||||||
|
# Use Rofi if we don't have caelestia
|
||||||
|
(lib.optionalAttrs (!config.modules.hyprland.caelestia.enable) {
|
||||||
|
"$mainMod, a" = ["exec, rofi -drun-show-actions -show drun"];
|
||||||
|
"$mainMod, c" = ["exec, clipman pick --tool=rofi"];
|
||||||
|
"$mainMod SHIFT, l" = ["exec, loginctl lock-session"];
|
||||||
|
})
|
||||||
|
|
||||||
|
# Caelestia
|
||||||
|
(lib.optionalAttrs (config.modules.hyprland.caelestia.enable) {
|
||||||
|
"$mainMod, a" = ["exec, caelestia shell drawers toggle launcher"];
|
||||||
|
# "$mainMod, c" = ["exec, caelestia clipboard"];
|
||||||
|
"$mainMod SHIFT, l" = ["exec, caelestia shell lock lock"];
|
||||||
|
|
||||||
|
"$mainMod, escape" = ["exec, caelestia shell drawers toggle session"];
|
||||||
|
})
|
||||||
|
|
||||||
|
{
|
||||||
|
# Applications
|
||||||
"$mainMod, t" = ["exec, kitty"];
|
"$mainMod, t" = ["exec, kitty"];
|
||||||
"$mainMod, e" = ["exec, kitty --title=Yazi yazi"];
|
"$mainMod, e" = ["exec, kitty --title=Yazi yazi"];
|
||||||
"$mainMod, n" = ["exec, neovide"];
|
"$mainMod, n" = ["exec, neovide"];
|
||||||
@ -96,25 +136,48 @@
|
|||||||
"$mainMod CTRL, n" = ["exec, kitty --title=Navi navi"];
|
"$mainMod CTRL, n" = ["exec, kitty --title=Navi navi"];
|
||||||
"$mainMod SHIFT, n" = ["exec, neovide ${config.paths.dotfiles}/navi/christoph.cheat"];
|
"$mainMod SHIFT, n" = ["exec, neovide ${config.paths.dotfiles}/navi/christoph.cheat"];
|
||||||
"$mainMod SHIFT, f" = ["exec, neovide ${config.paths.dotfiles}/flake.nix"];
|
"$mainMod SHIFT, f" = ["exec, neovide ${config.paths.dotfiles}/flake.nix"];
|
||||||
|
# "ALT, tab" = ["exec, rofi -show window"];
|
||||||
|
|
||||||
|
# Screenshots
|
||||||
"$mainMod, p" = ["exec, hyprpicker --autocopy --format=hex"];
|
"$mainMod, p" = ["exec, hyprpicker --autocopy --format=hex"];
|
||||||
"$mainMod, s" = ["exec, grim -g \"$(slurp)\""];
|
"$mainMod, s" = ["exec, grim -g \"$(slurp)\""];
|
||||||
"$mainMod CTRL, s" = ["exec, grim -g \"$(slurp)\" - | wl-copy"];
|
|
||||||
"$mainMod SHIFT, s" = ["exec, grim -g \"$(slurp)\" - | wl-copy"];
|
"$mainMod SHIFT, s" = ["exec, grim -g \"$(slurp)\" - | wl-copy"];
|
||||||
|
|
||||||
|
# Audio
|
||||||
", XF86AudioRaiseVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"];
|
", XF86AudioRaiseVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"];
|
||||||
", XF86AudioLowerVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"];
|
", XF86AudioLowerVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"];
|
||||||
", XF86AudioPlay" = ["exec, playerctl play-pause"];
|
", XF86AudioPlay" = ["exec, playerctl play-pause"];
|
||||||
", XF86AudioPrev" = ["exec, playerctl previous"];
|
", XF86AudioPrev" = ["exec, playerctl previous"];
|
||||||
", XF86AudioNext" = ["exec, playerctl next"];
|
", XF86AudioNext" = ["exec, playerctl next"];
|
||||||
|
|
||||||
|
# Brightness
|
||||||
", XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset gamma -10"];
|
", XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset gamma -10"];
|
||||||
", XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset gamma +10"];
|
", XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset gamma +10"];
|
||||||
"$mainMod, XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset temperature 5750"];
|
"$mainMod, XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset temperature 5750"];
|
||||||
"$mainMod, XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset identity"];
|
"$mainMod, XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset identity"];
|
||||||
|
|
||||||
|
"CTRL ALT, f" = let
|
||||||
|
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
|
||||||
|
grep = "${pkgs.gnugrep}/bin/grep";
|
||||||
|
awk = "${pkgs.gawk}/bin/gawk";
|
||||||
|
notify = "${pkgs.libnotify}/bin/notify-send";
|
||||||
|
|
||||||
|
toggleMouseFocus = pkgs.writeScriptBin "hypr-toggle-mouse-focus" ''
|
||||||
|
CURRENT=$(${hyprctl} getoption input:follow_mouse | ${grep} int | ${awk} -F' ' '{print $2}')
|
||||||
|
|
||||||
|
if [[ "$CURRENT" == "1" ]]; then
|
||||||
|
${hyprctl} keyword input:follow_mouse 0
|
||||||
|
${notify} "Disabled Mouse Focus!"
|
||||||
|
else
|
||||||
|
${hyprctl} keyword input:follow_mouse 1
|
||||||
|
${notify} "Enabled Mouse Focus!"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in ["exec, ${toggleMouseFocus}/bin/hypr-toggle-mouse-focus"];
|
||||||
|
|
||||||
# "CTRL ALT, t" = ["exec, bash -c 'systemctl --user restart hyprpanel.service'"];
|
# "CTRL ALT, t" = ["exec, bash -c 'systemctl --user restart hyprpanel.service'"];
|
||||||
};
|
}
|
||||||
|
];
|
||||||
|
|
||||||
ws-bindings = {
|
ws-bindings = {
|
||||||
# "<Workspace>" = "<Key>";
|
# "<Workspace>" = "<Key>";
|
||||||
@ -140,7 +203,8 @@
|
|||||||
|
|
||||||
autostart = {
|
autostart = {
|
||||||
immediate = [
|
immediate = [
|
||||||
"kitty"
|
"kitty --hold fastfetch"
|
||||||
|
"zeal"
|
||||||
"nextcloud --background"
|
"nextcloud --background"
|
||||||
"protonvpn-app"
|
"protonvpn-app"
|
||||||
|
|
||||||
@ -159,13 +223,17 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
windowrules = [];
|
windowrules = [
|
||||||
|
# Fix jetbrains tooltip flicker
|
||||||
|
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, float 1"
|
||||||
|
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, no_initial_focus 1"
|
||||||
|
];
|
||||||
|
|
||||||
workspacerules = {
|
workspacerules = {
|
||||||
"1" = [];
|
"1" = [];
|
||||||
"2" = ["Zotero" "neovide" "code-url-handler"];
|
"2" = ["Zotero" "neovide" "code-url-handler"];
|
||||||
"3" = ["obsidian" "unityhub" "Unity"];
|
"3" = ["obsidian"];
|
||||||
"4" = ["firefox" "Google-chrome" "chromium-browser"];
|
"4" = ["firefox" "Google-chrome" "chromium-browser" "org.qutebrowser.qutebrowser"];
|
||||||
"5" = ["steam"];
|
"5" = ["steam"];
|
||||||
"6" = ["steam_app_(.+)"];
|
"6" = ["steam_app_(.+)"];
|
||||||
"7" = ["signal"];
|
"7" = ["signal"];
|
||||||
@ -175,16 +243,16 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
floating = [
|
floating = [
|
||||||
{
|
{class = "org.kde.polkit-kde-authentication-agent-1";}
|
||||||
class = "org.kde.polkit-kde-authentication-agent-1";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
class = "thunar";
|
class = "thunar";
|
||||||
title = "File Operation Progress";
|
title = "File Operation Progress";
|
||||||
}
|
}
|
||||||
|
{class = "ffplay";}
|
||||||
|
{class = "Unity";}
|
||||||
];
|
];
|
||||||
|
|
||||||
transparent-opacity = "0.8";
|
transparent-opacity = "0.75";
|
||||||
|
|
||||||
transparent = [
|
transparent = [
|
||||||
"kitty"
|
"kitty"
|
||||||
@ -195,6 +263,8 @@
|
|||||||
"Spotify"
|
"Spotify"
|
||||||
"tidal-hifi"
|
"tidal-hifi"
|
||||||
"obsidian"
|
"obsidian"
|
||||||
|
"firefox"
|
||||||
|
"org.qutebrowser.qutebrowser"
|
||||||
"jetbrains-clion"
|
"jetbrains-clion"
|
||||||
"jetbrains-idea"
|
"jetbrains-idea"
|
||||||
"jetbrains-pycharm"
|
"jetbrains-pycharm"
|
||||||
@ -209,7 +279,8 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprpanel.enable = !headless;
|
# hyprpanel.enable = !headless; # Enabled by hyprland module
|
||||||
|
|
||||||
kitty.enable = !headless;
|
kitty.enable = !headless;
|
||||||
lazygit.enable = true;
|
lazygit.enable = true;
|
||||||
mpd.enable = !headless;
|
mpd.enable = !headless;
|
||||||
@ -220,7 +291,9 @@
|
|||||||
neovide = !headless;
|
neovide = !headless;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
niri.enable = !headless;
|
||||||
nnn.enable = false; # Use yazi
|
nnn.enable = false; # Use yazi
|
||||||
|
qutebrowser.enable = !headless;
|
||||||
rmpc.enable = !headless;
|
rmpc.enable = !headless;
|
||||||
|
|
||||||
rofi = {
|
rofi = {
|
||||||
@ -417,7 +490,7 @@
|
|||||||
|
|
||||||
# Hardware/Software info
|
# Hardware/Software info
|
||||||
pciutils # lspci
|
pciutils # lspci
|
||||||
glxinfo # OpenGL info
|
mesa-demos # OpenGL info
|
||||||
wayland-utils # wayland-info
|
wayland-utils # wayland-info
|
||||||
clinfo # OpenCL info
|
clinfo # OpenCL info
|
||||||
vulkan-tools # vulkaninfo
|
vulkan-tools # vulkaninfo
|
||||||
@ -438,7 +511,7 @@
|
|||||||
spotdl
|
spotdl
|
||||||
|
|
||||||
# Document utils
|
# Document utils
|
||||||
poppler_utils # pdfunite
|
poppler-utils # pdfunite
|
||||||
graphviz # generate graphs from code
|
graphviz # generate graphs from code
|
||||||
d2 # generate diagrams from code
|
d2 # generate diagrams from code
|
||||||
plantuml # generate diagrams
|
plantuml # generate diagrams
|
||||||
@ -460,16 +533,14 @@
|
|||||||
cifs-utils # Mount samba shares
|
cifs-utils # Mount samba shares
|
||||||
nfs-utils # Mount NFS shares
|
nfs-utils # Mount NFS shares
|
||||||
sshfs # Mount remote directories via SSH
|
sshfs # Mount remote directories via SSH
|
||||||
protonvpn-cli_2
|
|
||||||
protonmail-bridge # TODO: Enable on startup, email module
|
|
||||||
|
|
||||||
# Run unpatched binaries on NixOS
|
# Run unpatched binaries on NixOS
|
||||||
# Sets NIX_LD_LIBRARY_PATH and NIX_LD variables for nix-ld.
|
# Sets NIX_LD_LIBRARY_PATH and NIX_LD variables for nix-ld.
|
||||||
# Usage: "nix-alien-ld -- <Executable>".
|
# Usage: "nix-alien-ld -- <Executable>".
|
||||||
inputs.nix-alien.packages.${system}.nix-alien
|
inputs.nix-alien.packages.${pkgs.stdenv.hostPlatform.system}.nix-alien
|
||||||
|
|
||||||
# Search nixpkgs
|
# Search nixpkgs
|
||||||
inputs.nps.packages.${system}.default
|
inputs.nps.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
|
|
||||||
# Use NixCommunity binary cache
|
# Use NixCommunity binary cache
|
||||||
cachix
|
cachix
|
||||||
@ -483,6 +554,7 @@
|
|||||||
protonmail-bridge-gui
|
protonmail-bridge-gui
|
||||||
|
|
||||||
# GUI stuff
|
# GUI stuff
|
||||||
|
nautilus # Just in case
|
||||||
signal-desktop
|
signal-desktop
|
||||||
anki
|
anki
|
||||||
font-manager # Previews fonts, but doesn't set them
|
font-manager # Previews fonts, but doesn't set them
|
||||||
@ -491,7 +563,7 @@
|
|||||||
thunderbird # TODO: Email module
|
thunderbird # TODO: Email module
|
||||||
obsidian
|
obsidian
|
||||||
zotero
|
zotero
|
||||||
zeal-qt6 # docs browser
|
zeal # docs browser
|
||||||
helvum
|
helvum
|
||||||
vlc
|
vlc
|
||||||
audacity
|
audacity
|
||||||
@ -500,9 +572,11 @@
|
|||||||
tidal-hifi
|
tidal-hifi
|
||||||
tidal-dl-ng
|
tidal-dl-ng
|
||||||
picard
|
picard
|
||||||
|
handbrake
|
||||||
|
teamspeak6-client
|
||||||
|
|
||||||
# Office
|
# Office
|
||||||
wacomtablet # For xournalpp/krita
|
kdePackages.wacomtablet # For xournalpp/krita
|
||||||
xournalpp # Write with a pen, like old people
|
xournalpp # Write with a pen, like old people
|
||||||
hunspell # I cna't type
|
hunspell # I cna't type
|
||||||
hunspellDicts.en_US
|
hunspellDicts.en_US
|
||||||
@ -560,14 +634,15 @@
|
|||||||
color = {
|
color = {
|
||||||
# https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava
|
# https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava
|
||||||
gradient = 1;
|
gradient = 1;
|
||||||
gradient_color_1 = "'#179299'";
|
|
||||||
gradient_color_2 = "'#04a5e5'";
|
gradient_color_1 = "'${color.hexS.teal}'";
|
||||||
gradient_color_3 = "'#209fb5'";
|
gradient_color_2 = "'${color.hexS.sky}'";
|
||||||
gradient_color_4 = "'#1e66f5'";
|
gradient_color_3 = "'${color.hexS.sapphire}'";
|
||||||
gradient_color_5 = "'#8839ef'";
|
gradient_color_4 = "'${color.hexS.blue}'";
|
||||||
gradient_color_6 = "'#ea76cb'";
|
gradient_color_5 = "'${color.hexS.mauve}'";
|
||||||
gradient_color_7 = "'#e64553'";
|
gradient_color_6 = "'${color.hexS.pink}'";
|
||||||
gradient_color_8 = "'#d20f39'";
|
gradient_color_7 = "'${color.hexS.maroon}'";
|
||||||
|
gradient_color_8 = "'${color.hexS.red}'";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -582,7 +657,156 @@
|
|||||||
enableFishIntegration = config.modules.fish.enable;
|
enableFishIntegration = config.modules.fish.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
fastfetch.enable = true;
|
# TODO: Module
|
||||||
|
fastfetch = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
logo = {
|
||||||
|
padding = {
|
||||||
|
top = 3;
|
||||||
|
left = 1;
|
||||||
|
right = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
display = {
|
||||||
|
separator = "";
|
||||||
|
key.width = 17;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Box Drawing: ╭ ─ ╮ ╰ ╯ │
|
||||||
|
modules = [
|
||||||
|
# Title
|
||||||
|
{
|
||||||
|
type = "title";
|
||||||
|
format = "{#1}╭─── {#}{user-name-colored}";
|
||||||
|
}
|
||||||
|
|
||||||
|
# System Information
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│ {#}System Information";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "os";
|
||||||
|
key = "{#separator}│ {#keys} OS";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "kernel";
|
||||||
|
key = "{#separator}│ {#keys} Kernel";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "bootmgr";
|
||||||
|
key = "{#separator}│ {#keys} BootMGR";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "uptime";
|
||||||
|
key = "{#separator}│ {#keys} Uptime";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "packages";
|
||||||
|
key = "{#separator}│ {#keys} Packages";
|
||||||
|
# format = "{all}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Desktop Environment
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│ {#}Desktop Environment";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "de";
|
||||||
|
key = "{#separator}│ {#keys} DE";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "wm";
|
||||||
|
key = "{#separator}│ {#keys} WM";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "wmtheme";
|
||||||
|
key = "{#separator}│ {#keys} Theme";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "display";
|
||||||
|
key = "{#separator}│ {#keys} Resolution";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "shell";
|
||||||
|
key = "{#separator}│ {#keys} Shell";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "terminalfont";
|
||||||
|
key = "{#separator}│ {#keys} Font";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "icons";
|
||||||
|
key = "{#separator}│ {#keys} Icons";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "cursor";
|
||||||
|
key = "{#separator}│ {#keys} Cursor";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Hardware Information
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│ {#}Hardware Information";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "board";
|
||||||
|
key = "{#separator}│ {#keys} Board";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "cpu";
|
||||||
|
key = "{#separator}│ {#keys} CPU";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "gpu";
|
||||||
|
key = "{#separator}│ {#keys} GPU";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "memory";
|
||||||
|
key = "{#separator}│ {#keys} Memory";
|
||||||
|
}
|
||||||
|
# {
|
||||||
|
# type = "disk";
|
||||||
|
# key = "{#separator}│ {#keys} Disk (/)";
|
||||||
|
# folders = "/";
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# type = "disk";
|
||||||
|
# key = "{#separator}│ {#keys} Disk (~/Games)";
|
||||||
|
# folders = "/home/christoph/Games";
|
||||||
|
# }
|
||||||
|
{
|
||||||
|
type = "btrfs";
|
||||||
|
key = "{#separator}│ {#keys} BTRFS";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Colors Footer
|
||||||
|
{
|
||||||
|
type = "colors";
|
||||||
|
key = "{#separator}╰─── {#1}";
|
||||||
|
keyWidth = 6;
|
||||||
|
symbol = "circle";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
fd.enable = true;
|
fd.enable = true;
|
||||||
|
|
||||||
fzf = {
|
fzf = {
|
||||||
@ -590,6 +814,19 @@
|
|||||||
enableFishIntegration = config.modules.fish.enable;
|
enableFishIntegration = config.modules.fish.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
imv = {
|
||||||
|
enable = !headless;
|
||||||
|
settings = {
|
||||||
|
options = {
|
||||||
|
background = "${color.hex.base}";
|
||||||
|
overlay = true;
|
||||||
|
overlay_font = "${color.font}:12";
|
||||||
|
overlay_background_color = "${color.hex.accent}";
|
||||||
|
overlay_text_color = "${color.hex.accentText}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
keychain = {
|
keychain = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = config.modules.fish.enable;
|
enableFishIntegration = config.modules.fish.enable;
|
||||||
@ -598,7 +835,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
mpv = {
|
mpv = {
|
||||||
enable = false;
|
enable = !headless;
|
||||||
config = {
|
config = {
|
||||||
gpu-context = "wayland";
|
gpu-context = "wayland";
|
||||||
};
|
};
|
||||||
@ -617,7 +854,7 @@
|
|||||||
nushell.enable = false;
|
nushell.enable = false;
|
||||||
|
|
||||||
# spicetify = let
|
# spicetify = let
|
||||||
# spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
# spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||||
# in {
|
# in {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
#
|
#
|
||||||
@ -641,9 +878,21 @@
|
|||||||
|
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
compression = true;
|
enableDefaultConfig = false;
|
||||||
|
|
||||||
matchBlocks = {
|
matchBlocks = {
|
||||||
|
"*" = {
|
||||||
|
forwardAgent = false;
|
||||||
|
addKeysToAgent = "no";
|
||||||
|
compression = true;
|
||||||
|
serverAliveInterval = 0;
|
||||||
|
serverAliveCountMax = 3;
|
||||||
|
hashKnownHosts = false;
|
||||||
|
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||||
|
controlMaster = "no";
|
||||||
|
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||||
|
controlPersist = "no";
|
||||||
|
};
|
||||||
"nixinator" = {
|
"nixinator" = {
|
||||||
user = "christoph";
|
user = "christoph";
|
||||||
hostname = "192.168.86.50";
|
hostname = "192.168.86.50";
|
||||||
@ -771,24 +1020,25 @@
|
|||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
user = {
|
user = {
|
||||||
tmpfiles.rules = lib.mkMerge [
|
# TODO: This has been deprecated and replaced with a bad alternative in a stupid HM update
|
||||||
[]
|
# tmpfiles.rules = lib.mkMerge [
|
||||||
(lib.mkIf (mylib.modules.contains
|
# []
|
||||||
config.services.flatpak.packages
|
# (lib.mkIf (mylib.modules.contains
|
||||||
"com.discordapp.Discord") [
|
# config.services.flatpak.packages
|
||||||
# Fix Discord rich presence for Flatpak
|
# "com.discordapp.Discord") [
|
||||||
"L %t/discord-ipc-0 - - - - app/com.discordapp.Discord/discord-ipc-0"
|
# # Fix Discord rich presence for Flatpak
|
||||||
])
|
# "L %t/discord-ipc-0 - - - - app/com.discordapp.Discord/discord-ipc-0"
|
||||||
(lib.mkIf (mylib.modules.contains
|
# ])
|
||||||
config.services.flatpak.packages
|
# (lib.mkIf (mylib.modules.contains
|
||||||
"com.discordapp.DiscordCanary") [
|
# config.services.flatpak.packages
|
||||||
# Fix Discord rich presence for Flatpak
|
# "com.discordapp.DiscordCanary") [
|
||||||
"L %t/discord-ipc-0 - - - - app/com.discordapp.DiscordCanary/discord-ipc-0"
|
# # Fix Discord rich presence for Flatpak
|
||||||
])
|
# "L %t/discord-ipc-0 - - - - app/com.discordapp.DiscordCanary/discord-ipc-0"
|
||||||
];
|
# ])
|
||||||
|
# ];
|
||||||
|
|
||||||
# Nicely reload system units when changing configs
|
# Nicely reload system units when changing configs
|
||||||
startServices = "sd-switch";
|
startServices = "sd-switch";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,20 +21,23 @@
|
|||||||
fcitx.enable = true;
|
fcitx.enable = true;
|
||||||
|
|
||||||
hyprland = {
|
hyprland = {
|
||||||
kb-layout = "us";
|
keyboard = {
|
||||||
kb-variant = "altgr-intl";
|
layout = "us";
|
||||||
|
variant = "altgr-intl";
|
||||||
|
option = "nodeadkeys";
|
||||||
|
};
|
||||||
|
|
||||||
monitors = {
|
monitors = {
|
||||||
"HDMI-A-1" = {
|
"DP-1" = {
|
||||||
width = 2560;
|
width = 3440;
|
||||||
height = 1440;
|
height = 1440;
|
||||||
rate = 144;
|
rate = 165;
|
||||||
x = 1920;
|
x = 1920;
|
||||||
y = 0;
|
y = 0;
|
||||||
scale = 1;
|
scale = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
"DP-1" = {
|
"DP-2" = {
|
||||||
width = 1920;
|
width = 1920;
|
||||||
height = 1080;
|
height = 1080;
|
||||||
rate = 60;
|
rate = 60;
|
||||||
@ -45,8 +48,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
workspaces = {
|
workspaces = {
|
||||||
"HDMI-A-1" = [1 2 3 4 5 6 7 8 9];
|
"DP-1" = [1 2 3 4 5 6 7 8 9];
|
||||||
"DP-1" = [10];
|
"DP-2" = [10];
|
||||||
};
|
};
|
||||||
|
|
||||||
autostart = {
|
autostart = {
|
||||||
@ -62,7 +65,7 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
waybar.monitor = "HDMI-A-1";
|
waybar.monitor = "DP-1";
|
||||||
};
|
};
|
||||||
|
|
||||||
home = let
|
home = let
|
||||||
@ -88,8 +91,7 @@
|
|||||||
# Add any extra libraries you want accessible to Rider here
|
# Add any extra libraries you want accessible to Rider here
|
||||||
];
|
];
|
||||||
|
|
||||||
# TODO: Broken, jetbrains.jdk doesn't build (see nixpkgs #425328)
|
rider-unity = pkgs.jetbrains.rider.overrideAttrs (attrs: {
|
||||||
unity-rider = pkgs.jetbrains.rider.overrideAttrs (attrs: {
|
|
||||||
postInstall =
|
postInstall =
|
||||||
''
|
''
|
||||||
# Wrap rider with extra tools and libraries
|
# Wrap rider with extra tools and libraries
|
||||||
@ -112,49 +114,55 @@
|
|||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# quartus-prime-lite # Intel FPGA design software
|
# Intel FPGA design software
|
||||||
|
# quartus-prime-lite
|
||||||
|
|
||||||
# Don't want heavy IDE's on the laptop
|
|
||||||
# jetbrains.clion
|
# jetbrains.clion
|
||||||
# jetbrains.rust-rover
|
# jetbrains.rust-rover
|
||||||
# jetbrains.pycharm-professional
|
# jetbrains.pycharm-professional
|
||||||
# jetbrains.idea-ultimate
|
# jetbrains.idea-ultimate
|
||||||
# jetbrains.webstorm
|
# jetbrains.webstorm
|
||||||
|
# jetbrains.rider
|
||||||
|
|
||||||
# Unity Stuff
|
# Unity Stuff
|
||||||
# TODO: Unity module
|
# TODO: Unity module
|
||||||
# unityhub # TODO: Wait for https://nixpk.gs/pr-tracker.html?pr=422785
|
# unityhub
|
||||||
# unity-rider
|
# rider-unity
|
||||||
# dotnetCore
|
# dotnetCore
|
||||||
# mono
|
# mono
|
||||||
|
# steam-run-free # nix-alien doesn't seem to run unity apps, this does...
|
||||||
|
|
||||||
blender
|
(blender.override {cudaSupport = true;})
|
||||||
godot_4
|
godot_4
|
||||||
obs-studio
|
(obs-studio.override {cudaSupport = true;})
|
||||||
kdePackages.kdenlive
|
kdePackages.kdenlive
|
||||||
krita
|
krita
|
||||||
makemkv
|
makemkv
|
||||||
|
lrcget
|
||||||
msty
|
msty
|
||||||
|
# jellyfin-media-player # CVE, can't install
|
||||||
|
jellyfin-mpv-shim
|
||||||
|
|
||||||
steam-devices-udev-rules
|
steam-devices-udev-rules
|
||||||
];
|
];
|
||||||
|
|
||||||
file = lib.mkMerge [
|
file = lib.mkMerge [
|
||||||
{
|
# {
|
||||||
# ".local/share/applications/jetbrains-rider.desktop".source = let
|
# ".local/share/applications/jetbrains-rider.desktop".source = let
|
||||||
# desktopFile = pkgs.makeDesktopItem {
|
# desktopFile = pkgs.makeDesktopItem {
|
||||||
# name = "jetbrains-rider";
|
# name = "jetbrains-rider";
|
||||||
# desktopName = "Rider";
|
# desktopName = "Rider";
|
||||||
# exec = "\"${unity-rider}/bin/rider\"";
|
# exec = "\"${rider-unity}/bin/rider\"";
|
||||||
# icon = "rider";
|
# icon = "rider";
|
||||||
# type = "Application";
|
# type = "Application";
|
||||||
# # Don't show desktop icon in search or run launcher
|
# # Don't show desktop icon in search or run launcher
|
||||||
# extraConfig.NoDisplay = "true";
|
# extraConfig.NoDisplay = "true";
|
||||||
# };
|
# };
|
||||||
# in "${desktopFile}/share/applications/jetbrains-rider.desktop";
|
# in "${desktopFile}/share/applications/jetbrains-rider.desktop";
|
||||||
|
#
|
||||||
".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source = ../../../config/mangohud/MangoHud.conf;
|
# ".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source =
|
||||||
}
|
# ../../../config/mangohud/MangoHud.conf;
|
||||||
|
# }
|
||||||
(lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) {
|
(lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) {
|
||||||
".MakeMKV/settings.conf".source =
|
".MakeMKV/settings.conf".source =
|
||||||
config.lib.file.mkOutOfStoreSymlink
|
config.lib.file.mkOutOfStoreSymlink
|
||||||
@ -199,21 +207,28 @@
|
|||||||
|
|
||||||
flatpak = {
|
flatpak = {
|
||||||
packages = [
|
packages = [
|
||||||
"com.valvesoftware.Steam"
|
# "com.valvesoftware.Steam"
|
||||||
"com.valvesoftware.Steam.Utility.steamtinkerlaunch"
|
# "com.valvesoftware.Steam.Utility.steamtinkerlaunch"
|
||||||
"net.davidotek.pupgui2"
|
# "net.davidotek.pupgui2"
|
||||||
|
# "org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/24.08"
|
||||||
"org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/24.08"
|
# "org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
|
||||||
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
|
|
||||||
|
|
||||||
"org.prismlauncher.PrismLauncher"
|
"org.prismlauncher.PrismLauncher"
|
||||||
"com.usebottles.bottles"
|
"com.usebottles.bottles"
|
||||||
"io.github.lawstorant.boxflat"
|
# "io.github.lawstorant.boxflat"
|
||||||
|
|
||||||
"com.unity.UnityHub"
|
# "com.unity.UnityHub"
|
||||||
];
|
];
|
||||||
|
|
||||||
overrides = {
|
overrides = {
|
||||||
|
"org.prismlauncher.PrismLauncher".Context = {
|
||||||
|
filesystems = [
|
||||||
|
"${config.home.homeDirectory}/Downloads"
|
||||||
|
|
||||||
|
"/tmp" # To allow temporary world folder creation for datapack installation
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
"com.valvesoftware.Steam".Context = {
|
"com.valvesoftware.Steam".Context = {
|
||||||
filesystems = [
|
filesystems = [
|
||||||
"${config.home.homeDirectory}/Games"
|
"${config.home.homeDirectory}/Games"
|
||||||
|
|||||||
@ -7,10 +7,11 @@
|
|||||||
config = {
|
config = {
|
||||||
modules = {
|
modules = {
|
||||||
hyprland = {
|
hyprland = {
|
||||||
# kb-layout = "de";
|
keyboard = {
|
||||||
# kb-variant = "nodeadkeys";
|
layout = "us";
|
||||||
kb-layout = "us";
|
variant = "altgr-intl";
|
||||||
kb-variant = "altgr-intl";
|
option = "nodeadkeys";
|
||||||
|
};
|
||||||
|
|
||||||
monitors = {
|
monitors = {
|
||||||
"eDP-1" = {
|
"eDP-1" = {
|
||||||
|
|||||||
@ -17,20 +17,20 @@ in {
|
|||||||
|
|
||||||
# AGS libs go here
|
# AGS libs go here
|
||||||
extraPackages = [
|
extraPackages = [
|
||||||
inputs.ags.packages.${pkgs.system}.apps
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.apps
|
||||||
inputs.ags.packages.${pkgs.system}.auth
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.auth
|
||||||
inputs.ags.packages.${pkgs.system}.battery
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.battery
|
||||||
inputs.ags.packages.${pkgs.system}.bluetooth
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.bluetooth
|
||||||
inputs.ags.packages.${pkgs.system}.cava
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.cava
|
||||||
# inputs.ags.packages.${pkgs.system}.greet
|
# inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.greet
|
||||||
inputs.ags.packages.${pkgs.system}.hyprland
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.hyprland
|
||||||
inputs.ags.packages.${pkgs.system}.mpris
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.mpris
|
||||||
inputs.ags.packages.${pkgs.system}.network
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.network
|
||||||
inputs.ags.packages.${pkgs.system}.notifd
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.notifd
|
||||||
# inputs.ags.packages.${pkgs.system}.powerprofiles
|
# inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.powerprofiles
|
||||||
# inputs.ags.packages.${pkgs.system}.river
|
# inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.river
|
||||||
inputs.ags.packages.${pkgs.system}.tray
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.tray
|
||||||
inputs.ags.packages.${pkgs.system}.wireplumber
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.wireplumber
|
||||||
];
|
];
|
||||||
|
|
||||||
# This should symlink but doesn't, it copies the files :/
|
# This should symlink but doesn't, it copies the files :/
|
||||||
@ -40,7 +40,7 @@ in {
|
|||||||
# The ags module doesn't expose the "astal" cli tool or extraPackages
|
# The ags module doesn't expose the "astal" cli tool or extraPackages
|
||||||
home.packages =
|
home.packages =
|
||||||
[
|
[
|
||||||
inputs.ags.packages.${pkgs.system}.io
|
inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.io
|
||||||
]
|
]
|
||||||
++ config.programs.ags.extraPackages;
|
++ config.programs.ags.extraPackages;
|
||||||
|
|
||||||
|
|||||||
@ -81,7 +81,7 @@ with mylib.modules;
|
|||||||
cp -f ${pkgs.lxgw-wenkai}/share/fonts/truetype/LXGWWenKaiMono-Regular.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
cp -f ${pkgs.lxgw-wenkai}/share/fonts/truetype/LXGWWenKaiMono-Regular.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||||
cp -f ${pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}}/share/fonts/truetype/NerdFonts/JetBrainsMonoNerdFontMono-Regular.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
cp -f ${pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}}/share/fonts/truetype/NerdFonts/JetBrainsMonoNerdFontMono-Regular.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||||
cp -f ${pkgs.noto-fonts}/share/fonts/noto/NotoSans[wdth,wght].ttf ${config.home.homeDirectory}/.local/share/fonts/
|
cp -f ${pkgs.noto-fonts}/share/fonts/noto/NotoSans[wdth,wght].ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||||
cp -f ${pkgs.noto-fonts-emoji}/share/fonts/noto/NotoColorEmoji.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
cp -f ${pkgs.noto-fonts-color-emoji}/share/fonts/noto/NotoColorEmoji.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
(mkElse cfg.fontFix {
|
(mkElse cfg.fontFix {
|
||||||
|
|||||||
@ -33,7 +33,7 @@ in {
|
|||||||
python310Packages.pillow
|
python310Packages.pillow
|
||||||
ffmpegthumbnailer
|
ffmpegthumbnailer
|
||||||
imagemagick
|
imagemagick
|
||||||
poppler_utils
|
poppler-utils
|
||||||
])
|
])
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,8 @@ in {
|
|||||||
"edit" # edit metadata in text editor
|
"edit" # edit metadata in text editor
|
||||||
"fetchart" # pickup local cover art or search online
|
"fetchart" # pickup local cover art or search online
|
||||||
"fish" # beet fish generates ~/.config/fish/completions file
|
"fish" # beet fish generates ~/.config/fish/completions file
|
||||||
"lyrics" # fetch song lyrics
|
# "lyrics" # fetch song lyrics
|
||||||
|
"musicbrainz" # auto tagger data source
|
||||||
"replaygain" # write replaygain tags for automatic loudness adjustments
|
"replaygain" # write replaygain tags for automatic loudness adjustments
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -59,10 +60,10 @@ in {
|
|||||||
sources = "filesystem coverart itunes amazon albumart"; # sources are queried in this order
|
sources = "filesystem coverart itunes amazon albumart"; # sources are queried in this order
|
||||||
};
|
};
|
||||||
|
|
||||||
lyrics = {
|
# lyrics = {
|
||||||
auto = "yes"; # only embeds lyrics into metadata, needed for jellyfin but useless for rmpc
|
# auto = "yes"; # only embeds lyrics into metadata, needed for jellyfin but useless for rmpc
|
||||||
synced = "yes"; # prefer synced lyrics if provided
|
# synced = "yes"; # prefer synced lyrics if provided
|
||||||
};
|
# };
|
||||||
|
|
||||||
replaygain = {
|
replaygain = {
|
||||||
auto = "yes"; # analyze on import automatically
|
auto = "yes"; # analyze on import automatically
|
||||||
|
|||||||
@ -34,13 +34,13 @@ in {
|
|||||||
theme[hi_fg]=${color.hexS.accent}
|
theme[hi_fg]=${color.hexS.accent}
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
theme[selected_bg]=${color.hexS.surface1}
|
theme[selected_bg]=${color.hexS.accentDim}
|
||||||
|
|
||||||
# Foreground color of selected item in processes box
|
# Foreground color of selected item in processes box
|
||||||
theme[selected_fg]=${color.hexS.accent}
|
theme[selected_fg]=${color.hexS.accentText}
|
||||||
|
|
||||||
# Color of inactive/disabled text
|
# Color of inactive/disabled text
|
||||||
theme[inactive_fg]=${color.hexS.overlay1}
|
theme[inactive_fg]=${color.hexS.overlay0}
|
||||||
|
|
||||||
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
||||||
theme[graph_text]=${color.hexS.overlay0}
|
theme[graph_text]=${color.hexS.overlay0}
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
}: let
|
}: let
|
||||||
inherit (config.modules) color;
|
inherit (config.modules) color;
|
||||||
in {
|
in {
|
||||||
options.modules.color = import ./options.nix {inherit lib mylib;};
|
options.modules.color = import ./options.nix {inherit lib mylib pkgs;};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.packages = let
|
home.packages = let
|
||||||
@ -50,10 +50,13 @@ in {
|
|||||||
|> builtins.concatStringsSep "\n")
|
|> builtins.concatStringsSep "\n")
|
||||||
''echo ${lib.concatStrings (lib.replicate 20 "=")}''
|
''echo ${lib.concatStrings (lib.replicate 20 "=")}''
|
||||||
]);
|
]);
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
applyColors
|
applyColors
|
||||||
printNixColors
|
printNixColors
|
||||||
];
|
]
|
||||||
|
++ (lib.optionals color.installPackages [color.iconPackage color.cursorPackage])
|
||||||
|
++ (lib.optionals color.installPackages color.extraPackages);
|
||||||
|
|
||||||
# This module sets its own options to the values specified in a colorscheme file.
|
# This module sets its own options to the values specified in a colorscheme file.
|
||||||
modules.color = let
|
modules.color = let
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
colorKeys = [
|
colorKeys = [
|
||||||
@ -50,6 +51,54 @@ in rec {
|
|||||||
default = "JetBrainsMono Nerd Font Mono";
|
default = "JetBrainsMono Nerd Font Mono";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cursor = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "The cursor to use";
|
||||||
|
example = "Bibata-Modern-Classic";
|
||||||
|
default = "Bibata-Modern-Classic";
|
||||||
|
};
|
||||||
|
|
||||||
|
cursorSize = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
description = "The cursor size";
|
||||||
|
example = 24;
|
||||||
|
default = 24;
|
||||||
|
};
|
||||||
|
|
||||||
|
cursorPackage = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
description = "The cursor package";
|
||||||
|
example = pkgs.bibata-cursors;
|
||||||
|
default = pkgs.bibata-cursors;
|
||||||
|
};
|
||||||
|
|
||||||
|
iconTheme = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "The icon theme to use";
|
||||||
|
example = "Papirus";
|
||||||
|
default = "Papirus";
|
||||||
|
};
|
||||||
|
|
||||||
|
iconPackage = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
description = "The icon theme package";
|
||||||
|
example = pkgs.papirus-icon-theme;
|
||||||
|
default = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraPackages = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.package;
|
||||||
|
description = "Extra packages to install";
|
||||||
|
example = ''
|
||||||
|
[
|
||||||
|
pkgs.bibata-cursors
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
installPackages = lib.mkEnableOption "Install cursor and icon themes";
|
||||||
|
|
||||||
# This option is set automatically
|
# This option is set automatically
|
||||||
wallpapers = let
|
wallpapers = let
|
||||||
# Collect all the available wallpapers.
|
# Collect all the available wallpapers.
|
||||||
@ -72,6 +121,7 @@ in rec {
|
|||||||
in
|
in
|
||||||
lib.mkOption {
|
lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
|
readOnly = true;
|
||||||
description = "The available wallpapers";
|
description = "The available wallpapers";
|
||||||
default = wallpapers;
|
default = wallpapers;
|
||||||
};
|
};
|
||||||
@ -117,21 +167,25 @@ in rec {
|
|||||||
|
|
||||||
hex = lib.mkOption {
|
hex = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
|
readOnly = true;
|
||||||
description = "Colors in \"RRGGBB\" hexadecimal format";
|
description = "Colors in \"RRGGBB\" hexadecimal format";
|
||||||
};
|
};
|
||||||
|
|
||||||
hexS = lib.mkOption {
|
hexS = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
|
readOnly = true;
|
||||||
description = "Colors in \"#RRGGBB\" hexadecimal format";
|
description = "Colors in \"#RRGGBB\" hexadecimal format";
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb = lib.mkOption {
|
rgb = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
|
readOnly = true;
|
||||||
description = "Colors in [RR GG BB] decimal format";
|
description = "Colors in [RR GG BB] decimal format";
|
||||||
};
|
};
|
||||||
|
|
||||||
rgbS = lib.mkOption {
|
rgbS = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
|
readOnly = true;
|
||||||
description = "Colors in \"RR,GG,BB\" decimal format";
|
description = "Colors in \"RR,GG,BB\" decimal format";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,8 +18,10 @@
|
|||||||
./lazygit
|
./lazygit
|
||||||
./mpd
|
./mpd
|
||||||
./neovim
|
./neovim
|
||||||
|
./niri
|
||||||
./nnn
|
./nnn
|
||||||
./paths
|
./paths
|
||||||
|
./qutebrowser
|
||||||
./rmpc
|
./rmpc
|
||||||
./rofi
|
./rofi
|
||||||
./waybar
|
./waybar
|
||||||
@ -28,7 +30,15 @@
|
|||||||
|
|
||||||
# HM modules imported from the flake inputs
|
# HM modules imported from the flake inputs
|
||||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeModules.nixvim
|
||||||
|
inputs.textfox.homeManagerModules.default
|
||||||
|
# inputs.niri.homeModules.niri # Imported by system module
|
||||||
|
inputs.noctalia.homeModules.default
|
||||||
|
inputs.caelestia.homeManagerModules.default
|
||||||
|
inputs.dankMaterialShell.homeModules.dankMaterialShell.default
|
||||||
|
inputs.dankMaterialShell.homeModules.dankMaterialShell.niri
|
||||||
|
|
||||||
|
# NOTE: Do NOT use this, use the system module (the HM module has to rely on fuse)
|
||||||
# inputs.impermanence.homeManagerModules.impermanence
|
# inputs.impermanence.homeManagerModules.impermanence
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,8 +12,11 @@ in {
|
|||||||
config = lib.mkIf docs.enable {
|
config = lib.mkIf docs.enable {
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
texliveFull
|
|
||||||
inkscape
|
inkscape
|
||||||
|
|
||||||
|
texliveFull # TODO: LaTeX packages
|
||||||
|
|
||||||
|
typst # TODO: Typst packages
|
||||||
];
|
];
|
||||||
|
|
||||||
file = {
|
file = {
|
||||||
|
|||||||
@ -22,8 +22,8 @@ in {
|
|||||||
# fcitx5-configtool
|
# fcitx5-configtool
|
||||||
catppuccin-fcitx5
|
catppuccin-fcitx5
|
||||||
|
|
||||||
libsForQt5.fcitx5-qt # QT5
|
kdePackages.fcitx5-qt # QT5
|
||||||
libsForQt5.fcitx5-chinese-addons
|
kdePackages.fcitx5-chinese-addons
|
||||||
|
|
||||||
qt6Packages.fcitx5-qt # QT6
|
qt6Packages.fcitx5-qt # QT6
|
||||||
qt6Packages.fcitx5-chinese-addons
|
qt6Packages.fcitx5-chinese-addons
|
||||||
|
|||||||
@ -78,6 +78,7 @@ in [
|
|||||||
(mkBm "DeepSeek Chat" "https://chat.deepseek.com/")
|
(mkBm "DeepSeek Chat" "https://chat.deepseek.com/")
|
||||||
(mkBm "Claude Chat" "https://claude.ai/new")
|
(mkBm "Claude Chat" "https://claude.ai/new")
|
||||||
(mkBm "ChatGPT" "https://chatgpt.com/")
|
(mkBm "ChatGPT" "https://chatgpt.com/")
|
||||||
|
(mkBm "DeepWiki" "https://deepwiki.com/")
|
||||||
"separator"
|
"separator"
|
||||||
(mkBm "Mistral API" "https://console.mistral.ai/usage")
|
(mkBm "Mistral API" "https://console.mistral.ai/usage")
|
||||||
(mkBm "DeepSeek API" "https://platform.deepseek.com/usage")
|
(mkBm "DeepSeek API" "https://platform.deepseek.com/usage")
|
||||||
|
|||||||
@ -46,6 +46,7 @@
|
|||||||
"downloads-button",
|
"downloads-button",
|
||||||
"urlbar-container",
|
"urlbar-container",
|
||||||
"save-to-pocket-button",
|
"save-to-pocket-button",
|
||||||
|
"_3c078156-979c-498b-8990-85f7987dd929_-browser-action",
|
||||||
"fxa-toolbar-menu-button",
|
"fxa-toolbar-menu-button",
|
||||||
"treestyletab_piro_sakura_ne_jp-browser-action",
|
"treestyletab_piro_sakura_ne_jp-browser-action",
|
||||||
"ublock0_raymondhill_net-browser-action",
|
"ublock0_raymondhill_net-browser-action",
|
||||||
@ -128,7 +129,8 @@
|
|||||||
"_cb31ec5d-c49a-4e5a-b240-16c767444f62_-browser-action",
|
"_cb31ec5d-c49a-4e5a-b240-16c767444f62_-browser-action",
|
||||||
"screenshot-button",
|
"screenshot-button",
|
||||||
"_bbb880ce-43c9-47ae-b746-c3e0096c5b76_-browser-action",
|
"_bbb880ce-43c9-47ae-b746-c3e0096c5b76_-browser-action",
|
||||||
"jid1-qofqdk4qzufgwq_jetpack-browser-action"
|
"jid1-qofqdk4qzufgwq_jetpack-browser-action",
|
||||||
|
"_3c078156-979c-498b-8990-85f7987dd929_-browser-action"
|
||||||
],
|
],
|
||||||
"dirtyAreaCache": [
|
"dirtyAreaCache": [
|
||||||
"nav-bar",
|
"nav-bar",
|
||||||
@ -140,5 +142,5 @@
|
|||||||
"vertical-tabs"
|
"vertical-tabs"
|
||||||
],
|
],
|
||||||
"currentVersion": 22,
|
"currentVersion": 22,
|
||||||
"newElementCount": 8
|
"newElementCount": 9
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,11 +6,54 @@
|
|||||||
hostname,
|
hostname,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (config.modules) firefox;
|
inherit (config.modules) firefox color;
|
||||||
in {
|
in {
|
||||||
options.modules.firefox = import ./options.nix {inherit lib mylib;};
|
options.modules.firefox = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = lib.mkIf firefox.enable {
|
config = lib.mkIf firefox.enable {
|
||||||
|
textfox = {
|
||||||
|
enable = firefox.textfox;
|
||||||
|
useLegacyExtensions = false;
|
||||||
|
profile = "default";
|
||||||
|
|
||||||
|
config = {
|
||||||
|
background = {
|
||||||
|
color = color.hexS.base;
|
||||||
|
};
|
||||||
|
|
||||||
|
border = {
|
||||||
|
color = color.hexS.overlay0;
|
||||||
|
width = "2px";
|
||||||
|
transition = "1.0s ease";
|
||||||
|
radius = "3px";
|
||||||
|
};
|
||||||
|
|
||||||
|
displayWindowControls = true;
|
||||||
|
displayNavButtons = true;
|
||||||
|
displayUrlbarIcons = true;
|
||||||
|
displaySidebarTools = false;
|
||||||
|
displayTitles = false;
|
||||||
|
|
||||||
|
icons = {
|
||||||
|
toolbar.extensions.enable = true;
|
||||||
|
context.extensions.enable = true;
|
||||||
|
context.firefox.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
tabs = {
|
||||||
|
horizontal.enable = !firefox.disableTabBar;
|
||||||
|
vertical.enable = firefox.disableTabBar;
|
||||||
|
# vertical.margin = "1rem";
|
||||||
|
};
|
||||||
|
|
||||||
|
font = {
|
||||||
|
family = color.font;
|
||||||
|
size = "14px";
|
||||||
|
accent = color.hexS.accent;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [vdhcoapp];
|
home.packages = with pkgs; [vdhcoapp];
|
||||||
|
|
||||||
home.sessionVariables = lib.mkMerge [
|
home.sessionVariables = lib.mkMerge [
|
||||||
@ -154,6 +197,27 @@ in {
|
|||||||
definedAliases = ["@nw"];
|
definedAliases = ["@nw"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
arch-wiki = {
|
||||||
|
name = "Arch Wiki";
|
||||||
|
urls = [{template = "https://wiki.archlinux.org/?search={searchTerms}";}];
|
||||||
|
iconMapObj."16" = "https://wiki.archlinux.org/favicon.ico";
|
||||||
|
definedAliases = ["@aw"];
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs-issues = {
|
||||||
|
name = "Nixpkgs Issues";
|
||||||
|
urls = [{template = "https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue%20{searchTerms}";}];
|
||||||
|
iconMapObj."16" = "https://github.com/favicon.ico";
|
||||||
|
definedAliases = ["@i"];
|
||||||
|
};
|
||||||
|
|
||||||
|
github = {
|
||||||
|
name = "GitHub";
|
||||||
|
urls = [{template = "https://github.com/search?q={searchTerms}&type=repositories";}];
|
||||||
|
iconMapObj."16" = "https://github.com/favicon.ico";
|
||||||
|
definedAliases = ["@gh"];
|
||||||
|
};
|
||||||
|
|
||||||
google.metaData.alias = "@g";
|
google.metaData.alias = "@g";
|
||||||
|
|
||||||
# Hide bullshit
|
# Hide bullshit
|
||||||
@ -178,10 +242,11 @@ in {
|
|||||||
catppuccin-mocha-mauve
|
catppuccin-mocha-mauve
|
||||||
# catppuccin-web-file-icons
|
# catppuccin-web-file-icons
|
||||||
clearurls
|
clearurls
|
||||||
cookie-autodelete
|
# cookie-autodelete
|
||||||
|
dark-background-light-text
|
||||||
display-_anchors # Easier linking to specific website parts
|
display-_anchors # Easier linking to specific website parts
|
||||||
don-t-fuck-with-paste
|
don-t-fuck-with-paste
|
||||||
enhancer-for-youtube
|
# enhancer-for-youtube # Discontinued, use tweaks-for-youtube
|
||||||
fastforwardteam # skip URL shorteners
|
fastforwardteam # skip URL shorteners
|
||||||
# faststream # replace video players with a faster one
|
# faststream # replace video players with a faster one
|
||||||
frankerfacez # twitch emotes
|
frankerfacez # twitch emotes
|
||||||
@ -189,11 +254,11 @@ in {
|
|||||||
keepassxc-browser
|
keepassxc-browser
|
||||||
localcdn
|
localcdn
|
||||||
lovely-forks # Display notable forks on GitHub repos
|
lovely-forks # Display notable forks on GitHub repos
|
||||||
move-unloaded-tabs-for-tst # move tst tabs without them becoming active
|
# move-unloaded-tabs-for-tst # move tst tabs without them becoming active
|
||||||
native-mathml # native MathML instead of MathJax/MediaWiki
|
native-mathml # native MathML instead of MathJax/MediaWiki
|
||||||
no-pdf-download # open pdf in browser without downloading
|
no-pdf-download # open pdf in browser without downloading
|
||||||
open-in-freedium
|
open-in-freedium
|
||||||
# plasma-integration # TODO: Only when Plasma is used
|
# plasma-integration
|
||||||
privacy-badger
|
privacy-badger
|
||||||
privacy-settings
|
privacy-settings
|
||||||
protondb-for-steam
|
protondb-for-steam
|
||||||
@ -209,11 +274,12 @@ in {
|
|||||||
# sourcegraph # Code intelligence for GitHub/GitLap for 20+ languages
|
# sourcegraph # Code intelligence for GitHub/GitLap for 20+ languages
|
||||||
sponsorblock
|
sponsorblock
|
||||||
steam-database
|
steam-database
|
||||||
tab-session-manager
|
# tab-session-manager
|
||||||
# to-deepl
|
# to-deepl
|
||||||
transparent-standalone-image
|
transparent-standalone-image
|
||||||
tree-style-tab
|
# tree-style-tab
|
||||||
tst-fade-old-tabs
|
# tst-fade-old-tabs
|
||||||
|
tweaks-for-youtube
|
||||||
twitch-auto-points
|
twitch-auto-points
|
||||||
ublacklist
|
ublacklist
|
||||||
ublock-origin
|
ublock-origin
|
||||||
|
|||||||
@ -9,4 +9,5 @@ with mylib.modules; {
|
|||||||
wayland = mkBoolOption false "Enable firefox wayland support";
|
wayland = mkBoolOption false "Enable firefox wayland support";
|
||||||
vaapi = mkBoolOption false "Enable firefox vaapi support";
|
vaapi = mkBoolOption false "Enable firefox vaapi support";
|
||||||
disableTabBar = mkBoolOption false "Disable the firefox tab bar (for TST)";
|
disableTabBar = mkBoolOption false "Disable the firefox tab bar (for TST)";
|
||||||
|
textfox = mkBoolOption false "Enable the TextFox theme";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -201,10 +201,10 @@ in {
|
|||||||
settings = {
|
settings = {
|
||||||
# Other config here
|
# Other config here
|
||||||
format = "$all"; # Remove this line to disable the default prompt format
|
format = "$all"; # Remove this line to disable the default prompt format
|
||||||
palette = "nixos-palette";
|
palette = "system-theme";
|
||||||
|
|
||||||
# https://github.com/catppuccin/starship/blob/main/themes/mocha.toml
|
# https://github.com/catppuccin/starship/blob/main/themes/mocha.toml
|
||||||
palettes."nixos-palette" = {
|
palettes."system-theme" = {
|
||||||
rosewater = color.hexS.rosewater;
|
rosewater = color.hexS.rosewater;
|
||||||
flamingo = color.hexS.flamingo;
|
flamingo = color.hexS.flamingo;
|
||||||
pink = color.hexS.accentHl;
|
pink = color.hexS.accentHl;
|
||||||
|
|||||||
@ -11,30 +11,29 @@ in {
|
|||||||
options.modules.git = import ./options.nix {inherit lib mylib;};
|
options.modules.git = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = lib.mkIf git.enable {
|
config = lib.mkIf git.enable {
|
||||||
programs.git = {
|
programs.diff-so-fancy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
enableGitIntegration = true;
|
||||||
|
|
||||||
# userEmail = "christoph.urlacher@protonmail.com";
|
settings = {
|
||||||
# userName = "Christoph Urlacher";
|
|
||||||
|
|
||||||
userEmail = git.userEmail;
|
|
||||||
userName = git.userName;
|
|
||||||
|
|
||||||
signing = {
|
|
||||||
signByDefault = git.signCommits;
|
|
||||||
format = "ssh";
|
|
||||||
key = "~/.ssh/id_ed25519.pub";
|
|
||||||
};
|
|
||||||
|
|
||||||
lfs.enable = true;
|
|
||||||
diff-so-fancy = {
|
|
||||||
enable = true;
|
|
||||||
changeHunkIndicators = true;
|
changeHunkIndicators = true;
|
||||||
markEmptyLines = false;
|
markEmptyLines = false;
|
||||||
stripLeadingSymbols = true;
|
stripLeadingSymbols = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# settings.user.email = "christoph.urlacher@protonmail.com";
|
||||||
|
# settings.user.name = "Christoph Urlacher";
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
user = {
|
||||||
|
email = git.userEmail;
|
||||||
|
name = git.userName;
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = {
|
|
||||||
core = {
|
core = {
|
||||||
compression = 9;
|
compression = 9;
|
||||||
# whitespace = "error";
|
# whitespace = "error";
|
||||||
@ -111,6 +110,14 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
signing = {
|
||||||
|
signByDefault = git.signCommits;
|
||||||
|
format = "ssh";
|
||||||
|
key = "~/.ssh/id_ed25519.pub";
|
||||||
|
};
|
||||||
|
|
||||||
|
lfs.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
31
home/modules/hyprland/autostart.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
hyprland,
|
||||||
|
}:
|
||||||
|
builtins.concatLists [
|
||||||
|
(lib.optionals hyprland.dunst.enable ["dunst"]) # Notifications
|
||||||
|
(lib.optionals hyprland.hyprpanel.enable ["hyprpanel"]) # Panel
|
||||||
|
(lib.optionals hyprland.caelestia.enable ["caelestia shell"]) # Panel/Shell # TODO: Crashes on startup
|
||||||
|
[
|
||||||
|
# Start clipboard management
|
||||||
|
"wl-paste -t text --watch clipman store --no-persist"
|
||||||
|
"wl-paste -p -t text --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\""
|
||||||
|
|
||||||
|
"hyprctl setcursor ${config.home.pointerCursor.name} ${builtins.toString config.home.pointerCursor.size}"
|
||||||
|
"hyprsunset --identity"
|
||||||
|
|
||||||
|
# HACK: Hyprland doesn't set the xwayland/x11 keymap correctly
|
||||||
|
"setxkbmap -layout ${hyprland.keyboard.layout} -variant ${hyprland.keyboard.variant} -option ${hyprland.keyboard.option} -model pc104"
|
||||||
|
|
||||||
|
# HACK: Flatpak doesn't find applications in the system PATH
|
||||||
|
"systemctl --user import-environment PATH && systemctl --user restart xdg-desktop-portal.service"
|
||||||
|
|
||||||
|
# Provide a polkit authentication UI.
|
||||||
|
# This is used for example when running systemd commands without root.
|
||||||
|
# "systemctl --user start hyprpolkitagent.service"
|
||||||
|
# "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1"
|
||||||
|
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
||||||
|
]
|
||||||
|
]
|
||||||
516
home/modules/hyprland/caelestia.nix
Normal file
@ -0,0 +1,516 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
hyprland,
|
||||||
|
color,
|
||||||
|
}: {
|
||||||
|
enable = hyprland.caelestia.enable;
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
enable = false; # Start from hyprland autostart
|
||||||
|
target = "graphical-session.target";
|
||||||
|
environment = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
appearance = {
|
||||||
|
anim = {durations = {scale = 1;};};
|
||||||
|
font = {
|
||||||
|
family = {
|
||||||
|
clock = "Rubik";
|
||||||
|
material = "Material Symbols Rounded";
|
||||||
|
mono = color.font;
|
||||||
|
sans = color.font;
|
||||||
|
};
|
||||||
|
size = {scale = 1;};
|
||||||
|
};
|
||||||
|
|
||||||
|
padding = {scale = 1;};
|
||||||
|
rounding = {scale = 1;};
|
||||||
|
spacing = {scale = 1;};
|
||||||
|
|
||||||
|
transparency = {
|
||||||
|
base = 0.85;
|
||||||
|
enabled = false;
|
||||||
|
layers = 0.4;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
background = {
|
||||||
|
desktopClock = {enabled = false;};
|
||||||
|
enabled = true;
|
||||||
|
|
||||||
|
# Lags when visible on both monitors (different refresh rates?)
|
||||||
|
visualiser = {
|
||||||
|
autoHide = true;
|
||||||
|
blur = true;
|
||||||
|
enabled = false;
|
||||||
|
rounding = 1;
|
||||||
|
spacing = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
bar = {
|
||||||
|
clock = {showIcon = true;};
|
||||||
|
dragThreshold = 20;
|
||||||
|
|
||||||
|
entries = [
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "logo";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "workspaces";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "spacer";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "activeWindow";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "spacer";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "clock";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "tray";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "statusIcons";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "power";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
persistent = true;
|
||||||
|
|
||||||
|
popouts = {
|
||||||
|
activeWindow = true;
|
||||||
|
statusIcons = true;
|
||||||
|
tray = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
scrollActions = {
|
||||||
|
brightness = false;
|
||||||
|
volume = true;
|
||||||
|
workspaces = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
showOnHover = true;
|
||||||
|
|
||||||
|
status = {
|
||||||
|
showAudio = true;
|
||||||
|
showBattery = false;
|
||||||
|
showBluetooth = true;
|
||||||
|
showKbLayout = false;
|
||||||
|
showLockStatus = true;
|
||||||
|
showMicrophone = false;
|
||||||
|
showNetwork = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
tray = {
|
||||||
|
background = true;
|
||||||
|
compact = false;
|
||||||
|
iconSubs = [];
|
||||||
|
recolour = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
workspaces = {
|
||||||
|
activeIndicator = true;
|
||||||
|
activeLabel = "";
|
||||||
|
activeTrail = true;
|
||||||
|
label = " ";
|
||||||
|
occupiedBg = false;
|
||||||
|
occupiedLabel = "";
|
||||||
|
perMonitorWorkspaces = false;
|
||||||
|
showWindows = false;
|
||||||
|
shown = 10;
|
||||||
|
|
||||||
|
# Pick them here: https://fonts.google.com/icons
|
||||||
|
specialWorkspaceIcons = [
|
||||||
|
{
|
||||||
|
icon = "music_note";
|
||||||
|
name = "rmpc";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = "memory";
|
||||||
|
name = "btop";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = "mark_chat_unread";
|
||||||
|
name = "ferdium";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = "network_intelligence";
|
||||||
|
name = "msty";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
border = {
|
||||||
|
rounding = 25;
|
||||||
|
thickness = 10;
|
||||||
|
};
|
||||||
|
|
||||||
|
dashboard = {
|
||||||
|
dragThreshold = 50;
|
||||||
|
enabled = true;
|
||||||
|
mediaUpdateInterval = 500;
|
||||||
|
showOnHover = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
general = {
|
||||||
|
apps = {
|
||||||
|
audio = ["kitty" "--title=NcpaMixer" "-e" "ncpamixer"];
|
||||||
|
explorer = ["kitty" "--title=Yazi" "-e" "yazi"];
|
||||||
|
playback = ["mpv"];
|
||||||
|
terminal = ["kitty"];
|
||||||
|
};
|
||||||
|
|
||||||
|
battery = {
|
||||||
|
criticalLevel = 3;
|
||||||
|
warnLevels = [
|
||||||
|
{
|
||||||
|
icon = "battery_android_frame_2";
|
||||||
|
level = 20;
|
||||||
|
message = "You might want to plug in a charger";
|
||||||
|
title = "Low battery";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
icon = "battery_android_frame_1";
|
||||||
|
level = 10;
|
||||||
|
message = "You should probably plug in a charger <b>now</b>";
|
||||||
|
title = "Did you see the previous message?";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
critical = true;
|
||||||
|
icon = "battery_android_alert";
|
||||||
|
level = 5;
|
||||||
|
message = "PLUG THE CHARGER RIGHT NOW!!";
|
||||||
|
title = "Critical battery level";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
idle = {
|
||||||
|
inhibitWhenAudio = true;
|
||||||
|
lockBeforeSleep = true;
|
||||||
|
timeouts = [
|
||||||
|
{
|
||||||
|
idleAction = "lock";
|
||||||
|
timeout = 600;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# idleAction = "dpms off";
|
||||||
|
# returnAction = "dpms on";
|
||||||
|
idleAction = "echo 'idle'";
|
||||||
|
returnAction = "echo 'return'";
|
||||||
|
timeout = 10000;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# idleAction = ["systemctl" "suspend-then-hibernate"];
|
||||||
|
idleAction = ["echo" "'idle'"];
|
||||||
|
timeout = 20000;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
launcher = {
|
||||||
|
actionPrefix = ">";
|
||||||
|
actions = [
|
||||||
|
{
|
||||||
|
command = ["autocomplete" "calc"];
|
||||||
|
dangerous = false;
|
||||||
|
description = "Do simple math equations (powered by Qalc)";
|
||||||
|
enabled = true;
|
||||||
|
icon = "calculate";
|
||||||
|
name = "Calculator";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["autocomplete" "scheme"];
|
||||||
|
dangerous = false;
|
||||||
|
description = "Change the current colour scheme";
|
||||||
|
enabled = true;
|
||||||
|
icon = "palette";
|
||||||
|
name = "Scheme";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["autocomplete" "wallpaper"];
|
||||||
|
dangerous = false;
|
||||||
|
description = "Change the current wallpaper";
|
||||||
|
enabled = true;
|
||||||
|
icon = "image";
|
||||||
|
name = "Wallpaper";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["autocomplete" "variant"];
|
||||||
|
dangerous = false;
|
||||||
|
description = "Change the current scheme variant";
|
||||||
|
enabled = true;
|
||||||
|
icon = "colors";
|
||||||
|
name = "Variant";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["autocomplete" "transparency"];
|
||||||
|
dangerous = false;
|
||||||
|
description = "Change shell transparency";
|
||||||
|
enabled = false;
|
||||||
|
icon = "opacity";
|
||||||
|
name = "Transparency";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["caelestia" "wallpaper" "-r"];
|
||||||
|
dangerous = false;
|
||||||
|
description = "Switch to a random wallpaper";
|
||||||
|
enabled = false;
|
||||||
|
icon = "casino";
|
||||||
|
name = "Random";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["setMode" "light"];
|
||||||
|
dangerous = false;
|
||||||
|
description = "Change the scheme to light mode";
|
||||||
|
enabled = true;
|
||||||
|
icon = "light_mode";
|
||||||
|
name = "Light";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["setMode" "dark"];
|
||||||
|
dangerous = false;
|
||||||
|
description = "Change the scheme to dark mode";
|
||||||
|
enabled = true;
|
||||||
|
icon = "dark_mode";
|
||||||
|
name = "Dark";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["systemctl" "poweroff"];
|
||||||
|
dangerous = true;
|
||||||
|
description = "Shutdown the system";
|
||||||
|
enabled = true;
|
||||||
|
icon = "power_settings_new";
|
||||||
|
name = "Shutdown";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["systemctl" "reboot"];
|
||||||
|
dangerous = true;
|
||||||
|
description = "Reboot the system";
|
||||||
|
enabled = true;
|
||||||
|
icon = "cached";
|
||||||
|
name = "Reboot";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["loginctl" "terminate-user" ""];
|
||||||
|
dangerous = true;
|
||||||
|
description = "Log out of the current session";
|
||||||
|
enabled = true;
|
||||||
|
icon = "exit_to_app";
|
||||||
|
name = "Logout";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["loginctl" "lock-session"];
|
||||||
|
dangerous = false;
|
||||||
|
description = "Lock the current session";
|
||||||
|
enabled = true;
|
||||||
|
icon = "lock";
|
||||||
|
name = "Lock";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = ["systemctl" "suspend-then-hibernate"];
|
||||||
|
dangerous = false;
|
||||||
|
description = "Suspend then hibernate";
|
||||||
|
enabled = false;
|
||||||
|
icon = "bedtime";
|
||||||
|
name = "Sleep";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
dragThreshold = 50;
|
||||||
|
enableDangerousActions = true;
|
||||||
|
hiddenApps = [];
|
||||||
|
maxShown = 7;
|
||||||
|
maxWallpapers = 9;
|
||||||
|
showOnHover = false;
|
||||||
|
specialPrefix = "@";
|
||||||
|
useFuzzy = {
|
||||||
|
actions = false;
|
||||||
|
apps = false;
|
||||||
|
schemes = false;
|
||||||
|
variants = false;
|
||||||
|
wallpapers = false;
|
||||||
|
};
|
||||||
|
vimKeybinds = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
lock = {recolourLogo = false;};
|
||||||
|
|
||||||
|
notifs = {
|
||||||
|
actionOnClick = false;
|
||||||
|
clearThreshold = 0.3;
|
||||||
|
defaultExpireTimeout = 5000;
|
||||||
|
expandThreshold = 20;
|
||||||
|
expire = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
osd = {
|
||||||
|
enableBrightness = false;
|
||||||
|
enableMicrophone = true;
|
||||||
|
enabled = true;
|
||||||
|
hideDelay = 2000;
|
||||||
|
};
|
||||||
|
|
||||||
|
paths = {
|
||||||
|
mediaGif = "root:/assets/bongocat.gif";
|
||||||
|
sessionGif = "root:/assets/kurukuru.gif";
|
||||||
|
wallpaperDir = "~/NixFlake/wallpapers";
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
audioIncrement = 0.1;
|
||||||
|
defaultPlayer = "MPD";
|
||||||
|
gpuType = "";
|
||||||
|
maxVolume = 1;
|
||||||
|
playerAliases = [
|
||||||
|
{
|
||||||
|
from = "com.github.th_ch.youtube_music";
|
||||||
|
to = "YT Music";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
smartScheme = true;
|
||||||
|
useFahrenheit = false;
|
||||||
|
useTwelveHourClock = false;
|
||||||
|
visualiserBars = 45;
|
||||||
|
weatherLocation = "Dortmund, Germany";
|
||||||
|
};
|
||||||
|
|
||||||
|
session = {
|
||||||
|
commands = {
|
||||||
|
hibernate = ["systemctl" "hibernate"];
|
||||||
|
logout = ["loginctl" "terminate-user" ""];
|
||||||
|
reboot = ["systemctl" "reboot"];
|
||||||
|
shutdown = ["systemctl" "poweroff"];
|
||||||
|
};
|
||||||
|
dragThreshold = 30;
|
||||||
|
enabled = true;
|
||||||
|
vimKeybinds = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
sidebar = {
|
||||||
|
dragThreshold = 80;
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
utilities = {
|
||||||
|
enabled = true;
|
||||||
|
maxToasts = 4;
|
||||||
|
toasts = {
|
||||||
|
audioInputChanged = true;
|
||||||
|
audioOutputChanged = true;
|
||||||
|
capsLockChanged = true;
|
||||||
|
chargingChanged = true;
|
||||||
|
configLoaded = true;
|
||||||
|
dndChanged = true;
|
||||||
|
gameModeChanged = true;
|
||||||
|
kbLayoutChanged = false;
|
||||||
|
nowPlaying = false;
|
||||||
|
numLockChanged = true;
|
||||||
|
vpnChanged = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
vpn = {
|
||||||
|
enabled = false;
|
||||||
|
provider = [
|
||||||
|
{
|
||||||
|
displayName = "Wireguard (Your VPN)";
|
||||||
|
interface = "your-connection-name";
|
||||||
|
name = "wireguard";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cli = {
|
||||||
|
enable = hyprland.caelestia.enable;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
record = {extraArgs = [];};
|
||||||
|
|
||||||
|
theme = {
|
||||||
|
enableBtop = false;
|
||||||
|
enableDiscord = false;
|
||||||
|
enableFuzzel = false;
|
||||||
|
enableGtk = false;
|
||||||
|
enableHypr = false;
|
||||||
|
enableQt = false;
|
||||||
|
enableSpicetify = false;
|
||||||
|
enableTerm = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
toggles = {
|
||||||
|
communication = {
|
||||||
|
discord = {
|
||||||
|
command = ["discord"];
|
||||||
|
enable = false;
|
||||||
|
match = [{class = "discord";}];
|
||||||
|
move = true;
|
||||||
|
};
|
||||||
|
whatsapp = {
|
||||||
|
enable = false;
|
||||||
|
match = [{class = "whatsapp";}];
|
||||||
|
move = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
music = {
|
||||||
|
feishin = {
|
||||||
|
enable = false;
|
||||||
|
match = [{class = "feishin";}];
|
||||||
|
move = true;
|
||||||
|
};
|
||||||
|
spotify = {
|
||||||
|
command = ["spicetify" "watch" "-s"];
|
||||||
|
enable = false;
|
||||||
|
match = [{class = "Spotify";} {initialTitle = "Spotify";} {initialTitle = "Spotify Free";}];
|
||||||
|
move = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sysmon = {
|
||||||
|
btop = {
|
||||||
|
command = ["kitty" "--title" "Btop" "-e" "btop"];
|
||||||
|
enable = false;
|
||||||
|
match = [
|
||||||
|
{
|
||||||
|
class = "btop";
|
||||||
|
title = "Btop";
|
||||||
|
workspace = {name = "special:sysmon";};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
todo = {
|
||||||
|
todoist = {
|
||||||
|
command = ["todoist"];
|
||||||
|
enable = false;
|
||||||
|
match = [{class = "Todoist";}];
|
||||||
|
move = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
wallpaper = {postHook = "echo $WALLPAPER_PATH";};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -10,116 +10,21 @@
|
|||||||
}: let
|
}: let
|
||||||
inherit (config.modules) hyprland color;
|
inherit (config.modules) hyprland color;
|
||||||
|
|
||||||
always-bind = lib.mergeAttrsList [
|
# Autostart programs
|
||||||
{
|
always-exec = import ./autostart.nix {inherit lib pkgs config hyprland;};
|
||||||
# Hyprland control
|
|
||||||
"$mainMod, a" = ["exec, rofi -drun-show-actions -show drun"];
|
|
||||||
"$mainMod, q" = ["killactive"];
|
|
||||||
"$mainMod, v" = ["togglefloating"];
|
|
||||||
"$mainMod, f" = ["fullscreen"];
|
|
||||||
"$mainMod, c" = ["exec, clipman pick --tool=rofi"];
|
|
||||||
"$mainMod SHIFT, l" = ["exec, loginctl lock-session"];
|
|
||||||
"$mainMod, tab" = ["workspace, previous"];
|
|
||||||
"ALT, tab" = ["exec, rofi -show window"];
|
|
||||||
# "$mainMod, g" = ["togglegroup"];
|
|
||||||
# "ALT, tab" = ["changegroupactive"];
|
|
||||||
|
|
||||||
# Move focus with mainMod + arrow keys
|
# Keybindings
|
||||||
"$mainMod, h" = ["movefocus, l"];
|
always-bind = import ./mappings.nix {inherit lib config hyprland;};
|
||||||
"$mainMod, l" = ["movefocus, r"];
|
|
||||||
"$mainMod, k" = ["movefocus, u"];
|
|
||||||
"$mainMod, j" = ["movefocus, d"];
|
|
||||||
|
|
||||||
# Swap windows
|
|
||||||
"$mainMod CTRL, h" = ["movewindow, l"];
|
|
||||||
"$mainMod CTRL, l" = ["movewindow, r"];
|
|
||||||
"$mainMod CTRL, k" = ["movewindow, u"];
|
|
||||||
"$mainMod CTRL, d" = ["movewindow, d"];
|
|
||||||
|
|
||||||
# Reset workspaces to the defined configuration in hyprland.workspaces:
|
|
||||||
"CTRL ALT, r" = let
|
|
||||||
mkWBinding = m: w:
|
|
||||||
"moveworkspacetomonitor, "
|
|
||||||
+ "${builtins.toString w} ${builtins.toString m}";
|
|
||||||
mkWsBindings = m: ws: builtins.map (mkWBinding m) ws;
|
|
||||||
in
|
|
||||||
hyprland.workspaces
|
|
||||||
|> builtins.mapAttrs mkWsBindings
|
|
||||||
|> builtins.attrValues
|
|
||||||
|> builtins.concatLists;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Switch to WS: "$mainMod, 1" = ["workspace, 1"];
|
|
||||||
(let
|
|
||||||
mkWBinding = w: k: {"$mainMod, ${k}" = ["workspace, ${w}"];};
|
|
||||||
in
|
|
||||||
hyprland.keybindings.ws-bindings
|
|
||||||
|> builtins.mapAttrs mkWBinding
|
|
||||||
|> builtins.attrValues
|
|
||||||
|> lib.mergeAttrsList)
|
|
||||||
|
|
||||||
# Toggle special WS: "$mainMod, x" = ["togglespecialworkspace, ferdium"];
|
|
||||||
(let
|
|
||||||
mkSpecialWBinding = w: k: {"$mainMod, ${k}" = ["togglespecialworkspace, ${w}"];};
|
|
||||||
in
|
|
||||||
hyprland.keybindings.special-ws-bindings
|
|
||||||
|> builtins.mapAttrs mkSpecialWBinding
|
|
||||||
|> builtins.attrValues
|
|
||||||
|> lib.mergeAttrsList)
|
|
||||||
|
|
||||||
# Move to WS: "$mainMod SHIFT, 1" = ["movetoworkspace, 1"];
|
|
||||||
(let
|
|
||||||
mkMoveWBinding = w: k: {"$mainMod SHIFT, ${k}" = ["movetoworkspace, ${w}"];};
|
|
||||||
in
|
|
||||||
(hyprland.keybindings.ws-bindings)
|
|
||||||
|> builtins.mapAttrs mkMoveWBinding
|
|
||||||
|> builtins.attrValues
|
|
||||||
|> lib.mergeAttrsList)
|
|
||||||
|
|
||||||
# Move to special WS: "$mainMod SHIFT, x" = ["movetoworkspace, special:ferdium"];
|
|
||||||
(let
|
|
||||||
mkSpecialMoveWBinding = w: k: {"$mainMod SHIFT, ${k}" = ["movetoworkspace, special:${w}"];};
|
|
||||||
in
|
|
||||||
(hyprland.keybindings.special-ws-bindings)
|
|
||||||
|> builtins.mapAttrs mkSpecialMoveWBinding
|
|
||||||
|> builtins.attrValues
|
|
||||||
|> lib.mergeAttrsList)
|
|
||||||
];
|
|
||||||
|
|
||||||
|
# Mousebindings
|
||||||
always-bindm = {
|
always-bindm = {
|
||||||
"$mainMod, mouse:272" = ["movewindow"];
|
"$mainMod, mouse:272" = ["movewindow"];
|
||||||
"$mainMod, mouse:273" = ["resizewindow"];
|
"$mainMod, mouse:273" = ["resizewindow"];
|
||||||
};
|
};
|
||||||
|
|
||||||
always-exec = builtins.concatLists [
|
|
||||||
(lib.optionals hyprland.dunst.enable ["dunst"]) # Notifications
|
|
||||||
[
|
|
||||||
# Start clipboard management
|
|
||||||
"wl-paste -t text --watch clipman store --no-persist"
|
|
||||||
"wl-paste -p -t text --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\""
|
|
||||||
|
|
||||||
"hyprctl setcursor Bibata-Modern-Classic 16"
|
|
||||||
"hyprsunset --identity"
|
|
||||||
|
|
||||||
# HACK: Hyprland doesn't set the xwayland/x11 keymap correctly
|
|
||||||
"setxkbmap -layout ${hyprland.kb-layout} -variant ${hyprland.kb-variant} -model pc104"
|
|
||||||
|
|
||||||
# HACK: Flatpak doesn't find applications in the system PATH
|
|
||||||
"systemctl --user import-environment PATH && systemctl --user restart xdg-desktop-portal.service"
|
|
||||||
|
|
||||||
# Provide a polkit authentication UI.
|
|
||||||
# This is used for example when running systemd commands without root.
|
|
||||||
# "systemctl --user start hyprpolkitagent.service"
|
|
||||||
# "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1"
|
|
||||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
|
||||||
]
|
|
||||||
];
|
|
||||||
in {
|
in {
|
||||||
options.modules.hyprland = import ./options.nix {inherit lib mylib;};
|
options.modules.hyprland = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = lib.mkIf hyprland.enable {
|
config = lib.mkIf hyprland.enable {
|
||||||
# Some assertion is not possible if HM is used standalone,
|
|
||||||
# because nixosConfig won't be available.
|
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = nixosConfig.programs.hyprland.enable;
|
assertion = nixosConfig.programs.hyprland.enable;
|
||||||
@ -129,21 +34,29 @@ in {
|
|||||||
assertion = builtins.hasAttr "hyprlock" nixosConfig.security.pam.services;
|
assertion = builtins.hasAttr "hyprlock" nixosConfig.security.pam.services;
|
||||||
message = "Can't enable Hyprland module without Hyprlock PAM service!";
|
message = "Can't enable Hyprland module without Hyprlock PAM service!";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
assertion = hyprland.hyprpanel.enable != hyprland.caelestia.enable;
|
||||||
|
message = "Can't enable Hyprpanel and Caelestia at the same time!";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme.package = pkgs.papirus-icon-theme;
|
iconTheme.package = lib.mkDefault color.iconPackage;
|
||||||
iconTheme.name = "Papirus";
|
iconTheme.name = color.iconTheme;
|
||||||
|
};
|
||||||
|
|
||||||
|
modules = {
|
||||||
|
hyprpanel.enable = hyprland.hyprpanel.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
pointerCursor = {
|
pointerCursor = {
|
||||||
gtk.enable = true;
|
gtk.enable = lib.mkDefault true;
|
||||||
x11.enable = true;
|
x11.enable = lib.mkDefault true;
|
||||||
package = pkgs.bibata-cursors;
|
package = lib.mkDefault color.cursorPackage;
|
||||||
name = "Bibata-Modern-Classic";
|
name = color.cursor;
|
||||||
size = 16;
|
size = color.cursorSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
@ -156,7 +69,7 @@ in {
|
|||||||
wl-clipboard
|
wl-clipboard
|
||||||
clipman # Clipboard manager (wl-paste)
|
clipman # Clipboard manager (wl-paste)
|
||||||
libnotify
|
libnotify
|
||||||
inotifyTools # Includes inotifywait
|
inotify-tools # Includes inotifywait
|
||||||
|
|
||||||
ncpamixer # Audio control
|
ncpamixer # Audio control
|
||||||
slurp # Region selector for screensharing
|
slurp # Region selector for screensharing
|
||||||
@ -207,389 +120,60 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
imv = {
|
hyprlock = import ./hyprlock.nix {inherit config hyprland color;};
|
||||||
enable = true;
|
caelestia = import ./caelestia.nix {inherit config hyprland color;};
|
||||||
settings = {
|
|
||||||
options = {
|
|
||||||
background = "${color.hex.base}";
|
|
||||||
overlay = true;
|
|
||||||
overlay_font = "${color.font}:12";
|
|
||||||
overlay_background_color = "${color.hex.accent}";
|
|
||||||
overlay_text_color = "${color.hex.accentText}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
hyprlock = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
disable_loading_bar = true;
|
|
||||||
grace = 0; # Immediately lock
|
|
||||||
hide_cursor = true;
|
|
||||||
no_fade_in = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# The widgets start here.
|
|
||||||
|
|
||||||
background = [
|
|
||||||
{
|
|
||||||
path = "${config.paths.nixflake}/wallpapers/${color.wallpaper}.jpg";
|
|
||||||
blur_passes = 3;
|
|
||||||
blur_size = 10;
|
|
||||||
monitor = "";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
input-field = [
|
|
||||||
# Password input
|
|
||||||
{
|
|
||||||
size = "200, 50";
|
|
||||||
position = "0, 0";
|
|
||||||
monitor = "";
|
|
||||||
dots_center = true;
|
|
||||||
fade_on_empty = false;
|
|
||||||
font_color = "rgb(${color.hex.accentText})";
|
|
||||||
font_family = "${color.font}";
|
|
||||||
inner_color = "rgb(${color.hex.accent})";
|
|
||||||
outer_color = "rgb(${color.hex.accent})";
|
|
||||||
outline_thickness = 2;
|
|
||||||
placeholder_text = "<span foreground='\#\#${color.hex.accentText}'>Password...</span>";
|
|
||||||
shadow_passes = 0;
|
|
||||||
rounding = 4;
|
|
||||||
halign = "center";
|
|
||||||
valign = "center";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
label = [
|
|
||||||
# Date
|
|
||||||
{
|
|
||||||
position = "0, 300";
|
|
||||||
monitor = "";
|
|
||||||
text = ''cmd[update:1000] date -I'';
|
|
||||||
color = "rgba(${color.hex.text}AA)";
|
|
||||||
font_size = 22;
|
|
||||||
font_family = "${color.font}";
|
|
||||||
halign = "center";
|
|
||||||
valign = "center";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Time
|
|
||||||
{
|
|
||||||
position = "0, 200";
|
|
||||||
monitor = "";
|
|
||||||
text = ''cmd[update:1000] date +"%-H:%M"'';
|
|
||||||
color = "rgba(${color.hex.text}AA)";
|
|
||||||
font_size = 95;
|
|
||||||
font_family = "${color.font} Extrabold";
|
|
||||||
halign = "center";
|
|
||||||
valign = "center";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
hyprpaper = {
|
dunst = import ./dunst.nix {inherit pkgs config hyprland color;};
|
||||||
enable = true;
|
hypridle = import ./hypridle.nix {inherit config hyprland color;};
|
||||||
|
hyprpaper = import ./hyprpaper.nix {inherit config hyprland color;};
|
||||||
settings = {
|
|
||||||
ipc = "on";
|
|
||||||
splash = false;
|
|
||||||
splash_offset = 2.0;
|
|
||||||
|
|
||||||
# Wallpapers have to be preloaded to be displayed
|
|
||||||
preload = let
|
|
||||||
mkPreload = name: "${config.paths.nixflake}/wallpapers/${name}.jpg";
|
|
||||||
in
|
|
||||||
color.wallpapers |> builtins.map mkPreload;
|
|
||||||
|
|
||||||
wallpaper = let
|
|
||||||
mkWallpaper = monitor:
|
|
||||||
"${monitor}, "
|
|
||||||
+ "${config.paths.nixflake}/wallpapers/${color.wallpaper}.jpg";
|
|
||||||
in
|
|
||||||
hyprland.monitors
|
|
||||||
|> builtins.attrNames
|
|
||||||
|> builtins.map mkWallpaper;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hypridle = {
|
# Make sure the units only start when using Hyprland
|
||||||
enable = true;
|
systemd.user.services.dunst.Unit.After = lib.mkIf hyprland.dunst.enable (lib.mkForce ["hyprland-session.target"]);
|
||||||
|
systemd.user.services.dunst.Unit.PartOf = lib.mkIf hyprland.dunst.enable (lib.mkForce ["hyprland-session.target"]);
|
||||||
settings = {
|
systemd.user.services.hypridle.Install.WantedBy = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||||
general = {
|
systemd.user.services.hypridle.Unit.After = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||||
# DPMS - Display Powermanagement Signaling. "On" means the monitor is on.
|
systemd.user.services.hypridle.Unit.PartOf = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
systemd.user.services.hyprpaper.Install.WantedBy = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||||
ignore_dbus_inhibit = false;
|
systemd.user.services.hyprpaper.Unit.After = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||||
lock_cmd = "hyprlock";
|
systemd.user.services.hyprpaper.Unit.PartOf = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||||
};
|
|
||||||
|
|
||||||
listener = [
|
|
||||||
{
|
|
||||||
timeout = 900;
|
|
||||||
on-timeout = "hyprlock";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
timeout = 1200;
|
|
||||||
on-timeout = "hyprctl dispatch dpms off";
|
|
||||||
on-resume = "hyprctl dispatch dpms on";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Notification service
|
|
||||||
dunst = {
|
|
||||||
enable = hyprland.dunst.enable;
|
|
||||||
|
|
||||||
iconTheme.package = pkgs.papirus-icon-theme;
|
|
||||||
iconTheme.name = "Papirus";
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
global = {
|
|
||||||
monitor = config.modules.waybar.monitor;
|
|
||||||
font = "${color.font} 11";
|
|
||||||
offset = "10x10";
|
|
||||||
background = color.hexS.base;
|
|
||||||
foreground = color.hexS.text;
|
|
||||||
frame_width = 2;
|
|
||||||
corner_radius = 6;
|
|
||||||
separator_color = "frame";
|
|
||||||
};
|
|
||||||
|
|
||||||
urgency_low = {
|
|
||||||
frame_color = color.hexS.green;
|
|
||||||
};
|
|
||||||
|
|
||||||
urgency_normal = {
|
|
||||||
frame_color = color.hexS.green;
|
|
||||||
};
|
|
||||||
|
|
||||||
urgency_critical = {
|
|
||||||
frame_color = color.hexS.red;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||||
|
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||||
|
|
||||||
systemd.enable = true; # Enable hyprland-session.target
|
systemd.enable = true; # Enable hyprland-session.target
|
||||||
systemd.variables = ["--all"]; # Import PATH into systemd
|
systemd.variables = ["--all"]; # Import PATH into systemd
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
|
|
||||||
plugins = [
|
plugins = builtins.concatLists [
|
||||||
# TODO: Takes ages (compiles all hyprland dependencies locally...)
|
(lib.optionals
|
||||||
# Probably have to use hyprland flake to follow...
|
hyprland.bars.enable
|
||||||
|
[inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars])
|
||||||
# inputs.hypr-dynamic-cursors.packages.${pkgs.system}.hypr-dynamic-cursors
|
(lib.optionals
|
||||||
# inputs.hyprland-plugins.packages.${pkgs.system}.hyprbars
|
hyprland.dynamicCursor.enable
|
||||||
|
[inputs.hypr-dynamic-cursors.packages.${pkgs.stdenv.hostPlatform.system}.hypr-dynamic-cursors])
|
||||||
|
(lib.optionals
|
||||||
|
hyprland.trails.enable
|
||||||
|
[inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprtrails])
|
||||||
|
(lib.optionals
|
||||||
|
hyprland.hyprspace.enable
|
||||||
|
[inputs.hyprspace.packages.${pkgs.stdenv.hostPlatform.system}.Hyprspace])
|
||||||
];
|
];
|
||||||
|
|
||||||
settings = {
|
settings = import ./settings.nix {
|
||||||
"$mainMod" = "${hyprland.keybindings.main-mod}";
|
inherit
|
||||||
|
lib
|
||||||
general = {
|
config
|
||||||
gaps_in = 5;
|
hyprland
|
||||||
gaps_out = 10;
|
color
|
||||||
border_size = 2;
|
|
||||||
|
|
||||||
"col.active_border" = "rgb(${color.hex.accent})";
|
|
||||||
"col.inactive_border" = "rgb(${color.hex.base})";
|
|
||||||
};
|
|
||||||
|
|
||||||
group = {
|
|
||||||
groupbar = {
|
|
||||||
enabled = true;
|
|
||||||
render_titles = false;
|
|
||||||
font_size = 10;
|
|
||||||
gradients = false;
|
|
||||||
|
|
||||||
"col.active" = "rgb(${color.hex.accent})";
|
|
||||||
"col.inactive" = "rgb(${color.hex.base})";
|
|
||||||
};
|
|
||||||
|
|
||||||
"col.border_active" = "rgb(${color.hex.accent})";
|
|
||||||
"col.border_inactive" = "rgb(${color.hex.base})";
|
|
||||||
};
|
|
||||||
|
|
||||||
input = {
|
|
||||||
kb_layout = "${hyprland.kb-layout}";
|
|
||||||
kb_variant = "${hyprland.kb-variant}";
|
|
||||||
kb_model = "pc104";
|
|
||||||
kb_options = "";
|
|
||||||
kb_rules = "";
|
|
||||||
|
|
||||||
follow_mouse = true;
|
|
||||||
|
|
||||||
touchpad = {
|
|
||||||
natural_scroll = "no";
|
|
||||||
};
|
|
||||||
|
|
||||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
|
||||||
};
|
|
||||||
|
|
||||||
monitor = let
|
|
||||||
mkMonitor = name: conf:
|
|
||||||
"${name}, "
|
|
||||||
+ "${builtins.toString conf.width}x${builtins.toString conf.height}@"
|
|
||||||
+ "${builtins.toString conf.rate}, "
|
|
||||||
+ "${builtins.toString conf.x}x${builtins.toString conf.y}, "
|
|
||||||
+ "${builtins.toString conf.scale}";
|
|
||||||
in
|
|
||||||
hyprland.monitors
|
|
||||||
|> builtins.mapAttrs mkMonitor
|
|
||||||
|> builtins.attrValues;
|
|
||||||
|
|
||||||
workspace = let
|
|
||||||
mkWorkspace = monitor: workspace:
|
|
||||||
"${builtins.toString workspace}, "
|
|
||||||
+ "monitor:${builtins.toString monitor}";
|
|
||||||
|
|
||||||
mkWorkspaces = monitor: workspace-list:
|
|
||||||
builtins.map (mkWorkspace monitor) workspace-list;
|
|
||||||
in
|
|
||||||
hyprland.workspaces
|
|
||||||
|> builtins.mapAttrs mkWorkspaces
|
|
||||||
|> builtins.attrValues
|
|
||||||
|> builtins.concatLists;
|
|
||||||
|
|
||||||
bind = let
|
|
||||||
mkBind = key: action: "${key}, ${action}";
|
|
||||||
mkBinds = key: actions: builtins.map (mkBind key) actions;
|
|
||||||
in
|
|
||||||
(hyprland.keybindings.bindings // always-bind)
|
|
||||||
|> builtins.mapAttrs mkBinds
|
|
||||||
|> builtins.attrValues
|
|
||||||
|> builtins.concatLists;
|
|
||||||
|
|
||||||
bindm = let
|
|
||||||
mkBind = key: action: "${key}, ${action}";
|
|
||||||
mkBinds = key: actions: builtins.map (mkBind key) actions;
|
|
||||||
in
|
|
||||||
always-bindm
|
|
||||||
|> builtins.mapAttrs mkBinds
|
|
||||||
|> builtins.attrValues
|
|
||||||
|> builtins.concatLists;
|
|
||||||
|
|
||||||
exec-once = let
|
|
||||||
mkDelayedStart = str: ''hyprctl dispatch exec "sleep 5s && ${str}"'';
|
|
||||||
|
|
||||||
mkSpecialSilentStart = w: str: "[workspace special:${w} silent] ${str}";
|
|
||||||
mkSpecialSilentStarts = w: strs: builtins.map (mkSpecialSilentStart w) strs;
|
|
||||||
in
|
|
||||||
lib.mkMerge [
|
|
||||||
always-exec
|
always-exec
|
||||||
hyprland.autostart.immediate
|
always-bind
|
||||||
(hyprland.autostart.special-silent
|
always-bindm
|
||||||
|> builtins.mapAttrs mkSpecialSilentStarts
|
;
|
||||||
|> builtins.attrValues
|
|
||||||
|> builtins.concatLists)
|
|
||||||
(hyprland.autostart.delayed
|
|
||||||
|> builtins.map mkDelayedStart)
|
|
||||||
];
|
|
||||||
|
|
||||||
windowrule = let
|
|
||||||
mkWorkspaceRule = workspace: class:
|
|
||||||
"workspace ${workspace}, "
|
|
||||||
+ "class:^(${class})$";
|
|
||||||
mkWorkspaceRules = workspace: class-list:
|
|
||||||
builtins.map (mkWorkspaceRule workspace) class-list;
|
|
||||||
|
|
||||||
mkFloatingRule = attrs:
|
|
||||||
"float"
|
|
||||||
+ (lib.optionalString (builtins.hasAttr "class" attrs) ", class:^(${attrs.class})$")
|
|
||||||
+ (lib.optionalString (builtins.hasAttr "title" attrs) ", title:^(${attrs.title})$");
|
|
||||||
|
|
||||||
mkTranslucentRule = class:
|
|
||||||
"opacity ${hyprland.transparent-opacity} ${hyprland.transparent-opacity}, "
|
|
||||||
+ "class:^(${class})$";
|
|
||||||
in
|
|
||||||
lib.mkMerge [
|
|
||||||
(hyprland.workspacerules
|
|
||||||
|> builtins.mapAttrs mkWorkspaceRules
|
|
||||||
|> builtins.attrValues
|
|
||||||
|> builtins.concatLists)
|
|
||||||
(hyprland.floating
|
|
||||||
|> builtins.map mkFloatingRule)
|
|
||||||
(hyprland.transparent
|
|
||||||
|> builtins.map mkTranslucentRule)
|
|
||||||
hyprland.windowrules
|
|
||||||
];
|
|
||||||
|
|
||||||
dwindle = {
|
|
||||||
pseudotile = true;
|
|
||||||
preserve_split = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
master = {
|
|
||||||
new_status = "master";
|
|
||||||
};
|
|
||||||
|
|
||||||
gestures = {
|
|
||||||
workspace_swipe = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
misc = {
|
|
||||||
# Say no to the anime girl
|
|
||||||
disable_hyprland_logo = true;
|
|
||||||
force_default_wallpaper = 0;
|
|
||||||
|
|
||||||
# Say no to the "Application not responding" window
|
|
||||||
enable_anr_dialog = false;
|
|
||||||
|
|
||||||
disable_splash_rendering = true;
|
|
||||||
font_family = "${color.font}";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Because those are not windows, but layers,
|
|
||||||
# we have to blur them explicitly
|
|
||||||
layerrule = [
|
|
||||||
"blur,rofi"
|
|
||||||
"ignorealpha 0.001,rofi" # Fix pixelated corners
|
|
||||||
"xray 0,rofi" # Render on top of other windows
|
|
||||||
"dimaround,rofi"
|
|
||||||
|
|
||||||
"blur,waybar"
|
|
||||||
"blur,gtk4-layer-shell"
|
|
||||||
"blur,bar-0"
|
|
||||||
"blur,bar-1"
|
|
||||||
];
|
|
||||||
|
|
||||||
decoration = {
|
|
||||||
rounding = 4;
|
|
||||||
|
|
||||||
shadow = {
|
|
||||||
enabled = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
blur = {
|
|
||||||
enabled = true;
|
|
||||||
size = 10;
|
|
||||||
passes = 3;
|
|
||||||
new_optimizations = true;
|
|
||||||
ignore_opacity = true;
|
|
||||||
xray = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
animations = {
|
|
||||||
enabled = true;
|
|
||||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
|
||||||
animation = [
|
|
||||||
"windows, 1, 7, myBezier"
|
|
||||||
"windowsOut, 1, 7, default,popin 80%"
|
|
||||||
"border, 1, 10, default"
|
|
||||||
"borderangle, 1, 8, default"
|
|
||||||
"fade, 1, 7, default"
|
|
||||||
"workspaces, 1, 6, default"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
36
home/modules/hyprland/dunst.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
hyprland,
|
||||||
|
color,
|
||||||
|
}: {
|
||||||
|
enable = hyprland.dunst.enable;
|
||||||
|
|
||||||
|
iconTheme.package = color.iconPackage;
|
||||||
|
iconTheme.name = color.iconTheme;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
monitor = config.modules.waybar.monitor;
|
||||||
|
font = "${color.font} 11";
|
||||||
|
offset = "10x10";
|
||||||
|
background = color.hexS.base;
|
||||||
|
foreground = color.hexS.text;
|
||||||
|
frame_width = 2;
|
||||||
|
corner_radius = 6;
|
||||||
|
separator_color = "frame";
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_low = {
|
||||||
|
frame_color = color.hexS.green;
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_normal = {
|
||||||
|
frame_color = color.hexS.green;
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_critical = {
|
||||||
|
frame_color = color.hexS.red;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
28
home/modules/hyprland/hypridle.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
hyprland,
|
||||||
|
color,
|
||||||
|
}: {
|
||||||
|
enable = !hyprland.caelestia.enable;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
# DPMS - Display Powermanagement Signaling. "On" means the monitor is on.
|
||||||
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||||
|
ignore_dbus_inhibit = false;
|
||||||
|
lock_cmd = "hyprlock";
|
||||||
|
};
|
||||||
|
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = 900;
|
||||||
|
on-timeout = "hyprlock";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 1200;
|
||||||
|
on-timeout = "hyprctl dispatch dpms off";
|
||||||
|
on-resume = "hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
74
home/modules/hyprland/hyprlock.nix
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
hyprland,
|
||||||
|
color,
|
||||||
|
}: {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
disable_loading_bar = true;
|
||||||
|
grace = 0; # Immediately lock
|
||||||
|
hide_cursor = true;
|
||||||
|
no_fade_in = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# The widgets start here.
|
||||||
|
|
||||||
|
background = [
|
||||||
|
{
|
||||||
|
path = "${config.paths.nixflake}/wallpapers/${color.wallpaper}.jpg";
|
||||||
|
blur_passes = 3;
|
||||||
|
blur_size = 10;
|
||||||
|
monitor = "";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
input-field = [
|
||||||
|
# Password input
|
||||||
|
{
|
||||||
|
size = "200, 50";
|
||||||
|
position = "0, 0";
|
||||||
|
monitor = "";
|
||||||
|
dots_center = true;
|
||||||
|
fade_on_empty = false;
|
||||||
|
font_color = "rgb(${color.hex.accentText})";
|
||||||
|
font_family = "${color.font}";
|
||||||
|
inner_color = "rgb(${color.hex.accent})";
|
||||||
|
outer_color = "rgb(${color.hex.accent})";
|
||||||
|
outline_thickness = 2;
|
||||||
|
placeholder_text = "<span foreground='\#\#${color.hex.accentText}'>Password...</span>";
|
||||||
|
shadow_passes = 0;
|
||||||
|
rounding = 4;
|
||||||
|
halign = "center";
|
||||||
|
valign = "center";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
label = [
|
||||||
|
# Date
|
||||||
|
{
|
||||||
|
position = "0, 300";
|
||||||
|
monitor = "";
|
||||||
|
text = ''cmd[update:1000] date -I'';
|
||||||
|
color = "rgba(${color.hex.text}AA)";
|
||||||
|
font_size = 22;
|
||||||
|
font_family = "${color.font}";
|
||||||
|
halign = "center";
|
||||||
|
valign = "center";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Time
|
||||||
|
{
|
||||||
|
position = "0, 200";
|
||||||
|
monitor = "";
|
||||||
|
text = ''cmd[update:1000] date +"%-H:%M"'';
|
||||||
|
color = "rgba(${color.hex.text}AA)";
|
||||||
|
font_size = 95;
|
||||||
|
font_family = "${color.font} Extrabold";
|
||||||
|
halign = "center";
|
||||||
|
valign = "center";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
28
home/modules/hyprland/hyprpaper.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
hyprland,
|
||||||
|
color,
|
||||||
|
}: {
|
||||||
|
enable = !hyprland.caelestia.enable;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
ipc = "on";
|
||||||
|
splash = false;
|
||||||
|
splash_offset = 2.0;
|
||||||
|
|
||||||
|
# Wallpapers have to be preloaded to be displayed
|
||||||
|
preload = let
|
||||||
|
mkPreload = name: "${config.paths.nixflake}/wallpapers/${name}.jpg";
|
||||||
|
in
|
||||||
|
color.wallpapers |> builtins.map mkPreload;
|
||||||
|
|
||||||
|
wallpaper = let
|
||||||
|
mkWallpaper = monitor:
|
||||||
|
"${monitor}, "
|
||||||
|
+ "${config.paths.nixflake}/wallpapers/${color.wallpaper}.jpg";
|
||||||
|
in
|
||||||
|
hyprland.monitors
|
||||||
|
|> builtins.attrNames
|
||||||
|
|> builtins.map mkWallpaper;
|
||||||
|
};
|
||||||
|
}
|
||||||
77
home/modules/hyprland/mappings.nix
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
hyprland,
|
||||||
|
}:
|
||||||
|
lib.mergeAttrsList [
|
||||||
|
{
|
||||||
|
# Hyprland control
|
||||||
|
"$mainMod, q" = ["killactive"];
|
||||||
|
"$mainMod, v" = ["togglefloating"];
|
||||||
|
"$mainMod, f" = ["fullscreen"];
|
||||||
|
"$mainMod, tab" = ["workspace, previous"];
|
||||||
|
# "$mainMod, g" = ["togglegroup"];
|
||||||
|
# "ALT, tab" = ["changegroupactive"];
|
||||||
|
|
||||||
|
# Move focus with mainMod + arrow keys
|
||||||
|
"$mainMod, h" = ["movefocus, l"];
|
||||||
|
"$mainMod, l" = ["movefocus, r"];
|
||||||
|
"$mainMod, k" = ["movefocus, u"];
|
||||||
|
"$mainMod, j" = ["movefocus, d"];
|
||||||
|
|
||||||
|
# Swap windows
|
||||||
|
"$mainMod CTRL, h" = ["movewindow, l"];
|
||||||
|
"$mainMod CTRL, l" = ["movewindow, r"];
|
||||||
|
"$mainMod CTRL, k" = ["movewindow, u"];
|
||||||
|
"$mainMod CTRL, d" = ["movewindow, d"];
|
||||||
|
|
||||||
|
# Reset workspaces to the defined configuration in hyprland.workspaces:
|
||||||
|
"CTRL ALT, r" = let
|
||||||
|
mkWBinding = m: w:
|
||||||
|
"moveworkspacetomonitor, "
|
||||||
|
+ "${builtins.toString w} ${builtins.toString m}";
|
||||||
|
|
||||||
|
mkWsBindings = m: ws: builtins.map (mkWBinding m) ws;
|
||||||
|
in
|
||||||
|
hyprland.workspaces
|
||||||
|
|> builtins.mapAttrs mkWsBindings
|
||||||
|
|> builtins.attrValues
|
||||||
|
|> builtins.concatLists;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Switch to WS: "$mainMod, 1" = ["workspace, 1"];
|
||||||
|
(let
|
||||||
|
mkWBinding = w: k: {"$mainMod, ${k}" = ["workspace, ${w}"];};
|
||||||
|
in
|
||||||
|
hyprland.keybindings.ws-bindings
|
||||||
|
|> builtins.mapAttrs mkWBinding
|
||||||
|
|> builtins.attrValues
|
||||||
|
|> lib.mergeAttrsList)
|
||||||
|
|
||||||
|
# Toggle special WS: "$mainMod, x" = ["togglespecialworkspace, ferdium"];
|
||||||
|
(let
|
||||||
|
mkSpecialWBinding = w: k: {"$mainMod, ${k}" = ["togglespecialworkspace, ${w}"];};
|
||||||
|
in
|
||||||
|
hyprland.keybindings.special-ws-bindings
|
||||||
|
|> builtins.mapAttrs mkSpecialWBinding
|
||||||
|
|> builtins.attrValues
|
||||||
|
|> lib.mergeAttrsList)
|
||||||
|
|
||||||
|
# Move to WS: "$mainMod SHIFT, 1" = ["movetoworkspace, 1"];
|
||||||
|
(let
|
||||||
|
mkMoveWBinding = w: k: {"$mainMod SHIFT, ${k}" = ["movetoworkspace, ${w}"];};
|
||||||
|
in
|
||||||
|
(hyprland.keybindings.ws-bindings)
|
||||||
|
|> builtins.mapAttrs mkMoveWBinding
|
||||||
|
|> builtins.attrValues
|
||||||
|
|> lib.mergeAttrsList)
|
||||||
|
|
||||||
|
# Move to special WS: "$mainMod SHIFT, x" = ["movetoworkspace, special:ferdium"];
|
||||||
|
(let
|
||||||
|
mkSpecialMoveWBinding = w: k: {"$mainMod SHIFT, ${k}" = ["movetoworkspace, special:${w}"];};
|
||||||
|
in
|
||||||
|
hyprland.keybindings.special-ws-bindings
|
||||||
|
|> builtins.mapAttrs mkSpecialMoveWBinding
|
||||||
|
|> builtins.attrValues
|
||||||
|
|> lib.mergeAttrsList)
|
||||||
|
]
|
||||||
@ -2,141 +2,35 @@
|
|||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
...
|
...
|
||||||
}: rec {
|
}: {
|
||||||
enable = lib.mkEnableOption "Hyprland Window Manager + Compositor";
|
enable = lib.mkEnableOption "Hyprland Window Manager + Compositor";
|
||||||
|
|
||||||
kb-layout = lib.mkOption {
|
dunst.enable = lib.mkEnableOption "Enable Dunst notification daemon";
|
||||||
|
bars.enable = lib.mkEnableOption "Enable window bars";
|
||||||
|
dynamicCursor.enable = lib.mkEnableOption "Enable dynamic cursors";
|
||||||
|
trails.enable = lib.mkEnableOption "Enable dynamic window trails";
|
||||||
|
hyprspace.enable = lib.mkEnableOption "Enable Hyprspace workspace overview";
|
||||||
|
hyprpanel.enable = lib.mkEnableOption "Enable Hyprpanel";
|
||||||
|
caelestia.enable = lib.mkEnableOption "Enable Caelestia";
|
||||||
|
|
||||||
|
keyboard = {
|
||||||
|
layout = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
example = "us";
|
example = "us";
|
||||||
description = "Keyboard layout to use";
|
description = "Keyboard layout to use";
|
||||||
};
|
};
|
||||||
|
|
||||||
kb-variant = lib.mkOption {
|
variant = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
example = "altgr-intl";
|
example = "altgr-intl";
|
||||||
description = "Keyboard layout variant";
|
description = "Keyboard layout variant";
|
||||||
};
|
};
|
||||||
|
|
||||||
dunst.enable = lib.mkEnableOption "Enable dunst notification daemon";
|
option = lib.mkOption {
|
||||||
|
|
||||||
monitors = lib.mkOption {
|
|
||||||
type = lib.types.attrs;
|
|
||||||
description = "Hyprland Monitor Configurations";
|
|
||||||
example = ''
|
|
||||||
{
|
|
||||||
"HDMI-A-1" = {
|
|
||||||
width = 2560;
|
|
||||||
height = 1440;
|
|
||||||
rate = 144;
|
|
||||||
x = 1920;
|
|
||||||
y = 0;
|
|
||||||
scale = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
workspaces = lib.mkOption {
|
|
||||||
type = lib.types.attrs;
|
|
||||||
description = "How workspaces are distributed to monitors. These monitors will also receive a wallpaper.";
|
|
||||||
example = ''
|
|
||||||
{
|
|
||||||
"HDMI-A-1" = [1 2 3 4 5 6 7 8 9];
|
|
||||||
"HDMI-A-2" = [0];
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
autostart = {
|
|
||||||
immediate = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.str;
|
|
||||||
description = "Programs to launch when Hyprland starts";
|
|
||||||
example = ''
|
|
||||||
[
|
|
||||||
"kitty"
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
delayed = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.str;
|
|
||||||
description = "Programs to launch with a delay when Hyprland starts (e.g. to wait for the waybar tray)";
|
|
||||||
example = ''
|
|
||||||
[
|
|
||||||
"keepassxc"
|
|
||||||
"nextcloud --background"
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
special-silent = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.listOf lib.types.str);
|
|
||||||
description = "Programs to silently launch on special workspaces";
|
|
||||||
example = ''
|
|
||||||
{
|
|
||||||
"ferdium" = ["ferdium"];
|
|
||||||
"btop" = ["kitty --title=Btop btop"];
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
default = {};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
workspacerules = lib.mkOption {
|
|
||||||
type = lib.types.attrs;
|
|
||||||
description = "Launch programs on specified workspaces, accepts window class.";
|
|
||||||
example = ''
|
|
||||||
{
|
|
||||||
"2" = [
|
|
||||||
"jetbrains-clion"
|
|
||||||
"code-url-handler"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
windowrules = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.str;
|
|
||||||
description = "Specify specific window rules.";
|
|
||||||
example = ''
|
|
||||||
[
|
|
||||||
"suppressevent activate, class: Unity"
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
transparent-opacity = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "The opacity transparent windows should have.";
|
example = "nodeadkeys";
|
||||||
example = "0.8";
|
description = "Keyboard layout options";
|
||||||
};
|
};
|
||||||
|
|
||||||
floating = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.attrs;
|
|
||||||
description = "What programs are floating down here?";
|
|
||||||
example = ''
|
|
||||||
[
|
|
||||||
{
|
|
||||||
class = "thunar";
|
|
||||||
title = "File Operation Progress";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
class = "org.kde.polkit-kde-authentication-agent-1";
|
|
||||||
}
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
transparent = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.str;
|
|
||||||
description = "What programs should be transparent? Accepts window class.";
|
|
||||||
example = ''
|
|
||||||
[
|
|
||||||
"kitty"
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
keybindings = {
|
keybindings = {
|
||||||
@ -189,4 +83,124 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
monitors = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
description = "Hyprland Monitor Configurations";
|
||||||
|
example = ''
|
||||||
|
{
|
||||||
|
"HDMI-A-1" = {
|
||||||
|
width = 2560;
|
||||||
|
height = 1440;
|
||||||
|
rate = 144;
|
||||||
|
x = 1920;
|
||||||
|
y = 0;
|
||||||
|
scale = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
workspaces = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
description = "How workspaces are distributed to monitors. These monitors will also receive a wallpaper.";
|
||||||
|
example = ''
|
||||||
|
{
|
||||||
|
"HDMI-A-1" = [1 2 3 4 5 6 7 8 9];
|
||||||
|
"HDMI-A-2" = [0];
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
workspacerules = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
description = "Launch programs on specified workspaces, accepts window class.";
|
||||||
|
example = ''
|
||||||
|
{
|
||||||
|
"2" = [
|
||||||
|
"jetbrains-clion"
|
||||||
|
"code-url-handler"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
windowrules = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
description = "Specify specific window rules.";
|
||||||
|
example = ''
|
||||||
|
[
|
||||||
|
"suppressevent activate, class: Unity"
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
transparent-opacity = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "The opacity transparent windows should have.";
|
||||||
|
example = "0.8";
|
||||||
|
};
|
||||||
|
|
||||||
|
transparent = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
description = "What programs should be transparent? Accepts window class.";
|
||||||
|
example = ''
|
||||||
|
[
|
||||||
|
"kitty"
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
floating = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.attrs;
|
||||||
|
description = "What programs are floating down here?";
|
||||||
|
example = ''
|
||||||
|
[
|
||||||
|
{
|
||||||
|
class = "thunar";
|
||||||
|
title = "File Operation Progress";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
class = "org.kde.polkit-kde-authentication-agent-1";
|
||||||
|
}
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
autostart = {
|
||||||
|
immediate = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
description = "Programs to launch when Hyprland starts";
|
||||||
|
example = ''
|
||||||
|
[
|
||||||
|
"kitty"
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
delayed = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
description = "Programs to launch with a delay when Hyprland starts (e.g. to wait for the waybar tray)";
|
||||||
|
example = ''
|
||||||
|
[
|
||||||
|
"keepassxc"
|
||||||
|
"nextcloud --background"
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
special-silent = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.listOf lib.types.str);
|
||||||
|
description = "Programs to silently launch on special workspaces";
|
||||||
|
example = ''
|
||||||
|
{
|
||||||
|
"ferdium" = ["ferdium"];
|
||||||
|
"btop" = ["kitty --title=Btop btop"];
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
359
home/modules/hyprland/settings.nix
Normal file
@ -0,0 +1,359 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
hyprland,
|
||||||
|
color,
|
||||||
|
always-exec,
|
||||||
|
always-bind,
|
||||||
|
always-bindm,
|
||||||
|
}: {
|
||||||
|
"$mainMod" = "${hyprland.keybindings.main-mod}";
|
||||||
|
|
||||||
|
general = {
|
||||||
|
gaps_in = 5;
|
||||||
|
gaps_out = 10;
|
||||||
|
border_size = 2;
|
||||||
|
|
||||||
|
"col.active_border" = "rgb(${color.hex.accent})";
|
||||||
|
"col.inactive_border" = "rgb(${color.hex.base})";
|
||||||
|
};
|
||||||
|
|
||||||
|
group = {
|
||||||
|
groupbar = {
|
||||||
|
enabled = true;
|
||||||
|
render_titles = false;
|
||||||
|
font_size = 10;
|
||||||
|
gradients = false;
|
||||||
|
|
||||||
|
"col.active" = "rgb(${color.hex.accent})";
|
||||||
|
"col.inactive" = "rgb(${color.hex.base})";
|
||||||
|
};
|
||||||
|
|
||||||
|
"col.border_active" = "rgb(${color.hex.accent})";
|
||||||
|
"col.border_inactive" = "rgb(${color.hex.base})";
|
||||||
|
};
|
||||||
|
|
||||||
|
input = {
|
||||||
|
kb_layout = hyprland.keyboard.layout;
|
||||||
|
kb_variant = hyprland.keyboard.variant;
|
||||||
|
kb_options = hyprland.keyboard.option;
|
||||||
|
kb_model = "pc104";
|
||||||
|
kb_rules = "";
|
||||||
|
|
||||||
|
follow_mouse = true;
|
||||||
|
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = "no";
|
||||||
|
};
|
||||||
|
|
||||||
|
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||||
|
};
|
||||||
|
|
||||||
|
monitor = let
|
||||||
|
mkMonitor = name: conf:
|
||||||
|
"${name}, "
|
||||||
|
+ "${builtins.toString conf.width}x${builtins.toString conf.height}@"
|
||||||
|
+ "${builtins.toString conf.rate}, "
|
||||||
|
+ "${builtins.toString conf.x}x${builtins.toString conf.y}, "
|
||||||
|
+ "${builtins.toString conf.scale}";
|
||||||
|
in
|
||||||
|
hyprland.monitors
|
||||||
|
|> builtins.mapAttrs mkMonitor
|
||||||
|
|> builtins.attrValues;
|
||||||
|
|
||||||
|
workspace = let
|
||||||
|
mkWorkspace = monitor: workspace:
|
||||||
|
"${builtins.toString workspace}, "
|
||||||
|
+ "monitor:${builtins.toString monitor}";
|
||||||
|
|
||||||
|
mkWorkspaces = monitor: workspace-list:
|
||||||
|
builtins.map (mkWorkspace monitor) workspace-list;
|
||||||
|
in
|
||||||
|
hyprland.workspaces
|
||||||
|
|> builtins.mapAttrs mkWorkspaces
|
||||||
|
|> builtins.attrValues
|
||||||
|
|> builtins.concatLists;
|
||||||
|
|
||||||
|
bind = let
|
||||||
|
mkBind = key: action: "${key}, ${action}";
|
||||||
|
mkBinds = key: actions: builtins.map (mkBind key) actions;
|
||||||
|
in
|
||||||
|
(hyprland.keybindings.bindings // always-bind)
|
||||||
|
|> builtins.mapAttrs mkBinds
|
||||||
|
|> builtins.attrValues
|
||||||
|
|> builtins.concatLists;
|
||||||
|
|
||||||
|
bindm = let
|
||||||
|
mkBind = key: action: "${key}, ${action}";
|
||||||
|
mkBinds = key: actions: builtins.map (mkBind key) actions;
|
||||||
|
in
|
||||||
|
always-bindm
|
||||||
|
|> builtins.mapAttrs mkBinds
|
||||||
|
|> builtins.attrValues
|
||||||
|
|> builtins.concatLists;
|
||||||
|
|
||||||
|
exec-once = let
|
||||||
|
mkDelayedStart = str: ''hyprctl dispatch exec "sleep 5s && ${str}"'';
|
||||||
|
|
||||||
|
mkSpecialSilentStart = w: str: "[workspace special:${w} silent] ${str}";
|
||||||
|
mkSpecialSilentStarts = w: strs: builtins.map (mkSpecialSilentStart w) strs;
|
||||||
|
in
|
||||||
|
lib.mkMerge [
|
||||||
|
always-exec
|
||||||
|
hyprland.autostart.immediate
|
||||||
|
(hyprland.autostart.special-silent
|
||||||
|
|> builtins.mapAttrs mkSpecialSilentStarts
|
||||||
|
|> builtins.attrValues
|
||||||
|
|> builtins.concatLists)
|
||||||
|
(hyprland.autostart.delayed
|
||||||
|
|> builtins.map mkDelayedStart)
|
||||||
|
];
|
||||||
|
|
||||||
|
windowrule = let
|
||||||
|
mkWorkspaceRule = workspace: class:
|
||||||
|
"match:class ^(${class})$, "
|
||||||
|
+ "workspace ${workspace}";
|
||||||
|
mkWorkspaceRules = workspace: class-list:
|
||||||
|
builtins.map (mkWorkspaceRule workspace) class-list;
|
||||||
|
|
||||||
|
mkFloatingRule = attrs:
|
||||||
|
(lib.optionalString (builtins.hasAttr "class" attrs) "match:class ^(${attrs.class})$, ")
|
||||||
|
+ (lib.optionalString (builtins.hasAttr "title" attrs) "match:title ^(${attrs.title})$, ")
|
||||||
|
+ "float 1";
|
||||||
|
|
||||||
|
mkTranslucentRule = class:
|
||||||
|
"match:class ^(${class})$, "
|
||||||
|
+ "opacity ${hyprland.transparent-opacity} ${hyprland.transparent-opacity}";
|
||||||
|
in
|
||||||
|
lib.mkMerge [
|
||||||
|
(hyprland.workspacerules
|
||||||
|
|> builtins.mapAttrs mkWorkspaceRules
|
||||||
|
|> builtins.attrValues
|
||||||
|
|> builtins.concatLists)
|
||||||
|
(hyprland.floating
|
||||||
|
|> builtins.map mkFloatingRule)
|
||||||
|
(hyprland.transparent
|
||||||
|
|> builtins.map mkTranslucentRule)
|
||||||
|
hyprland.windowrules
|
||||||
|
];
|
||||||
|
|
||||||
|
dwindle = {
|
||||||
|
pseudotile = true;
|
||||||
|
preserve_split = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
master = {
|
||||||
|
new_status = "master";
|
||||||
|
};
|
||||||
|
|
||||||
|
gesture = [
|
||||||
|
"3, horizontal, workspace" # 3 Fingers, horizontal, workspace swipe
|
||||||
|
];
|
||||||
|
|
||||||
|
misc = {
|
||||||
|
# Say no to the anime girl
|
||||||
|
disable_hyprland_logo = true;
|
||||||
|
force_default_wallpaper = 0;
|
||||||
|
|
||||||
|
# Say no to the "Application not responding" window
|
||||||
|
enable_anr_dialog = false;
|
||||||
|
|
||||||
|
disable_splash_rendering = true;
|
||||||
|
font_family = "${color.font}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Because those are not windows, but layers,
|
||||||
|
# we have to blur them explicitly
|
||||||
|
layerrule = [
|
||||||
|
"match:class rofi, blur 1"
|
||||||
|
# "match:class rofi, ignore_alpha 0.001" # Fix pixelated corners
|
||||||
|
# "match:class rofi, xray 0" # Render on top of other windows
|
||||||
|
# "match:class rofi, dim_around 1"
|
||||||
|
|
||||||
|
"match:class waybar, blur 1"
|
||||||
|
"match:class gtk4-layer-shell, blur 1"
|
||||||
|
"match:class bar-0, blur 1"
|
||||||
|
"match:class bar-1, blur 1"
|
||||||
|
];
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
rounding = 4;
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
enabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
blur = {
|
||||||
|
enabled = true;
|
||||||
|
size = 10;
|
||||||
|
passes = 3;
|
||||||
|
new_optimizations = true;
|
||||||
|
ignore_opacity = true;
|
||||||
|
xray = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
animations = {
|
||||||
|
enabled = true;
|
||||||
|
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||||
|
animation = [
|
||||||
|
"windows, 1, 7, myBezier"
|
||||||
|
"windowsOut, 1, 7, default,popin 80%"
|
||||||
|
"border, 1, 10, default"
|
||||||
|
"borderangle, 1, 8, default"
|
||||||
|
"fade, 1, 7, default"
|
||||||
|
"workspaces, 1, 6, default"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
plugin = lib.mergeAttrsList [
|
||||||
|
(lib.optionalAttrs hyprland.bars.enable {
|
||||||
|
hyprbars = {
|
||||||
|
enabled = true;
|
||||||
|
|
||||||
|
bar_height = 25;
|
||||||
|
bar_blur = true;
|
||||||
|
bar_color = "rgb(${color.hex.base})";
|
||||||
|
col.text = "rgb(${color.hex.text})";
|
||||||
|
|
||||||
|
bar_title_enabled = true;
|
||||||
|
bar_text_size = 12;
|
||||||
|
bar_text_font = color.font;
|
||||||
|
|
||||||
|
bar_text_align = "center";
|
||||||
|
bar_buttons_alignment = "left";
|
||||||
|
|
||||||
|
bar_part_of_window = true;
|
||||||
|
bar_precedence_over_border = false;
|
||||||
|
|
||||||
|
# example buttons (R -> L)
|
||||||
|
# hyprbars-button = color, size, on-click
|
||||||
|
hyprbars-button = [
|
||||||
|
"rgb(${color.hex.red}), 10, , hyprctl dispatch killactive"
|
||||||
|
"rgb(${color.hex.green}), 10, , hyprctl dispatch fullscreen 1"
|
||||||
|
];
|
||||||
|
|
||||||
|
# cmd to run on double click of the bar
|
||||||
|
on_double_click = "hyprctl dispatch fullscreen 1";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
(lib.optionalAttrs hyprland.dynamicCursor.enable {
|
||||||
|
dynamic-cursors = {
|
||||||
|
# enables the plugin
|
||||||
|
enabled = true;
|
||||||
|
|
||||||
|
# sets the cursor behaviour, supports these values:
|
||||||
|
# tilt - tilt the cursor based on x-velocity
|
||||||
|
# rotate - rotate the cursor based on movement direction
|
||||||
|
# stretch - stretch the cursor shape based on direction and velocity
|
||||||
|
# none - do not change the cursors behaviour
|
||||||
|
mode = "rotate";
|
||||||
|
|
||||||
|
# minimum angle difference in degrees after which the shape is changed
|
||||||
|
# smaller values are smoother, but more expensive for hw cursors
|
||||||
|
threshold = 2;
|
||||||
|
|
||||||
|
# for mode = rotate
|
||||||
|
rotate = {
|
||||||
|
# length in px of the simulated stick used to rotate the cursor
|
||||||
|
# most realistic if this is your actual cursor size
|
||||||
|
length = 20;
|
||||||
|
|
||||||
|
# clockwise offset applied to the angle in degrees
|
||||||
|
# this will apply to ALL shapes
|
||||||
|
offset = 0.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
# for mode = tilt
|
||||||
|
tilt = {
|
||||||
|
# controls how powerful the tilt is, the lower, the more power
|
||||||
|
# this value controls at which speed (px/s) the full tilt is reached
|
||||||
|
# the full tilt being 60° in both directions
|
||||||
|
limit = 1000;
|
||||||
|
|
||||||
|
# relationship between speed and tilt, supports these values:
|
||||||
|
# linear - a linear function is used
|
||||||
|
# quadratic - a quadratic function is used (most realistic to actual air drag)
|
||||||
|
# negative_quadratic - negative version of the quadratic one, feels more aggressive
|
||||||
|
# see `activation` in `src/mode/utils.cpp` for how exactly the calculation is done
|
||||||
|
function = "negative_quadratic";
|
||||||
|
|
||||||
|
# time window (ms) over which the speed is calculated
|
||||||
|
# higher values will make slow motions smoother but more delayed
|
||||||
|
window = 100;
|
||||||
|
};
|
||||||
|
|
||||||
|
# configure shake to find
|
||||||
|
# magnifies the cursor if its is being shaken
|
||||||
|
shake = {
|
||||||
|
# enables shake to find
|
||||||
|
enabled = false;
|
||||||
|
|
||||||
|
# use nearest-neighbour (pixelated) scaling when shaking
|
||||||
|
# may look weird when effects are enabled
|
||||||
|
nearest = true;
|
||||||
|
|
||||||
|
# controls how soon a shake is detected
|
||||||
|
# lower values mean sooner
|
||||||
|
threshold = 3.0;
|
||||||
|
|
||||||
|
# magnification level immediately after shake start
|
||||||
|
base = 1.5;
|
||||||
|
# magnification increase per second when continuing to shake
|
||||||
|
speed = 0.0;
|
||||||
|
# how much the speed is influenced by the current shake intensitiy
|
||||||
|
influence = 0.0;
|
||||||
|
|
||||||
|
# maximal magnification the cursor can reach
|
||||||
|
# values below 1 disable the limit (e.g. 0)
|
||||||
|
limit = 0.0;
|
||||||
|
|
||||||
|
# time in millseconds the cursor will stay magnified after a shake has ended
|
||||||
|
timeout = 1000;
|
||||||
|
|
||||||
|
# show cursor behaviour `tilt`, `rotate`, etc. while shaking
|
||||||
|
effects = true;
|
||||||
|
|
||||||
|
# enable ipc events for shake
|
||||||
|
# see the `ipc` section below
|
||||||
|
ipc = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# use hyprcursor to get a higher resolution texture when the cursor is magnified
|
||||||
|
# see the `hyprcursor` section below
|
||||||
|
hyprcursor = {
|
||||||
|
# use nearest-neighbour (pixelated) scaling when magnifing beyond texture size
|
||||||
|
# this will also have effect without hyprcursor support being enabled
|
||||||
|
# 0 / false - never use pixelated scaling
|
||||||
|
# 1 / true - use pixelated when no highres image
|
||||||
|
# 2 - always use pixleated scaling
|
||||||
|
nearest = true;
|
||||||
|
|
||||||
|
# enable dedicated hyprcursor support
|
||||||
|
enabled = true;
|
||||||
|
|
||||||
|
# resolution in pixels to load the magnified shapes at
|
||||||
|
# be warned that loading a very high-resolution image will take a long time and might impact memory consumption
|
||||||
|
# -1 means we use [normal cursor size] * [shake:base option]
|
||||||
|
resolution = -1;
|
||||||
|
|
||||||
|
# shape to use when clientside cursors are being magnified
|
||||||
|
# see the shape-name property of shape rules for possible names
|
||||||
|
# specifying clientside will use the actual shape, but will be pixelated
|
||||||
|
fallback = "clientside";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
(lib.optionalAttrs hyprland.trails.enable {
|
||||||
|
hyprtrails = {
|
||||||
|
color = "rgb(${color.hex.accent})";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
(lib.optionalAttrs hyprland.hyprspace.enable {
|
||||||
|
overview = {};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -13,7 +13,7 @@ in {
|
|||||||
config = lib.mkIf hyprpanel.enable {
|
config = lib.mkIf hyprpanel.enable {
|
||||||
programs.hyprpanel = {
|
programs.hyprpanel = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = hyprpanel.systemd.enable;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
#
|
#
|
||||||
@ -28,14 +28,15 @@ in {
|
|||||||
"bar.autoHide" = "never";
|
"bar.autoHide" = "never";
|
||||||
|
|
||||||
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/layouts/index.ts
|
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/layouts/index.ts
|
||||||
|
# TODO: To module option
|
||||||
# TODO: This should contain battery etc. for laptop
|
# TODO: This should contain battery etc. for laptop
|
||||||
"bar.layouts" = {
|
"bar.layouts" = {
|
||||||
"HDMI-A-1" = {
|
"DP-1" = {
|
||||||
"left" = ["workspaces" "windowtitle"];
|
"left" = ["workspaces" "windowtitle"];
|
||||||
"middle" = ["media"]; # "cava"
|
"middle" = ["media"]; # "cava"
|
||||||
"right" = ["volume" "network" "bluetooth" "cpu" "ram" "storage" "clock" "systray" "notifications"];
|
"right" = ["volume" "network" "cpu" "ram" "storage" "clock" "systray" "notifications"]; # "bluetooth"
|
||||||
};
|
};
|
||||||
"DP-1" = {
|
"DP-2" = {
|
||||||
"left" = ["workspaces" "windowtitle"];
|
"left" = ["workspaces" "windowtitle"];
|
||||||
"middle" = ["media"]; # "cava"
|
"middle" = ["media"]; # "cava"
|
||||||
"right" = ["volume" "clock" "notifications"];
|
"right" = ["volume" "clock" "notifications"];
|
||||||
@ -68,6 +69,7 @@ in {
|
|||||||
"class:^(Zotero)$" = "";
|
"class:^(Zotero)$" = "";
|
||||||
"class:^(org.zealdocs.zeal)$" = "";
|
"class:^(org.zealdocs.zeal)$" = "";
|
||||||
"class:^(navi)$" = "";
|
"class:^(navi)$" = "";
|
||||||
|
"class:^(org.qutebrowser.qutebrowser)$" = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/index.ts
|
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/index.ts
|
||||||
@ -82,7 +84,7 @@ in {
|
|||||||
"theme.bar.margin_bottom" = "0px";
|
"theme.bar.margin_bottom" = "0px";
|
||||||
"theme.bar.margin_sides" = "10px";
|
"theme.bar.margin_sides" = "10px";
|
||||||
"theme.bar.margin_top" = "10px";
|
"theme.bar.margin_top" = "10px";
|
||||||
"theme.bar.opacity" = 80;
|
"theme.bar.opacity" = 75;
|
||||||
"theme.bar.outer_spacing" = "0px"; # NOTE: Left/Right bar padding
|
"theme.bar.outer_spacing" = "0px"; # NOTE: Left/Right bar padding
|
||||||
"theme.bar.transparent" = false;
|
"theme.bar.transparent" = false;
|
||||||
|
|
||||||
@ -281,7 +283,12 @@ in {
|
|||||||
"theme.bar.buttons.clock.spacing" = "6px";
|
"theme.bar.buttons.clock.spacing" = "6px";
|
||||||
"theme.bar.buttons.clock.text" = "#${color.hex.accentText}";
|
"theme.bar.buttons.clock.text" = "#${color.hex.accentText}";
|
||||||
|
|
||||||
|
# TODO: To module option
|
||||||
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/systray/index.ts
|
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/config/bar/systray/index.ts
|
||||||
|
"bar.systray.ignore" = [
|
||||||
|
"Fcitx" # Keyboard indicator
|
||||||
|
]; # Middle click the tray icon to show a notification with the app name :)
|
||||||
|
"bar.systray.customIcons" = {};
|
||||||
|
|
||||||
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/systray.ts
|
# https://github.com/Jas-SinghFSU/HyprPanel/blob/master/src/configuration/modules/theme/bar/buttons/systray.ts
|
||||||
"theme.bar.buttons.systray.background" = "#${color.hex.blue}";
|
"theme.bar.buttons.systray.background" = "#${color.hex.blue}";
|
||||||
|
|||||||
@ -5,5 +5,6 @@
|
|||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
with mylib.modules; {
|
with mylib.modules; {
|
||||||
enable = mkEnableOption "hyprpanel";
|
enable = mkEnableOption "Enable Hyprpanel";
|
||||||
|
systemd.enable = mkEnableOption "Start using systemd";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,7 +74,9 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
mpd-discord-rpc = {
|
mpd-discord-rpc = {
|
||||||
enable = true;
|
# NOTE: Creates a new thread for each IPC request but don't cleans them up?
|
||||||
|
# They just keep accumulating when discord is not running lol
|
||||||
|
enable = false;
|
||||||
|
|
||||||
# NOTE: Bitch wants to create a default config file inside a
|
# NOTE: Bitch wants to create a default config file inside a
|
||||||
# read-only filesystem when changing settings here...
|
# read-only filesystem when changing settings here...
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
system,
|
system,
|
||||||
|
headless,
|
||||||
username,
|
username,
|
||||||
hostname,
|
hostname,
|
||||||
config,
|
config,
|
||||||
@ -25,31 +26,9 @@ in {
|
|||||||
|
|
||||||
packages = with pkgs;
|
packages = with pkgs;
|
||||||
builtins.concatLists [
|
builtins.concatLists [
|
||||||
(lib.optionals neovim.neovide [
|
(lib.optionals neovim.neovide [neovide])
|
||||||
# TODO: Remove this after 0.15.1 hit nixpkgs
|
|
||||||
(neovide.overrideAttrs (finalAttrs: prevAttrs: {
|
|
||||||
version = "0.15.1";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "neovide";
|
|
||||||
repo = "neovide";
|
|
||||||
tag = finalAttrs.version;
|
|
||||||
hash = "sha256-2iV3g6tcCkMF7sFG/GZDz3czPZNIDi6YLfrVzYO9jYI=";
|
|
||||||
};
|
|
||||||
cargoHash = "sha256-YlHAcUCRk6ROg5yXIumHfsiR/2TrsSzbuXz/IQK7sEo=";
|
|
||||||
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
|
|
||||||
inherit (finalAttrs) pname src version;
|
|
||||||
hash = finalAttrs.cargoHash;
|
|
||||||
};
|
|
||||||
}))
|
|
||||||
])
|
|
||||||
|
|
||||||
[
|
|
||||||
(pkgs.ripgrep.override {withPCRE2 = true;})
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
lua54Packages.jsregexp # For tree-sitter
|
|
||||||
# nodejs_latest
|
|
||||||
|
|
||||||
|
(lib.optionals (!headless) [
|
||||||
# Language servers
|
# Language servers
|
||||||
clang-tools
|
clang-tools
|
||||||
clojure-lsp
|
clojure-lsp
|
||||||
@ -58,7 +37,7 @@ in {
|
|||||||
jdt-language-server
|
jdt-language-server
|
||||||
ltex-ls # TODO: Only enable on-demand
|
ltex-ls # TODO: Only enable on-demand
|
||||||
lua-language-server
|
lua-language-server
|
||||||
nil
|
# nil
|
||||||
nixd
|
nixd
|
||||||
basedpyright
|
basedpyright
|
||||||
pyrefly
|
pyrefly
|
||||||
@ -68,8 +47,9 @@ in {
|
|||||||
tailwindcss-language-server
|
tailwindcss-language-server
|
||||||
tex-fmt
|
tex-fmt
|
||||||
texlab
|
texlab
|
||||||
|
tinymist
|
||||||
typescript
|
typescript
|
||||||
# vscode-langservers-extracted # includes nodejs
|
vscode-langservers-extracted # includes nodejs
|
||||||
|
|
||||||
# Linters
|
# Linters
|
||||||
checkstyle # java
|
checkstyle # java
|
||||||
@ -94,6 +74,15 @@ in {
|
|||||||
# nodePackages_latest.prettier # Use local install as plugins change per project
|
# nodePackages_latest.prettier # Use local install as plugins change per project
|
||||||
rustfmt
|
rustfmt
|
||||||
stylua
|
stylua
|
||||||
|
typstyle
|
||||||
|
])
|
||||||
|
|
||||||
|
[
|
||||||
|
(pkgs.ripgrep.override {withPCRE2 = true;})
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
lua54Packages.jsregexp # For tree-sitter
|
||||||
|
# nodejs_latest
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -422,7 +411,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
fuzzy = {
|
fuzzy = {
|
||||||
use_frecency = true;
|
frecency.enabled = true;
|
||||||
use_proximity = true;
|
use_proximity = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -528,9 +517,10 @@ in {
|
|||||||
nix = ["alejandra"];
|
nix = ["alejandra"];
|
||||||
python = ["black"];
|
python = ["black"];
|
||||||
qml = ["qmlformat"];
|
qml = ["qmlformat"];
|
||||||
|
rust = ["rustfmt"];
|
||||||
svelte = ["prettierd" "prettier"];
|
svelte = ["prettierd" "prettier"];
|
||||||
typescript = ["prettierd" "prettier"];
|
typescript = ["prettierd" "prettier"];
|
||||||
rust = ["rustfmt"];
|
typst = ["typstyle"];
|
||||||
};
|
};
|
||||||
|
|
||||||
default_format_opts = {
|
default_format_opts = {
|
||||||
@ -597,89 +587,89 @@ in {
|
|||||||
# Don't call setup!
|
# Don't call setup!
|
||||||
};
|
};
|
||||||
|
|
||||||
hover = let
|
# hover = let
|
||||||
# Display LSP information and Diagnostics at the same time
|
# # Display LSP information and Diagnostics at the same time
|
||||||
# https://github.com/lewis6991/hover.nvim/issues/34#issuecomment-1625662866
|
# # https://github.com/lewis6991/hover.nvim/issues/34#issuecomment-1625662866
|
||||||
lspWithDiag = ''
|
# lspWithDiag = ''
|
||||||
{
|
# {
|
||||||
name = "LSP",
|
# name = "LSP",
|
||||||
priority = 1000,
|
# priority = 1000,
|
||||||
enabled = function()
|
# enabled = function()
|
||||||
return true
|
# return true
|
||||||
end,
|
# end,
|
||||||
|
#
|
||||||
execute = function(opts, done)
|
# execute = function(opts, done)
|
||||||
local params = vim.lsp.util.make_position_params()
|
# local params = vim.lsp.util.make_position_params()
|
||||||
local ___ = "\n─────────────────────────────────────────────────────────────────────────────\n"
|
# local ___ = "\n─────────────────────────────────────────────────────────────────────────────\n"
|
||||||
|
#
|
||||||
vim.lsp.buf_request_all(0, 'textDocument/hover', params, function(responses)
|
# vim.lsp.buf_request_all(0, 'textDocument/hover', params, function(responses)
|
||||||
local value = ""
|
# local value = ""
|
||||||
for _, response in pairs(responses) do
|
# for _, response in pairs(responses) do
|
||||||
local result = response.result
|
# local result = response.result
|
||||||
if result and result.contents and result.contents.value then
|
# if result and result.contents and result.contents.value then
|
||||||
if value ~= "" then
|
# if value ~= "" then
|
||||||
value = value .. ___
|
# value = value .. ___
|
||||||
end
|
# end
|
||||||
value = value .. result.contents.value
|
# value = value .. result.contents.value
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
local _, row = unpack(vim.fn.getpos("."))
|
# local _, row = unpack(vim.fn.getpos("."))
|
||||||
local lineDiag = vim.diagnostic.get(0, { lnum = row - 1 })
|
# local lineDiag = vim.diagnostic.get(0, { lnum = row - 1 })
|
||||||
for _, d in pairs(lineDiag) do
|
# for _, d in pairs(lineDiag) do
|
||||||
if d.message then
|
# if d.message then
|
||||||
if value ~= "" then
|
# if value ~= "" then
|
||||||
value = value .. ___
|
# value = value .. ___
|
||||||
end
|
# end
|
||||||
value = value .. string.format("*%s* %s", d.source, d.message)
|
# value = value .. string.format("*%s* %s", d.source, d.message)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
value = value:gsub("\r", "")
|
# value = value:gsub("\r", "")
|
||||||
|
#
|
||||||
if value ~= "" then
|
# if value ~= "" then
|
||||||
done({ lines = vim.split(value, "\n", true), filetype = "markdown" })
|
# done({ lines = vim.split(value, "\n", true), filetype = "markdown" })
|
||||||
else
|
# else
|
||||||
done()
|
# done()
|
||||||
end
|
# end
|
||||||
end)
|
# end)
|
||||||
end,
|
# end,
|
||||||
}
|
# }
|
||||||
'';
|
# '';
|
||||||
in rec {
|
# in rec {
|
||||||
name = "hover";
|
# name = "hover";
|
||||||
pkg = pkgs.vimPlugins.hover-nvim;
|
# pkg = pkgs.vimPlugins.hover-nvim;
|
||||||
lazy = true;
|
# lazy = true;
|
||||||
event = ["BufReadPost" "BufNewFile"];
|
# event = ["BufReadPost" "BufNewFile"];
|
||||||
config = mkDefaultConfig name;
|
# config = mkDefaultConfig name;
|
||||||
opts = {
|
# opts = {
|
||||||
init.__raw = ''
|
# init.__raw = ''
|
||||||
function()
|
# function()
|
||||||
-- Register custom providers
|
# -- Register custom providers
|
||||||
require('hover').register(${lspWithDiag})
|
# require('hover').register(${lspWithDiag})
|
||||||
|
#
|
||||||
-- Require providers
|
# -- Require providers
|
||||||
-- require("hover.providers.lsp")
|
# -- require("hover.providers.lsp")
|
||||||
-- require('hover.providers.diagnostic')
|
# -- require('hover.providers.diagnostic')
|
||||||
require('hover.providers.fold_preview')
|
# require('hover.providers.fold_preview')
|
||||||
require('hover.providers.man')
|
# require('hover.providers.man')
|
||||||
|
#
|
||||||
-- require('hover.providers.gh')
|
# -- require('hover.providers.gh')
|
||||||
-- require('hover.providers.gh_user')
|
# -- require('hover.providers.gh_user')
|
||||||
-- require('hover.providers.jira')
|
# -- require('hover.providers.jira')
|
||||||
-- require('hover.providers.dap')
|
# -- require('hover.providers.dap')
|
||||||
-- require('hover.providers.dictionary')
|
# -- require('hover.providers.dictionary')
|
||||||
-- require('hover.providers.highlight')
|
# -- require('hover.providers.highlight')
|
||||||
end
|
# end
|
||||||
'';
|
# '';
|
||||||
preview_opts = {
|
# preview_opts = {
|
||||||
border = "rounded";
|
# border = "rounded";
|
||||||
};
|
# };
|
||||||
# Whether the contents of a currently open hover window should be moved
|
# # Whether the contents of a currently open hover window should be moved
|
||||||
# to a :h preview-window when pressing the hover keymap.
|
# # to a :h preview-window when pressing the hover keymap.
|
||||||
preview_window = false;
|
# preview_window = false;
|
||||||
title = false;
|
# title = false;
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
|
|
||||||
illuminate = rec {
|
illuminate = rec {
|
||||||
name = "illuminate";
|
name = "illuminate";
|
||||||
@ -836,10 +826,11 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# NOTE: This entire thing is rough, I should rewrite...
|
# NOTE: This entire thing is rough, I should rewrite...
|
||||||
|
# TODO: Need to rewrite this once lspconfig 3.0 comes around
|
||||||
lspconfig = {
|
lspconfig = {
|
||||||
name = "lspconfig";
|
name = "lspconfig";
|
||||||
pkg = pkgs.vimPlugins.nvim-lspconfig;
|
pkg = pkgs.vimPlugins.nvim-lspconfig;
|
||||||
lazy = true;
|
lazy = false;
|
||||||
cmd = ["LspInfo"];
|
cmd = ["LspInfo"];
|
||||||
event = ["BufReadPost" "BufNewFile"];
|
event = ["BufReadPost" "BufNewFile"];
|
||||||
dependencies = [_lazydev];
|
dependencies = [_lazydev];
|
||||||
@ -853,14 +844,17 @@ in {
|
|||||||
extraOptions = {
|
extraOptions = {
|
||||||
root_dir.__raw = ''
|
root_dir.__raw = ''
|
||||||
function(fname)
|
function(fname)
|
||||||
return require("lspconfig.util").root_pattern(
|
-- return require("lspconfig.util").root_pattern(
|
||||||
|
return vim.lsp.config.util.root_pattern(
|
||||||
"Makefile",
|
"Makefile",
|
||||||
"CMakeLists.txt",
|
"CMakeLists.txt",
|
||||||
".clang-format",
|
".clang-format",
|
||||||
".clang-tidy"
|
".clang-tidy"
|
||||||
)(fname) or require("lspconfig.util").root_pattern(
|
-- )(fname) or require("lspconfig.util").root_pattern(
|
||||||
|
)(fname) or vim.lsp.config.util.root_pattern(
|
||||||
"compile_commands.json"
|
"compile_commands.json"
|
||||||
)(fname) or require("lspconfig.util").find_git_ancestor(fname)
|
-- )(fname) or require("lspconfig.util").find_git_ancestor(fname)
|
||||||
|
)(fname) or vim.lsp.config.util.find_git_ancestor(fname)
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -888,7 +882,7 @@ in {
|
|||||||
{name = "clojure_lsp";}
|
{name = "clojure_lsp";}
|
||||||
{name = "cmake";}
|
{name = "cmake";}
|
||||||
{name = "cssls";}
|
{name = "cssls";}
|
||||||
# {name = "html";} # vscode-langservers-extracted
|
{name = "html";} # vscode-langservers-extracted
|
||||||
{name = "lua_ls";}
|
{name = "lua_ls";}
|
||||||
{
|
{
|
||||||
name = "ltex";
|
name = "ltex";
|
||||||
@ -899,7 +893,7 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{name = "nil_ls";}
|
# {name = "nil_ls";}
|
||||||
{
|
{
|
||||||
name = "nixd";
|
name = "nixd";
|
||||||
extraOptions.cmd = [
|
extraOptions.cmd = [
|
||||||
@ -950,6 +944,14 @@ in {
|
|||||||
{name = "svelte";}
|
{name = "svelte";}
|
||||||
{name = "tailwindcss";}
|
{name = "tailwindcss";}
|
||||||
{name = "texlab";}
|
{name = "texlab";}
|
||||||
|
{
|
||||||
|
name = "tinymist";
|
||||||
|
extraOptions.settings = {
|
||||||
|
formatterMode = "typstyle";
|
||||||
|
exportPdf = "onType";
|
||||||
|
semanticTokens = "disable";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
# {name = "jdtls";} # Don't set up when using nvim-jdtls
|
# {name = "jdtls";} # Don't set up when using nvim-jdtls
|
||||||
# {name = "rust_analyzer";} # Don't set up when using rustaceanvim
|
# {name = "rust_analyzer";} # Don't set up when using rustaceanvim
|
||||||
@ -957,9 +959,6 @@ in {
|
|||||||
];
|
];
|
||||||
in ''
|
in ''
|
||||||
function(_, opts)
|
function(_, opts)
|
||||||
-- Make LspInfo window border rounded
|
|
||||||
require("lspconfig.ui.windows").default_options.border = "rounded"
|
|
||||||
|
|
||||||
local __lspOnAttach = function(client, bufnr)
|
local __lspOnAttach = function(client, bufnr)
|
||||||
|
|
||||||
-- NOTE: The ltex-extra package needs to be loaded in ltex's onAttach.
|
-- NOTE: The ltex-extra package needs to be loaded in ltex's onAttach.
|
||||||
@ -1001,9 +1000,12 @@ in {
|
|||||||
capabilities = __lspCapabilities(),
|
capabilities = __lspCapabilities(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Enable configured servers
|
||||||
for i, server in ipairs(${servers}) do
|
for i, server in ipairs(${servers}) do
|
||||||
if type(server) == "string" then
|
if type(server) == "string" then
|
||||||
require("lspconfig")[server].setup(__setup)
|
-- require("lspconfig")[server].setup(__setup)
|
||||||
|
vim.lsp.config(server, __setup)
|
||||||
|
vim.lsp.enable(server)
|
||||||
else
|
else
|
||||||
local options = server.extraOptions
|
local options = server.extraOptions
|
||||||
|
|
||||||
@ -1013,7 +1015,9 @@ in {
|
|||||||
options = vim.tbl_extend("keep", options, __setup)
|
options = vim.tbl_extend("keep", options, __setup)
|
||||||
end
|
end
|
||||||
|
|
||||||
require("lspconfig")[server.name].setup(options)
|
-- require("lspconfig")[server.name].setup(options)
|
||||||
|
vim.lsp.config(server.name, options)
|
||||||
|
vim.lsp.enable(server.name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1511,6 +1515,8 @@ in {
|
|||||||
line_length = 1000;
|
line_length = 1000;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bufdelete.enabled = false;
|
||||||
|
|
||||||
dashboard = {
|
dashboard = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
|
|
||||||
@ -1572,11 +1578,24 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
debug.enabled = false;
|
||||||
|
dim.enabled = false;
|
||||||
|
|
||||||
explorer = {
|
explorer = {
|
||||||
enabled = false;
|
enabled = false;
|
||||||
replace_netrw = false; # Use yazi for that
|
replace_netrw = false; # Use yazi for that
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gh.enabled = false;
|
||||||
|
git.enabled = false;
|
||||||
|
gitbrowse.enabled = false;
|
||||||
|
image.enabled = false;
|
||||||
|
indent.enabled = false;
|
||||||
|
input.enabled = false;
|
||||||
|
keymap.enabled = false;
|
||||||
|
layout.enabled = false;
|
||||||
|
lazygit.enabled = true;
|
||||||
|
|
||||||
notifier = {
|
notifier = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
};
|
};
|
||||||
@ -1590,6 +1609,7 @@ in {
|
|||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
|
|
||||||
layout = {
|
layout = {
|
||||||
cycle = true;
|
cycle = true;
|
||||||
preset.__raw = defaultLayout;
|
preset.__raw = defaultLayout;
|
||||||
@ -1600,10 +1620,31 @@ in {
|
|||||||
layout.__raw = defaultLayout;
|
layout.__raw = defaultLayout;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
formatters = {
|
||||||
|
file = {
|
||||||
|
filename_first = true;
|
||||||
|
truncate = 80;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
profiler.enabled = false;
|
||||||
|
quickfile.enabled = false;
|
||||||
|
rename.enabled = false;
|
||||||
|
scope.enabled = false;
|
||||||
|
scratch.enabled = false;
|
||||||
|
scroll.enabled = false;
|
||||||
|
statuscolumn.enabled = false;
|
||||||
|
terminal.enabled = false;
|
||||||
|
toggle.enabled = false;
|
||||||
|
util.enabled = false;
|
||||||
|
win.enabled = false;
|
||||||
|
words.enabled = false;
|
||||||
|
zen.enabled = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
tabby = rec {
|
tabby = rec {
|
||||||
name = "tabby";
|
name = "tabby";
|
||||||
pkg = pkgs.vimPlugins.tabby-nvim;
|
pkg = pkgs.vimPlugins.tabby-nvim;
|
||||||
@ -1892,6 +1933,24 @@ in {
|
|||||||
config = mkDefaultConfig name;
|
config = mkDefaultConfig name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typst-preview = rec {
|
||||||
|
name = "typst-preview";
|
||||||
|
pkg = pkgs.vimPlugins.typst-preview-nvim;
|
||||||
|
lazy = true;
|
||||||
|
ft = ["typst"];
|
||||||
|
config = mkDefaultConfig name;
|
||||||
|
opts = {
|
||||||
|
dependencies_bin.__raw = ''
|
||||||
|
{
|
||||||
|
['tinymist'] = "${pkgs.tinymist}/bin/tinymist",
|
||||||
|
['websocat'] = "${pkgs.websocat}/bin/websocat"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
# open_cmd = "qutebrowser %s";
|
||||||
|
# open_cmd = "firefox %s -P typst-preview --class typst-preview";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
_promise = {
|
_promise = {
|
||||||
name = "promise";
|
name = "promise";
|
||||||
pkg = pkgs.vimPlugins.promise-async;
|
pkg = pkgs.vimPlugins.promise-async;
|
||||||
@ -2043,9 +2102,10 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
in [
|
in [
|
||||||
autopairs # Automatic closing brackets/parens # NOTE: For now replaced by blink
|
autopairs # Automatic closing brackets/parens
|
||||||
|
|
||||||
|
# better-escape # Escape with "jk" # NOTE: Bad in lazygit + looses visual selection when correcting too fast
|
||||||
|
|
||||||
better-escape # Escape to normal mode using "jk"
|
|
||||||
catppuccin # Colortheme (also add this here to access palettes)
|
catppuccin # Colortheme (also add this here to access palettes)
|
||||||
clangd-extensions # Improved clang LSP support
|
clangd-extensions # Improved clang LSP support
|
||||||
blink-cmp # Fast as fuck auto completion
|
blink-cmp # Fast as fuck auto completion
|
||||||
@ -2064,7 +2124,9 @@ in {
|
|||||||
flash # Highlight f/F search results
|
flash # Highlight f/F search results
|
||||||
gitsigns # Show git line additions/deletions/changes in the gutter
|
gitsigns # Show git line additions/deletions/changes in the gutter
|
||||||
haskell-tools # Haskell integration
|
haskell-tools # Haskell integration
|
||||||
hover # Multiple hover providers
|
|
||||||
|
# hover # Multiple hover providers
|
||||||
|
|
||||||
illuminate # Highlight usages of word under cursor
|
illuminate # Highlight usages of word under cursor
|
||||||
|
|
||||||
intellitab # Indent to the correct level on blanklines # TODO: Behaves bit fishy sometimes
|
intellitab # Indent to the correct level on blanklines # TODO: Behaves bit fishy sometimes
|
||||||
@ -2105,6 +2167,7 @@ in {
|
|||||||
trouble # Diagnostics window
|
trouble # Diagnostics window
|
||||||
ts-autotag # Automatic html tag insertion/updating
|
ts-autotag # Automatic html tag insertion/updating
|
||||||
typescript-tools # Typescript tsserver LSP
|
typescript-tools # Typescript tsserver LSP
|
||||||
|
typst-preview # Typst support
|
||||||
ufo # Code folding
|
ufo # Code folding
|
||||||
vimtex # LaTeX support
|
vimtex # LaTeX support
|
||||||
# wakatime # Time tracking
|
# wakatime # Time tracking
|
||||||
@ -2113,7 +2176,8 @@ in {
|
|||||||
window-picker # Jump to window without multiple <leader-hjkl>
|
window-picker # Jump to window without multiple <leader-hjkl>
|
||||||
winshift # Move windows around
|
winshift # Move windows around
|
||||||
yanky # Clipboard history
|
yanky # Clipboard history
|
||||||
yazi
|
|
||||||
|
yazi # File manager: TODO: Theming
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -14,7 +14,7 @@ if g.neovide then
|
|||||||
g.neovide_padding_bottom = 0
|
g.neovide_padding_bottom = 0
|
||||||
g.neovide_padding_right = 0
|
g.neovide_padding_right = 0
|
||||||
g.neovide_padding_left = 0
|
g.neovide_padding_left = 0
|
||||||
g.neovide_refresh_rate = 144
|
g.neovide_refresh_rate = 165
|
||||||
g.neovide_floating_corner_radius = 0.0
|
g.neovide_floating_corner_radius = 0.0
|
||||||
-- g.neovide_theme = "light"
|
-- g.neovide_theme = "light"
|
||||||
|
|
||||||
|
|||||||
@ -259,18 +259,18 @@ _: let
|
|||||||
action = "<cmd>nohlsearch<cr>";
|
action = "<cmd>nohlsearch<cr>";
|
||||||
options.desc = "Clear Search Highlights";
|
options.desc = "Clear Search Highlights";
|
||||||
}
|
}
|
||||||
# {
|
|
||||||
# mode = "n";
|
|
||||||
# key = "K";
|
|
||||||
# action = "<cmd>lua vim.lsp.buf.hover()<cr>";
|
|
||||||
# options.desc = "LSP Hover";
|
|
||||||
# }
|
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "K";
|
key = "K";
|
||||||
action = "<cmd>lua require('hover').hover()<cr>";
|
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
|
||||||
options.desc = "LSP Hover";
|
options.desc = "LSP Hover";
|
||||||
}
|
}
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "K";
|
||||||
|
# action = "<cmd>lua require('hover').hover()<cr>";
|
||||||
|
# options.desc = "LSP Hover";
|
||||||
|
# }
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "/";
|
key = "/";
|
||||||
@ -301,10 +301,15 @@ _: let
|
|||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>e";
|
key = "<leader>e";
|
||||||
# action = "<cmd>lua Snacks.explorer.open({ enter = false, on_show = function() vim.cmd('wincmd =') end })<cr>";
|
|
||||||
action = "<cmd>Neotree action=show toggle=true<cr><C-w>=";
|
action = "<cmd>Neotree action=show toggle=true<cr><C-w>=";
|
||||||
options.desc = "Toggle Explorer";
|
options.desc = "Toggle Explorer";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>E";
|
||||||
|
action = "<cmd>Neotree<cr>";
|
||||||
|
options.desc = "Focus Explorer";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>n";
|
key = "<leader>n";
|
||||||
@ -829,19 +834,19 @@ _: let
|
|||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>tt";
|
key = "<leader>tt";
|
||||||
action = "<cmd>Trouble diagnostics toggle focus=false win.position=bottom<cr>";
|
action = "<cmd>Trouble diagnostics toggle focus=false win.position=left<cr>";
|
||||||
options.desc = "Trouble Diagnostics";
|
options.desc = "Trouble Diagnostics";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>tD";
|
key = "<leader>tD";
|
||||||
action = "<cmd>Trouble todo toggle focus=false win.position=bottom<cr>";
|
action = "<cmd>Trouble todo toggle focus=false win.position=left<cr>";
|
||||||
options.desc = "Toggle TODOs";
|
options.desc = "Toggle TODOs";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>ts";
|
key = "<leader>ts";
|
||||||
action = "<cmd>Trouble symbols toggle focus=false win.position=right<cr>";
|
action = "<cmd>Trouble symbols toggle focus=false win.position=left<cr>";
|
||||||
options.desc = "Trouble Symbols";
|
options.desc = "Trouble Symbols";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,6 +10,7 @@ _: {
|
|||||||
formatexpr = "v:lua.require('conform').formatexpr()";
|
formatexpr = "v:lua.require('conform').formatexpr()";
|
||||||
laststatus = 3; # Global statusline
|
laststatus = 3; # Global statusline
|
||||||
winblend = 30; # Floating popup transparency
|
winblend = 30; # Floating popup transparency
|
||||||
|
winborder = "rounded";
|
||||||
sessionoptions = ["buffers" "curdir" "folds" "globals" "help" "skiprtp" "tabpages" "winsize"]; # What should be saved when creating a session
|
sessionoptions = ["buffers" "curdir" "folds" "globals" "help" "skiprtp" "tabpages" "winsize"]; # What should be saved when creating a session
|
||||||
showtabline = 2; # Disable tabline with 0, show for > 1 with 1, always show with 2
|
showtabline = 2; # Disable tabline with 0, show for > 1 with 1, always show with 2
|
||||||
conceallevel = 2;
|
conceallevel = 2;
|
||||||
|
|||||||
482
home/modules/niri/dankMaterialShell.nix
Normal file
@ -0,0 +1,482 @@
|
|||||||
|
{color}: {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
enable = false;
|
||||||
|
restartIfChanged = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Deprecated
|
||||||
|
# enableClipboard = true;
|
||||||
|
# enableBrightnessControl = false;
|
||||||
|
# enableColorPicker = true;
|
||||||
|
# enableSystemSound = false;
|
||||||
|
|
||||||
|
enableSystemMonitoring = true;
|
||||||
|
enableVPN = true;
|
||||||
|
enableDynamicTheming = false;
|
||||||
|
enableAudioWavelength = true;
|
||||||
|
enableCalendarEvents = false;
|
||||||
|
|
||||||
|
niri = {
|
||||||
|
enableKeybinds = false;
|
||||||
|
enableSpawn = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# This is generated from the DMS settings dialog.
|
||||||
|
# Run: nix eval --impure --expr 'builtins.fromJSON (builtins.readFile ~/.config/DankMaterialShell/settings.json)'
|
||||||
|
default.settings = {
|
||||||
|
# Bar
|
||||||
|
barConfigs = [
|
||||||
|
{
|
||||||
|
# Widgets
|
||||||
|
leftWidgets = [
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "launcherButton";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "workspaceSwitcher";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
focusedWindowCompactMode = true;
|
||||||
|
id = "focusedWindow";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
centerWidgets = [
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "music";
|
||||||
|
mediaSize = 1;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
rightWidgets = [
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "cpuUsage";
|
||||||
|
minimumWidth = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "memUsage";
|
||||||
|
minimumWidth = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "diskUsage";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "clipboard";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "controlCenterButton";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "systemTray";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
clockCompactMode = true;
|
||||||
|
enabled = true;
|
||||||
|
id = "clock";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "notificationButton";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
enabled = true;
|
||||||
|
id = "default";
|
||||||
|
name = "Main Bar";
|
||||||
|
|
||||||
|
# Behavior
|
||||||
|
autoHide = false;
|
||||||
|
autoHideDelay = 250;
|
||||||
|
maximizeDetection = true;
|
||||||
|
openOnOverview = false;
|
||||||
|
|
||||||
|
# Border
|
||||||
|
borderColor = "surfaceText";
|
||||||
|
borderEnabled = false;
|
||||||
|
borderOpacity = 1;
|
||||||
|
borderThickness = 2;
|
||||||
|
gothCornerRadiusOverride = false;
|
||||||
|
gothCornerRadiusValue = 12;
|
||||||
|
gothCornersEnabled = false;
|
||||||
|
|
||||||
|
# Styling
|
||||||
|
position = 0;
|
||||||
|
fontScale = 1.1;
|
||||||
|
bottomGap = 0;
|
||||||
|
innerPadding = 4;
|
||||||
|
noBackground = false;
|
||||||
|
popupGapsAuto = true;
|
||||||
|
popupGapsManual = 4;
|
||||||
|
spacing = 0;
|
||||||
|
transparency = 1;
|
||||||
|
widgetOutlineColor = "primary";
|
||||||
|
widgetOutlineEnabled = false;
|
||||||
|
widgetOutlineOpacity = 1;
|
||||||
|
widgetOutlineThickness = 2;
|
||||||
|
widgetTransparency = 1;
|
||||||
|
squareCorners = true;
|
||||||
|
screenPreferences = ["all"];
|
||||||
|
showOnLastDisplay = true;
|
||||||
|
visible = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Power saving
|
||||||
|
acLockTimeout = 0;
|
||||||
|
acMonitorTimeout = 0;
|
||||||
|
acProfileName = "";
|
||||||
|
acSuspendBehavior = 0;
|
||||||
|
acSuspendTimeout = 0;
|
||||||
|
|
||||||
|
animationSpeed = 1;
|
||||||
|
|
||||||
|
# Launcher
|
||||||
|
appLauncherGridColumns = 4;
|
||||||
|
appLauncherViewMode = "list";
|
||||||
|
launchPrefix = "";
|
||||||
|
launcherLogoBrightness = 0.5;
|
||||||
|
launcherLogoColorInvertOnMode = false;
|
||||||
|
launcherLogoColorOverride = "";
|
||||||
|
launcherLogoContrast = 1;
|
||||||
|
launcherLogoCustomPath = "";
|
||||||
|
launcherLogoMode = "os";
|
||||||
|
launcherLogoSizeOffset = 0;
|
||||||
|
|
||||||
|
# Audio
|
||||||
|
audioInputDevicePins = {};
|
||||||
|
audioOutputDevicePins = {};
|
||||||
|
audioVisualizerEnabled = true;
|
||||||
|
|
||||||
|
# Battery
|
||||||
|
batteryLockTimeout = 0;
|
||||||
|
batteryMonitorTimeout = 0;
|
||||||
|
batteryProfileName = "";
|
||||||
|
batterySuspendBehavior = 0;
|
||||||
|
batterySuspendTimeout = 0;
|
||||||
|
|
||||||
|
# Wallpaper
|
||||||
|
blurWallpaperOnOverview = true;
|
||||||
|
blurredWallpaperLayer = false;
|
||||||
|
wallpaperFillMode = "Fill";
|
||||||
|
|
||||||
|
# Control center
|
||||||
|
controlCenterShowAudioIcon = true;
|
||||||
|
controlCenterShowBatteryIcon = false;
|
||||||
|
controlCenterShowBluetoothIcon = true;
|
||||||
|
controlCenterShowBrightnessIcon = false;
|
||||||
|
controlCenterShowMicIcon = true;
|
||||||
|
controlCenterShowNetworkIcon = true;
|
||||||
|
controlCenterShowPrinterIcon = false;
|
||||||
|
controlCenterShowVpnIcon = true;
|
||||||
|
controlCenterWidgets = [
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "volumeSlider";
|
||||||
|
width = 50;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "brightnessSlider";
|
||||||
|
width = 50;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "wifi";
|
||||||
|
width = 50;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "bluetooth";
|
||||||
|
width = 50;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "audioOutput";
|
||||||
|
width = 50;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "audioInput";
|
||||||
|
width = 50;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "nightMode";
|
||||||
|
width = 50;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
id = "darkMode";
|
||||||
|
width = 50;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Styling
|
||||||
|
cornerRadius = 10;
|
||||||
|
currentThemeName = "cat-mauve";
|
||||||
|
customAnimationDuration = 500;
|
||||||
|
fontFamily = "MonoLisa Normal";
|
||||||
|
monoFontFamily = "MonoLisa Normal";
|
||||||
|
fontScale = 1;
|
||||||
|
fontWeight = 500;
|
||||||
|
gtkThemingEnabled = false;
|
||||||
|
iconTheme = "System Default";
|
||||||
|
|
||||||
|
# Lock
|
||||||
|
fadeToLockEnabled = true;
|
||||||
|
fadeToLockGracePeriod = 5;
|
||||||
|
lockBeforeSuspend = false;
|
||||||
|
lockDateFormat = "yyyy-MM-dd";
|
||||||
|
lockScreenActiveMonitor = "all";
|
||||||
|
lockScreenInactiveColor = "#000000";
|
||||||
|
lockScreenShowDate = true;
|
||||||
|
lockScreenShowPasswordField = true;
|
||||||
|
lockScreenShowPowerActions = true;
|
||||||
|
lockScreenShowProfileImage = true;
|
||||||
|
lockScreenShowSystemIcons = true;
|
||||||
|
lockScreenShowTime = true;
|
||||||
|
loginctlLockIntegration = true;
|
||||||
|
|
||||||
|
# Notifications
|
||||||
|
notificationOverlayEnabled = false;
|
||||||
|
notificationPopupPosition = 0;
|
||||||
|
notificationTimeoutCritical = 0;
|
||||||
|
notificationTimeoutLow = 5000;
|
||||||
|
notificationTimeoutNormal = 5000;
|
||||||
|
|
||||||
|
# OSD
|
||||||
|
osdAlwaysShowValue = true;
|
||||||
|
osdAudioOutputEnabled = true;
|
||||||
|
osdBrightnessEnabled = true;
|
||||||
|
osdCapsLockEnabled = true;
|
||||||
|
osdIdleInhibitorEnabled = true;
|
||||||
|
osdMediaVolumeEnabled = true;
|
||||||
|
osdMicMuteEnabled = true;
|
||||||
|
osdPosition = 7;
|
||||||
|
osdPowerProfileEnabled = false;
|
||||||
|
osdVolumeEnabled = true;
|
||||||
|
|
||||||
|
# Power menu
|
||||||
|
powerActionConfirm = true;
|
||||||
|
powerActionHoldDuration = 0.5;
|
||||||
|
powerMenuActions = ["reboot" "logout" "poweroff" "lock" "restart"];
|
||||||
|
powerMenuDefaultAction = "poweroff";
|
||||||
|
powerMenuGridLayout = false;
|
||||||
|
|
||||||
|
# Settings
|
||||||
|
focusedWindowCompactMode = false;
|
||||||
|
hideBrightnessSlider = false;
|
||||||
|
keyboardLayoutNameCompactMode = false;
|
||||||
|
modalDarkenBackground = true;
|
||||||
|
nightModeEnabled = false;
|
||||||
|
niriOverviewOverlayEnabled = true;
|
||||||
|
showBattery = false;
|
||||||
|
showCapsLockIndicator = false;
|
||||||
|
showClipboard = true;
|
||||||
|
showClock = true;
|
||||||
|
showControlCenterButton = true;
|
||||||
|
showCpuTemp = true;
|
||||||
|
showCpuUsage = true;
|
||||||
|
showDock = false;
|
||||||
|
showFocusedWindow = true;
|
||||||
|
showGpuTemp = false;
|
||||||
|
showLauncherButton = true;
|
||||||
|
showMemUsage = true;
|
||||||
|
showMusic = true;
|
||||||
|
showNotificationButton = true;
|
||||||
|
showOccupiedWorkspacesOnly = false;
|
||||||
|
showPrivacyButton = false;
|
||||||
|
showSystemTray = true;
|
||||||
|
showWorkspaceApps = false;
|
||||||
|
showWorkspaceIndex = false;
|
||||||
|
showWorkspacePadding = false;
|
||||||
|
showWorkspaceSwitcher = true;
|
||||||
|
soundNewNotification = true;
|
||||||
|
soundPluggedIn = true;
|
||||||
|
soundVolumeChanged = true;
|
||||||
|
soundsEnabled = false;
|
||||||
|
|
||||||
|
# Launcher
|
||||||
|
sortAppsAlphabetically = false;
|
||||||
|
spotlightCloseNiriOverview = true;
|
||||||
|
spotlightModalViewMode = "list";
|
||||||
|
|
||||||
|
# Clock
|
||||||
|
use24HourClock = true;
|
||||||
|
showSeconds = true;
|
||||||
|
clockCompactMode = false;
|
||||||
|
clockDateFormat = "yyyy-MM-dd";
|
||||||
|
|
||||||
|
# Media
|
||||||
|
waveProgressEnabled = true;
|
||||||
|
scrollTitleEnabled = true;
|
||||||
|
|
||||||
|
# Weather
|
||||||
|
showWeather = true;
|
||||||
|
useFahrenheit = false;
|
||||||
|
useAutoLocation = false;
|
||||||
|
weatherCoordinates = "51.5142273,7.4652789";
|
||||||
|
weatherEnabled = true;
|
||||||
|
weatherLocation = "Dortmund, Nordrhein-Westfalen";
|
||||||
|
|
||||||
|
# Workspaces
|
||||||
|
workspaceNameIcons = {};
|
||||||
|
workspaceScrolling = false;
|
||||||
|
workspacesPerMonitor = true;
|
||||||
|
|
||||||
|
# Dock
|
||||||
|
dockAutoHide = false;
|
||||||
|
dockBorderColor = "surfaceText";
|
||||||
|
dockBorderEnabled = false;
|
||||||
|
dockBorderOpacity = 1;
|
||||||
|
dockBorderThickness = 1;
|
||||||
|
dockBottomGap = 0;
|
||||||
|
dockGroupByApp = false;
|
||||||
|
dockIconSize = 40;
|
||||||
|
dockIndicatorStyle = "circle";
|
||||||
|
dockMargin = 0;
|
||||||
|
dockOpenOnOverview = false;
|
||||||
|
dockPosition = 1;
|
||||||
|
dockSpacing = 4;
|
||||||
|
dockTransparency = 1;
|
||||||
|
|
||||||
|
# Random shit
|
||||||
|
widgetBackgroundColor = "sc";
|
||||||
|
widgetColorMode = "default";
|
||||||
|
wifiNetworkPins = {};
|
||||||
|
brightnessDevicePins = {};
|
||||||
|
bluetoothDevicePins = {};
|
||||||
|
centeringMode = "index";
|
||||||
|
useSystemSoundTheme = false;
|
||||||
|
vpnLastConnected = "";
|
||||||
|
syncModeWithPortal = true;
|
||||||
|
terminalsAlwaysDark = false;
|
||||||
|
updaterCustomCommand = "";
|
||||||
|
updaterTerminalAdditionalParams = "";
|
||||||
|
updaterUseCustomCommand = false;
|
||||||
|
showOnLastDisplay = {};
|
||||||
|
dwlShowAllTags = false;
|
||||||
|
enableFprint = false;
|
||||||
|
enabledGpuPciIds = [];
|
||||||
|
customPowerActionHibernate = "";
|
||||||
|
customPowerActionLock = "";
|
||||||
|
customPowerActionLogout = "";
|
||||||
|
customPowerActionPowerOff = "";
|
||||||
|
customPowerActionReboot = "";
|
||||||
|
customPowerActionSuspend = "";
|
||||||
|
customThemeFile = "";
|
||||||
|
displayNameMode = "system";
|
||||||
|
matugenScheme = "scheme-tonal-spot";
|
||||||
|
matugenTargetMonitor = "";
|
||||||
|
matugenTemplateAlacritty = true;
|
||||||
|
matugenTemplateDgop = true;
|
||||||
|
matugenTemplateFirefox = true;
|
||||||
|
matugenTemplateFoot = true;
|
||||||
|
matugenTemplateGhostty = true;
|
||||||
|
matugenTemplateGtk = true;
|
||||||
|
matugenTemplateKcolorscheme = true;
|
||||||
|
matugenTemplateKitty = true;
|
||||||
|
matugenTemplateNiri = true;
|
||||||
|
matugenTemplatePywalfox = true;
|
||||||
|
matugenTemplateQt5ct = true;
|
||||||
|
matugenTemplateQt6ct = true;
|
||||||
|
matugenTemplateVesktop = true;
|
||||||
|
matugenTemplateVscode = true;
|
||||||
|
matugenTemplateWezterm = true;
|
||||||
|
notepadFontFamily = "";
|
||||||
|
notepadFontSize = 14;
|
||||||
|
notepadLastCustomTransparency = 0.7;
|
||||||
|
notepadShowLineNumbers = false;
|
||||||
|
notepadTransparencyOverride = -1;
|
||||||
|
notepadUseMonospace = true;
|
||||||
|
maxFprintTries = 15;
|
||||||
|
maxWorkspaceIcons = 3;
|
||||||
|
mediaSize = 1;
|
||||||
|
networkPreference = "auto";
|
||||||
|
selectedGpuIndex = 0;
|
||||||
|
popupTransparency = 1;
|
||||||
|
privacyShowCameraIcon = false;
|
||||||
|
privacyShowMicIcon = false;
|
||||||
|
privacyShowScreenShareIcon = false;
|
||||||
|
qtThemingEnabled = false;
|
||||||
|
runDmsMatugenTemplates = false;
|
||||||
|
runUserMatugenTemplates = false;
|
||||||
|
runningAppsCompactMode = true;
|
||||||
|
runningAppsCurrentWorkspace = false;
|
||||||
|
runningAppsGroupByApp = false;
|
||||||
|
screenPreferences = {};
|
||||||
|
|
||||||
|
configVersion = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
default.session = {
|
||||||
|
# Settings
|
||||||
|
doNotDisturb = false;
|
||||||
|
isLightMode = false;
|
||||||
|
weatherHourlyDetailed = true;
|
||||||
|
|
||||||
|
# Night
|
||||||
|
nightModeAutoEnabled = true;
|
||||||
|
nightModeAutoMode = "time";
|
||||||
|
nightModeEnabled = true;
|
||||||
|
nightModeEndHour = 6;
|
||||||
|
nightModeEndMinute = 0;
|
||||||
|
nightModeHighTemperature = 6500;
|
||||||
|
nightModeLocationProvider = "";
|
||||||
|
nightModeStartHour = 22;
|
||||||
|
nightModeStartMinute = 0;
|
||||||
|
nightModeTemperature = 5500;
|
||||||
|
nightModeUseIPLocation = false;
|
||||||
|
|
||||||
|
# Hardware
|
||||||
|
nonNvidiaGpuTempEnabled = false;
|
||||||
|
nvidiaGpuTempEnabled = false;
|
||||||
|
selectedGpuIndex = 0;
|
||||||
|
wifiDeviceOverride = "";
|
||||||
|
enabledGpuPciIds = [];
|
||||||
|
lastBrightnessDevice = "";
|
||||||
|
|
||||||
|
# Wallpapers
|
||||||
|
perModeWallpaper = false;
|
||||||
|
perMonitorWallpaper = false;
|
||||||
|
wallpaperCyclingEnabled = false;
|
||||||
|
wallpaperCyclingInterval = 300;
|
||||||
|
wallpaperCyclingMode = "interval";
|
||||||
|
wallpaperCyclingTime = "06:00";
|
||||||
|
wallpaperPath = "/home/christoph/NixFlake/wallpapers/Windows.jpg";
|
||||||
|
wallpaperPathDark = "";
|
||||||
|
wallpaperPathLight = "";
|
||||||
|
wallpaperTransition = "iris bloom";
|
||||||
|
|
||||||
|
# Random shit
|
||||||
|
includedTransitions = ["fade" "wipe" "disc" "stripes" "iris bloom" "pixelate" "portal"];
|
||||||
|
launchPrefix = "";
|
||||||
|
latitude = 0;
|
||||||
|
longitude = 0;
|
||||||
|
pinnedApps = [];
|
||||||
|
hiddenTrayIds = [];
|
||||||
|
recentColors = [];
|
||||||
|
showThirdPartyPlugins = true;
|
||||||
|
|
||||||
|
# Ultra random shit
|
||||||
|
monitorCyclingSettings = {};
|
||||||
|
monitorWallpapers = {};
|
||||||
|
monitorWallpapersDark = {};
|
||||||
|
monitorWallpapersLight = {};
|
||||||
|
brightnessExponentValues = {};
|
||||||
|
brightnessExponentialDevices = {};
|
||||||
|
brightnessUserSetValues = {};
|
||||||
|
|
||||||
|
configVersion = 1;
|
||||||
|
};
|
||||||
|
}
|
||||||
580
home/modules/niri/default.nix
Normal file
@ -0,0 +1,580 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
nixosConfig,
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (config.modules) niri color;
|
||||||
|
in {
|
||||||
|
options.modules.niri = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
|
config = lib.mkIf niri.enable rec {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = nixosConfig.programs.niri.enable;
|
||||||
|
message = "Can't enable Niri config with Niri disabled!";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
assertion = !(programs.noctalia-shell.enable && programs.dankMaterialShell.enable);
|
||||||
|
message = "Can't enable Noctalia and DankMaterialShell at the same time!";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
iconTheme.package = color.iconPackage;
|
||||||
|
iconTheme.name = color.iconTheme;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Disable niri polkit if we use DMS, as it has its own
|
||||||
|
systemd.user.services.niri-flake-polkit = lib.mkForce {};
|
||||||
|
|
||||||
|
home = {
|
||||||
|
sessionVariables = {
|
||||||
|
QT_QPA_PLATFORMTHEME = "gtk3"; # For Noctalia
|
||||||
|
GDK_BACKEND = "wayland"; # For screen sharing
|
||||||
|
};
|
||||||
|
|
||||||
|
pointerCursor = {
|
||||||
|
gtk.enable = true;
|
||||||
|
x11.enable = true;
|
||||||
|
package = color.cursorPackage;
|
||||||
|
name = color.cursor;
|
||||||
|
size = color.cursorSize;
|
||||||
|
};
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
xwayland-satellite
|
||||||
|
ncpamixer # Audio control
|
||||||
|
|
||||||
|
nautilus # Fallback file chooser used by xdg-desktop-portal-gnome
|
||||||
|
|
||||||
|
# In case we fallback to the default config
|
||||||
|
alacritty
|
||||||
|
fuzzel
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
# TODO: Those should be modules with their own options
|
||||||
|
noctalia-shell = import ./noctalia.nix {inherit color;};
|
||||||
|
dankMaterialShell = import ./dankMaterialShell.nix {inherit color;};
|
||||||
|
|
||||||
|
# TODO: Extract options
|
||||||
|
niri = {
|
||||||
|
# enable = true; # Enabled in system module
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
input = {
|
||||||
|
focus-follows-mouse = {
|
||||||
|
enable = true;
|
||||||
|
# max-scroll-amount = "0%"; # Skip partial windows that would scroll the viewport on focus
|
||||||
|
};
|
||||||
|
|
||||||
|
keyboard = {
|
||||||
|
xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "altgr-intl";
|
||||||
|
options = "nodeadkeys";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
touchpad = {
|
||||||
|
click-method = "clickfinger";
|
||||||
|
tap = true;
|
||||||
|
drag = true;
|
||||||
|
dwt = true;
|
||||||
|
natural-scroll = true;
|
||||||
|
scroll-method = "two-finger";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
hotkey-overlay = {
|
||||||
|
hide-not-bound = true;
|
||||||
|
skip-at-startup = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
prefer-no-csd = true; # Disable client-side decorations (e.g. window titlebars)
|
||||||
|
|
||||||
|
spawn-at-startup = [
|
||||||
|
# TODO: Depend on options
|
||||||
|
# {argv = ["noctalia-shell"];}
|
||||||
|
{argv = ["dms" "run"];}
|
||||||
|
|
||||||
|
{argv = ["kitty" "--hold" "fastfetch"];}
|
||||||
|
{argv = ["zeal"];}
|
||||||
|
{argv = ["protonvpn-app"];}
|
||||||
|
{argv = ["fcitx5"];}
|
||||||
|
{argv = ["jellyfin-mpv-shim"];}
|
||||||
|
|
||||||
|
{sh = "sleep 5s && nextcloud --background";}
|
||||||
|
{sh = "sleep 5s && keepassxc";}
|
||||||
|
];
|
||||||
|
|
||||||
|
workspaces = {
|
||||||
|
"1" = {open-on-output = "DP-1";};
|
||||||
|
"2" = {open-on-output = "DP-1";};
|
||||||
|
"3" = {open-on-output = "DP-1";};
|
||||||
|
"4" = {open-on-output = "DP-1";};
|
||||||
|
"5" = {open-on-output = "DP-1";};
|
||||||
|
"6" = {open-on-output = "DP-1";};
|
||||||
|
"7" = {open-on-output = "DP-1";};
|
||||||
|
"8" = {open-on-output = "DP-1";};
|
||||||
|
"9" = {open-on-output = "DP-1";};
|
||||||
|
"10" = {open-on-output = "DP-2";};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
"DP-1" = {
|
||||||
|
focus-at-startup = true;
|
||||||
|
mode = {
|
||||||
|
width = 3440;
|
||||||
|
height = 1440;
|
||||||
|
refresh = 164.999;
|
||||||
|
};
|
||||||
|
position = {
|
||||||
|
x = 1920;
|
||||||
|
y = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"DP-2" = {
|
||||||
|
focus-at-startup = false;
|
||||||
|
mode = {
|
||||||
|
width = 1920;
|
||||||
|
height = 1080;
|
||||||
|
refresh = 60.0;
|
||||||
|
};
|
||||||
|
position = {
|
||||||
|
x = 0;
|
||||||
|
y = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
hide-when-typing = true;
|
||||||
|
theme = color.cursor;
|
||||||
|
size = color.cursorSize;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout = {
|
||||||
|
# This border is drawn INSIDE the window
|
||||||
|
border = {
|
||||||
|
enable = true;
|
||||||
|
width = 2;
|
||||||
|
active = {color = color.hex.accent;};
|
||||||
|
inactive = {color = color.hex.base;};
|
||||||
|
};
|
||||||
|
|
||||||
|
# This border is drawn OUTSIDE of the focused window
|
||||||
|
focus-ring = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Hint where a dragged window will be inserted
|
||||||
|
insert-hint = {
|
||||||
|
enable = true;
|
||||||
|
display = {color = color.hex.accentDim;};
|
||||||
|
};
|
||||||
|
|
||||||
|
always-center-single-column = true;
|
||||||
|
|
||||||
|
# Gaps between windows
|
||||||
|
gaps = 8;
|
||||||
|
|
||||||
|
# Gaps at screen borders
|
||||||
|
struts = {
|
||||||
|
# left = 8;
|
||||||
|
# right = 8;
|
||||||
|
top = 4; # Somehow the bar eclusivity doesn't work as expected
|
||||||
|
bottom = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gestures = {
|
||||||
|
hot-corners = {enable = false;};
|
||||||
|
};
|
||||||
|
|
||||||
|
window-rules = [
|
||||||
|
# Rules for all windows
|
||||||
|
{
|
||||||
|
default-column-width.proportion = 0.5;
|
||||||
|
default-window-height.proportion = 1.0;
|
||||||
|
|
||||||
|
# Rounded corners
|
||||||
|
clip-to-geometry = true;
|
||||||
|
geometry-corner-radius = {
|
||||||
|
bottom-left = 8.0;
|
||||||
|
bottom-right = 8.0;
|
||||||
|
top-left = 8.0;
|
||||||
|
top-right = 8.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
# open-floating = false;
|
||||||
|
# open-focused = false;
|
||||||
|
# open-fullscreen = false;
|
||||||
|
# open-maximized = false;
|
||||||
|
|
||||||
|
# open-on-output = "DP-1";
|
||||||
|
# open-on-workspace = "2";
|
||||||
|
|
||||||
|
# opacity = 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Rules for specific windows
|
||||||
|
{
|
||||||
|
matches = [{app-id = "Zotero";}];
|
||||||
|
open-on-workspace = "2";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "neovide";}];
|
||||||
|
open-on-workspace = "2";
|
||||||
|
open-maximized = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "code-url-handler";}];
|
||||||
|
open-on-workspace = "2";
|
||||||
|
open-floating = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "obsidian";}];
|
||||||
|
open-on-workspace = "3";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "firefox";}];
|
||||||
|
open-on-workspace = "4";
|
||||||
|
open-maximized = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "Google-chrome";}];
|
||||||
|
open-on-workspace = "4";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "chromium-browser";}];
|
||||||
|
open-on-workspace = "4";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "org.qutebrowser.qutebrowser";}];
|
||||||
|
open-on-workspace = "4";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "steam";}];
|
||||||
|
open-on-workspace = "5";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "steam_app_(.+)";}];
|
||||||
|
open-on-workspace = "6";
|
||||||
|
open-floating = true;
|
||||||
|
open-maximized = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "signal";}];
|
||||||
|
open-on-workspace = "7";
|
||||||
|
open-maximized = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "discord";}];
|
||||||
|
open-on-workspace = "9";
|
||||||
|
open-maximized = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
layer-rules = [
|
||||||
|
{
|
||||||
|
# Set the overview wallpaper on the backdrop.
|
||||||
|
matches = [{namespace = "^noctalia-overview*";}];
|
||||||
|
place-within-backdrop = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
debug = {
|
||||||
|
# Allows notification actions and window activation from Noctalia.
|
||||||
|
honor-xdg-activation-with-invalid-serial = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO: Only start hypr... stuff with hyprland, not systemd (hypridle, hyprpaper currently)
|
||||||
|
|
||||||
|
# TODO: Move values to config option and set in home/christoph/niri.nix
|
||||||
|
binds = with config.lib.niri.actions; {
|
||||||
|
# Applications
|
||||||
|
"Mod+T" = {
|
||||||
|
action = spawn "kitty";
|
||||||
|
hotkey-overlay = {title = "Spawn Kitty.";};
|
||||||
|
};
|
||||||
|
"Mod+E" = {
|
||||||
|
action = spawn "kitty" "--title=Yazi" "yazi";
|
||||||
|
hotkey-overlay = {title = "Spawn Yazi.";};
|
||||||
|
};
|
||||||
|
"Mod+B" = {
|
||||||
|
action = spawn "kitty" "--title=Btop" "btop";
|
||||||
|
hotkey-overlay = {title = "Spawn Btop.";};
|
||||||
|
};
|
||||||
|
"Mod+R" = {
|
||||||
|
action = spawn "kitty" "--title=Rmpc" "rmpc";
|
||||||
|
hotkey-overlay = {title = "Spawn Rmpc.";};
|
||||||
|
};
|
||||||
|
"Mod+N" = {
|
||||||
|
action = spawn "neovide";
|
||||||
|
hotkey-overlay = {title = "Spawn Neovide.";};
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+N" = {
|
||||||
|
action = spawn "kitty" "--title=Navi" "navi";
|
||||||
|
hotkey-overlay = {title = "Call Navi for help.";};
|
||||||
|
};
|
||||||
|
"Mod+Shift+N" = {
|
||||||
|
action = spawn "neovide" "${config.paths.dotfiles}/navi/christoph.cheat";
|
||||||
|
hotkey-overlay = {title = "Edit the Navi cheats.";};
|
||||||
|
};
|
||||||
|
"Mod+Shift+F" = {
|
||||||
|
action = spawn "neovide" "${config.paths.dotfiles}/flake.nix";
|
||||||
|
hotkey-overlay = {title = "Edit the NixFlake.";};
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO: Enable with Noctalia option
|
||||||
|
# Noctalia
|
||||||
|
# "Mod+A" = {
|
||||||
|
# action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle";
|
||||||
|
# hotkey-overlay = {title = "Toggle the application launcher.";};
|
||||||
|
# };
|
||||||
|
# "Mod+Ctrl+L" = {
|
||||||
|
# action = spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock";
|
||||||
|
# hotkey-overlay = {title = "Lock the screen.";};
|
||||||
|
# };
|
||||||
|
# "Mod+W" = {
|
||||||
|
# action = spawn "noctalia-shell" "ipc" "call" "wallpaper" "toggle";
|
||||||
|
# hotkey-overlay = {title = "Toggle the wallpaper chooser.";};
|
||||||
|
# };
|
||||||
|
# "Mod+Escape" = {
|
||||||
|
# action = spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle";
|
||||||
|
# hotkey-overlay = {title = "Toggle the session menu.";};
|
||||||
|
# };
|
||||||
|
|
||||||
|
# TODO: Enable with DMS option
|
||||||
|
# DankMaterialShell
|
||||||
|
"Mod+A" = {
|
||||||
|
action = spawn "dms" "ipc" "call" "spotlight" "toggle";
|
||||||
|
hotkey-overlay = {title = "Toggle the application launcher.";};
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+L" = {
|
||||||
|
action = spawn "dms" "ipc" "call" "lock" "lock";
|
||||||
|
hotkey-overlay = {title = "Lock the screen.";};
|
||||||
|
};
|
||||||
|
"Mod+Escape" = {
|
||||||
|
action = spawn "dms" "ipc" "call" "powermenu" "toggle";
|
||||||
|
hotkey-overlay = {title = "Toggle the session menu.";};
|
||||||
|
};
|
||||||
|
"Mod+C" = {
|
||||||
|
action = spawn "dms" "ipc" "call" "clipboard" "toggle";
|
||||||
|
hotkey-overlay = {title = "Show clipboard history.";};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Screenshots
|
||||||
|
"Mod+S" = {
|
||||||
|
action.screenshot-window = {write-to-disk = true;};
|
||||||
|
hotkey-overlay = {title = "Take a screenshot of the current window.";};
|
||||||
|
};
|
||||||
|
"Mod+Shift+S" = {
|
||||||
|
action.screenshot = {show-pointer = true;};
|
||||||
|
hotkey-overlay = {title = "Take a screenshot of a region.";};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Niri
|
||||||
|
"Mod+Shift+Slash" = {
|
||||||
|
action = show-hotkey-overlay;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Audio
|
||||||
|
"XF86AudioRaiseVolume" = {
|
||||||
|
action = spawn "wpctl" "set-volume" "-l" "1.5" "@DEFAULT_AUDIO_SINK@" "5%+";
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"XF86AudioLowerVolume" = {
|
||||||
|
action = spawn "wpctl" "set-volume" "-l" "1.5" "@DEFAULT_AUDIO_SINK@" "5%-";
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"XF86AudioPlay" = {
|
||||||
|
action = spawn "playerctl" "play-pause";
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"XF86AudioPrev" = {
|
||||||
|
action = spawn "playerctl" "previous";
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"XF86AudioNext" = {
|
||||||
|
action = spawn "playerctl" "next";
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Niri windows
|
||||||
|
"Mod+Q" = {
|
||||||
|
action = close-window;
|
||||||
|
hotkey-overlay = {title = "Close the current window.";};
|
||||||
|
};
|
||||||
|
"Mod+F" = {
|
||||||
|
action = fullscreen-window;
|
||||||
|
hotkey-overlay = {title = "Toggle between fullscreen and tiled window.";};
|
||||||
|
};
|
||||||
|
"Mod+Equal" = {
|
||||||
|
action = set-column-width "+10%";
|
||||||
|
hotkey-overlay = {title = "Increase column width";};
|
||||||
|
};
|
||||||
|
"Mod+Minus" = {
|
||||||
|
action = set-column-width "-10%";
|
||||||
|
hotkey-overlay = {title = "Decrease column width";};
|
||||||
|
};
|
||||||
|
"Mod+Shift+M" = {
|
||||||
|
action = set-column-width "50%";
|
||||||
|
hotkey-overlay = {title = "Set column width to 50%";};
|
||||||
|
};
|
||||||
|
"Mod+M" = {
|
||||||
|
action = maximize-column;
|
||||||
|
hotkey-overlay = {title = "Maximize column.";};
|
||||||
|
};
|
||||||
|
"Mod+V" = {
|
||||||
|
action = toggle-window-floating;
|
||||||
|
hotkey-overlay = {title = "Toggle between floating and tiled window.";};
|
||||||
|
};
|
||||||
|
"Mod+O" = {
|
||||||
|
action = toggle-overview;
|
||||||
|
hotkey-overlay = {title = "Toggle overlay.";};
|
||||||
|
};
|
||||||
|
"Mod+H" = {
|
||||||
|
action = focus-column-or-monitor-left;
|
||||||
|
hotkey-overlay = {title = "Focus column on the left. Equivalent bindings for other directions.";};
|
||||||
|
};
|
||||||
|
"Mod+J" = {
|
||||||
|
action = focus-window-or-workspace-down;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+K" = {
|
||||||
|
action = focus-window-or-workspace-up;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+L" = {
|
||||||
|
action = focus-column-or-monitor-right;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+WheelScrollUp" = {
|
||||||
|
action = focus-column-left;
|
||||||
|
hotkey-overlay = {title = "Focus column on the left. Equivalent binding for other direction.";};
|
||||||
|
};
|
||||||
|
"Mod+WheelScrollDown" = {
|
||||||
|
action = focus-column-right;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+WheelScrollUp" = {
|
||||||
|
action = focus-workspace-up;
|
||||||
|
hotkey-overlay = {title = "Focus previous workspace. Equivalent binding for other direction.";};
|
||||||
|
};
|
||||||
|
"Mod+Shift+WheelScrollDown" = {
|
||||||
|
action = focus-workspace-down;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+H" = {
|
||||||
|
action = move-column-left-or-to-monitor-left;
|
||||||
|
hotkey-overlay = {title = "Move column to the left. Equivalent bindings for other directions.";};
|
||||||
|
};
|
||||||
|
"Mod+Shift+J" = {
|
||||||
|
action = move-window-down-or-to-workspace-down;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+K" = {
|
||||||
|
action = move-window-up-or-to-workspace-up;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+L" = {
|
||||||
|
action = move-column-right-or-to-monitor-right;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Niri workspaces
|
||||||
|
"Mod+1" = {
|
||||||
|
action = focus-workspace 1;
|
||||||
|
hotkey-overlay = {title = "Focus workspace 1. Equivalent bindings for other workspaces.";};
|
||||||
|
};
|
||||||
|
"Mod+2" = {
|
||||||
|
action = focus-workspace 2;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+3" = {
|
||||||
|
action = focus-workspace 3;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+4" = {
|
||||||
|
action = focus-workspace 4;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+5" = {
|
||||||
|
action = focus-workspace 5;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+6" = {
|
||||||
|
action = focus-workspace 6;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+7" = {
|
||||||
|
action = focus-workspace 7;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+8" = {
|
||||||
|
action = focus-workspace 8;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+9" = {
|
||||||
|
action = focus-workspace 9;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+0" = {
|
||||||
|
action = focus-workspace 10;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+1" = {
|
||||||
|
action.move-window-to-workspace = 1;
|
||||||
|
hotkey-overlay = {title = "Move current window to workspace 1. Equivalent bindings for other workspaces.";};
|
||||||
|
};
|
||||||
|
"Mod+Shift+2" = {
|
||||||
|
action.move-window-to-workspace = 2;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+3" = {
|
||||||
|
action.move-window-to-workspace = 3;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+4" = {
|
||||||
|
action.move-window-to-workspace = 4;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+5" = {
|
||||||
|
action.move-window-to-workspace = 5;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+6" = {
|
||||||
|
action.move-window-to-workspace = 6;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+7" = {
|
||||||
|
action.move-window-to-workspace = 7;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+8" = {
|
||||||
|
action.move-window-to-workspace = 8;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+9" = {
|
||||||
|
action.move-window-to-workspace = 9;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
"Mod+Shift+0" = {
|
||||||
|
action.move-window-to-workspace = 10;
|
||||||
|
hotkey-overlay = {hidden = true;};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
265
home/modules/niri/noctalia.nix
Normal file
@ -0,0 +1,265 @@
|
|||||||
|
{color}: {
|
||||||
|
enable = false;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
# configure noctalia here; defaults will
|
||||||
|
# be deep merged with these attributes.
|
||||||
|
|
||||||
|
colorSchemes.predefinedScheme = "Catppuccin";
|
||||||
|
|
||||||
|
general = {
|
||||||
|
avatarImage = ../../../config/face.jpeg;
|
||||||
|
radiusRatio = 0.2;
|
||||||
|
showScreenCorners = false;
|
||||||
|
forceBlackScreenCorners = false;
|
||||||
|
dimDesktop = true;
|
||||||
|
scaleRatio = 1;
|
||||||
|
screenRadiusRatio = 1;
|
||||||
|
animationSpeed = 1;
|
||||||
|
animationDisabled = false;
|
||||||
|
compactLockScreen = false;
|
||||||
|
lockOnSuspend = true;
|
||||||
|
enableShadows = true;
|
||||||
|
shadowDirection = "bottom_right";
|
||||||
|
shadowOffsetX = 2;
|
||||||
|
shadowOffsetY = 3;
|
||||||
|
language = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
ui = {
|
||||||
|
fontDefault = color.font;
|
||||||
|
fontFixed = color.font;
|
||||||
|
tooltipsEnabled = true;
|
||||||
|
panelsAttachedToBar = true;
|
||||||
|
settingsPanelAttachTobar = true;
|
||||||
|
fontDefaultScale = 1;
|
||||||
|
fontFixedScale = 1;
|
||||||
|
settingsPanelAttachToBar = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
location = {
|
||||||
|
name = "Dortmund, Germany";
|
||||||
|
monthBeforeDay = true;
|
||||||
|
weatherEnabled = true;
|
||||||
|
useFahrenheit = false;
|
||||||
|
use12hourFormat = false;
|
||||||
|
showWeekNumberInCalendar = false;
|
||||||
|
showCalendarEvents = true;
|
||||||
|
showCalendarWeather = true;
|
||||||
|
analogClockInCalendar = false;
|
||||||
|
firstDayOfWeek = -1;
|
||||||
|
};
|
||||||
|
|
||||||
|
screenRecorder = {
|
||||||
|
directory = "~/Videos/Recordings";
|
||||||
|
frameRate = 60;
|
||||||
|
audioCodec = "aac";
|
||||||
|
videoCodec = "h265";
|
||||||
|
quality = "very_high";
|
||||||
|
colorRange = "limited";
|
||||||
|
showCursor = true;
|
||||||
|
audioSource = "default_output";
|
||||||
|
videoSource = "portal";
|
||||||
|
};
|
||||||
|
|
||||||
|
wallpaper = {
|
||||||
|
enabled = true;
|
||||||
|
overviewEnabled = true;
|
||||||
|
directory = "~/NixFlake/wallpapers";
|
||||||
|
enableMultiMonitorDirectories = false;
|
||||||
|
recursiveSearch = false;
|
||||||
|
setWallpaperOnAllMonitors = true;
|
||||||
|
defaultWallpaper = ../../../wallpapers/Windows.jpg;
|
||||||
|
fillMode = "crop";
|
||||||
|
fillColor = "#000000";
|
||||||
|
randomEnabled = false;
|
||||||
|
randomIntervalSec = 300;
|
||||||
|
transitionDuration = 1500;
|
||||||
|
transitionType = "random";
|
||||||
|
transitionEdgeSmoothness = 0.05;
|
||||||
|
monitors = [];
|
||||||
|
panelPosition = "follow_bar";
|
||||||
|
};
|
||||||
|
|
||||||
|
appLauncher = {
|
||||||
|
enableClipboardHistory = true;
|
||||||
|
position = "center";
|
||||||
|
backgroundOpacity = 1;
|
||||||
|
pinnedExecs = [];
|
||||||
|
useApp2Unit = false;
|
||||||
|
sortByMostUsed = true;
|
||||||
|
terminalCommand = "kitty -e";
|
||||||
|
customLaunchPrefixEnabled = false;
|
||||||
|
customLaunchPrefix = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
dock = {
|
||||||
|
enabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
network = {
|
||||||
|
wifiEnabled = true;
|
||||||
|
bluetoothEnabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
notifications = {
|
||||||
|
enabled = true;
|
||||||
|
monitors = [];
|
||||||
|
location = "top_right";
|
||||||
|
overlayLayer = true;
|
||||||
|
backgroundOpacity = 1;
|
||||||
|
respectExpireTimeout = false;
|
||||||
|
lowUrgencyDuration = 3;
|
||||||
|
normalUrgencyDuration = 8;
|
||||||
|
criticalUrgencyDuration = 15;
|
||||||
|
};
|
||||||
|
|
||||||
|
osd = {
|
||||||
|
enabled = true;
|
||||||
|
location = "top_right";
|
||||||
|
monitors = [];
|
||||||
|
autoHideMs = 2000;
|
||||||
|
overlayLayer = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
audio = {
|
||||||
|
volumeStep = 5;
|
||||||
|
volumeOverdrive = true;
|
||||||
|
cavaFrameRate = 30;
|
||||||
|
visualizerType = "linear";
|
||||||
|
visualizerQuality = "high";
|
||||||
|
mprisBlacklist = [];
|
||||||
|
preferredPlayer = "";
|
||||||
|
externalMixer = "kitty --title=Ncpamixer ncpamixer";
|
||||||
|
};
|
||||||
|
|
||||||
|
nightLight = {
|
||||||
|
enabled = false;
|
||||||
|
forced = false;
|
||||||
|
autoSchedule = true;
|
||||||
|
nightTemp = "5000";
|
||||||
|
dayTemp = "6500";
|
||||||
|
manualSunrise = "06:30";
|
||||||
|
manualSunset = "21:30";
|
||||||
|
};
|
||||||
|
|
||||||
|
sessionMenu = {
|
||||||
|
countdownDuration = 10000;
|
||||||
|
enableCountdown = true;
|
||||||
|
position = "center";
|
||||||
|
powerOptions = [
|
||||||
|
{
|
||||||
|
action = "lock";
|
||||||
|
enabled = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
action = "suspend";
|
||||||
|
enabled = false;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
action = "reboot";
|
||||||
|
enabled = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
action = "logout";
|
||||||
|
enabled = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
action = "shutdown";
|
||||||
|
enabled = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
showHeader = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
bar = {
|
||||||
|
density = "default";
|
||||||
|
position = "top";
|
||||||
|
showCapsule = false;
|
||||||
|
outerCorners = false;
|
||||||
|
exclusive = true;
|
||||||
|
backgroundOpacity = 1;
|
||||||
|
monitors = [];
|
||||||
|
floating = false;
|
||||||
|
marginVertical = 0.25;
|
||||||
|
marginHorizontal = 0.25;
|
||||||
|
|
||||||
|
widgets = {
|
||||||
|
left = [
|
||||||
|
{
|
||||||
|
id = "SidePanelToggle";
|
||||||
|
useDistroLogo = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
hideUnoccupied = false;
|
||||||
|
id = "Workspace";
|
||||||
|
labelMode = "none";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "ActiveWindow";
|
||||||
|
maxWidth = 250;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
center = [
|
||||||
|
{
|
||||||
|
id = "MediaMini";
|
||||||
|
maxWidth = 250;
|
||||||
|
showAlbumArt = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "AudioVisualizer";
|
||||||
|
width = 100;
|
||||||
|
visualizerType = "mirrored";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
right = [
|
||||||
|
# {
|
||||||
|
# id = "SystemMonitor";
|
||||||
|
# usePrimaryColor = true;
|
||||||
|
# showCpuUsage = true;
|
||||||
|
# showCpuTemp = false;
|
||||||
|
# showMemoryUsage = true;
|
||||||
|
# showMemoryAsPercent = false;
|
||||||
|
# showNetworkStats = true;
|
||||||
|
# showDiskUsage = true;
|
||||||
|
# diskPath = "/";
|
||||||
|
# }
|
||||||
|
{
|
||||||
|
id = "Volume";
|
||||||
|
# displayMode = "alwaysShow";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "Microphone";
|
||||||
|
# displayMode = "alwaysShow";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "Bluetooth";
|
||||||
|
# displayMode = "alwaysShow";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "WiFi";
|
||||||
|
# displayMode = "alwaysShow";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "VPN";
|
||||||
|
# displayMode = "alwaysShow";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "Tray";
|
||||||
|
drawerEnabled = false;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
formatHorizontal = "yyyy-MM-dd HH:mm";
|
||||||
|
formatVertical = "HH mm";
|
||||||
|
id = "Clock";
|
||||||
|
useMonospacedFont = true;
|
||||||
|
usePrimaryColor = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
id = "NotificationHistory";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
home/modules/niri/options.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
enable = lib.mkEnableOption "Niri";
|
||||||
|
}
|
||||||
193
home/modules/qutebrowser/colors.nix
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
{color}: {
|
||||||
|
webpage.darkmode.enabled = true;
|
||||||
|
|
||||||
|
completion = {
|
||||||
|
## Background color of the completion widget category headers.
|
||||||
|
category.bg = color.hexS.base;
|
||||||
|
category.fg = color.hexS.accent;
|
||||||
|
|
||||||
|
## Bottom border color of the completion widget category headers.
|
||||||
|
category.border.top = color.hexS.base;
|
||||||
|
category.border.bottom = color.hexS.accent;
|
||||||
|
|
||||||
|
## Background color of the completion widget for even and odd rows.
|
||||||
|
even.bg = color.hexS.base;
|
||||||
|
odd.bg = color.hexS.base;
|
||||||
|
|
||||||
|
## Text color of the completion widget.
|
||||||
|
fg = color.hexS.text;
|
||||||
|
|
||||||
|
# Selected item color + border
|
||||||
|
item.selected.bg = color.hexS.accent;
|
||||||
|
item.selected.fg = color.hexS.accentText;
|
||||||
|
item.selected.border.bottom = color.hexS.surface2;
|
||||||
|
item.selected.border.top = color.hexS.surface2;
|
||||||
|
|
||||||
|
## Foreground color of the selected completion item.
|
||||||
|
item.selected.match.fg = color.hexS.accentText;
|
||||||
|
|
||||||
|
## Foreground color of the matched text in the completion.
|
||||||
|
match.fg = color.hexS.accent;
|
||||||
|
|
||||||
|
## Color of the scrollbar in completion view
|
||||||
|
scrollbar.bg = color.hexS.base;
|
||||||
|
scrollbar.fg = color.hexS.accent;
|
||||||
|
};
|
||||||
|
|
||||||
|
downloads = {
|
||||||
|
bar.bg = color.hexS.base;
|
||||||
|
|
||||||
|
error.bg = color.hexS.base;
|
||||||
|
error.fg = color.hexS.red;
|
||||||
|
|
||||||
|
# Color gradient
|
||||||
|
start.bg = color.hexS.base;
|
||||||
|
start.fg = color.hexS.blue;
|
||||||
|
stop.bg = color.hexS.base;
|
||||||
|
stop.fg = color.hexS.green;
|
||||||
|
|
||||||
|
# Set to "none" to disable gradient, otherwise "rgb"
|
||||||
|
system.fg = "none";
|
||||||
|
system.bg = "none";
|
||||||
|
};
|
||||||
|
|
||||||
|
hints = {
|
||||||
|
## Background color for hints. Note that you can use a `rgba(...)` value
|
||||||
|
## for transparency.
|
||||||
|
bg = color.hexS.accentDim;
|
||||||
|
fg = color.hexS.accentText;
|
||||||
|
|
||||||
|
## Font color for the matched part of hints.
|
||||||
|
match.fg = color.hexS.accent;
|
||||||
|
};
|
||||||
|
|
||||||
|
keyhint = {
|
||||||
|
## Background color of the keyhint widget.
|
||||||
|
bg = color.hexS.accentDim;
|
||||||
|
fg = color.hexS.accentText;
|
||||||
|
|
||||||
|
## Highlight color for keys to complete the current keychain.
|
||||||
|
suffix.fg = color.hexS.accent;
|
||||||
|
};
|
||||||
|
|
||||||
|
messages = {
|
||||||
|
## Background color of an error message.
|
||||||
|
error.bg = color.hexS.base;
|
||||||
|
error.fg = color.hexS.red;
|
||||||
|
error.border = color.hexS.red;
|
||||||
|
|
||||||
|
## Background color of an info message.
|
||||||
|
info.bg = color.hexS.base;
|
||||||
|
info.fg = color.hexS.blue;
|
||||||
|
info.border = color.hexS.blue;
|
||||||
|
|
||||||
|
## Background color of a warning message.
|
||||||
|
warning.bg = color.hexS.base;
|
||||||
|
warning.fg = color.hexS.yellow;
|
||||||
|
warning.border = color.hexS.yellow;
|
||||||
|
};
|
||||||
|
|
||||||
|
prompts = {
|
||||||
|
## Background color for prompts.
|
||||||
|
bg = color.hexS.base;
|
||||||
|
fg = color.hexS.text;
|
||||||
|
|
||||||
|
# ## Border used around UI elements in prompts.
|
||||||
|
border = "1px solid " + color.hexS.overlay0;
|
||||||
|
|
||||||
|
## Background color for the selected item in filename prompts.
|
||||||
|
selected.bg = color.hexS.accent;
|
||||||
|
selected.fg = color.hexS.accentText;
|
||||||
|
};
|
||||||
|
|
||||||
|
statusbar = {
|
||||||
|
## Background color of the statusbar.
|
||||||
|
normal.bg = color.hexS.base;
|
||||||
|
normal.fg = color.hexS.text;
|
||||||
|
|
||||||
|
## Background color of the statusbar in insert mode.
|
||||||
|
insert.bg = color.hexS.green;
|
||||||
|
insert.fg = color.hexS.accentText;
|
||||||
|
|
||||||
|
## Background color of the statusbar in command mode.
|
||||||
|
command.bg = color.hexS.peach;
|
||||||
|
command.fg = color.hexS.accentText;
|
||||||
|
|
||||||
|
## Background color of the statusbar in caret mode.
|
||||||
|
caret.bg = color.hexS.blue;
|
||||||
|
caret.fg = color.hexS.accentText;
|
||||||
|
|
||||||
|
## Background color of the statusbar in caret mode with a selection.
|
||||||
|
caret.selection.bg = color.hexS.blue;
|
||||||
|
caret.selection.fg = color.hexS.accentText;
|
||||||
|
|
||||||
|
## Background color of the progress bar.
|
||||||
|
progress.bg = color.hexS.base;
|
||||||
|
|
||||||
|
## Background color of the statusbar in passthrough mode.
|
||||||
|
passthrough.bg = color.hexS.red;
|
||||||
|
passthrough.fg = color.hexS.accentText;
|
||||||
|
|
||||||
|
## Default foreground color of the URL in the statusbar.
|
||||||
|
# NOTE: The colors will be barely legible in different modes,
|
||||||
|
# but currently we can't change url color per mode...
|
||||||
|
url.fg = color.hexS.text;
|
||||||
|
url.warn.fg = color.hexS.yellow;
|
||||||
|
url.error.fg = color.hexS.red;
|
||||||
|
url.hover.fg = color.hexS.sky;
|
||||||
|
url.success.http.fg = color.hexS.red;
|
||||||
|
url.success.https.fg = color.hexS.green;
|
||||||
|
|
||||||
|
## PRIVATE MODE COLORS
|
||||||
|
## Background color of the statusbar in private browsing mode.
|
||||||
|
private.bg = color.hexS.teal;
|
||||||
|
private.fg = color.hexS.accentText;
|
||||||
|
|
||||||
|
## Background color of the statusbar in private browsing + command mode.
|
||||||
|
command.private.bg = color.hexS.peach;
|
||||||
|
command.private.fg = color.hexS.accentText;
|
||||||
|
};
|
||||||
|
|
||||||
|
tabs = {
|
||||||
|
## Background color of the tab bar.
|
||||||
|
bar.bg = color.hexS.base;
|
||||||
|
|
||||||
|
# ## Background color of selected even tabs.
|
||||||
|
selected.even.bg = color.hexS.accent;
|
||||||
|
selected.even.fg = color.hexS.accentText;
|
||||||
|
|
||||||
|
# ## Background color of selected odd tabs.
|
||||||
|
selected.odd.bg = color.hexS.accent;
|
||||||
|
selected.odd.fg = color.hexS.accentText;
|
||||||
|
|
||||||
|
## Background color of unselected even tabs.
|
||||||
|
even.bg = color.hexS.base;
|
||||||
|
even.fg = color.hexS.accent;
|
||||||
|
|
||||||
|
## Background color of unselected odd tabs.
|
||||||
|
odd.bg = color.hexS.base;
|
||||||
|
odd.fg = color.hexS.accent;
|
||||||
|
|
||||||
|
## Color for the tab indicator on errors.
|
||||||
|
indicator.error = color.hexS.red;
|
||||||
|
|
||||||
|
## Color gradient interpolation system for the tab indicator.
|
||||||
|
## Valid values:
|
||||||
|
## - rgb: Interpolate in the RGB color system.
|
||||||
|
## - hsv: Interpolate in the HSV color system.
|
||||||
|
## - hsl: Interpolate in the HSL color system.
|
||||||
|
## - none: Don't show a gradient.
|
||||||
|
indicator.system = "none";
|
||||||
|
};
|
||||||
|
|
||||||
|
contextmenu = {
|
||||||
|
menu.bg = color.hexS.base;
|
||||||
|
menu.fg = color.hexS.accent;
|
||||||
|
|
||||||
|
disabled.bg = color.hexS.base;
|
||||||
|
disabled.fg = color.hexS.text;
|
||||||
|
|
||||||
|
selected.bg = color.hexS.accent;
|
||||||
|
selected.fg = color.hexS.accentText;
|
||||||
|
};
|
||||||
|
}
|
||||||
181
home/modules/qutebrowser/default.nix
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
nixosConfig,
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (config.modules) qutebrowser color;
|
||||||
|
in {
|
||||||
|
options.modules.qutebrowser = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
|
config = lib.mkIf qutebrowser.enable {
|
||||||
|
programs.qutebrowser = {
|
||||||
|
enable = true;
|
||||||
|
loadAutoconfig = true; # Load settings set from GUI
|
||||||
|
|
||||||
|
# TODO: Find a unified version for qutebrowser + firefox (+ other browers ideally)
|
||||||
|
quickmarks = let
|
||||||
|
# Use this function to keep the quickmarks (almost) compatible with the firefox bookmarks
|
||||||
|
mkBm = name: value: {
|
||||||
|
${name} = value;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
lib.mergeAttrsList [
|
||||||
|
(mkBm "Package Search" "https://search.nixos.org/packages")
|
||||||
|
(mkBm "Option Search" "https://search.nixos.org/options?")
|
||||||
|
(mkBm "Function Search" "https://noogle.dev/")
|
||||||
|
(mkBm "HM Search" "https://mipmip.github.io/home-manager-option-search/")
|
||||||
|
(mkBm "NUR Search" "https://nur.nix-community.org/")
|
||||||
|
(mkBm "Nixpkgs Version Search" "https://lazamar.co.uk/nix-versions/")
|
||||||
|
(mkBm "Nixpkgs PR Tracker" "https://nixpk.gs/pr-tracker.html")
|
||||||
|
(mkBm "NixOS Wiki" "https://wiki.nixos.org/wiki/NixOS_Wiki")
|
||||||
|
(mkBm "Nixpkgs Issues" "https://github.com/NixOS/nixpkgs/issues")
|
||||||
|
(mkBm "Nixpkgs Manual" "https://nixos.org/manual/nixpkgs/unstable/")
|
||||||
|
(mkBm "NixOS Manual" "https://nixos.org/manual/nixos/unstable/")
|
||||||
|
(mkBm "Nix Manual" "https://nix.dev/manual/nix/stable/")
|
||||||
|
(mkBm "Searchix" "https://searchix.ovh/")
|
||||||
|
(mkBm "Latest" "https://discourse.nixos.org/latest")
|
||||||
|
|
||||||
|
(mkBm "LAN Smart Switch" "http://192.168.86.2/")
|
||||||
|
(mkBm "WiFi Access Point" "http://192.168.86.3/")
|
||||||
|
(mkBm "OPNsense" "https://192.168.86.5/")
|
||||||
|
(mkBm "Synology DS223j" "https://synology.think.chriphost.de/")
|
||||||
|
(mkBm "PVE Direct" "https://192.168.86.4:8006/#v1:0:18:4:::::::")
|
||||||
|
(mkBm "PVF Direct" "https://192.168.86.13:8006/#v1:0:18:4:::::::")
|
||||||
|
(mkBm "Portainer" "https://portainer.think.chriphost.de/")
|
||||||
|
(mkBm "Local NGINX" "https://nginx.local.chriphost.de/")
|
||||||
|
(mkBm "Think NGINX" "https://nginx.think.chriphost.de/")
|
||||||
|
(mkBm "VPS NGINX" "http://vps.chriphost.de:51810/")
|
||||||
|
(mkBm "WUD ServeNix" "https://update.local.chriphost.de/")
|
||||||
|
(mkBm "WUD ThinkNix" "https://update.think.chriphost.de/")
|
||||||
|
|
||||||
|
(mkBm "Cloud" "https://nextcloud.local.chriphost.de/apps/files/files")
|
||||||
|
(mkBm "Immich" "https://immich.local.chriphost.de/photos")
|
||||||
|
(mkBm "Jelly" "https://jellyfin.local.chriphost.de/web/#/home.html")
|
||||||
|
(mkBm "HASS" "https://hass.think.chriphost.de/lovelace")
|
||||||
|
(mkBm "Docs" "https://paperless.local.chriphost.de/documents?sort=created&reverse=1&page=1")
|
||||||
|
(mkBm "Gitea" "https://gitea.local.chriphost.de/christoph")
|
||||||
|
# (mkBm "Chat" "http://localhost:11435/") # Local WebUI
|
||||||
|
|
||||||
|
(mkBm "C++Ref" "https://en.cppreference.com/w/")
|
||||||
|
(mkBm "Rust" "https://doc.rust-lang.org/stable/book/ch03-00-common-programming-concepts.html")
|
||||||
|
(mkBm "RustOS" "https://os.phil-opp.com/")
|
||||||
|
(mkBm "Interpreters" "https://craftinginterpreters.com/contents.html")
|
||||||
|
|
||||||
|
(mkBm "Mistral Chat" "https://chat.mistral.ai/chat")
|
||||||
|
(mkBm "DeepSeek Chat" "https://chat.deepseek.com/")
|
||||||
|
(mkBm "Claude Chat" "https://claude.ai/new")
|
||||||
|
(mkBm "ChatGPT" "https://chatgpt.com/")
|
||||||
|
(mkBm "DeepWiki" "https://deepwiki.com/")
|
||||||
|
(mkBm "Mistral API" "https://console.mistral.ai/usage")
|
||||||
|
(mkBm "DeepSeek API" "https://platform.deepseek.com/usage")
|
||||||
|
(mkBm "Claude API" "https://console.anthropic.com/usage")
|
||||||
|
(mkBm "OpenRouter API" "https://openrouter.ai/activity")
|
||||||
|
|
||||||
|
(mkBm "GH" "https://github.com/churl")
|
||||||
|
(mkBm "GL" "https://gitlab.com/churl")
|
||||||
|
(mkBm "SO" "https://stackoverflow.com/users/saves/17337508/all")
|
||||||
|
(mkBm "RegEx" "https://regex101.com/")
|
||||||
|
(mkBm "Shell" "https://explainshell.com/")
|
||||||
|
(mkBm "CDecl" "https://cdecl.org/")
|
||||||
|
(mkBm "ECR" "https://gallery.ecr.aws/")
|
||||||
|
(mkBm "Chmod" "https://chmod-calculator.com/")
|
||||||
|
|
||||||
|
(mkBm "Spiegel" "https://www.spiegel.de/")
|
||||||
|
(mkBm "Heise" "https://www.heise.de/")
|
||||||
|
(mkBm "HN" "https://news.ycombinator.com/news")
|
||||||
|
(mkBm "Reddit" "https://www.reddit.com/user/FightingMushroom/saved/")
|
||||||
|
(mkBm "F10" "https://f10.local.chriphost.de/race/Everyone")
|
||||||
|
(mkBm "F11" "https://f11.local.chriphost.de/racepicks")
|
||||||
|
(mkBm "F11PB" "https://f11pb.local.chriphost.de/_/#/collections?collection=pbc_1736455494&filter=&sort=-%40rowid")
|
||||||
|
(mkBm "ISBNDB" "https://isbndb.com/")
|
||||||
|
(mkBm "Music" "https://bandcamp.com/chriphost")
|
||||||
|
(mkBm "Albums" "https://www.albumoftheyear.org/user/chriphost/list/307966/2025/")
|
||||||
|
];
|
||||||
|
|
||||||
|
# TODO: Find a unified version for qutebrowser + firefox (+ other browsers ideally)
|
||||||
|
searchEngines = {
|
||||||
|
DEFAULT = "https://kagi.com/search?q={}";
|
||||||
|
k = "https://kagi.com/search?q={}";
|
||||||
|
w = "https://en.wikipedia.org/wiki/Special:Search?search={}";
|
||||||
|
np = "https://searchix.ovh/?query={}";
|
||||||
|
nf = "https://noogle.dev/q?term={}";
|
||||||
|
nw = "https://wiki.nixos.org/index.php?search={}";
|
||||||
|
aw = "https://wiki.archlinux.org/?search={}";
|
||||||
|
i = "https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue%20{}";
|
||||||
|
gh = "https://github.com/search?q={}&type=repositories";
|
||||||
|
g = "https://www.google.com/search?hl=en&q={}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# greasemonkey = [];
|
||||||
|
|
||||||
|
# Map keys to other keys
|
||||||
|
# keyMappings = {};
|
||||||
|
|
||||||
|
# Map keys to commands
|
||||||
|
# keyBindings = {
|
||||||
|
# normal = {
|
||||||
|
# "<Ctrl-v>" = "spawn mpv {url}";
|
||||||
|
# ",p" = "spawn --userscript qute-pass";
|
||||||
|
# ",l" = ''config-cycle spellcheck.languages ["en-GB"] ["en-US"]'';
|
||||||
|
# "<F1>" = lib.mkMerge [
|
||||||
|
# "config-cycle tabs.show never always"
|
||||||
|
# "config-cycle statusbar.show in-mode always"
|
||||||
|
# "config-cycle scrolling.bar never always"
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# prompt = {
|
||||||
|
# "<Ctrl-y>" = "prompt-yes";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
enableDefaultBindings = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
# Theme
|
||||||
|
colors = import ./colors.nix {inherit color;};
|
||||||
|
fonts = {
|
||||||
|
default_family = color.font;
|
||||||
|
default_size = "12pt";
|
||||||
|
web.family.fixed = color.font;
|
||||||
|
};
|
||||||
|
hints.border = "1px solid " + color.hexS.mantle;
|
||||||
|
|
||||||
|
# Settings
|
||||||
|
auto_save.session = true;
|
||||||
|
changelog_after_upgrade = "minor";
|
||||||
|
completion.height = "33%";
|
||||||
|
content = {
|
||||||
|
autoplay = true;
|
||||||
|
blocking.enabled = true;
|
||||||
|
blocking.method = "auto"; # "auto", "adblock", "hosts", "both"
|
||||||
|
dns_prefetch = true;
|
||||||
|
};
|
||||||
|
editor.command = ["neovide" "{file}" "--" "normal {line}G{column0}l"];
|
||||||
|
# TODO: termfilechooser, also for downloads (those are separate)
|
||||||
|
# fileselect = {
|
||||||
|
# handler = "external";
|
||||||
|
# folder.command = [];
|
||||||
|
# multiple_files.command = [];
|
||||||
|
# single_file.command = [];
|
||||||
|
# };
|
||||||
|
input.media_keys = false;
|
||||||
|
prompt.radius = 6;
|
||||||
|
scrolling.smooth = true;
|
||||||
|
session.lazy_restore = true;
|
||||||
|
tabs.position = "right";
|
||||||
|
url = {
|
||||||
|
default_page = "about:blank";
|
||||||
|
open_base_url = true;
|
||||||
|
start_pages = ["https://kagi.com"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Same keys as qutebrowser.settings, but per domain
|
||||||
|
# perDomainSettings = {
|
||||||
|
# "github.com".colors.webpage.darkmode.enabled = false;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
home/modules/qutebrowser/options.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
enable = lib.mkEnableOption "TEMPLATE";
|
||||||
|
}
|
||||||
@ -49,7 +49,7 @@ in {
|
|||||||
enable_config_hot_reload: true,
|
enable_config_hot_reload: true,
|
||||||
status_update_interval_ms: 1000,
|
status_update_interval_ms: 1000,
|
||||||
rewind_to_start_sec: 30,
|
rewind_to_start_sec: 30,
|
||||||
lyrics_dir: "${config.home.homeDirectory}/Music/.lyrics",
|
lyrics_dir: "${config.home.homeDirectory}/Music",
|
||||||
|
|
||||||
// Keep this on false, otherwise queue changes will be applied to the current playlist
|
// Keep this on false, otherwise queue changes will be applied to the current playlist
|
||||||
reflect_changes_to_playlist: false,
|
reflect_changes_to_playlist: false,
|
||||||
@ -308,7 +308,7 @@ in {
|
|||||||
inactive_style: (),
|
inactive_style: (),
|
||||||
),
|
),
|
||||||
|
|
||||||
highlighted_item_style: (fg: "${accentDim}", modifiers: "Bold|Italic"), // Currently playing
|
highlighted_item_style: (fg: "${accent}", modifiers: "Bold|Italic"), // Currently playing
|
||||||
current_item_style: (fg: "${accentText}", bg: "${accentDim}", modifiers: "Bold|Italic"), // Tracks list cursor
|
current_item_style: (fg: "${accentText}", bg: "${accentDim}", modifiers: "Bold|Italic"), // Tracks list cursor
|
||||||
borders_style: (fg: "${accent}", modifiers: "Bold"),
|
borders_style: (fg: "${accent}", modifiers: "Bold"),
|
||||||
highlight_border_style: (fg: "${accent}", modifiers: "Bold"),
|
highlight_border_style: (fg: "${accent}", modifiers: "Bold"),
|
||||||
|
|||||||
@ -15,7 +15,7 @@ in {
|
|||||||
config = lib.mkIf rofi.enable {
|
config = lib.mkIf rofi.enable {
|
||||||
programs.rofi = {
|
programs.rofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.rofi-wayland;
|
package = pkgs.rofi;
|
||||||
terminal = "kitty";
|
terminal = "kitty";
|
||||||
font = "${color.font} 14";
|
font = "${color.font} 14";
|
||||||
location = "center";
|
location = "center";
|
||||||
@ -24,7 +24,7 @@ in {
|
|||||||
extraConfig = {
|
extraConfig = {
|
||||||
modi = "run,drun,ssh,filebrowser";
|
modi = "run,drun,ssh,filebrowser";
|
||||||
show-icons = true;
|
show-icons = true;
|
||||||
icon-theme = "Papirus";
|
icon-theme = color.iconTheme;
|
||||||
drun-display-format = "{icon} {name}";
|
drun-display-format = "{icon} {name}";
|
||||||
disable-history = false;
|
disable-history = false;
|
||||||
hide-scrollbar = true;
|
hide-scrollbar = true;
|
||||||
@ -41,9 +41,6 @@ in {
|
|||||||
inherit (config.lib.formats.rasi) mkLiteral;
|
inherit (config.lib.formats.rasi) mkLiteral;
|
||||||
|
|
||||||
trans = "rgba(0, 0, 0, 0)";
|
trans = "rgba(0, 0, 0, 0)";
|
||||||
|
|
||||||
paddingInner = "5px";
|
|
||||||
paddingOuter = "10px";
|
|
||||||
in {
|
in {
|
||||||
"element-text,element-icon,mode-switcher" = {
|
"element-text,element-icon,mode-switcher" = {
|
||||||
background-color = mkLiteral "inherit";
|
background-color = mkLiteral "inherit";
|
||||||
@ -56,28 +53,16 @@ in {
|
|||||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||||
border-radius = 6;
|
border-radius = 6;
|
||||||
border-color = mkLiteral color.hexS.accent;
|
border-color = mkLiteral color.hexS.accent;
|
||||||
background-color = mkLiteral "rgba(${color.rgbS.base}, 0.2)";
|
|
||||||
|
# This is not opacity but translucency
|
||||||
|
background-color = mkLiteral "rgba(${color.rgbS.base}, 0.25)";
|
||||||
};
|
};
|
||||||
|
|
||||||
"mainbox" = {
|
"mainbox" = {
|
||||||
background-color = mkLiteral trans;
|
background-color = mkLiteral trans;
|
||||||
};
|
};
|
||||||
|
|
||||||
"message" = {
|
# TOP INPUT BAR START
|
||||||
background-color = mkLiteral trans;
|
|
||||||
};
|
|
||||||
|
|
||||||
"error-message" = {
|
|
||||||
background-color = mkLiteral trans;
|
|
||||||
margin = mkLiteral "0px 0px 10px 0px";
|
|
||||||
};
|
|
||||||
|
|
||||||
"textbox" = {
|
|
||||||
background-color = mkLiteral trans;
|
|
||||||
padding = 6;
|
|
||||||
margin = mkLiteral "10px 10px 0px 10px";
|
|
||||||
border-radius = 3;
|
|
||||||
};
|
|
||||||
|
|
||||||
"inputbar" = {
|
"inputbar" = {
|
||||||
children = builtins.map mkLiteral ["prompt" "entry"];
|
children = builtins.map mkLiteral ["prompt" "entry"];
|
||||||
@ -102,6 +87,26 @@ in {
|
|||||||
border-color = mkLiteral color.hexS.accentHl;
|
border-color = mkLiteral color.hexS.accentHl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# MESSAGEBOX (usually not visible)
|
||||||
|
|
||||||
|
"message" = {
|
||||||
|
background-color = mkLiteral trans;
|
||||||
|
};
|
||||||
|
|
||||||
|
"error-message" = {
|
||||||
|
background-color = mkLiteral trans;
|
||||||
|
margin = mkLiteral "0px 0px 10px 0px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"textbox" = {
|
||||||
|
background-color = mkLiteral trans;
|
||||||
|
padding = 6;
|
||||||
|
margin = mkLiteral "10px 10px 0px 10px";
|
||||||
|
border-radius = 3;
|
||||||
|
};
|
||||||
|
|
||||||
|
# LISTVIEW
|
||||||
|
|
||||||
"listview" = {
|
"listview" = {
|
||||||
# border = mkLiteral "0px 0px 0px";
|
# border = mkLiteral "0px 0px 0px";
|
||||||
padding = 0;
|
padding = 0;
|
||||||
@ -110,7 +115,7 @@ in {
|
|||||||
background-color = mkLiteral trans;
|
background-color = mkLiteral trans;
|
||||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||||
border-radius = 3;
|
border-radius = 3;
|
||||||
border-color = mkLiteral color.hexS.accentHl;
|
border-color = mkLiteral color.hexS.accentDim;
|
||||||
};
|
};
|
||||||
|
|
||||||
"element" = {
|
"element" = {
|
||||||
@ -126,7 +131,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
"element selected" = {
|
"element selected" = {
|
||||||
background-color = mkLiteral color.hexS.accentHl;
|
background-color = mkLiteral color.hexS.accentDim;
|
||||||
text-color = mkLiteral color.hexS.accentText;
|
text-color = mkLiteral color.hexS.accentText;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -179,7 +184,8 @@ in {
|
|||||||
(color.wallpapers
|
(color.wallpapers
|
||||||
|> builtins.map (setWallpaperOnMonitors monitors)
|
|> builtins.map (setWallpaperOnMonitors monitors)
|
||||||
|> lib.mergeAttrsList);
|
|> lib.mergeAttrsList);
|
||||||
in {
|
in
|
||||||
|
lib.mkIf (!config.modules.hyprland.caelestia.enable) {
|
||||||
bindings = lib.mergeAttrsList [
|
bindings = lib.mergeAttrsList [
|
||||||
{
|
{
|
||||||
"$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
|
"$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
|
||||||
|
|||||||
@ -68,7 +68,7 @@ in {
|
|||||||
opener = {
|
opener = {
|
||||||
play = [
|
play = [
|
||||||
{
|
{
|
||||||
run = ''vlc "$@"'';
|
run = ''mpv "$@"'';
|
||||||
orphan = true;
|
orphan = true;
|
||||||
desc = "Play selection";
|
desc = "Play selection";
|
||||||
}
|
}
|
||||||
@ -280,7 +280,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
border_symbol = "│";
|
border_symbol = "│";
|
||||||
border_style = {fg = color.hexS.overlay1;};
|
border_style = {fg = color.hexS.overlay0;};
|
||||||
};
|
};
|
||||||
|
|
||||||
tabs = {
|
tabs = {
|
||||||
@ -353,7 +353,7 @@ in {
|
|||||||
perm_read = {fg = color.hexS.yellow;};
|
perm_read = {fg = color.hexS.yellow;};
|
||||||
perm_write = {fg = color.hexS.red;};
|
perm_write = {fg = color.hexS.red;};
|
||||||
perm_exec = {fg = color.hexS.green;};
|
perm_exec = {fg = color.hexS.green;};
|
||||||
perm_sep = {fg = color.hexS.overlay1;};
|
perm_sep = {fg = color.hexS.overlay0;};
|
||||||
};
|
};
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
pkgs-stable,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
# Taken from https://github.com/Misterio77/nix-config/blob/main/overlay/default.nix
|
# Taken from https://github.com/Misterio77/nix-config/blob/main/overlay/default.nix
|
||||||
@ -11,14 +12,55 @@
|
|||||||
pkgs = final;
|
pkgs = final;
|
||||||
};
|
};
|
||||||
|
|
||||||
modifications = final: prev: rec {
|
modifications = final: prev: {
|
||||||
# Only kept as an example, has nothing to do with current dconf-editor-wrapped derivation
|
# Only kept as an example, has nothing to do with current dconf-editor-wrapped derivation
|
||||||
# dconf-editor-wrapped = import ./dconf-editor.nix { inherit final prev; };
|
# dconf-editor-wrapped = import ./dconf-editor.nix { inherit final prev; };
|
||||||
# Use dconf-editor.nix: { final, prev }: final.<package>.overrideAttrs (oldAttrs: { ... }) or sth similar
|
# Use dconf-editor.nix: { final, prev }: final.<package>.overrideAttrs (oldAttrs: { ... }) or sth similar
|
||||||
|
|
||||||
|
# Overriding specific packages from a different nixpkgs (e.g. a pull request)
|
||||||
|
# can be done like this. Note that this creates an additional nixpkgs instance.
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/418451
|
||||||
|
# unityhub_3_13 =
|
||||||
|
# (import inputs.unityhub-pinned {
|
||||||
|
# config.allowUnfree = true;
|
||||||
|
# localSystem = {inherit (prev) system;};
|
||||||
|
# }).unityhub;
|
||||||
|
|
||||||
|
# Remove this after jetbrains.jdk builds again (nixpkgs issue 425328)
|
||||||
|
# jetbrains.rider = pkgs-stable.jetbrains.rider;
|
||||||
|
|
||||||
|
# Now in Nixpkgs
|
||||||
|
# neovide = prev.neovide.overrideAttrs (finalAttrs: prevAttrs: {
|
||||||
|
# version = "0.15.1";
|
||||||
|
# src = prev.fetchFromGitHub {
|
||||||
|
# owner = "neovide";
|
||||||
|
# repo = "neovide";
|
||||||
|
# tag = finalAttrs.version;
|
||||||
|
# hash = "sha256-2iV3g6tcCkMF7sFG/GZDz3czPZNIDi6YLfrVzYO9jYI=";
|
||||||
|
# };
|
||||||
|
# cargoHash = "sha256-YlHAcUCRk6ROg5yXIumHfsiR/2TrsSzbuXz/IQK7sEo=";
|
||||||
|
# cargoDeps = prev.rustPlatform.fetchCargoVendor {
|
||||||
|
# inherit (finalAttrs) pname src version;
|
||||||
|
# hash = finalAttrs.cargoHash;
|
||||||
|
# };
|
||||||
|
# });
|
||||||
|
|
||||||
|
# Now in Nixpkgs
|
||||||
|
# rmpc = prev.rmpc.overrideAttrs (finalAttrs: prevAttrs: {
|
||||||
|
# version = "0.10.0";
|
||||||
|
# src = prev.fetchFromGitHub {
|
||||||
|
# owner = "mierak";
|
||||||
|
# repo = "rmpc";
|
||||||
|
# rev = "v0.10.0";
|
||||||
|
# hash = "sha256-NU8T26oPhm8L7wdO4p65cpNa0pax7/oqHGs98QDoEc0=";
|
||||||
|
# };
|
||||||
|
# cargoHash = "sha256-d2/4q2s/11HNE18D8d8Y2yWidhT+XsUS4J9ahnxToI0=";
|
||||||
|
# cargoDeps = prev.rustPlatform.fetchCargoVendor {
|
||||||
|
# inherit (finalAttrs) pname src version;
|
||||||
|
# hash = finalAttrs.cargoHash;
|
||||||
|
# };
|
||||||
|
# });
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
# TODO: I have absolutely no clue what happens here lol
|
# Composes a list of overlays and returns a single overlay function that combines them.
|
||||||
# Basically we need some sort of list of all overlays that can be imported from the flake
|
|
||||||
# in the overlays = [ ... ] section of the pkgs = import nixpkgs { ... } configuration
|
|
||||||
# Somehow this library function turns additions/modifications into that
|
|
||||||
nixpkgs.lib.composeManyExtensions [additions modifications]
|
nixpkgs.lib.composeManyExtensions [additions modifications]
|
||||||
|
|||||||
@ -26,9 +26,12 @@ with mylib.networking; {
|
|||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
loader =
|
loader =
|
||||||
|
lib.mkDefault
|
||||||
|
(
|
||||||
if headless
|
if headless
|
||||||
then "grub"
|
then "grub"
|
||||||
else "systemd-boot";
|
else "systemd-boot"
|
||||||
|
);
|
||||||
systemd-boot.bootDevice = "/boot";
|
systemd-boot.bootDevice = "/boot";
|
||||||
grub.bootDevice = "/dev/sda";
|
grub.bootDevice = "/dev/sda";
|
||||||
};
|
};
|
||||||
@ -38,6 +41,7 @@ with mylib.networking; {
|
|||||||
|
|
||||||
termfilechooser.enable = true;
|
termfilechooser.enable = true;
|
||||||
hyprland.enable = config.programs.hyprland.enable;
|
hyprland.enable = config.programs.hyprland.enable;
|
||||||
|
niri.enable = config.programs.niri.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
docker = {
|
docker = {
|
||||||
@ -66,8 +70,8 @@ with mylib.networking; {
|
|||||||
defaultWebBrowser = "firefox.desktop";
|
defaultWebBrowser = "firefox.desktop";
|
||||||
defaultPdfViewer = "org.pwmt.zathura.desktop";
|
defaultPdfViewer = "org.pwmt.zathura.desktop";
|
||||||
defaultImageViewer = "imv-dir.desktop";
|
defaultImageViewer = "imv-dir.desktop";
|
||||||
defaultAudioPlayer = "vlc.desktop";
|
defaultAudioPlayer = "mpv.desktop";
|
||||||
defaultVideoPlayer = "vlc.desktop";
|
defaultVideoPlayer = "mpv.desktop";
|
||||||
};
|
};
|
||||||
|
|
||||||
network = {
|
network = {
|
||||||
@ -140,7 +144,7 @@ with mylib.networking; {
|
|||||||
|
|
||||||
# Bootloader/Kernel stuff
|
# Bootloader/Kernel stuff
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
kernelPackages = lib.mkDefault pkgs.linuxPackages;
|
||||||
kernelParams = ["mitigations=off"]; # I don't care
|
kernelParams = ["mitigations=off"]; # I don't care
|
||||||
|
|
||||||
# Make /tmp volatile
|
# Make /tmp volatile
|
||||||
@ -213,11 +217,49 @@ with mylib.networking; {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/179486
|
# https://github.com/NixOS/nixpkgs/issues/179486
|
||||||
supportedLocales = ["en_US.UTF-8/UTF-8" "de_DE.UTF-8/UTF-8"];
|
supportedLocales = ["${en}/UTF-8" "${de}/UTF-8"];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure console keymap
|
console = {
|
||||||
console.keyMap = "us-acentos";
|
earlySetup = true;
|
||||||
|
useXkbConfig = true;
|
||||||
|
packages = [pkgs.terminus_font];
|
||||||
|
font = "ter-220b";
|
||||||
|
|
||||||
|
# Normal Bright
|
||||||
|
# -------- -------
|
||||||
|
# 0 Black 8 Black
|
||||||
|
# 1 Red 9 Red
|
||||||
|
# 2 Yellow 10 Yellow
|
||||||
|
# 3 Green 11 Green
|
||||||
|
# 4 Blue 12 Blue
|
||||||
|
# 5 Magenta 13 Magenta
|
||||||
|
# 6 Cyan 14 Cyan
|
||||||
|
# 7 White 15 White
|
||||||
|
colors = let
|
||||||
|
color = config.home-manager.users.${username}.modules.color;
|
||||||
|
in [
|
||||||
|
# 0 - 7
|
||||||
|
"000000" # Dark black
|
||||||
|
color.hex.red
|
||||||
|
color.hex.green
|
||||||
|
color.hex.yellow # Swapped with green for kitty consistency
|
||||||
|
color.hex.blue
|
||||||
|
color.hex.pink
|
||||||
|
color.hex.teal
|
||||||
|
color.hex.text # Dark white
|
||||||
|
|
||||||
|
# 8 - 15
|
||||||
|
color.hex.surface2 # Light black
|
||||||
|
color.hex.red
|
||||||
|
color.hex.green
|
||||||
|
color.hex.yellow # Swapped with green for kitty consistency
|
||||||
|
color.hex.blue
|
||||||
|
color.hex.pink
|
||||||
|
color.hex.teal
|
||||||
|
"ffffff" # Light white
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Define a user account. Password is set from sops-nix secrets automatically.
|
# Define a user account. Password is set from sops-nix secrets automatically.
|
||||||
users.mutableUsers = false; # Users are always overridden by stuff defined here
|
users.mutableUsers = false; # Users are always overridden by stuff defined here
|
||||||
@ -283,7 +325,7 @@ with mylib.networking; {
|
|||||||
firejail.enable = true; # Use to run app in network namespace (e.g. through vpn)
|
firejail.enable = true; # Use to run app in network namespace (e.g. through vpn)
|
||||||
fuse.userAllowOther = true; # Allow users to mount e.g. samba shares (cifs)
|
fuse.userAllowOther = true; # Allow users to mount e.g. samba shares (cifs)
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
kdeconnect.enable = !headless; # Use this instead of HM for firewall setup
|
# kdeconnect.enable = !headless; # Use this instead of HM for firewall setup
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
nix-ld.enable = true; # Load dynamically linked executables
|
nix-ld.enable = true; # Load dynamically linked executables
|
||||||
|
|
||||||
@ -299,8 +341,14 @@ with mylib.networking; {
|
|||||||
enableSSHSupport = true;
|
enableSSHSupport = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gpu-screen-recorder.enable = !headless;
|
||||||
|
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = !headless;
|
enable = !headless;
|
||||||
|
|
||||||
|
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||||
|
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||||
|
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
withUWSM = true;
|
withUWSM = true;
|
||||||
};
|
};
|
||||||
@ -312,6 +360,7 @@ with mylib.networking; {
|
|||||||
flake = "/home/${username}/NixFlake";
|
flake = "/home/${username}/NixFlake";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
niri.enable = !headless;
|
||||||
ssh.startAgent = true; # Use gnupg
|
ssh.startAgent = true; # Use gnupg
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
xwayland.enable = !headless;
|
xwayland.enable = !headless;
|
||||||
@ -340,6 +389,21 @@ with mylib.networking; {
|
|||||||
wacom.enable = true;
|
wacom.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# greetd = {
|
||||||
|
# enable = !headless;
|
||||||
|
# restart = false;
|
||||||
|
# useTextGreeter = true;
|
||||||
|
#
|
||||||
|
# settings = {
|
||||||
|
# terminal.vt = 1;
|
||||||
|
#
|
||||||
|
# default_session = {
|
||||||
|
# command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd $SHELL";
|
||||||
|
# user = "greeter";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
libinput.enable = !headless;
|
libinput.enable = !headless;
|
||||||
|
|
||||||
@ -399,6 +463,7 @@ with mylib.networking; {
|
|||||||
services."refresh-nps-cache" = {
|
services."refresh-nps-cache" = {
|
||||||
# Make sure `nix` and `nix-env` are findable by systemd.services.
|
# Make sure `nix` and `nix-env` are findable by systemd.services.
|
||||||
path = ["/run/current-system/sw/"];
|
path = ["/run/current-system/sw/"];
|
||||||
|
after = ["network.target"];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
User = "${username}";
|
User = "${username}";
|
||||||
@ -406,7 +471,7 @@ with mylib.networking; {
|
|||||||
script = ''
|
script = ''
|
||||||
set -eu
|
set -eu
|
||||||
echo "Start refreshing nps cache..."
|
echo "Start refreshing nps cache..."
|
||||||
${inputs.nps.packages.${system}.default}/bin/nps -dddd -e -r
|
${inputs.nps.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/nps -dddd -e -r
|
||||||
echo "... finished nps cache with exit code $?."
|
echo "... finished nps cache with exit code $?."
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
@ -31,5 +32,20 @@ in {
|
|||||||
device = bootloader.grub.bootDevice;
|
device = bootloader.grub.bootDevice;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
(lib.mkIf (bootloader.loader == "lanzaboote") {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
sbctl
|
||||||
|
];
|
||||||
|
|
||||||
|
# Lanzaboote replaces systemd-boot
|
||||||
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||||
|
|
||||||
|
boot.lanzaboote = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# WARN: Make sure to persist this if using impermanence!
|
||||||
|
pkiBundle = "/var/lib/sbctl";
|
||||||
|
};
|
||||||
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
type = lib.types.enum [
|
type = lib.types.enum [
|
||||||
"grub"
|
"grub"
|
||||||
"systemd-boot"
|
"systemd-boot"
|
||||||
|
"lanzaboote"
|
||||||
];
|
];
|
||||||
description = "What boot loader to use";
|
description = "What boot loader to use";
|
||||||
example = "systemd-boot";
|
example = "systemd-boot";
|
||||||
|
|||||||
@ -14,7 +14,7 @@ in {
|
|||||||
portal = {
|
portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xdgOpenUsePortal = true;
|
xdgOpenUsePortal = true;
|
||||||
wlr.enable = false;
|
wlr.enable = true;
|
||||||
|
|
||||||
# TODO: Replace lib.optional(s) throughout the config with mkMerge
|
# TODO: Replace lib.optional(s) throughout the config with mkMerge
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
@ -35,6 +35,14 @@ in {
|
|||||||
(desktopportal.hyprland.enable && desktopportal.termfilechooser.enable) {
|
(desktopportal.hyprland.enable && desktopportal.termfilechooser.enable) {
|
||||||
hyprland."org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"];
|
hyprland."org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"];
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(lib.mkIf desktopportal.niri.enable {
|
||||||
|
niri.default = ["gtk" "gnome"];
|
||||||
|
})
|
||||||
|
|
||||||
|
(lib.mkIf (desktopportal.niri.enable && desktopportal.termfilechooser.enable) {
|
||||||
|
niri."org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
extraPortals = with pkgs;
|
extraPortals = with pkgs;
|
||||||
@ -43,9 +51,10 @@ in {
|
|||||||
xdg-desktop-portal-gtk # Fallback
|
xdg-desktop-portal-gtk # Fallback
|
||||||
]
|
]
|
||||||
|
|
||||||
(lib.mkIf desktopportal.hyprland.enable [
|
# We don't need to install that explicitly
|
||||||
xdg-desktop-portal-hyprland
|
# (lib.mkIf desktopportal.hyprland.enable [
|
||||||
])
|
# xdg-desktop-portal-hyprland
|
||||||
|
# ])
|
||||||
|
|
||||||
(lib.mkIf desktopportal.termfilechooser.enable [
|
(lib.mkIf desktopportal.termfilechooser.enable [
|
||||||
xdg-desktop-portal-termfilechooser # Filechooser using yazi
|
xdg-desktop-portal-termfilechooser # Filechooser using yazi
|
||||||
|
|||||||
@ -6,4 +6,5 @@
|
|||||||
enable = lib.mkEnableOption "Enable XDG desktop portals";
|
enable = lib.mkEnableOption "Enable XDG desktop portals";
|
||||||
termfilechooser.enable = lib.mkEnableOption "Enable xdg-desktop-portal-termfilechooser";
|
termfilechooser.enable = lib.mkEnableOption "Enable xdg-desktop-portal-termfilechooser";
|
||||||
hyprland.enable = lib.mkEnableOption "Configure portals for Hyprland";
|
hyprland.enable = lib.mkEnableOption "Configure portals for Hyprland";
|
||||||
|
niri.enable = lib.mkEnableOption "Configure portals for Niri";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (config.modules) docker;
|
inherit (config.modules) docker;
|
||||||
@ -22,6 +23,8 @@ in {
|
|||||||
enable = !docker.podman;
|
enable = !docker.podman;
|
||||||
autoPrune.enable = true;
|
autoPrune.enable = true;
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [docker-compose];
|
||||||
|
|
||||||
rootless = {
|
rootless = {
|
||||||
enable = docker.docker.rootless;
|
enable = docker.docker.rootless;
|
||||||
setSocketVariable = true;
|
setSocketVariable = true;
|
||||||
@ -54,7 +57,7 @@ in {
|
|||||||
dockerSocket.enable = true;
|
dockerSocket.enable = true;
|
||||||
defaultNetwork.settings.dns_enabled = true;
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
|
||||||
# extraPackages = with pkgs; [];
|
extraPackages = with pkgs; [podman-compose];
|
||||||
};
|
};
|
||||||
|
|
||||||
oci-containers.backend =
|
oci-containers.backend =
|
||||||
|
|||||||
@ -29,7 +29,7 @@ in {
|
|||||||
|
|
||||||
# Sans/Serif fonts
|
# Sans/Serif fonts
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-emoji
|
noto-fonts-color-emoji
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
lxgw-wenkai
|
lxgw-wenkai
|
||||||
];
|
];
|
||||||
|
|||||||
@ -43,6 +43,12 @@ in {
|
|||||||
mkRFile = mkFile "root";
|
mkRFile = mkFile "root";
|
||||||
mkUDir = mkDir "${username}";
|
mkUDir = mkDir "${username}";
|
||||||
mkUFile = mkFile "${username}";
|
mkUFile = mkFile "${username}";
|
||||||
|
# TODO: sth. like this, make options for configdirs/sharedirs/statedirs/homedirs
|
||||||
|
# populate options from respective modules, not here...
|
||||||
|
# mkConfigDirs = dirs:
|
||||||
|
# dirs
|
||||||
|
# |> builtins.map (dir: ".config/${dir}")
|
||||||
|
# |> builtins.map mkUDir # NOTE: mkUDir has wrong arg order
|
||||||
in
|
in
|
||||||
lib.mkIf impermanence.enable {
|
lib.mkIf impermanence.enable {
|
||||||
# TODO: Create options to allow host-specific impermanence setup
|
# TODO: Create options to allow host-specific impermanence setup
|
||||||
@ -63,14 +69,18 @@ in {
|
|||||||
# https://github.com/nix-community/impermanence/issues/253
|
# https://github.com/nix-community/impermanence/issues/253
|
||||||
(mkRDir "/usr/systemd-placeholder" m755)
|
(mkRDir "/usr/systemd-placeholder" m755)
|
||||||
|
|
||||||
|
(mkRDir "/var/cache/restic-backups-synology" m755)
|
||||||
|
|
||||||
(mkRDir "/var/db/sudo" m711)
|
(mkRDir "/var/db/sudo" m711)
|
||||||
|
|
||||||
(mkRDir "/var/lib/bluetooth" m755) # m700
|
(mkRDir "/var/lib/bluetooth" m755) # m700
|
||||||
|
(mkRDir "/var/lib/btrfs" m755)
|
||||||
(mkRDir "/var/lib/containers" m755)
|
(mkRDir "/var/lib/containers" m755)
|
||||||
(mkRDir "/var/lib/flatpak" m755)
|
(mkRDir "/var/lib/flatpak" m755)
|
||||||
(mkRDir "/var/lib/libvirt" m755)
|
(mkRDir "/var/lib/libvirt" m755)
|
||||||
(mkRDir "/var/lib/NetworkManager" m755)
|
(mkRDir "/var/lib/NetworkManager" m755)
|
||||||
(mkRDir "/var/lib/nixos" m755)
|
(mkRDir "/var/lib/nixos" m755)
|
||||||
|
(mkRDir "/var/lib/sbctl" m755)
|
||||||
(mkRDir "/var/lib/systemd" m755)
|
(mkRDir "/var/lib/systemd" m755)
|
||||||
|
|
||||||
(mkRDir "/var/tmp" m777)
|
(mkRDir "/var/tmp" m777)
|
||||||
@ -80,13 +90,13 @@ in {
|
|||||||
files = [
|
files = [
|
||||||
# NOTE: Don't put files generated/linked by HM here (they're already managed)
|
# NOTE: Don't put files generated/linked by HM here (they're already managed)
|
||||||
|
|
||||||
# TODO: These files are not mounted?
|
# TODO: Specifying files here (e.g. .config/QtProject.conf) doesn't seem to work
|
||||||
(mkUFile ".config/.tidal-dl.json" m755)
|
# They won't get mounted, also they can't be unmounted (because they're not mounted),
|
||||||
(mkUFile ".config/.tidal-dl.token.json" m755)
|
# which leads to /home not being unmounted correctly during shutdown...
|
||||||
(mkUFile ".config/QtProject.conf" m755) # KeePassXC
|
|
||||||
];
|
];
|
||||||
|
|
||||||
directories = [
|
directories = [
|
||||||
|
# Home directory
|
||||||
(mkUDir "Downloads" m755)
|
(mkUDir "Downloads" m755)
|
||||||
(mkUDir "Documents" m755)
|
(mkUDir "Documents" m755)
|
||||||
(mkUDir "GitRepos" m755)
|
(mkUDir "GitRepos" m755)
|
||||||
@ -95,60 +105,82 @@ in {
|
|||||||
(mkUDir "Pictures" m755)
|
(mkUDir "Pictures" m755)
|
||||||
(mkUDir "Projects" m755)
|
(mkUDir "Projects" m755)
|
||||||
(mkUDir "Public" m755)
|
(mkUDir "Public" m755)
|
||||||
(mkUDir "Unity" m755)
|
# (mkUDir "Unity" m755)
|
||||||
(mkUDir "Videos" m755)
|
(mkUDir "Videos" m755)
|
||||||
|
|
||||||
|
# Secrets
|
||||||
(mkUDir ".gnupg" m755) # m600
|
(mkUDir ".gnupg" m755) # m600
|
||||||
(mkUDir ".secrets" m755) # m644
|
(mkUDir ".secrets" m755) # m644
|
||||||
(mkUDir ".ssh" m755) # m644
|
(mkUDir ".ssh" m755) # m644
|
||||||
|
|
||||||
(mkUDir ".android" m755) # Unity
|
# The shit some applications add to ~/ without asking
|
||||||
(mkUDir ".java" m755) # Unity/Rider
|
# (mkUDir ".android" m755) # Unity
|
||||||
|
# (mkUDir ".gradle" m755) # Unity
|
||||||
|
# (mkUDir ".java" m755) # Unity/Rider
|
||||||
|
(mkUDir ".MakeMKV" m755)
|
||||||
(mkUDir ".mozilla/firefox" m755) # TODO: Remove this someday
|
(mkUDir ".mozilla/firefox" m755) # TODO: Remove this someday
|
||||||
(mkUDir ".mozilla/native-messaging-hosts" m755)
|
(mkUDir ".mozilla/native-messaging-hosts" m755)
|
||||||
(mkUDir ".nix-package-search" m755)
|
(mkUDir ".nix-package-search" m755)
|
||||||
|
# (mkUDir ".nv" m755) # Unity
|
||||||
(mkUDir ".ollama" m755)
|
(mkUDir ".ollama" m755)
|
||||||
|
# (mkUDir ".plastic4" m755) # Unity
|
||||||
(mkUDir ".var/app" m755)
|
(mkUDir ".var/app" m755)
|
||||||
(mkUDir ".vim/undo" m755)
|
(mkUDir ".vim/undo" m755)
|
||||||
(mkUDir ".zotero" m755)
|
(mkUDir ".zotero" m755)
|
||||||
|
|
||||||
|
# Cache that's actually useful
|
||||||
(mkUDir ".cache/fish/generated_completions" m755)
|
(mkUDir ".cache/fish/generated_completions" m755)
|
||||||
(mkUDir ".cache/nix-index" m755)
|
(mkUDir ".cache/nix-index" m755)
|
||||||
(mkUDir ".cache/nix-search-tv" m755)
|
(mkUDir ".cache/nix-search-tv" m755)
|
||||||
(mkUDir ".cache/nvim" m755)
|
(mkUDir ".cache/nvim" m755)
|
||||||
|
|
||||||
|
# Config
|
||||||
|
# (mkUDir ".config/.android" m755) # Unity
|
||||||
(mkUDir ".config/beets" m755)
|
(mkUDir ".config/beets" m755)
|
||||||
|
(mkUDir ".config/blender" m755)
|
||||||
(mkUDir ".config/chromium" m755) # TODO: Remove this someday
|
(mkUDir ".config/chromium" m755) # TODO: Remove this someday
|
||||||
(mkUDir ".config/Ferdium" m755)
|
(mkUDir ".config/Ferdium" m755)
|
||||||
(mkUDir ".config/fish/completions" m755)
|
(mkUDir ".config/fish/completions" m755)
|
||||||
(mkUDir ".config/impermanence" m755)
|
(mkUDir ".config/impermanence" m755)
|
||||||
(mkUDir ".config/JetBrains" m755) # Unity/Rider
|
(mkUDir ".config/jellyfin-mpv-shim" m755)
|
||||||
|
(mkUDir ".config/JetBrains" m755)
|
||||||
(mkUDir ".config/kdeconnect" m755)
|
(mkUDir ".config/kdeconnect" m755)
|
||||||
(mkUDir ".config/keepassxc" m755)
|
(mkUDir ".config/keepassxc" m755)
|
||||||
(mkUDir ".config/Msty" m755)
|
(mkUDir ".config/Msty" m755)
|
||||||
(mkUDir ".config/Nextcloud" m755)
|
(mkUDir ".config/Nextcloud" m755)
|
||||||
(mkUDir ".config/obsidian" m755)
|
(mkUDir ".config/obsidian" m755)
|
||||||
|
(mkUDir ".config/obs-studio" m755)
|
||||||
(mkUDir ".config/Signal" m755)
|
(mkUDir ".config/Signal" m755)
|
||||||
|
# (mkUDir ".config/singularitygroup-hotreload" m755) # Unity
|
||||||
|
(mkUDir ".config/TeamSpeak" m755)
|
||||||
(mkUDir ".config/tidal-hifi" m755)
|
(mkUDir ".config/tidal-hifi" m755)
|
||||||
(mkUDir ".config/tidal_dl_ng" m755)
|
(mkUDir ".config/tidal_dl_ng" m755)
|
||||||
(mkUDir ".config/unity3d" m755) # Unity
|
# (mkUDir ".config/unity3d" m755) # Unity
|
||||||
|
# (mkUDir ".config/unityhub" m755) # Unity
|
||||||
(mkUDir ".config/vlc" m755)
|
(mkUDir ".config/vlc" m755)
|
||||||
(mkUDir ".config/Zeal" m755)
|
(mkUDir ".config/Zeal" m755)
|
||||||
|
|
||||||
|
# Share
|
||||||
(mkUDir ".local/share/direnv" m755)
|
(mkUDir ".local/share/direnv" m755)
|
||||||
(mkUDir ".local/share/docker" m755)
|
(mkUDir ".local/share/docker" m755)
|
||||||
(mkUDir ".local/share/fish" m755)
|
(mkUDir ".local/share/fish" m755)
|
||||||
(mkUDir ".local/share/flatpak" m755)
|
(mkUDir ".local/share/flatpak" m755)
|
||||||
(mkUDir ".local/share/JetBrains" m755) # Unity/Rider
|
(mkUDir ".local/share/JetBrains" m755) # Unity
|
||||||
(mkUDir ".local/share/hyprland" m755)
|
(mkUDir ".local/share/hyprland" m755)
|
||||||
(mkUDir ".local/share/keyrings" m755) # m700
|
(mkUDir ".local/share/keyrings" m755) # m700
|
||||||
|
(mkUDir ".local/share/LRCGET" m755)
|
||||||
(mkUDir ".local/share/mime" m755)
|
(mkUDir ".local/share/mime" m755)
|
||||||
|
(mkUDir ".local/share/net.lrclib.lrcget" m755)
|
||||||
(mkUDir ".local/share/nix" m755)
|
(mkUDir ".local/share/nix" m755)
|
||||||
(mkUDir ".local/share/nvim" m755)
|
(mkUDir ".local/share/nvim" m755)
|
||||||
|
(mkUDir ".local/share/qutebrowser" m755)
|
||||||
(mkUDir ".local/share/systemd" m755)
|
(mkUDir ".local/share/systemd" m755)
|
||||||
|
# (mkUDir ".local/share/unity3d" m755) # Unity
|
||||||
(mkUDir ".local/share/zoxide" m755)
|
(mkUDir ".local/share/zoxide" m755)
|
||||||
|
|
||||||
|
# State
|
||||||
(mkUDir ".local/state/astal/notifd" m755)
|
(mkUDir ".local/state/astal/notifd" m755)
|
||||||
|
(mkUDir ".local/state/home-manager/gc-roots" m755) # nix-flatpak stores its state there
|
||||||
(mkUDir ".local/state/lazygit" m755)
|
(mkUDir ".local/state/lazygit" m755)
|
||||||
(mkUDir ".local/state/nix" m755)
|
(mkUDir ".local/state/nix" m755)
|
||||||
(mkUDir ".local/state/nvim" m755)
|
(mkUDir ".local/state/nvim" m755)
|
||||||
|
|||||||
@ -26,9 +26,7 @@ in {
|
|||||||
defaultSopsFile = ./secrets.yaml;
|
defaultSopsFile = ./secrets.yaml;
|
||||||
|
|
||||||
age = {
|
age = {
|
||||||
# NOTE: Sops needs the keys before impermanence kicks in
|
keyFile = lib.mkDefault "/home/${username}/.secrets/age/age.key";
|
||||||
# so we have to link to /persist directly...
|
|
||||||
keyFile = "/persist/home/${username}/.secrets/age/age.key";
|
|
||||||
generateKey = false;
|
generateKey = false;
|
||||||
sshKeyPaths = [];
|
sshKeyPaths = [];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
@ -11,9 +12,17 @@
|
|||||||
./disks.nix
|
./disks.nix
|
||||||
|
|
||||||
../modules
|
../modules
|
||||||
|
|
||||||
|
# General services
|
||||||
|
../services/fileflows-node.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
|
bootloader = {
|
||||||
|
# Secure boot
|
||||||
|
loader = "lanzaboote";
|
||||||
|
};
|
||||||
|
|
||||||
impermanence.enable = true;
|
impermanence.enable = true;
|
||||||
|
|
||||||
network = {
|
network = {
|
||||||
@ -61,8 +70,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
# 7777 # AvaTalk
|
7777 # AvaTalk
|
||||||
# 12777 # AvaTalk
|
12777 # AvaTalk
|
||||||
# 31431 # Parsec
|
# 31431 # Parsec
|
||||||
5173 # SvelteKit
|
5173 # SvelteKit
|
||||||
8090 # PocketBase
|
8090 # PocketBase
|
||||||
@ -70,8 +79,8 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
# 7777 # AvaTalk
|
7777 # AvaTalk
|
||||||
# 12777 # AvaTalk
|
12777 # AvaTalk
|
||||||
# 31431 # Parsec
|
# 31431 # Parsec
|
||||||
5173 # SvelteKit
|
5173 # SvelteKit
|
||||||
8090 # PocketBase
|
8090 # PocketBase
|
||||||
@ -85,6 +94,10 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# NOTE: Sops needs the keys before impermanence kicks in
|
||||||
|
# so we have to link to /persist directly...
|
||||||
|
sops.age.keyFile = "/persist/home/${username}/.secrets/age/age.key";
|
||||||
|
|
||||||
sops.templates."makemkv-settings.conf" = {
|
sops.templates."makemkv-settings.conf" = {
|
||||||
owner = config.users.users.${username}.name;
|
owner = config.users.users.${username}.name;
|
||||||
content = ''
|
content = ''
|
||||||
@ -95,8 +108,9 @@
|
|||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_zen;
|
kernelPackages = pkgs.linuxPackages_zen;
|
||||||
|
# kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# kernelParams = ["quiet"];
|
# kernelParams = [ "quiet" ];
|
||||||
# plymouth.enable = true;
|
# plymouth.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -12,12 +12,22 @@
|
|||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
|
||||||
# Enable early Nvidia kernel modesetting
|
initrd.kernelModules = [
|
||||||
# https://wiki.archlinux.org/title/GDM#GDM_ignores_Wayland_and_uses_X.Org_by_default (not fixed by this)
|
# Enable Nvidia early KMS
|
||||||
# https://wiki.archlinux.org/title/Kernel_mode_setting#Early_KMS_start
|
"nvidia"
|
||||||
initrd.kernelModules = ["nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm"]; # NVIDIA
|
"nvidia_modeset"
|
||||||
|
"nvidia_uvm"
|
||||||
|
"nvidia_drm"
|
||||||
|
];
|
||||||
|
|
||||||
initrd.supportedFilesystems = [
|
initrd.supportedFilesystems = [
|
||||||
"ext4"
|
"ext4"
|
||||||
@ -25,6 +35,10 @@
|
|||||||
"vfat"
|
"vfat"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
supportedFilesystems = [
|
||||||
|
# "zfs" # Probably requires LTS kernel + networking.hostId
|
||||||
|
];
|
||||||
|
|
||||||
kernelModules = [
|
kernelModules = [
|
||||||
"kvm-amd"
|
"kvm-amd"
|
||||||
"sg" # Blu-Ray drive
|
"sg" # Blu-Ray drive
|
||||||
@ -33,9 +47,11 @@
|
|||||||
|
|
||||||
blacklistedKernelModules = ["k10temp"]; # Disable in favor of zenpower
|
blacklistedKernelModules = ["k10temp"]; # Disable in favor of zenpower
|
||||||
|
|
||||||
|
kernelParams = [
|
||||||
# Enable AMD pstate
|
# Enable AMD pstate
|
||||||
# https://github.com/NixOS/nixos-hardware/blob/master/common/cpu/amd/pstate.nix
|
# https://github.com/NixOS/nixos-hardware/blob/master/common/cpu/amd/pstate.nix
|
||||||
kernelParams = ["amd_pstate=active"];
|
"amd_pstate=active"
|
||||||
|
];
|
||||||
|
|
||||||
# extraModprobeConfig = ''
|
# extraModprobeConfig = ''
|
||||||
# options iwlwifi 11n_disable=1 wd_disable=0
|
# options iwlwifi 11n_disable=1 wd_disable=0
|
||||||
@ -48,6 +64,9 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Required for supportedFilesystems = ["zfs"];, so pools don't get imported on the wrong machine
|
||||||
|
# networking.hostId = "611e6afb";
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
# NOTE: Some filesystems are managed by disko (see ./disks.nix)
|
# NOTE: Some filesystems are managed by disko (see ./disks.nix)
|
||||||
|
|
||||||
@ -70,29 +89,39 @@
|
|||||||
# Using NFS over TCP or increasing the value of the retrans option may mitigate
|
# Using NFS over TCP or increasing the value of the retrans option may mitigate
|
||||||
# some of the risks of using the soft option.
|
# some of the risks of using the soft option.
|
||||||
|
|
||||||
"/home/${username}/Movies" = {
|
# Synology DS223j
|
||||||
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Movie";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"/home/${username}/Shows" = {
|
|
||||||
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Show";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"/home/${username}/Music" = {
|
|
||||||
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Music";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"/home/${username}/Restic" = {
|
"/home/${username}/Restic" = {
|
||||||
device = "192.168.86.15:/volume1/NixinatorPersistence";
|
device = "192.168.86.15:/volume1/NixinatorPersistence";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"];
|
options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# TrueNAS
|
||||||
|
|
||||||
|
"/home/${username}/Movies" = {
|
||||||
|
device = "192.168.86.20:/mnt/Seagate4TB/Movies";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/home/${username}/Shows" = {
|
||||||
|
device = "192.168.86.20:/mnt/Seagate4TB/Shows";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/home/${username}/Music" = {
|
||||||
|
device = "192.168.86.20:/mnt/Seagate4TB/Music";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/media/Box" = {
|
||||||
|
device = "192.168.86.20:/mnt/Seagate4TB/Box";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
@ -104,12 +133,12 @@
|
|||||||
nvidia-container-toolkit.enable = true;
|
nvidia-container-toolkit.enable = true;
|
||||||
|
|
||||||
nvidia = {
|
nvidia = {
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
# package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
# package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
|
|
||||||
modesetting.enable = true; # Not officially supported by NVidia but needed for wayland
|
|
||||||
open = true;
|
open = true;
|
||||||
nvidiaSettings = false; # Those are for x-server
|
nvidiaSettings = false; # Those are for x-server
|
||||||
|
modesetting.enable = true; # Required for wayland
|
||||||
};
|
};
|
||||||
|
|
||||||
# video.hidpi.enable = lib.mkDefault true; # No longer has any effect
|
# video.hidpi.enable = lib.mkDefault true; # No longer has any effect
|
||||||
@ -119,7 +148,7 @@
|
|||||||
|
|
||||||
# https://nixos.wiki/wiki/Accelerated_Video_Playback
|
# https://nixos.wiki/wiki/Accelerated_Video_Playback
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
vaapiVdpau # Taken from wiki, this is also part of nixos-hardware/common/gpu/nvidia
|
libva-vdpau-driver # Taken from wiki, this is also part of nixos-hardware/common/gpu/nvidia
|
||||||
libvdpau-va-gl # Taken from wiki
|
libvdpau-va-gl # Taken from wiki
|
||||||
|
|
||||||
# https://discourse.nixos.org/t/nvidia-open-breaks-hardware-acceleration/58770/3
|
# https://discourse.nixos.org/t/nvidia-open-breaks-hardware-acceleration/58770/3
|
||||||
|
|||||||
@ -13,10 +13,21 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ehci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"rtsx_pci_sdmmc"
|
||||||
|
];
|
||||||
|
|
||||||
initrd.kernelModules = [];
|
initrd.kernelModules = [];
|
||||||
|
|
||||||
kernelModules = ["kvm-intel"];
|
kernelModules = ["kvm-intel"];
|
||||||
|
|
||||||
extraModulePackages = with config.boot.kernelPackages; [];
|
extraModulePackages = with config.boot.kernelPackages; [];
|
||||||
|
|
||||||
# NOTE: Didn't work with Zen, switched to regular kernel instead
|
# NOTE: Didn't work with Zen, switched to regular kernel instead
|
||||||
# kernelPatches = [
|
# kernelPatches = [
|
||||||
# {
|
# {
|
||||||
@ -60,8 +71,8 @@
|
|||||||
# driSupport = true; # NOTE: Deprecated
|
# driSupport = true; # NOTE: Deprecated
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
intel-media-driver
|
intel-media-driver
|
||||||
vaapiIntel
|
intel-vaapi-driver
|
||||||
vaapiVdpau
|
libva-vdpau-driver
|
||||||
libvdpau-va-gl
|
libvdpau-va-gl
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -20,18 +20,30 @@
|
|||||||
../services/heidi.nix
|
../services/heidi.nix
|
||||||
../services/formula10.nix
|
../services/formula10.nix
|
||||||
../services/formula11.nix
|
../services/formula11.nix
|
||||||
|
../services/statespaces.nix
|
||||||
|
|
||||||
# General services
|
# General services
|
||||||
../services/authelia.nix
|
../services/authelia.nix
|
||||||
|
../services/bazarr.nix
|
||||||
|
../services/box.nix
|
||||||
|
../services/fileflows.nix
|
||||||
../services/gitea.nix
|
../services/gitea.nix
|
||||||
../services/gitea-runner.nix
|
|
||||||
../services/immich.nix
|
../services/immich.nix
|
||||||
../services/jellyfin.nix
|
../services/jellyfin.nix
|
||||||
../services/kopia.nix
|
../services/kopia.nix
|
||||||
../services/nextcloud.nix
|
../services/nextcloud.nix
|
||||||
../services/nginx-proxy-manager.nix
|
../services/nginx-proxy-manager.nix
|
||||||
../services/paperless.nix
|
../services/paperless.nix
|
||||||
|
# ../services/plex.nix # Their monetization strategy is absolutely atrocious
|
||||||
../services/portainer-agent.nix
|
../services/portainer-agent.nix
|
||||||
|
../services/pulse-agent-servenix.nix
|
||||||
|
../services/prowlarr.nix
|
||||||
|
../services/radarr.nix
|
||||||
|
../services/sabnzbd-movies.nix
|
||||||
|
../services/sabnzbd-shows.nix
|
||||||
|
../services/sonarr.nix
|
||||||
|
../services/teamspeak.nix
|
||||||
|
../services/tinymediamanager.nix
|
||||||
../services/whats-up-docker.nix
|
../services/whats-up-docker.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -57,16 +69,30 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# NOTE: Streams: Ports have to be opened in the VPS firewall + VPS UFW and bound in the VPS Nginx compose file.
|
||||||
|
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
53 # DNS
|
53 # DNS (Adguard Home)
|
||||||
80 # HTTP
|
67 # DHCP
|
||||||
3000 # Gitea runner needs to reach local gitea instance
|
80 # HTTP (Nginx Proxy Manager)
|
||||||
|
443 # HTTPS (Nginx Proxy Manager)
|
||||||
|
|
||||||
|
3000 # Gitea (runner needs to reach local gitea instance)
|
||||||
|
|
||||||
|
30033 # Teamspeak
|
||||||
|
10080 # Teamspeak
|
||||||
];
|
];
|
||||||
|
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
53 # DNS
|
53 # DNS (Adguard Home)
|
||||||
67 # DHCP
|
67 # DHCP
|
||||||
3000 # Gitea runner needs to reach local gitea instance
|
80 # HTTP (Nginx Proxy Manager)
|
||||||
|
443 # HTTPS (Nginx Proxy Manager)
|
||||||
|
|
||||||
|
3000 # Gitea (runner needs to reach local gitea instance)
|
||||||
|
|
||||||
|
30033 # Teamspeak
|
||||||
|
9987 # Teamspeak
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,14 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
|
initrd.availableKernelModules = [
|
||||||
|
"ata_piix"
|
||||||
|
"uhci_hcd"
|
||||||
|
"virtio_pci"
|
||||||
|
"virtio_scsi"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
initrd.kernelModules = [];
|
initrd.kernelModules = [];
|
||||||
kernelModules = ["kvm-intel"];
|
kernelModules = ["kvm-intel"];
|
||||||
extraModulePackages = [];
|
extraModulePackages = [];
|
||||||
@ -37,22 +44,28 @@
|
|||||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
||||||
};
|
};
|
||||||
|
|
||||||
# SG Exos Mirror Shares
|
# TrueNAS
|
||||||
|
|
||||||
"/media/Movie" = {
|
"/media/Movie" = {
|
||||||
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Movie";
|
device = "192.168.86.20:/mnt/Seagate4TB/Movies";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/media/Show" = {
|
"/media/Show" = {
|
||||||
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Show";
|
device = "192.168.86.20:/mnt/Seagate4TB/Shows";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/media/TV-Music" = {
|
"/media/TV-Music" = {
|
||||||
device = "192.168.86.20:/mnt/SG Exos Mirror 18TB/Music";
|
device = "192.168.86.20:/mnt/Seagate4TB/Music";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/media/Box" = {
|
||||||
|
device = "192.168.86.20:/mnt/Seagate4TB/Box";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"];
|
||||||
};
|
};
|
||||||
@ -85,7 +98,7 @@
|
|||||||
enable32Bit = true;
|
enable32Bit = true;
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
vaapiVdpau
|
libva-vdpau-driver
|
||||||
libvdpau-va-gl
|
libvdpau-va-gl
|
||||||
|
|
||||||
nvidia-vaapi-driver
|
nvidia-vaapi-driver
|
||||||
|
|||||||
@ -20,9 +20,7 @@ in {
|
|||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [];
|
||||||
# "pihole"
|
|
||||||
];
|
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
# "9091:9091"
|
# "9091:9091"
|
||||||
|
|||||||
49
system/services/bazarr.nix
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
bazarrVersion = "1.5.3";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
bazarr = {
|
||||||
|
image = "linuxserver/bazarr:${bazarrVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
# "6767:6767"
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"/media/Movie:/media/movies"
|
||||||
|
"/media/Show:/media/shows"
|
||||||
|
|
||||||
|
"bazarr_config:/config"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "1000";
|
||||||
|
PGID = "1000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
# "--privileged"
|
||||||
|
# "--device=nvidia.com/gpu=all"
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
59
system/services/box.nix
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
boxVersion = "v0.29.3";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
box = {
|
||||||
|
image = "stashapp/stash:${boxVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
# "9999:9999"
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"/etc/localtime:/etc/localtime:ro"
|
||||||
|
|
||||||
|
"/media/Box:/data"
|
||||||
|
|
||||||
|
"box_config:/root/.stash"
|
||||||
|
"box_metadata:/metadata"
|
||||||
|
"box_cache:/cache"
|
||||||
|
"box_blobs:/blobs"
|
||||||
|
"box_generated:/generated"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "3000";
|
||||||
|
PGID = "3000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
|
||||||
|
STASH_STASH = "/data/";
|
||||||
|
STASH_GENERATED = "/generated/";
|
||||||
|
STASH_METADATA = "/metadata/";
|
||||||
|
STASH_CACHE = "/cache/";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
"--privileged"
|
||||||
|
"--device=nvidia.com/gpu=all"
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
54
system/services/fileflows-node.nix
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
fileflowsVersion = "25.10";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
fileflows-node = {
|
||||||
|
image = "revenz/fileflows:${fileflowsVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"/home/christoph/Movies:/media/movies"
|
||||||
|
"/home/christoph/Shows:/media/tvshows"
|
||||||
|
|
||||||
|
"fileflows_temp:/temp"
|
||||||
|
|
||||||
|
"/var/run/docker.sock:/var/run/docker.socl:ro"
|
||||||
|
];
|
||||||
|
|
||||||
|
hostname = "Nixinator";
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "3000";
|
||||||
|
PGID = "3000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
|
||||||
|
FFNODE = "1";
|
||||||
|
ServerUrl = "https://fileflows.local.chriphost.de";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
"--privileged"
|
||||||
|
"--device=nvidia.com/gpu=all"
|
||||||
|
# "--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
51
system/services/fileflows.nix
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
version = "25.10";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
fileflows = {
|
||||||
|
image = "revenz/fileflows:${version}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"fileflows_temp:/temp"
|
||||||
|
"fileflows_data:/app/Data"
|
||||||
|
"fileflows_logs:/app/Logs"
|
||||||
|
|
||||||
|
"/media/Movie:/media/movies"
|
||||||
|
"/media/Show:/media/tvshows"
|
||||||
|
|
||||||
|
"/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "3000";
|
||||||
|
PGID = "3000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
"--privileged"
|
||||||
|
"--device=nvidia.com/gpu=all"
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -14,7 +14,7 @@ in {
|
|||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
"55555:5000"
|
"55555:5000" # Bind for VPS
|
||||||
];
|
];
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
pocketbaseVersion = "0.25.0";
|
pocketbaseVersion = "0.33.0";
|
||||||
f11Version = "latest";
|
f11Version = "latest";
|
||||||
in {
|
in {
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
@ -12,12 +12,10 @@ in {
|
|||||||
image = "gitea.vps.chriphost.de/christoph/pocketbase:${pocketbaseVersion}";
|
image = "gitea.vps.chriphost.de/christoph/pocketbase:${pocketbaseVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [];
|
||||||
# "pihole"
|
|
||||||
];
|
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
"8090:8080"
|
"8090:8080" # Bind for VPS
|
||||||
];
|
];
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
|
|||||||
@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
runnerVersion = "0.2.12";
|
|
||||||
in {
|
|
||||||
virtualisation.oci-containers.containers = {
|
|
||||||
gitea-runner = {
|
|
||||||
image = "gitea/act_runner:${runnerVersion}"; # NOTE: vegardit has other runner images
|
|
||||||
autoStart = true;
|
|
||||||
|
|
||||||
login = {
|
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
|
||||||
|
|
||||||
ports = [];
|
|
||||||
|
|
||||||
volumes = [
|
|
||||||
"gitea-runner_data:/data"
|
|
||||||
"gitea-runner_config:/config" # Managed by env variables for vegardit image
|
|
||||||
|
|
||||||
"/var/run/docker.sock:/var/run/docker.sock" # Disable for dind
|
|
||||||
];
|
|
||||||
|
|
||||||
environment = {
|
|
||||||
# gitlab.local.chriphost.de doesn't work, because it gets resolved to 192.168.86.25:443, which is nginx
|
|
||||||
GITEA_INSTANCE_URL = "http://192.168.86.25:3000";
|
|
||||||
GITEA_RUNNER_NAME = "servenix";
|
|
||||||
|
|
||||||
# Can be generated from inside the container using act_runner generate-config > /config/config.yaml
|
|
||||||
CONFIG_FILE = "/config/config.yaml";
|
|
||||||
|
|
||||||
# This token is invalid, when re-registering is needed it has to be refreshed
|
|
||||||
GITEA_RUNNER_REGISTRATION_TOKEN = "Mq6wr0dPthqDij3iaryP8s5VYZA5kPfOQbHA6wm6";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraOptions = [
|
|
||||||
# "--privileged" # Enable for dind
|
|
||||||
"--net=behind-nginx"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -5,6 +5,7 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
giteaVersion = "1.24.2";
|
giteaVersion = "1.24.2";
|
||||||
|
runnerVersion = "0.2.12";
|
||||||
in {
|
in {
|
||||||
users = {
|
users = {
|
||||||
groups.git = {};
|
groups.git = {};
|
||||||
@ -72,7 +73,7 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
"3000:3000"
|
"3000:3000" # Bind for VPS
|
||||||
|
|
||||||
# NOTE: Set .git/config url to ssh://christoph@gitea.local.chriphost.de:222/christoph/<repo>.git
|
# NOTE: Set .git/config url to ssh://christoph@gitea.local.chriphost.de:222/christoph/<repo>.git
|
||||||
"222:222" # Gitea SSH
|
"222:222" # Gitea SSH
|
||||||
@ -101,5 +102,49 @@ in {
|
|||||||
"--net=behind-nginx"
|
"--net=behind-nginx"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gitea-runner = {
|
||||||
|
image = "gitea/act_runner:${runnerVersion}"; # NOTE: vegardit has other runner images
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependsOn = [
|
||||||
|
"gitea"
|
||||||
|
];
|
||||||
|
|
||||||
|
ports = [];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"gitea-runner_data:/data"
|
||||||
|
"gitea-runner_config:/config" # Managed by env variables for vegardit image
|
||||||
|
|
||||||
|
"/var/run/docker.sock:/var/run/docker.sock" # Disable for dind
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
# gitlab.local.chriphost.de doesn't work, because it gets resolved to 192.168.86.25:443, which is nginx
|
||||||
|
GITEA_INSTANCE_URL = "http://192.168.86.25:3000";
|
||||||
|
GITEA_RUNNER_NAME = "servenix";
|
||||||
|
|
||||||
|
# Can be generated from inside the container using act_runner generate-config > /config/config.yaml
|
||||||
|
CONFIG_FILE = "/config/config.yaml";
|
||||||
|
|
||||||
|
# This token is invalid, when re-registering is needed it has to be refreshed
|
||||||
|
GITEA_RUNNER_REGISTRATION_TOKEN = "Mq6wr0dPthqDij3iaryP8s5VYZA5kPfOQbHA6wm6";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
# "--privileged" # Enable for dind
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
}: let
|
}: let
|
||||||
vectorchordVersion = "0.4.2";
|
vectorchordVersion = "0.4.2";
|
||||||
pgvectorsVersion = "0.2.0";
|
pgvectorsVersion = "0.2.0";
|
||||||
immichVersion = "1.135.3";
|
immichVersion = "2.3.1";
|
||||||
in {
|
in {
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
immich-database = {
|
immich-database = {
|
||||||
@ -73,7 +73,7 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
"2283:8080"
|
"2283:8080" # Bind for VPS
|
||||||
];
|
];
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
@ -103,7 +103,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
# "--privileged"
|
"--privileged"
|
||||||
"--device=nvidia.com/gpu=all"
|
"--device=nvidia.com/gpu=all"
|
||||||
"--net=behind-nginx"
|
"--net=behind-nginx"
|
||||||
];
|
];
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
jellyfinVersion = "10.10.7";
|
jellyfinVersion = "10.11.2";
|
||||||
in {
|
in {
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
@ -25,7 +25,7 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
"8096:8096"
|
"8096:8096" # Bind for VPS
|
||||||
];
|
];
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
@ -43,7 +43,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
# "--privileged"
|
"--privileged"
|
||||||
"--device=nvidia.com/gpu=all"
|
"--device=nvidia.com/gpu=all"
|
||||||
"--net=behind-nginx"
|
"--net=behind-nginx"
|
||||||
];
|
];
|
||||||
|
|||||||
@ -112,7 +112,7 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
"8080:80"
|
"8080:80" # Bind for VPS
|
||||||
];
|
];
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
nginxVersion = "2.12.6";
|
nginxVersion = "2.13.1";
|
||||||
in {
|
in {
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
nginx-proxy-manager = {
|
nginx-proxy-manager = {
|
||||||
|
|||||||
@ -125,7 +125,7 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
"8000:8000"
|
"8000:8000" # Bind for VPS
|
||||||
];
|
];
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
|
|||||||
64
system/services/plex.nix
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
plexVersion = "1.42.2.10156-f737b826c";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
plex = {
|
||||||
|
image = "plexinc/pms-docker:${plexVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependsOn = [
|
||||||
|
# "pihole"
|
||||||
|
];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
"32400:32400" # Bind for VPS
|
||||||
|
|
||||||
|
# "8324:8324/tcp" # Controlling Plex for Roku via Plex Companion
|
||||||
|
# "32469:32469/tcp" # Plex DLNA server
|
||||||
|
# "1900:1900/udp" # Plex DLNA server
|
||||||
|
# "32410:32410/udp" # GDM network discovery
|
||||||
|
# "32412:32412/udp" # GDM network discovery
|
||||||
|
# "32413:32413/udp" # GDM network discovery
|
||||||
|
# "32414:32414/udp" # GDM network discovery
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"/media/Show:/data/tvshows"
|
||||||
|
"/media/Movie:/data/movies"
|
||||||
|
"/media/TV-Music:/data/music"
|
||||||
|
|
||||||
|
"plex_config:/config"
|
||||||
|
"plex_transcode:/transcode"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PLEX_UID = "3000";
|
||||||
|
PLEX_GID = "3000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
|
||||||
|
# PLEX_CLAIM = "";
|
||||||
|
# ADVERTISE_IP = "https://plex.vps.chriphost.de:32400";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
"--privileged"
|
||||||
|
"--device=nvidia.com/gpu=all"
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -5,7 +5,7 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
# Match this with the portainer-ce version
|
# Match this with the portainer-ce version
|
||||||
portainerVersion = "2.31.3";
|
portainerVersion = "2.33.3";
|
||||||
in {
|
in {
|
||||||
# Use the agent to connect clients to a main portainer instance
|
# Use the agent to connect clients to a main portainer instance
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
# Match this with the portainer agent version
|
# Match this with the portainer agent version
|
||||||
portainerVersion = "2.31.3";
|
portainerVersion = "2.33.3";
|
||||||
in {
|
in {
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
portainer = {
|
portainer = {
|
||||||
|
|||||||
46
system/services/prowlarr.nix
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
prowlarrVersion = "2.1.5";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
prowlarr = {
|
||||||
|
image = "linuxserver/prowlarr:${prowlarrVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
# "9696:9696"
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"prowlarr_config:/config"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "1000";
|
||||||
|
PGID = "1000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
# "--privileged"
|
||||||
|
# "--device=nvidia.com/gpu=all"
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
40
system/services/pulse-agent-servenix.nix
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
pulseAgentServenixVersion = "4.35.0";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
pulse-agent-servenix = {
|
||||||
|
image = "ghcr.io/rcourtman/pulse-docker-agent:${pulseAgentServenixVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "1000";
|
||||||
|
PGID = "1000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
|
||||||
|
PULSE_URL = "https://pulse.think.chriphost.de";
|
||||||
|
PULSE_TOKEN = "6a72f3951990d6724f09106d052302f6f60fc9e94f71720bf8e8a1fe4a27d4a2";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
# "--privileged"
|
||||||
|
# "--device=nvidia.com/gpu=all"
|
||||||
|
"--net=behind-nginx"
|
||||||
|
"--pid=host"
|
||||||
|
"--uts=host"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
42
system/services/pulse-agent-thinknix.nix
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
pulseAgentThinknixVersion = "4.35.0";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
pulse-agent-thinknix = {
|
||||||
|
image = "ghcr.io/rcourtman/pulse-docker-agent:${pulseAgentThinknixVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
dependsOn = [
|
||||||
|
"pulse"
|
||||||
|
];
|
||||||
|
|
||||||
|
ports = [];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "1000";
|
||||||
|
PGID = "1000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
|
||||||
|
PULSE_URL = "https://pulse.think.chriphost.de";
|
||||||
|
PULSE_TOKEN = "6ab80ff7336a0cd7e0edcf3cd270a72bf6e075bcff337235ab011d1f70231e2f";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
# "--privileged"
|
||||||
|
# "--device=nvidia.com/gpu=all"
|
||||||
|
"--net=behind-nginx"
|
||||||
|
"--pid=host"
|
||||||
|
"--uts=host"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
46
system/services/pulse.nix
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
pulseVersion = "4.35.0";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
pulse = {
|
||||||
|
image = "rcourtman/pulse:${pulseVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
# "7655:7655"
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"pulse_data:/data"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "1000";
|
||||||
|
PGID = "1000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
# "--privileged"
|
||||||
|
# "--device=nvidia.com/gpu=all"
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
49
system/services/radarr.nix
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
radarrVersion = "5.28.0";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
radarr = {
|
||||||
|
image = "linuxserver/radarr:${radarrVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
# "7878:7878"
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"/media/Movie/.sabnzbd-complete:/media/downloads"
|
||||||
|
"/media/Movie:/media/movies"
|
||||||
|
|
||||||
|
"radarr_config:/config"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "3000";
|
||||||
|
PGID = "3000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
# "--privileged"
|
||||||
|
# "--device=nvidia.com/gpu=all"
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
53
system/services/sabnzbd-movies.nix
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
sabnzbdVersion = "4.5.5";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
sabnzbd-movies = {
|
||||||
|
image = "linuxserver/sabnzbd:${sabnzbdVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
# NOTE: On initial start, the gui won't be reachable via reverse proxy,
|
||||||
|
# because the hostname has to be whitelisted.
|
||||||
|
# Edit the "sabnzbd.ini" in the docker volume and add the reverse-proxy address
|
||||||
|
# to the host_whitelist variable.
|
||||||
|
# "8080:8080"
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"/media/Movie/.sabnzbd:/media/movies/incomplete"
|
||||||
|
"/media/Movie/.sabnzbd-complete:/media/movies/complete"
|
||||||
|
|
||||||
|
"sabnzbd-movies_config:/config"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "3000";
|
||||||
|
PGID = "3000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
# "--privileged"
|
||||||
|
# "--device=nvidia.com/gpu=all"
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
53
system/services/sabnzbd-shows.nix
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
sabnzbdVersion = "4.5.5";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
sabnzbd-shows = {
|
||||||
|
image = "linuxserver/sabnzbd:${sabnzbdVersion}";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
# NOTE: On initial start, the gui won't be reachable via reverse proxy,
|
||||||
|
# because the hostname has to be whitelisted.
|
||||||
|
# Edit the "sabnzbd.ini" in the docker volume and add the reverse-proxy address
|
||||||
|
# to the host_whitelist variable.
|
||||||
|
# "8080:8080"
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"/media/Show/.sabnzbd:/media/shows/incomplete"
|
||||||
|
"/media/Show/.sabnzbd-complete:/media/shows/complete"
|
||||||
|
|
||||||
|
"sabnzbd-shows_config:/config"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "3000";
|
||||||
|
PGID = "3000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
# "--privileged"
|
||||||
|
# "--device=nvidia.com/gpu=all"
|
||||||
|
"--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||