Niri > Hyprland

This commit is contained in:
Aleksandr Lebedev 2025-06-09 22:35:14 +02:00
parent 48427feb65
commit f7a08debf5
13 changed files with 803 additions and 84 deletions

146
flake.lock generated
View file

@ -932,6 +932,62 @@
"type": "github"
}
},
"niri-flake": {
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": "nixpkgs_9",
"nixpkgs-stable": "nixpkgs-stable_3",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1749396815,
"narHash": "sha256-vwr2vLETE4CSi4c6SFoQyP+uBUnvwPPQmn+1D1207ts=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "e6db401ff0aa3b03507b4819f9a44deab3cfcf2f",
"type": "github"
},
"original": {
"owner": "sodiboo",
"repo": "niri-flake",
"type": "github"
}
},
"niri-stable": {
"flake": false,
"locked": {
"lastModified": 1740117926,
"narHash": "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "b94a5db8790339cf9134873d8b490be69e02ac71",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"ref": "v25.02",
"repo": "niri",
"type": "github"
}
},
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1749327170,
"narHash": "sha256-mBrxeWd7L8oAIh6G2PgKuZAzqyZMyjBpHEAcSSTbhJg=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "f918eabe6a144e78c62c3fc0cfa7fe32e4623e5a",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nix": {
"inputs": {
"flake-compat": [
@ -1054,7 +1110,7 @@
"nix-gaming": {
"inputs": {
"flake-parts": "flake-parts_4",
"nixpkgs": "nixpkgs_9"
"nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1749175147,
@ -1152,7 +1208,7 @@
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat_5",
"nixpkgs": "nixpkgs_10"
"nixpkgs": "nixpkgs_11"
},
"locked": {
"lastModified": 1746453552,
@ -1292,6 +1348,22 @@
"type": "github"
}
},
"nixpkgs-stable_3": {
"locked": {
"lastModified": 1749237914,
"narHash": "sha256-N5waoqWt8aMr/MykZjSErOokYH6rOsMMXu3UOVH5kiw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "70c74b02eac46f4e4aa071e45a6189ce0f6d9265",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1748929857,
@ -1309,6 +1381,22 @@
}
},
"nixpkgs_10": {
"locked": {
"lastModified": 1748662220,
"narHash": "sha256-7gGa49iB9nCnFk4h/g9zwjlQAyjtpgcFkODjcOQS0Es=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "59138c7667b7970d205d6a05a8bfa2d78caa3643",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_11": {
"locked": {
"lastModified": 1742937945,
"narHash": "sha256-lWc+79eZRyvHp/SqMhHTMzZVhpxkRvthsP1Qx6UCq0E=",
@ -1324,7 +1412,7 @@
"type": "github"
}
},
"nixpkgs_11": {
"nixpkgs_12": {
"locked": {
"lastModified": 1749086602,
"narHash": "sha256-DJcgJMekoxVesl9kKjfLPix2Nbr42i7cpEHJiTnBUwU=",
@ -1340,7 +1428,7 @@
"type": "github"
}
},
"nixpkgs_12": {
"nixpkgs_13": {
"locked": {
"lastModified": 1744868846,
"narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
@ -1356,7 +1444,7 @@
"type": "github"
}
},
"nixpkgs_13": {
"nixpkgs_14": {
"locked": {
"lastModified": 1747610100,
"narHash": "sha256-rpR5ZPMkWzcnCcYYo3lScqfuzEw5Uyfh+R0EKZfroAc=",
@ -1486,16 +1574,16 @@
},
"nixpkgs_9": {
"locked": {
"lastModified": 1748662220,
"narHash": "sha256-7gGa49iB9nCnFk4h/g9zwjlQAyjtpgcFkODjcOQS0Es=",
"lastModified": 1749285348,
"narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "59138c7667b7970d205d6a05a8bfa2d78caa3643",
"rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -3707,13 +3795,14 @@
"home-manager": "home-manager",
"impermanence": "impermanence",
"neovim": "neovim",
"niri-flake": "niri-flake",
"nix-darwin": "nix-darwin",
"nix-flatpak": "nix-flatpak",
"nix-gaming": "nix-gaming",
"nix-on-droid": "nix-on-droid",
"nixos-facter-modules": "nixos-facter-modules",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_11",
"nixpkgs": "nixpkgs_12",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix",
@ -3778,7 +3867,7 @@
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_12"
"nixpkgs": "nixpkgs_13"
},
"locked": {
"lastModified": 1747603214,
@ -3806,7 +3895,7 @@
"git-hooks": "git-hooks_2",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_13",
"nixpkgs": "nixpkgs_14",
"nur": "nur",
"systems": "systems_4",
"tinted-foot": "tinted-foot",
@ -3992,6 +4081,39 @@
"repo": "treefmt-nix",
"type": "github"
}
},
"xwayland-satellite-stable": {
"flake": false,
"locked": {
"lastModified": 1739246919,
"narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"ref": "v0.5.1",
"repo": "xwayland-satellite",
"type": "github"
}
},
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1749315541,
"narHash": "sha256-bEik1BfVOFnWvtOrcOHluos/edJ8f+G2y1QySbt/0Ak=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "da2ecb5be816de35e2efe23a408a1c49fe8b11ba",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github"
}
}
},
"root": "root",

View file

@ -66,6 +66,9 @@
url = "git+https://github.com/KyleKrein/BeeEngine?submodules=1";
};
conduwuit.url = "github:matrix-construct/tuwunel";
niri-flake = {
url = "github:sodiboo/niri-flake";
};
};
outputs = {

View file

@ -42,10 +42,6 @@ in
boot = {
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_14;
plymouth = {
enable = true;
};
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = if hwconfig.hostname != "kylekrein-mac" then true else false;
@ -244,38 +240,6 @@ in
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit pkgs;
inherit hwconfig;
inherit first-nixos-install;
inherit inputs;
};
};
stylix = {
enable = true;
image = "${./modules/hyprland/wallpaper.jpg}";
autoEnable = true;
opacity = {
desktop = 0.0;#0.5;
};
targets = {
gtk.enable = true;
plymouth = {
enable = true;
#logo = ./fastfetch/nixos.png;
logoAnimated = false;
};
};
fonts = {
sizes = {
applications = 14;
desktop = 12;
popups = 12;
terminal = 16;
};
};
polarity = "dark";
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
};
programs.bash = {

View file

@ -23,25 +23,23 @@ in
inherit inputs;
}
)
++ lib.optional (config.programs.hyprland.enable) (
import ./modules/hyprland/home.nix {
inherit pkgs;
inherit username;
inherit inputs;
inherit hwconfig;
inherit lib;
}
)
#++ lib.optional (config.programs.hyprland.enable) (
# import ./modules/hyprland/home.nix {
# inherit pkgs;
# inherit username;
# inherit inputs;
# inherit hwconfig;
# inherit lib;
# }
#)
++ lib.optional (builtins.pathExists ./homes/${username}) (
import ./homes/${username} { inherit username; }
import ./homes/${username} { inherit username; inherit config; inherit pkgs; inherit lib; inherit inputs; inherit hwconfig; }
);
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = username;
home.homeDirectory = "/home/${username}";
stylix = {
enable = lib.strings.hasInfix "kylekrein" hwconfig.hostname;
};
#xdg.configFile."Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" {
# General.theme = "Catppuccin-Mocha";
# };
@ -106,8 +104,8 @@ in
programs.kitty = {
enable = lib.strings.hasInfix "kylekrein" hwconfig.hostname;
font = {
#name = "JetBrainsMono Nerd Font";
#size = 16;
name = "JetBrainsMono Nerd Font";
size = 20;
};
settings = {
confirm_os_window_close = 0;

View file

@ -0,0 +1,83 @@
{pkgs, hwconfig, ...}:
let
battery-path = "/sys/class/power_supply/${if hwconfig.hostname == "kylekrein-mac" then "macsmc-battery" else "BAT0"}";
get-battery-level = "${pkgs.writeShellScriptBin "get-battery-level" ''
cat ${battery-path}/capacity 2>/dev/null || echo "N/A"
''}/bin/get-battery-level";
get-status = "${pkgs.writeShellScriptBin "get-status" ''
cat ${battery-path}/status 2>/dev/null || echo "Unknown"
''}/bin/get-status";
get-icon = "${pkgs.writeShellScriptBin "get-icon" ''
BATTERY_LEVEL=$(${get-battery-level})
STATUS=$(${get-status})
if [[ "$BATTERY_LEVEL" == "N/A" ]]; then
ICON="󰂑 "
elif [[ "$STATUS" == "Charging" ]]; then
if [[ $BATTERY_LEVEL -ge 90 ]]; then
ICON="󰂋 "
elif [[ $BATTERY_LEVEL -ge 80 ]]; then
ICON="󰂊 "
elif [[ $BATTERY_LEVEL -ge 70 ]]; then
ICON="󰢞 "
elif [[ $BATTERY_LEVEL -ge 60 ]]; then
ICON="󰂉 "
elif [[ $BATTERY_LEVEL -ge 50 ]]; then
ICON="󰢝 "
elif [[ $BATTERY_LEVEL -ge 40 ]]; then
ICON="󰂈 "
elif [[ $BATTERY_LEVEL -ge 30 ]]; then
ICON="󰂇 "
elif [[ $BATTERY_LEVEL -ge 20 ]]; then
ICON="󰂆 "
elif [[ $BATTERY_LEVEL -ge 10 ]]; then
ICON="󰢜 "
else
ICON="󰢜 "
fi
else
if [[ $BATTERY_LEVEL -ge 90 ]]; then
ICON="󰂂 "
elif [[ $BATTERY_LEVEL -ge 70 ]]; then
ICON="󰂀 "
elif [[ $BATTERY_LEVEL -ge 50 ]]; then
ICON="󰁾 "
elif [[ $BATTERY_LEVEL -ge 30 ]]; then
ICON="󰁼 "
elif [[ $BATTERY_LEVEL -ge 10 ]]; then
ICON="󰁺 "
else
ICON="󰁺 "
fi
fi
echo "$ICON"
''}/bin/get-icon";
get-remaining-time = "${pkgs.writeShellScriptBin "get-remaining-time" ''
REMAINING_ENERGY=$(cat ${battery-path}/energy_now)
POWER_USAGE=$(cat ${battery-path}/power_now)
if [[ -n "$REMAINING_ENERGY" && -n "$POWER_USAGE" && "$POWER_USAGE" -ne 0 ]]; then
TIME_LEFT=$((0 - (REMAINING_ENERGY / POWER_USAGE)))
MINUTES_LEFT=$(((0 - ( (REMAINING_ENERGY * 60) / POWER_USAGE )) - (TIME_LEFT * 60)))
echo "$TIME_LEFT h $MINUTES_LEFT min"
else
echo ""
fi
''}/bin/get-remaining-time";
in
{
available = hwconfig.isLaptop;
icon = get-icon;
status = get-status;
time = get-remaining-time;
level = get-battery-level;
labelAdaptive = "${pkgs.writeShellScriptBin "labelAdaptive" ''
if [[ "$(${get-status})" == "Charging" ]]; then
echo "$(${get-battery-level})% $(${get-icon})"
else
echo "$(${get-remaining-time}) $(${get-icon})"
fi
''}/bin/labelAdaptive";
labelPercent = "${pkgs.writeShellScriptBin "labelPercent" ''
echo "$(${get-battery-level})% $(${get-icon})"
''}/bin/labelPercent";
}

