Compare commits

..

No commits in common. "1969b09059f4c55441b8772366e5729431371512" and "0e5cf3249d13a401257c7e24a4bb708c58b8ace9" have entirely different histories.

14 changed files with 194 additions and 298 deletions

6
flake.lock generated
View file

@ -637,11 +637,11 @@
"niri-blur": { "niri-blur": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1772514470, "lastModified": 1771749270,
"narHash": "sha256-nSrfHwbjg8/Rfx5pqDqU8bL5IWh99MsvxfjNZYxqEFw=", "narHash": "sha256-ZJCM1XOHIdud6Jfpl4jYQOzbOJId9wmXT+hNJ1IPBIY=",
"owner": "niri-wm", "owner": "niri-wm",
"repo": "niri", "repo": "niri",
"rev": "c837d944f0cc08580ee86574dd0c3a68ca9379a4", "rev": "734d86ec061d15d1980c5b940b2f4dc9aee80cf5",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -212,7 +212,7 @@
./home/apps ./home/apps
./home/games ./home/games
./home/hosts/${hostname} ./home/hosts/${hostname}
# ./home/kde ./home/kde
./home/services ./home/services
./home/terminal ./home/terminal
./home/tiling ./home/tiling

View file

@ -41,6 +41,7 @@
# kde and kde theming # kde and kde theming
kde-rounded-corners kde-rounded-corners
kdePackages.partitionmanager kdePackages.partitionmanager
pkgs.catppuccin-cursors.mochaPeach
adwaita-icon-theme adwaita-icon-theme
morewaita-icon-theme morewaita-icon-theme

View file

@ -63,6 +63,16 @@
gtk = { gtk = {
enable = true; enable = true;
# colorScheme = if config.userOptions.isDark then "dark" else "light";
# theme = {
# package = pkgs.kdePackages.breeze-gtk;
# name =
# if config.userOptions.isDark
# then "Breeze-Dark"
# else "Breeze";
# };
colorScheme = "dark"; colorScheme = "dark";
iconTheme = { iconTheme = {
name = "MoreWaita"; name = "MoreWaita";
@ -85,74 +95,4 @@
gtk-decoration-layout = ":"; gtk-decoration-layout = ":";
}; };
}; };
xdg.mimeApps = {
enable = true;
associations.added = {
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/discord" = [ "vesktop.desktop" ];
"x-scheme-handler/spotify" = [ "riff.desktop" ];
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
"image/png" = [ "loupe.desktop" ];
"image/jpeg" = [ "loupe.desktop" ];
};
defaultApplications = {
# Web
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"text/html" = [ "firefox.desktop" ];
# Communication & Social
"x-scheme-handler/discord" = [ "vesktop.desktop" ];
"x-scheme-handler/spotify" = [ "riff.desktop" ];
# File Management
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
# Torrents
"application/x-bittorrent" = [ "org.qbittorrent.qBittorrent.desktop" ];
"x-scheme-handler/magnet" = [ "org.qbittorrent.qBittorrent.desktop" ];
# Documents
"application/pdf" = [ "firefox.desktop" ]; # Or libreoffice-draw.desktop
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = [
"libreoffice-writer.desktop"
]; # docx
"application/msword" = [ "libreoffice-writer.desktop" ]; # doc
"application/vnd.oasis.opendocument.text" = [ "libreoffice-writer.desktop" ]; # odt
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = [
"libreoffice-calc.desktop"
]; # xlsx
"application/vnd.ms-excel" = [ "libreoffice-calc.desktop" ]; # xls
"application/vnd.oasis.opendocument.spreadsheet" = [ "libreoffice-calc.desktop" ]; # ods
# Text & Code
"text/plain" = [ "nvim.desktop" ];
"text/markdown" = [ "nvim.desktop" ];
"application/x-shellscript" = [ "nvim.desktop" ];
"application/json" = [ "nvim.desktop" ];
"text/x-c" = [ "nvim.desktop" ];
"text/x-c++" = [ "nvim.desktop" ];
"text/x-python" = [ "nvim.desktop" ];
"text/x-makefile" = [ "nvim.desktop" ];
# Terminal
"x-scheme-handler/terminal" = [ "kitty.desktop" ];
# Media
"video/mp4" = [ "mpv.desktop" ];
"video/mkv" = [ "mpv.desktop" ];
"video/webm" = [ "mpv.desktop" ];
"audio/mpeg" = [ "mpv.desktop" ];
"audio/flac" = [ "mpv.desktop" ];
"audio/wav" = [ "mpv.desktop" ];
# Images
"image/png" = [ "loupe.desktop" ];
"image/jpeg" = [ "loupe.desktop" ];
"image/webp" = [ "loupe.desktop" ];
"image/gif" = [ "loupe.desktop" ];
};
};
} }

