Compare commits

..

No commits in common. "03ecaf76d6dee634ad7d1eee2f18a8d771a2893d" and "fcb5ee3581205ab42c6b9d67ace335a4ca478904" have entirely different histories.

13 changed files with 167 additions and 157 deletions

View file

@ -24,6 +24,7 @@
modules = { modules = {
wms.wayland.enable = true; wms.wayland.enable = true;
desktops.hyprland.enable = false;
# desktops.niri.enable = true; # desktops.niri.enable = true;
theming = { theming = {
@ -33,7 +34,6 @@
system = { system = {
systemType = "laptop"; systemType = "laptop";
isGraphical = true;
boot = { boot = {
systemd-boot.enable = true; systemd-boot.enable = true;
@ -55,6 +55,11 @@
editors = { editors = {
helix.enable = true; helix.enable = true;
}; };
# nushell.enable = true;
# starship.enable = true;
terminals = {
foot.enable = true;
};
}; };
sound.enable = true; sound.enable = true;
}; };
@ -77,6 +82,7 @@
btop.enable = true; btop.enable = true;
nh.enable = true; nh.enable = true;
thunar.enable = true; thunar.enable = true;
schizofox.enable = false;
}; };
}; };
system.stateVersion = "23.11"; system.stateVersion = "23.11";

View file

@ -1,7 +1,7 @@
{pkgs, ...}: { { pkgs, ... }:
{
environment.systemPackages = builtins.attrValues { environment.systemPackages = builtins.attrValues {
inherit inherit (pkgs)
(pkgs)
abook abook
aerc aerc
aichat aichat
@ -72,8 +72,10 @@
vlc vlc
wiki-tui wiki-tui
wireguard-tools wireguard-tools
wordgrinder
xournalpp xournalpp
zathura zathura
; ;
inherit new-nil;
}; };
} }

View file

@ -31,7 +31,7 @@ let
font-family = "JetBrainsMonoNerdFont"; font-family = "JetBrainsMonoNerdFont";
app-notifications = "no-clipboard-copy"; app-notifications = "no-clipboard-copy";
background-opacity = 1.0; background-opacity = 0.7;
bold-is-bright = "true"; bold-is-bright = "true";
confirm-close-surface = "false"; confirm-close-surface = "false";
cursor-style-blink = "false"; cursor-style-blink = "false";

View file

@ -57,8 +57,6 @@ in
}; };
}; };
config = { config = {
# environment.shells = [ pkgs.nushell ];
programs.zsh.enable = true;
users = { users = {
mutableUsers = true; mutableUsers = true;
users = { users = {
@ -73,7 +71,7 @@ in
"nix" "nix"
"docker" "docker"
]; ];
shell = pkgs.zsh; shell = pkgs.nushell;
}; };
}; };
}; };

View file

@ -10,11 +10,9 @@ in
environment.systemPackages = environment.systemPackages =
with pkgs; with pkgs;
[ [
universal-android-debloater
emacs-pgtk emacs-pgtk
# better cd # better cd
zoxide zoxide
ouch
# pipe viewer # pipe viewer
pv pv
# hex editor # hex editor

View file

@ -10,19 +10,18 @@ let
# https://peter.sh/experiments/chromium-command-line-switches/ # https://peter.sh/experiments/chromium-command-line-switches/
flags = concatStringsSep " " [ flags = concatStringsSep " " [
"--no-first-run" "--no-first-run"
"--enable-features=UseOzonePlatform"
"--enable-gpu-rasterization" "--enable-gpu-rasterization"
"--force-dark-mode" "--force-dark-mode"
"--enable-smooth-scrolling" "--enable-smooth-scrolling"
"--enable-features=UseOzonePlatform" "--enable-features=UseOzonePlatform"
"--ozone-platform=wayland" "--ozone-platform=wayland"
"--user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.3'" "--user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.3'"
# https://source.chromium.org/chromium/chromium/src/+/main:headless/app/headless_shell_switches.cc;drc=3556fbff47c18193f4a39d2496596e89b8307a15;l=47-55
"--password-store=gnome-keyring"
]; ];
brave-wrapped = pkgs.symlinkJoin { brave-wrapped = pkgs.symlinkJoin {
name = "brave"; name = "brave";
paths = [ paths = [
pkgs.brave (pkgs.brave.override { vulkanSupport = true; })
]; ];
nativeBuildInputs = [ pkgs.makeWrapper ]; nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = '' postBuild = ''

View file

@ -31,10 +31,7 @@ in
gamescopeSession.enable = true; gamescopeSession.enable = true;
extraCompatPackages = [ pkgs.proton-ge-bin.steamcompattool ]; extraCompatPackages = [ pkgs.proton-ge-bin.steamcompattool ];
}; };
# See
services.udev.extraRules = ''
SUBSYSTEM=="input", ATTRS{idVendor}=="2dc8", ATTRS{idProduct}=="3106", MODE="0660", GROUP="input"
''; # See
# https://wiki.nixos.org/wiki/GameMode # https://wiki.nixos.org/wiki/GameMode
programs.gamemode.enable = true; programs.gamemode.enable = true;
}; };