View file

@ -1,5 +1,14 @@
{username, ...}: {
{config, username, pkgs, lib, inputs, hwconfig, ...}: {
imports = [
./git.nix
];
] ++ lib.optional (lib.strings.hasInfix "kylekrein" hwconfig.hostname) (
import ./niri.nix {
inherit pkgs;
inherit config;
inherit username;
inherit inputs;
inherit hwconfig;
inherit lib;
}
);
}

View file

@ -0,0 +1,217 @@
#https://github.com/sodiboo/niri-flake/blob/main/default-config.kdl.nix
#https://github.com/sodiboo/niri-flake/blob/main/docs.md
#https://github.com/sodiboo/system/blob/main/niri.mod.nix
{config, pkgs, lib, inputs, hwconfig, ...}:
{
programs.fuzzel = {
enable = true;
settings.main.terminal = "kitty";
};
services.swaync = {
enable = true;
};
imports = [
./waybar
];
home.packages = with pkgs;[
wlogout
brightnessctl
fuzzel
waybar
swaybg
libnotify
swaylock
];
programs.niri = {
settings = {
outputs = lib.mkIf (hwconfig.hostname == "kylekrein-homepc") {
"DP-1" = {
scale = 1.6;
position.x = 1600;
position.y = 0;
};
"DP-3" = {
scale = 1.6;
position.x = 0;
position.y = 0;
};
};
spawn-at-startup = let
set-low-brightness = lib.mkIf (hwconfig.isLaptop) {
command = [
"${lib.getExe pkgs.brightnessctl}"
"set"
"25%"
];
};
in [
set-low-brightness
{
command = [
"${lib.getExe pkgs.waybar}"
];
}
{
command = [
"${lib.getExe pkgs.networkmanagerapplet}"
];
}
{
command = [
"${pkgs.solaar}/bin/solaar"
"-w"
"hide"
];
}
{
command = [
"${lib.getExe pkgs.swaybg}"
"-m"
"fill"
"-i"
"${../../modules/hyprland/wallpaper.jpg}"
];
}
{
command = [
"emacs"
"--daemon"
];
}
];
layout = {
preset-column-widths = [
{proportion = 1.0 / 3.0;}
{proportion = 1.0 / 2.0;}
{proportion = 2.0 / 3.0;}
{proportion = 1.0;}
];
default-column-width = {proportion = 1.0 / 3.0;};
};
binds = with config.lib.niri.actions;
let
sh = spawn "sh" "-c";
in {
"Mod+E".action = sh "emacsclient -c";
"Mod+T".action = spawn "kitty";
"Mod+D".action = spawn "fuzzel";
"Mod+B".action = spawn "librewolf";
"Mod+H".action = show-hotkey-overlay;
"Mod+F".action = fullscreen-window;
"Mod+R".action = switch-preset-column-width;
"Mod+Q".action = close-window;
#"Mod+Q".action = ;
"Mod+Shift+S".action = screenshot;
"Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3;
"Mod+4".action = focus-workspace 4;
"Mod+5".action = focus-workspace 5;
"Mod+6".action = focus-workspace 6;
"Mod+7".action = focus-workspace 7;
"Mod+8".action = focus-workspace 8;
"Mod+9".action = focus-workspace 9;
"Mod+0".action = focus-workspace 10;
"Mod+Shift+1".action.move-column-to-workspace = 1;
"Mod+Shift+2".action.move-column-to-workspace = 2;
"Mod+Shift+3".action.move-column-to-workspace = 3;
"Mod+Shift+4".action.move-column-to-workspace = 4;
"Mod+Shift+5".action.move-column-to-workspace = 5;
"Mod+Shift+6".action.move-column-to-workspace = 6;
"Mod+Shift+7".action.move-column-to-workspace = 7;
"Mod+Shift+8".action.move-column-to-workspace = 8;
"Mod+Shift+9".action.move-column-to-workspace = 9;
"Mod+Shift+0".action.move-column-to-workspace = 10;
"Mod+Left".action = focus-column-left;
"Mod+Right".action = focus-column-right;
"Mod+Up".action = focus-workspace-up;
"Mod+Down".action = focus-workspace-down;
"Mod+Shift+Left".action = move-column-left;
"Mod+Shift+Right".action = move-column-right;
"Mod+Shift+Up".action = move-column-to-workspace-up;
"Mod+Shift+Down".action = move-column-to-workspace-down;
"Mod+Ctrl+Left".action = focus-monitor-left;
"Mod+Ctrl+Right".action = focus-monitor-right;
"Mod+Shift+Ctrl+Left".action = move-column-to-monitor-left;
"Mod+Shift+Ctrl+Right".action = move-column-to-monitor-right;
"XF86AudioRaiseVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+";
"XF86AudioLowerVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-";
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86MonBrightnessUp".action = sh "brightnessctl set 10%+";
"XF86MonBrightnessDown".action = sh "brightnessctl set 10%-";
#"Mod+Tab".action = focus-window-down-or-column-right;
#"Mod+Shift+Tab".action = focus-window-up-or-column-left;
"Mod+Tab".action = open-overview;
};
input = {
focus-follows-mouse = {
#enable = true;
};
warp-mouse-to-focus = true;
keyboard = {
xkb.layout = "us, ru";
xkb.options = "grp:lctrl_toggle, ctrl:nocaps" + (if hwconfig.hostname == "kylekrein-mac" then ", altwin:swap_alt_win" else "");
track-layout = "window";
};
touchpad = {
tap = true;
#accel-profile = "adaptive";
click-method = "clickfinger";
};
};
cursor = {
hide-after-inactive-ms = 10000;
};
gestures.hot-corners.enable = true;
prefer-no-csd = true;
environment = {
XDG_SESSION_TYPE = "wayland";
__GL_GSYNC_ALLOWED = "1";
QT_QPA_PLATFORM = "wayland";
};
window-rules = [
{ #active
matches = [
{
is-active = true;
}
];
opacity = 0.9;
}
{ #inactive
matches = [
{
is-active = false;
}
];
opacity = 0.7;
}
{ #opaque
matches = [
{
app-id = "emacs";
}
{
app-id = "blender";
}
];
opacity = 1.0;
}
{ #app-launcher
matches = [
{
title = "emacs-run-launcher";
}
];
open-floating = true;
open-focused = true;
}
];
};
};
}