View file

@ -47,69 +47,76 @@
}; };
}; };
programs.swaylock = with config.scheme; {
enable = true;
package = pkgs.swaylock-effects;
settings = {
# this would sometimes load the previous day's wallpaper
# when it is run before the bing retrieval script finishes
image = "~/.local/share/wallpaper/daily-colored.jpg";
effect-blur = "7x5";
# color = "000000"; # black
font-size = 24;
indicator-idle-visible = true;
indicator-radius = 100;
show-failed-attempts = true;
bs-hl-color = base09 + "E6"; # peach
caps-lock-bs-hl-color = base09 + "E6"; # peach
caps-lock-key-hl-color = base0E + "E6"; # mauve
inside-color = base00 + "E6"; # base
inside-clear-color = base00 + "E6"; # base
inside-caps-lock-color = base00 + "E6"; # base
inside-ver-color = base00 + "E6"; # base
inside-wrong-color = base00 + "E6"; # base
key-hl-color = base0D + "E6"; # blue
layout-bg-color = base00 + "E6"; # base
layout-border-color = base00 + "E6"; # base
layout-text-color = base05 + "E6"; # text
line-color = base00 + "E6"; # base
line-clear-color = base00 + "E6"; # base
line-caps-lock-color = base00 + "E6"; # base
line-ver-color = base00 + "E6"; # base
line-wrong-color = base00 + "E6"; # base
ring-color = base00 + "E6"; # base
ring-clear-color = base09 + "E6"; # peach
ring-caps-lock-color = base00 + "E6"; # base
ring-ver-color = base0B + "E6"; # green
ring-wrong-color = base00 + "E6"; # base
separator-color = "00000000"; # transparent
text-color = base05 + "E6"; # text
text-clear-color = base09 + "E6"; # peach
text-caps-lock-color = base0E + "E6"; # mauve
text-ver-color = base05 + "E6"; # text
text-wrong-color = base08 + "E6"; # red
};
};
systemd.user.services.swaylock = {
Unit = {
After = [ "niri.service" ];
PartOf = [ "niri.service" ];
Description = "Screen locker";
Documentation = "https://github.com/swaywm/swaylock";
};
Service = {
ExecStart = "${config.programs.swaylock.package}/bin/swaylock";
Restart = "on-failure";
};
Install.WantedBy = [ "niri.service" ];
};
xsession = { xsession = {
enable = true; enable = true;
windowManager.command = "niri"; windowManager.command = "niri";
}; };
xdg.mimeApps = {
enable = true;
associations.added = {
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/discord" = [ "vesktop.desktop" ];
"x-scheme-handler/spotify" = [ "riff.desktop" ];
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
"image/png" = [ "loupe.desktop" ];
"image/jpeg" = [ "loupe.desktop" ];
};
defaultApplications = {
# Web
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"text/html" = [ "firefox.desktop" ];
# Communication & Social
"x-scheme-handler/discord" = [ "vesktop.desktop" ];
"x-scheme-handler/spotify" = [ "riff.desktop" ];
# File Management
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
# Torrents
"application/x-bittorrent" = [ "org.qbittorrent.qBittorrent.desktop" ];
"x-scheme-handler/magnet" = [ "org.qbittorrent.qBittorrent.desktop" ];
# Documents
"application/pdf" = [ "firefox.desktop" ]; # Or libreoffice-draw.desktop
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = [
"libreoffice-writer.desktop"
]; # docx
"application/msword" = [ "libreoffice-writer.desktop" ]; # doc
"application/vnd.oasis.opendocument.text" = [ "libreoffice-writer.desktop" ]; # odt
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = [
"libreoffice-calc.desktop"
]; # xlsx
"application/vnd.ms-excel" = [ "libreoffice-calc.desktop" ]; # xls
"application/vnd.oasis.opendocument.spreadsheet" = [ "libreoffice-calc.desktop" ]; # ods
# Text & Code
"text/plain" = [ "nvim.desktop" ];
"text/markdown" = [ "nvim.desktop" ];
"application/x-shellscript" = [ "nvim.desktop" ];
"application/json" = [ "nvim.desktop" ];
"text/x-c" = [ "nvim.desktop" ];
"text/x-c++" = [ "nvim.desktop" ];
"text/x-python" = [ "nvim.desktop" ];
"text/x-makefile" = [ "nvim.desktop" ];
# Media
"video/mp4" = [ "mpv.desktop" ];
"video/mkv" = [ "mpv.desktop" ];
"video/webm" = [ "mpv.desktop" ];
"audio/mpeg" = [ "mpv.desktop" ];
"audio/flac" = [ "mpv.desktop" ];
"audio/wav" = [ "mpv.desktop" ];
# Images
"image/png" = [ "loupe.desktop" ];
"image/jpeg" = [ "loupe.desktop" ];
"image/webp" = [ "loupe.desktop" ];
"image/gif" = [ "loupe.desktop" ];
};
};
} }