View file

@ -12,6 +12,7 @@ let
inherit (config.meta.mainUser) username; inherit (config.meta.mainUser) username;
cfg = config.modules.services.greetd; cfg = config.modules.services.greetd;
uwsmEnabled = config.modules.services.uwsm.enable;
in in
{ {
options.modules.services.greetd = { options.modules.services.greetd = {
@ -27,7 +28,8 @@ in
session = mkOption { session = mkOption {
description = "Which login session to start"; description = "Which login session to start";
type = str; type = str;
default = "niri"; default =
if uwsmEnabled then "${getExe config.programs.uwsm.package} start Hyprland" else "Hyprland";
}; };
}; };
@ -35,17 +37,20 @@ in
services.greetd = services.greetd =
let let
session = { session = {
command = '' # command = ''
${getExe pkgs.greetd.tuigreet} \ # ${pkgs.greetd.tuigreet}/bin/tuigreet \
-c \"${cfg.session}\" \ # -c \"${cfg.session}\" \
-r # -r
-t --time-format "DD.MM.YYYY" # -t --time-format "DD.MM.YYYY"
--asteriks''; # --asteriks'';
user = "greeter";
command = "${getExe config.programs.uwsm.package} start hyprland-uwsm.desktop";
user = username;
}; };
in in
{ {
enable = true; enable = true;
package = pkgs.greetd;
vt = 7; vt = 7;
settings = { settings = {
default_session = session; default_session = session;

View file

@ -4,19 +4,17 @@
pkgs, pkgs,
sources, sources,
... ...
}: let }:
let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption; inherit (lib.options) mkEnableOption;
cfg = config.modules.system.boot.lanzaboote; cfg = config.modules.system.boot.lanzaboote;
in { in
{
options.modules.system.boot.lanzaboote.enable = mkEnableOption "Lanzaboote"; options.modules.system.boot.lanzaboote.enable = mkEnableOption "Lanzaboote";
imports = [ imports = [
(import sources.flake-compat { (sources.lanzaboote + "/nix/modules/lanzaboote.nix")
src = sources.lanzaboote;
copySourceTreeToStore = false;
useBuiltinsFetchTree = true;
}).outputs.nixosModules.lanzaboote
]; ];
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -33,6 +31,6 @@ in {
loader.systemd-boot.enable = lib.mkForce false; loader.systemd-boot.enable = lib.mkForce false;
}; };
environment.systemPackages = [pkgs.sbctl]; environment.systemPackages = [ pkgs.sbctl ];
}; };
} }

View file

@ -1,7 +1,4 @@
{ lib, pkgs, ... }: { pkgs, ... }:
let
inherit (lib.modules) mkForce;
in
{ {
security = { security = {
# Enable Soteria, a GTK-based Polkit authentication agent. # Enable Soteria, a GTK-based Polkit authentication agent.
@ -12,25 +9,23 @@ in
packages = [ pkgs.apparmor-profiles ]; packages = [ pkgs.apparmor-profiles ];
}; };
pam.services.login.enableGnomeKeyring = true; pam.services = {
login.kwallet = {
wrappers.gnome-keyring-daemon = { enable = true;
owner = "root"; # package = pkgs.kdePackages.kwallet-pam;
group = "root"; };
capabilities = "cap_ipc_lock=ep"; niri = {
source = "${pkgs.gnome-keyring}/bin/gnome-keyring-daemon"; allowNullPassword = true;
kwallet = {
enable = true;
package = pkgs.kdePackages.kwallet-pam;
};
};
}; };
}; };
services = { environment.systemPackages = with pkgs.kdePackages; [
dbus.packages = [ kwallet # provides helper service
pkgs.gnome-keyring kwallet-pam # provides helper service
]; kwalletmanager # provides KCMs and stuff
gnome.gcr-ssh-agent.enable = mkForce false;
};
xdg.portal.extraPortals = [
pkgs.gnome-keyring
];
environment.systemPackages = [
pkgs.gnome-keyring
]; ];
} }