View file

@ -0,0 +1,199 @@
{ pkgs, lib, hwconfig, ... }:
let
battery = (import ../battery-status.nix {inherit pkgs; inherit hwconfig;});
in
{
programs.waybar = {
enable = true;
systemd.enable = true;
#window#waybar {
# background: transparent;
#border-bottom: none;
#}
#${builtins.readFile "${pkgs.waybar}/etc/xdg/waybar/style.css"}
style = ''
${builtins.readFile ./waybarstyle.css}
* {
font-size: 15px;
}
'';
settings = [{
height = 36;
layer = "top";
position = "top";
tray = { spacing = 3; };
modules-center = [
#"hyprland/window"
"clock"
];
modules-left = [
"wlr/taskbar"
"niri/workspaces"
# "hyprland/window"
];
modules-right = lib.optional hwconfig.isLaptop "backlight"
++ [
"pulseaudio"
#"network"
#"cpu"
"memory"
#"temperature"
"niri/language"
] ++ lib.optional battery.available "custom/battery"
++ [
"tray"
"custom/notification"
#"custom/disablehypridle"
"custom/power"
];
battery = {
format = " {time} {icon} ";
format-alt = " {capacity}% {icon} ";
format-charging = " {capacity}% ";
format-icons = [ "" "" "" "" "" ];
format-plugged = " {capacity}% ";
states = {
critical = 10;
warning = 20;
};
};
backlight = {
format = "{percent}% 󰛩";
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl s 5%+";
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
};
"custom/battery" = {
exec ="${pkgs.writeShellScriptBin "battery-widget" ''
${battery.labelAdaptive}
${battery.labelPercent}
''}/bin/battery-widget";
interval = 20;
tooltip = true;
};
clock = {
format-alt = "{:%d.%m.%Y}";
tooltip-format = "{:%d.%m.%Y | %H:%M}";
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
"niri/language" = {
format = " {}";
format-en = "EN";
format-ru = "RU";
};
"wlr/taskbar" = {
format = "{icon}";
icon-size = 18;
tooltip-format = "{title}";
on-click = "activate";
on-click-middle = "close";
};
memory = {
interval = 1;
format = " {used}/{total}Gb";
};
network = {
interval = 1;
format-alt = "{ifname}: {ipaddr}/{cidr}";
format-disconnected = "Disconnected ";
format-ethernet = "{ifname}: {ipaddr}/{cidr} up: {bandwidthUpBits} down: {bandwidthDownBits}";
format-linked = "{ifname} (No IP) ";
#format-wifi = "{signalStrength}% ";
format-wifi = "{signalStrength}% ";
tooltip-format = "{essid} ({signalStrength}%) ";
};
pulseaudio = {
format = "{icon} {volume}% {format_source}";
format-bluetooth = "{icon} {volume}% {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-icons = {
car = "";
default = [ "" "" "" ];
handsfree = "";
headphones = "";
headset = "";
phone = "";
portable = "";
};
format-muted = " {format_source}";
format-source = " {volume}%";
format-source-muted = "";
on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol";
};
"hyprland/submap" = { format = ''<span style="italic">{}</span>''; };
temperature = {
critical-threshold = 80;
format = "{temperatureC}°C {icon}";
format-icons = [ "" "" "" ];
};
"hyprland/workspaces" = {
disable-scroll = true;
all-outputs = false;
warp-on-scroll = true;
format = "{name}{icon} ";
format-icons = {
urgent = "";
active = "";
default = "";
};
#persistent-workspaces = {
# "*" = 3;
#};
};
"custom/power" = {
format = " ";
tooltip = false;
#menu = "on-click";
#menu-file = ./power_menu.xml;
#menu-actions = {
# shutdown = "shutdown -h now";
# reboot = "reboot";
# suspend = "systemctl suspend";
# hibernate = "systemctl hibernate";
#};
on-click = "wlogout";
};
"custom/notification" = {
tooltip = false;
format = "{icon}";
format-icons = {
notification = " <span foreground='red'><small><sup></sup></small></span>";
none = " ";
dnd-notification = " <span foreground='red'><small><sup></sup></small></span>";
dnd-none = " ";
};
return-type = "json";
exec-if = "which swaync-client";
exec = "swaync-client -swb";
on-click = "sleep 0.1 && swaync-client -t -sw";
on-click-right = "sleep 0.1 && swaync-client -d -sw";
escape = true;
};
"custom/disablehypridle" = {
exec = ''
if pgrep -x "hypridle" > /dev/null; then
echo "{\"text\": \" \", \"tooltip\": \"Hypridle is running\", \"class\": \"active\"}";
else
echo "{\"text\": \" \", \"tooltip\": \"Hypridle is not running\", \"class\": \"inactive\"}";
fi
'';
return-type = "json";
on-click = ''
if pgrep -x "hypridle" > /dev/null; then
pkill hypridle
else
hypridle &
fi
'';
};
}];
};
}