View file

@ -121,7 +121,7 @@
clip-to-geometry = true; clip-to-geometry = true;
opacity = 0.90; opacity = 0.90;
background-effect = { background-effect = {
xray = true; xray = false;
blur = true; blur = true;
noise = 0.05; noise = 0.05;
saturation = 1; saturation = 1;
@ -204,7 +204,7 @@
matches = [ { namespace = "^launcher$"; } ]; matches = [ { namespace = "^launcher$"; } ];
opacity = 0.90; opacity = 0.90;
background-effect = { background-effect = {
xray = true; xray = false;
blur = true; blur = true;
noise = 0.05; noise = 0.05;
saturation = 1; saturation = 1;
@ -409,7 +409,6 @@
"XF86Sleep".action.power-off-monitors = { }; "XF86Sleep".action.power-off-monitors = { };
"XF86Search".action.spawn = [ "fuzzel" ]; "XF86Search".action.spawn = [ "fuzzel" ];
"Mod+Shift+L".action.spawn = [ "swaylock" ];
"XF86LaunchA" = { "XF86LaunchA" = {
action.toggle-overview = { }; action.toggle-overview = { };
@ -430,6 +429,10 @@
"Mod+Down".action.focus-window-down = { }; "Mod+Down".action.focus-window-down = { };
"Mod+Up".action.focus-window-up = { }; "Mod+Up".action.focus-window-up = { };
"Mod+Right".action.focus-column-right = { }; "Mod+Right".action.focus-column-right = { };
"Mod+H".action.focus-column-left = { };
"Mod+J".action.focus-window-down = { };
"Mod+K".action.focus-window-up = { };
"Mod+L".action.focus-column-right = { };
"Mod+Ctrl+Left".action.move-column-left = { }; "Mod+Ctrl+Left".action.move-column-left = { };
"Mod+Ctrl+Down".action.move-window-down = { }; "Mod+Ctrl+Down".action.move-window-down = { };
@ -449,6 +452,10 @@
"Mod+Shift+Down".action.focus-monitor-down = { }; "Mod+Shift+Down".action.focus-monitor-down = { };
"Mod+Shift+Up".action.focus-monitor-up = { }; "Mod+Shift+Up".action.focus-monitor-up = { };
"Mod+Shift+Right".action.focus-monitor-right = { }; "Mod+Shift+Right".action.focus-monitor-right = { };
"Mod+Shift+H".action.focus-monitor-left = { };
"Mod+Shift+J".action.focus-monitor-down = { };
"Mod+Shift+K".action.focus-monitor-up = { };
"Mod+Shift+L".action.focus-monitor-right = { };
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = { }; "Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = { };
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = { }; "Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = { };

View file

@ -203,7 +203,7 @@
unreadBadgeColor = "primary"; unreadBadgeColor = "primary";
} }
{ {
deviceNativePath = ""; deviceNativePath = "__default__";
displayMode = "icon-hover"; displayMode = "icon-hover";
hideIfIdle = false; hideIfIdle = false;
hideIfNotDetected = true; hideIfNotDetected = true;

View file

@ -16,6 +16,22 @@
default = "base09"; default = "base09";
}; };
}; };
# catppuccinUpper = {
# accent = lib.mkOption {
# type = lib.types.str;
# readOnly = true;
# default =
# builtins.substring 0 1 (lib.toUpper config.catppuccin.accent)
# + builtins.substring 1 (-1) config.catppuccin.accent;
# };
# flavor = lib.mkOption {
# type = lib.types.str;
# readOnly = true;
# default =
# builtins.substring 0 1 (lib.toUpper config.catppuccin.flavor)
# + builtins.substring 1 (-1) config.catppuccin.flavor;
# };
# };
userOptions = { userOptions = {
name = lib.mkOption { name = lib.mkOption {
type = lib.types.str; type = lib.types.str;
@ -100,36 +116,32 @@
default = pkgs.noto-fonts-color-emoji; default = pkgs.noto-fonts-color-emoji;
}; };
}; };
cursor = { cursor =
name = lib.mkOption { let
type = lib.types.str; attrName = "mocha" + "Peach";
readOnly = true; in
default = config.colors.scheme; {
name = lib.mkOption {
type = lib.types.str;
readOnly = true;
default = "catppuccin-mocha-peach-cursors";
};
package = lib.mkOption {
type = lib.types.package;
readOnly = true;
default = pkgs.catppuccin-cursors.${attrName};
};
size = lib.mkOption {
type = lib.types.int;
readOnly = true;
default = 24;
};
path = lib.mkOption {
type = lib.types.str;
readOnly = true;
default = "${pkgs.catppuccin-cursors.${attrName}}/share/icons";
};
}; };
package = lib.mkOption {
type = lib.types.package;
readOnly = true;
default =
with config.scheme;
(pkgs.bibata-cursor.override {
themeName = config.colors.scheme;
baseColor = withHashtag.${config.colors.accent};
outlineColor = withHashtag.base00;
watchBackgroundColor = withHashtag.base11;
cursorSizes = "16 20 22 24 28 32 40 48 56 64 72 80 88 96";
});
};
size = lib.mkOption {
type = lib.types.int;
readOnly = true;
default = 24;
};
path = lib.mkOption {
type = lib.types.str;
readOnly = true;
default = "${config.userOptions.cursor.package}/share/icons/${config.colors.scheme}";
};
};
# isDark = lib.mkOption { # isDark = lib.mkOption {
# type = lib.types.bool; # type = lib.types.bool;
# readOnly = true; # readOnly = true;

View file

@ -1,103 +0,0 @@
{
pkgs ? import <nixpkgs> { },
themeName ? "bibata",
baseColor ? "#000000",
outlineColor ? "#FFFFFF",
watchBackgroundColor ? "",
cursorSizes ? "24",
}:
let
version = "2.0.7";
src = pkgs.fetchFromGitHub {
owner = "ful1e5";
repo = "Bibata_Cursor";
rev = "v${version}";
hash = "sha256-kIKidw1vditpuxO1gVuZeUPdWBzkiksO/q2R/+DUdEc=";
};
yarnOfflineCache = pkgs.fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-EpWIGoFFokmzRML2r/dCM+TImOCtii8mifLgnLKdUMY=";
};
in
pkgs.stdenv.mkDerivation {
pname = "bibata-${themeName}-cursor";
inherit version src;
nativeBuildInputs = with pkgs; [
yarn
nodejs
fixup-yarn-lock
python3Packages.clickgen
autoPatchelfHook
];
buildInputs = with pkgs; [
# Required to satisfy dynamic linking for prebuilt JS native modules (like resvg-js)
stdenv.cc.cc.lib
];
configurePhase = ''
runHook preConfigure
export HOME=$(mktemp -d)
echo "1. Setup offline yarn cache"
yarn config --offline set yarn-offline-mirror ${yarnOfflineCache}
fixup-yarn-lock yarn.lock
echo "2. Install node_modules offline"
yarn install --offline --frozen-lockfile --ignore-scripts --no-progress --non-interactive
patchShebangs node_modules/
rm -rf node_modules/@resvg/resvg-js-linux-*-musl
echo "3. Patch prebuilt node binaries (like resvg) so they can run in the Nix sandbox"
autoPatchelf node_modules/
# https://github.com/ful1e5/cbmp/issues/4
echo "4. Patch 'ora' library to prevent Nix sandbox hangs"
sed -i 's/this.#isEnabled = .*/this.#isEnabled = false;/g' node_modules/ora/index.js
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
echo "Splitting SVGs to render across $NIX_BUILD_CORES cores..."
echo "1. Distribute SVGs evenly into chunk directories"
if [ -n "${watchBackgroundColor}" ]; then
./node_modules/.bin/cbmp -d "svg" -o "bitmaps/${themeName}" -bc "${baseColor}" -oc "${outlineColor}" -wc "${watchBackgroundColor}"
else
./node_modules/.bin/cbmp -d "svg" -o "bitmaps/${themeName}" -bc "${baseColor}" -oc "${outlineColor}"
fi
echo "Rendering complete. Building XCursor theme..."
echo "4. Build the final cursors"
ctgen configs/right/x.build.toml -s ${cursorSizes} -p x11 -d "bitmaps/${themeName}" -n "${themeName}" -c "${themeName} cursors"
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/icons
cp -r themes/${themeName} $out/share/icons/
runHook postInstall
'';
meta = with pkgs.lib; {
description = "Custom colored Bibata Cursor theme built from source";
homepage = "https://github.com/ful1e5/Bibata_Cursor";
license = licenses.gpl3;
platforms = platforms.linux;
};
}

View file

@ -1,6 +1,5 @@
final: prev: { final: prev: {
spotify-webapp = final.callPackage ./spotify-webapp { }; spotify-webapp = final.callPackage ./spotify-webapp { };
bibata-cursor = final.callPackage ./bibata-cursor { };
openmw-unstable = prev.openmw.overrideAttrs (oldAttrs: { openmw-unstable = prev.openmw.overrideAttrs (oldAttrs: {
pname = "openmw"; pname = "openmw";

View file

@ -49,10 +49,6 @@
}; };
programs = { programs = {
gamescope = {
enable = true;
capSysNice = false;
};
gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
@ -102,12 +98,11 @@
}; };
services = { services = {
desktopManager.plasma6.enable = true;
displayManager = { displayManager = {
autoLogin.enable = true;
autoLogin.user = "sckova";
defaultSession = "niri";
sddm.enable = true; sddm.enable = true;
sddm.wayland.enable = true; sddm.wayland.enable = true;
defaultSession = "niri";
}; };
gnome.gnome-keyring.enable = true; gnome.gnome-keyring.enable = true;
libinput.enable = true; libinput.enable = true;
@ -137,19 +132,8 @@
}) })
]; ];
security = { security.pam.services.niri.enableGnomeKeyring = config.services.gnome.gnome-keyring.enable;
pam.services = { security.polkit.enable = true;
niri.enableGnomeKeyring = config.services.gnome.gnome-keyring.enable;
swaylock = {
name = "swaylock";
enableGnomeKeyring = config.services.gnome.gnome-keyring.enable;
gnupg.enable = true;
gnupg.noAutostart = true;
};
};
sudo.wheelNeedsPassword = false;
polkit.enable = true;
};
networking.firewall.enable = false; networking.firewall.enable = false;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
documentation.man.enable = true; documentation.man.enable = true;

View file

@ -36,6 +36,10 @@
boot.loader.limine.maxGenerations = lib.mkForce 100; boot.loader.limine.maxGenerations = lib.mkForce 100;
programs = { programs = {
gamescope = {
enable = true;
capSysNice = false;
};
steam = { steam = {
enable = true; enable = true;
gamescopeSession.enable = true; gamescopeSession.enable = true;
@ -61,6 +65,21 @@
"nvidia" "nvidia"
]; ];
services.displayManager = {
autoLogin = {
enable = false;
user = "sckova";
};
};
environment = {
loginShellInit = ''
[[ "$(tty)" = "/dev/tty1" ]] && ./gs.sh
'';
};
security.sudo.wheelNeedsPassword = false;
hardware.nvidia = { hardware.nvidia = {
modesetting.enable = true; modesetting.enable = true;
powerManagement.enable = false; powerManagement.enable = false;
@ -68,6 +87,13 @@
open = false; open = false;
}; };
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true;
openFirewall = true;
};
# virtualization settings # virtualization settings
virtualisation = { virtualisation = {

27
system/hosts/alien/gs.sh Normal file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -xeuo pipefail
gamescopeArgs=(
--adaptive-sync # VRR support
--hdr-enabled
--mangoapp # performance overlay
--rt
--steam
)
steamArgs=(
-pipewire-dmabuf
-tenfoot
)
mangoConfig=(
cpu_temp
gpu_temp
ram
vram
)
mangoVars=(
MANGOHUD=1
MANGOHUD_CONFIG="$(IFS=,; echo "${mangoConfig[*]}")"
)
export "${mangoVars[@]}"
exec gamescope "${gamescopeArgs[@]}" -- steam "${steamArgs[@]}"

View file

@ -26,12 +26,6 @@ in
} }
]; ];
services.logind.settings.Login = {
HandleSuspendKey = "ignore";
HandlePowerKey = "lock";
HandleLidSwitch = "lock";
};
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = true;
# Use the rootless mode - run Docker daemon as non-root user # Use the rootless mode - run Docker daemon as non-root user
@ -58,4 +52,6 @@ in
''; '';
}; };
}; };
security.sudo.wheelNeedsPassword = false;
} }