View file

@ -66,7 +66,9 @@ layout {
} }
background-color "transparent" background-color "transparent"
} }
spawn-at-startup "waybar" // xwayland stuff
// spawn-at-startup "xwayland-satellite"
spawn-at-startup "kwalletd6"
spawn-at-startup "nu" "-c" "quickshell --path ~/repos/projects/nichts/main/modules/style/quickshell/shell" spawn-at-startup "nu" "-c" "quickshell --path ~/repos/projects/nichts/main/modules/style/quickshell/shell"
environment { environment {
DISPLAY ":0" DISPLAY ":0"
@ -83,15 +85,37 @@ switch-events {
} }
} }
overview { overview {
zoom 0.6 zoom 0.60
backdrop-color "#777777" backdrop-color "#777777"
} }
animations { animations {
window-close { window-close {
duration-ms 250 duration-ms 250
curve "linear" curve "linear"
custom-shader "\n vec4 fall_and_rotate(vec3 coords_geo, vec3 size_geo) {\n\n float progress = niri_clamped_progress * niri_clamped_progress;\n vec2 coords = (coords_geo.xy - vec2(0.5, 1.0)) * size_geo.xy;\n coords.y -= progress * 1440.0;\n float random = (niri_random_seed - 0.5) / 2.0;\n random = sign(random) - random;\n float max_angle = 0.5 * random;\n float angle = progress * max_angle;\n mat2 rotate = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));\n coords = rotate * coords;\n coords_geo = vec3(coords / size_geo.xy + vec2(0.5, 1.0), 1.0);\n vec3 coords_tex = niri_geo_to_tex * coords_geo;\n vec4 color = texture2D(niri_tex, coords_tex.st);\n\n return color;\n }\n\n vec4 close_color(vec3 coords_geo, vec3 size_geo) {\n return fall_and_rotate(coords_geo, size_geo);\n }\n " custom-shader r"
vec4 fall_and_rotate(vec3 coords_geo, vec3 size_geo) {
float progress = niri_clamped_progress * niri_clamped_progress;
vec2 coords = (coords_geo.xy - vec2(0.5, 1.0)) * size_geo.xy;
coords.y -= progress * 1440.0;
float random = (niri_random_seed - 0.5) / 2.0;
random = sign(random) - random;
float max_angle = 0.5 * random;
float angle = progress * max_angle;
mat2 rotate = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
coords = rotate * coords;
coords_geo = vec3(coords / size_geo.xy + vec2(0.5, 1.0), 1.0);
vec3 coords_tex = niri_geo_to_tex * coords_geo;
vec4 color = texture2D(niri_tex, coords_tex.st);
return color;
} }
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
return fall_and_rotate(coords_geo, size_geo);
}
"
}
} }
window-rule { window-rule {
match app-id="unset" match app-id="unset"
@ -108,6 +132,7 @@ window-rule {
window-rule { window-rule {
draw-border-with-background false draw-border-with-background false
} }
// Fix discord screencasting // Fix discord screencasting
debug { debug {
wait-for-frame-completion-in-pipewire wait-for-frame-completion-in-pipewire
@ -130,11 +155,8 @@ binds {
Mod+B { Mod+B {
spawn "brave" spawn "brave"
} }
// Mod+D {
// spawn "nu" "-c" "quickshell --path ~/repos/projects/nichts/main/modules/style/quickshell/shell msg launcher open"
// }
Mod+D { Mod+D {
spawn "fuzzel" spawn "nu" "-c" "quickshell --path ~/repos/projects/nichts/main/modules/style/quickshell/shell msg launcher open"
} }
Mod+Alt+L { Mod+Alt+L {
spawn "swaylock" spawn "swaylock"
@ -416,7 +438,7 @@ binds {
Mod+T { Mod+T {
screenshot screenshot
} }
// "$mainMod, T, exec, ${getExe pkgs.grimblast} save area - | ${getExe pkgs.tesseract} - - | ${getExe' pkgs.wl-clipboard "wl-copy"}" // "$mainMod, T, exec, ${getExe pkgs.grimblast} save area - | ${getExe pkgs.tesseract} - - | ${getExe' pkgs.wl-clipboard "wl-copy"}"
Mod+Escape allow-inhibiting=false { Mod+Escape allow-inhibiting=false {
toggle-keyboard-shortcuts-inhibit toggle-keyboard-shortcuts-inhibit
} }

View file

@ -11,100 +11,91 @@ let
inherit (config.modules.system) isGraphical; inherit (config.modules.system) isGraphical;
inherit (config.meta.mainUser) username; inherit (config.meta.mainUser) username;
cfg = config.modules.desktops.niri; cfg = config.modules.desktops.niri;
niri = pkgs.callPackage ( niri = pkgs.callPackage (_: pkgs.rustPlatform.buildRustPackage {
_: pname = "niri";
pkgs.rustPlatform.buildRustPackage { version = "unstable";
pname = "niri";
version = "unstable";
src = sources.niri; src = sources.niri;
postPatch = '' postPatch = ''
patchShebangs resources/niri-session patchShebangs resources/niri-session
substituteInPlace resources/niri.service \ substituteInPlace resources/niri.service \
--replace-fail '/usr/bin' "$out/bin" --replace-fail '/usr/bin' "$out/bin"
''; '';
cargoLock = { cargoLock = {
allowBuiltinFetchGit = true; allowBuiltinFetchGit = true;
lockFile = "${sources.niri}/Cargo.lock"; lockFile = "${sources.niri}/Cargo.lock";
}; };
strictDeps = true; strictDeps = true;
doInstallCheck = false; doInstallCheck = false;
doCheck = false;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
rustPlatform.bindgenHook rustPlatform.bindgenHook
pkg-config pkg-config
installShellFiles installShellFiles
]; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
cairo cairo
dbus dbus
libGL libGL
libdisplay-info libdisplay-info
libinput libinput
seatd seatd
libxkbcommon libxkbcommon
libgbm libgbm
pango pango
wayland wayland
dbus dbus
pipewire pipewire
# Also includes libudev # Also includes libudev
systemd systemd
]; ];
buildFeatures = [ buildFeatures = [
"dbus" "dbus"
"dinit" "dinit"
"xdp-gnome-screencast" "xdp-gnome-screencast"
"systemd" "systemd"
]; ];
buildNoDefaultFeatures = true; buildNoDefaultFeatures = true;
postInstall = '' postInstall = ''
installShellCompletion --cmd niri \ installShellCompletion --cmd niri \
--bash <($out/bin/niri completions bash) \ --bash <($out/bin/niri completions bash) \
--fish <($out/bin/niri completions fish) \ --fish <($out/bin/niri completions fish) \
--zsh <($out/bin/niri completions zsh) --zsh <($out/bin/niri completions zsh)
install -Dm644 resources/niri.desktop -t $out/share/wayland-sessions install -Dm644 resources/niri.desktop -t $out/share/wayland-sessions
install -Dm644 resources/niri-portals.conf -t $out/share/xdg-desktop-portal install -Dm644 resources/niri-portals.conf -t $out/share/xdg-desktop-portal
install -Dm755 resources/niri-session $out/bin/niri-session install -Dm755 resources/niri-session $out/bin/niri-session
install -Dm644 resources/niri{.service,-shutdown.target} -t $out/share/systemd/user install -Dm644 resources/niri{.service,-shutdown.target} -t $out/share/systemd/user
''; '';
env = { env = {
# Force linking with libEGL and libwayland-client # Force linking with libEGL and libwayland-client
# so they can be discovered by `dlopen()` # so they can be discovered by `dlopen()`
RUSTFLAGS = toString ( RUSTFLAGS = toString (
map (arg: "-C link-arg=" + arg) [ map (arg: "-C link-arg=" + arg) [
"-Wl,--push-state,--no-as-needed" "-Wl,--push-state,--no-as-needed"
"-lEGL" "-lEGL"
"-lwayland-client" "-lwayland-client"
"-Wl,--pop-state" "-Wl,--pop-state"
] ]
++ [ );
"-Ctarget-cpu=native" };
"-Cpanic=abort"
"-Clto=thin"
"-Cembed-bitcode=yes"
]
);
};
passthru = { passthru = {
providedSessions = [ "niri" ]; providedSessions = [ "niri" ];
}; };
meta.mainProgram = "niri"; meta.mainProgram = "niri";
} }) { };
) { };
in in
{ {
options.modules.desktops.niri.enable = mkEnableOption "Niri, a scolling tiling wayland compositor"; options.modules.desktops.niri.enable = mkEnableOption "Niri, a scolling tiling wayland compositor";
@ -126,7 +117,6 @@ in
avizo avizo
playerctl playerctl
wl-clipboard wl-clipboard
fuzzel
; ;
}; };
}; };

View file

@ -63,9 +63,9 @@
}, },
"branch": "main", "branch": "main",
"submodules": false, "submodules": false,
"revision": "43d6a79863d5e28b6a2cd98ecb22fe4ff491057e", "revision": "9d8ab804355d95d38a61ad5053d415ca1882d554",
"url": "https://git.lix.systems/lix-project/lix/archive/43d6a79863d5e28b6a2cd98ecb22fe4ff491057e.tar.gz", "url": "https://git.lix.systems/lix-project/lix/archive/9d8ab804355d95d38a61ad5053d415ca1882d554.tar.gz",
"hash": "sha256-/C+d8ET7B935H+xY9NTlw2kFiCeDq380yhv9Ez4379k=" "hash": "sha256-CFoDQz2mnfKWtAb6Y01xu+bfM+Q/6dHGkxKq6W+dzN8="
}, },
"lix-module": { "lix-module": {
"type": "Git", "type": "Git",
@ -142,8 +142,8 @@
"nixpkgs": { "nixpkgs": {
"type": "Channel", "type": "Channel",
"name": "nixpkgs-unstable", "name": "nixpkgs-unstable",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre833298.83e677f31c84/nixexprs.tar.xz", "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre832020.6b4955211758/nixexprs.tar.xz",
"hash": "sha256-GCDhyo1oW8YXwYNKSsJzwy4ilTMnRrPh+6OTWatUYn4=" "hash": "sha256-X3H1JILbG//yt1OHrx7GHwyIUoqmR9jXARlwbZyPF4k="
}, },
"npins": { "npins": {
"type": "Git", "type": "Git",
@ -166,9 +166,9 @@
}, },
"branch": "master", "branch": "master",
"submodules": false, "submodules": false,
"revision": "db77c71c216530159c2dcf5b269ebb4706b2e2dd", "revision": "759bd721dfd38e2ce02048f378ee025bcb175f93",
"url": null, "url": null,
"hash": "sha256-QG14m53ZGp2Gk7xD2Q+Tf7RYCKfk/BYRaBtX3X4IKbc=" "hash": "sha256-GjN9BXxWMlmIAAcKYrsrEPVT/cJkWieG3YOJG7sJuGk="
}, },
"spicetify-nix": { "spicetify-nix": {
"type": "Git", "type": "Git",
@ -179,9 +179,9 @@
}, },
"branch": "master", "branch": "master",
"submodules": false, "submodules": false,
"revision": "51ac0aee7e7ee21ca0874b913f07f9004bc9311f", "revision": "8f9fd947c52aa6adb6bafe72516eccf186708954",
"url": "https://github.com/Gerg-L/spicetify-nix/archive/51ac0aee7e7ee21ca0874b913f07f9004bc9311f.tar.gz", "url": "https://github.com/Gerg-L/spicetify-nix/archive/8f9fd947c52aa6adb6bafe72516eccf186708954.tar.gz",
"hash": "sha256-1AK8+W7d5eNyGRkcWHa+9oIChLJbY6jt7ujSJo+ft4M=" "hash": "sha256-R2iDZb94RosuCeuIukacZVVXxzWYr4jn/QI/ax15nW8="
}, },
"systems": { "systems": {
"type": "Git", "type": "Git",