View file

@ -0,0 +1,92 @@
* {
border: none;
font-family: Font Awesome, Roboto, Arial, sans-serif;
font-size: 13px;
color: #B9826A;/*#ffffff;*/
border-radius: 20px;
}
window {
/*font-weight: bold;*/
}
window#waybar {
background: transparent;/*rgba(0, 0, 0, 0);*/
}
/*-----module groups----*/
.modules-right {
background-color: rgba(0,43,51,0.85);
margin: 2px 10px 0 0;
}
.modules-center {
background-color: rgba(0,43,51,0.85);
margin: 2px 0 0 0;
}
.modules-left {
margin: 2px 0 0 5px;
background-color: rgba(0,119,179,0.6);
}
/*-----modules indv----*/
#workspaces button {
padding: 1px 5px;
background-color: transparent;
}
#workspaces button:hover {
box-shadow: inherit;
background-color: rgba(0,153,153,1);
}
#workspaces button.focused {
background-color: rgba(0,43,51,0.85);
}
#clock,
#battery,
#cpu,
#memory,
#temperature,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#custom-power,
#custom-menu,
#idle_inhibitor {
padding: 0 10px;
}
#mode {
color: #cc3436;
font-weight: bold;
}
#custom-power {
background-color: rgba(0,119,179,0.6);
border-radius: 100px;
margin: 5px 5px;
padding: 1px 1px 1px 6px;
}
/*-----Indicators----*/
#idle_inhibitor.activated {
color: #2dcc36;
}
#pulseaudio.muted {
color: #cc3436;
}
#battery.charging {
color: #2dcc36;
}
#battery.warning:not(.charging) {
color: #e6e600;
}
#battery.critical:not(.charging) {
color: #cc3436;
}
#temperature.critical {
color: #cc3436;
}
/*-----Colors----*/
/*
*rgba(0,85,102,1),#005566 --> Indigo(dye)
*rgba(0,43,51,1),#002B33 --> Dark Green
*rgba(0,153,153,1),#009999 --> Persian Green
*
*/

View file

@ -11,17 +11,13 @@
imports = [
../../hardware/nvidia
../../modules/hyprland
../../modules/niri
../../modules/libvirt
../../users/kylekrein
(import ../../modules/libvirt/user.nix {username = "kylekrein";})
../../users/dima
(import ../../modules/libvirt/user.nix {username = "dima";})
../../users/tania
];
sops.secrets."ssh_keys/${hwconfig.hostname}" = {};
@ -54,15 +50,6 @@
user = "ollama";
group = "ollama";
};
services.llama-cpp = {
enable = false;
model = "/home/kylekrein/Downloads/ds/DeepSeek-R1-GGUF/DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00001-of-00003.gguf";
port = 10005;
extraFlags = [
"--ctx-size 1024" #context size
"--n-gpu-layers 0"
];
};
services.open-webui.enable = true;
#services.open-webui.package = unstable-pkgs.open-webui;

View file

@ -1,5 +1,31 @@
{ pkgs, inputs, hwconfig, unstable-pkgs, ... }:
{
stylix = {
enable = true;
image = "${./wallpaper.jpg}";
autoEnable = true;
opacity = {
desktop = 0.0;#0.5;
};
targets = {
gtk.enable = true;
plymouth = {
enable = false;
#logo = ./fastfetch/nixos.png;
logoAnimated = false;
};
};
fonts = {
sizes = {
applications = 14;
desktop = 12;
popups = 12;
terminal = 16;
};
};
polarity = "dark";
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
};
environment.systemPackages = with pkgs; [
#kando

View file

@ -0,0 +1,22 @@
{ pkgs, inputs, ...}:
{
nixpkgs.overlays = [
inputs.niri-flake.overlays.niri
];
imports = [
inputs.niri-flake.nixosModules.niri
];
programs.niri = {
enable = true;
package = pkgs.niri-unstable;
};
niri-flake.cache.enable = true;
environment.systemPackages = with pkgs;[
wl-clipboard
wayland-utils
libsecret
gamescope
xwayland-satellite-stable
swaybg
];
}

View file

@ -32,16 +32,13 @@ in {
nix.settings.trusted-users = [
"kylekrein"
];
home-manager.users."${username}" = import ../../home.nix {
inherit lib;
home-manager.extraSpecialArgs = {
inherit username;
inherit inputs;
inherit first-nixos-install;
inherit hwconfig;
inherit config;
inherit pkgs;
};
home-manager.users."${username}" = ../../home.nix;
kylekrein.services.autoUpgrade = {
#configDir = lib.mkForce "/home/${username}/nixos-config";
#user = lib.mkForce username;