nixos-26.05 #7
@@ -0,0 +1,47 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.wayland.windowManager.hyprland;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hypridle.nix
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
./hyprpaper.nix
|
||||
./keybinds.nix
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.user.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
bibata-cursors
|
||||
swaynotificationcenter
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Modern-Ice";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
x11 = {
|
||||
enable = true;
|
||||
defaultCursor = true;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.wayland.windowManager.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "pidof hyprlock || ${config.programs.hyprlock.package}/bin/hyprlock";
|
||||
before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||
after_sleep_cmd = "${cfg.finalPackage}/bin/hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 8 * 60;
|
||||
on-timeout = "${pkgs.libnotify}/bin/notify-send \"You are idle!\"";
|
||||
}
|
||||
{
|
||||
timeout = 10 * 60;
|
||||
on-timeout = "${config.programs.hyprlock.package}/bin/hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 15 * 60;
|
||||
on-timeout = "${pkgs.systemd}/bin/systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# TODO - Remove?
|
||||
systemd.user.services.hypridle = {
|
||||
Unit.After = lib.mkForce "graphical-session.target";
|
||||
Service.Slice = "session.slice";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
systemd.enable = false; # Required for UWSM
|
||||
systemd.enableXdgAutostart = false;
|
||||
configType = "lua";
|
||||
|
||||
settings =
|
||||
let
|
||||
wpDir = "${config.home.homeDirectory}/Pictures/wallpapers";
|
||||
in
|
||||
{
|
||||
on._args = [
|
||||
"hyprland.start"
|
||||
(lib.generators.mkLuaInline (
|
||||
''
|
||||
function()
|
||||
''
|
||||
+
|
||||
|
||||
lib.concatMapStringsSep "\n" (cmd: ''hl.exec_cmd("${cmd}")'') [
|
||||
"swaync"
|
||||
"hyprswitch init --size-factor 5 &"
|
||||
"wl-paste --type text --watch cliphist store #Stores only text data"
|
||||
"wl-paste --type image --watch cliphist store #Stores only image data"
|
||||
# TODO: the hyprpaper hm-module still generates the old config format, use ipc temporarily
|
||||
"hyprctl hyprpaper wallpaper 'DP-1, ${wpDir}/Ultrawide_Stray_City.png'"
|
||||
"hyprctl hyprpaper wallpaper 'DP-2, ${wpDir}/cyberpunk-gas-station-1.jpg'"
|
||||
]
|
||||
|
||||
+ ''
|
||||
end
|
||||
''
|
||||
))
|
||||
];
|
||||
|
||||
monitor = [
|
||||
# Sisko
|
||||
{
|
||||
output = "desc:Philips Consumer Electronics Company 49M2C8900 AU42525000628";
|
||||
mode = "highres@highrr";
|
||||
position = "0x0";
|
||||
scale = "1";
|
||||
supports_hdr = 1;
|
||||
}
|
||||
{
|
||||
output = "desc:LG Electronics LG ULTRAWIDE 407NTABCV312";
|
||||
mode = "highres@highrr";
|
||||
position = "600x-1440";
|
||||
scale = "1";
|
||||
supports_hdr = 1;
|
||||
}
|
||||
|
||||
# fa-t14-2025
|
||||
# TODO
|
||||
|
||||
# Other
|
||||
{
|
||||
output = "";
|
||||
mode = "preferred";
|
||||
position = "auto";
|
||||
scale = "auto";
|
||||
}
|
||||
];
|
||||
|
||||
config = {
|
||||
general = {
|
||||
gaps_in = 8;
|
||||
gaps_out = 12;
|
||||
|
||||
border_size = 1;
|
||||
|
||||
"col.active_border" = {
|
||||
colors = [
|
||||
"rgba(33ccffee)"
|
||||
"rgba(00ff99ee)"
|
||||
];
|
||||
angle = 45;
|
||||
};
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
|
||||
resize_on_border = false;
|
||||
allow_tearing = false;
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 8;
|
||||
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 1.0;
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
|
||||
vibrancy = 0.1696;
|
||||
};
|
||||
};
|
||||
|
||||
animations.enabled = false; # TODO
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
};
|
||||
|
||||
binds = {
|
||||
movefocus_cycles_fullscreen = 1;
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
kb_variant = "intl";
|
||||
kb_model = "";
|
||||
kb_options = "ctrl:nocaps";
|
||||
kb_rules = "";
|
||||
|
||||
follow_mouse = 1;
|
||||
|
||||
sensitivity = 0;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.wayland.windowManager.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
hide_cursor = true;
|
||||
no_fade_in = false;
|
||||
};
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = "";
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
font_color = "rgb(202, 211, 245)";
|
||||
inner_color = "rgb(91, 96, 120)";
|
||||
outer_color = "rgb(24, 25, 38)";
|
||||
outline_thickness = 5;
|
||||
placeholder_text = "Password...";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.wayland.windowManager.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings.ipc = true;
|
||||
};
|
||||
|
||||
systemd.user.services.hyprpaper = {
|
||||
Unit.After = lib.mkForce "graphical-session.target";
|
||||
Service.Slice = "session.slice";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.wayland.windowManager.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings =
|
||||
let
|
||||
exe = lib.getExe;
|
||||
terminalCommand = "alacritty";
|
||||
resizeAmount = toString 10;
|
||||
in
|
||||
{
|
||||
mod._var = "SUPER";
|
||||
|
||||
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
||||
bind =
|
||||
let
|
||||
lua = lib.generators.mkLuaInline;
|
||||
mod = key: args: {
|
||||
_args = [
|
||||
(lua "mod .. \" + ${key}\"")
|
||||
]
|
||||
++ args;
|
||||
};
|
||||
in
|
||||
[
|
||||
# Layout actions
|
||||
|
||||
(mod "U" [
|
||||
(lua "hl.dsp.layout(\"togglesplit\")")
|
||||
])
|
||||
|
||||
(mod "Y" [
|
||||
(lua "hl.dsp.window.float({ action = \"toggle\" })")
|
||||
])
|
||||
|
||||
(mod "T" [
|
||||
(lua "hl.dsp.window.fullscreen({ action = \"toggle\", mode = \"maximized\" })")
|
||||
])
|
||||
|
||||
(mod "C" [
|
||||
(lua "hl.dsp.exec_cmd(\"hyprctl reload\")")
|
||||
])
|
||||
|
||||
# Left click drag
|
||||
(mod "mouse:272" [
|
||||
(lua "hl.dsp.window.drag()")
|
||||
(lua "{ mouse = true }")
|
||||
])
|
||||
|
||||
# Right click drag
|
||||
(mod "mouse:273" [
|
||||
(lua "hl.dsp.window.resize()")
|
||||
(lua "{ mouse = true }")
|
||||
])
|
||||
|
||||
# Window actions
|
||||
(mod "W" [
|
||||
(lua "hl.dsp.window.close()")
|
||||
])
|
||||
|
||||
(mod "SHIFT + W" [
|
||||
(lua "hl.dsp.window.kill()")
|
||||
])
|
||||
|
||||
# Application launches
|
||||
(mod "RETURN" [
|
||||
(lua "hl.dsp.exec_cmd(\"${terminalCommand}\")")
|
||||
])
|
||||
|
||||
(mod "SPACE" [
|
||||
(lua "hl.dsp.exec_cmd(\"rofi -show drun\")")
|
||||
])
|
||||
|
||||
(mod "A" [
|
||||
(lua "hl.dsp.exec_cmd(\"${exe pkgs.pavucontrol}\")")
|
||||
])
|
||||
|
||||
(mod "B" [
|
||||
(lua "hl.dsp.exec_cmd(\"rofi-rbw\")")
|
||||
])
|
||||
|
||||
(mod "N" [
|
||||
(lua "hl.dsp.exec_cmd(\"swaync-client -t -sw\")")
|
||||
])
|
||||
|
||||
(mod "P" [
|
||||
(lua "hl.dsp.exec_cmd(\"${terminalCommand} -e python3\")")
|
||||
])
|
||||
|
||||
(mod "V" [
|
||||
(lua "hl.dsp.exec_cmd(\"rofi -modi clipboard:${pkgs.cliphist}/bin/cliphist-rofi-img -show clipboard\")")
|
||||
])
|
||||
|
||||
# Focus workspace
|
||||
(mod "1" [ (lua "hl.dsp.focus({ workspace = 1 })") ])
|
||||
(mod "2" [ (lua "hl.dsp.focus({ workspace = 2 })") ])
|
||||
(mod "3" [ (lua "hl.dsp.focus({ workspace = 3 })") ])
|
||||
(mod "4" [ (lua "hl.dsp.focus({ workspace = 4 })") ])
|
||||
(mod "5" [ (lua "hl.dsp.focus({ workspace = 5 })") ])
|
||||
(mod "6" [ (lua "hl.dsp.focus({ workspace = 6 })") ])
|
||||
(mod "7" [ (lua "hl.dsp.focus({ workspace = 7 })") ])
|
||||
(mod "8" [ (lua "hl.dsp.focus({ workspace = 8 })") ])
|
||||
(mod "9" [ (lua "hl.dsp.focus({ workspace = 9 })") ])
|
||||
|
||||
# Move window to workspace
|
||||
(mod "SHIFT + 1" [ (lua "hl.dsp.window.move({ workspace = 1 })") ])
|
||||
(mod "SHIFT + 2" [ (lua "hl.dsp.window.move({ workspace = 2 })") ])
|
||||
(mod "SHIFT + 3" [ (lua "hl.dsp.window.move({ workspace = 3 })") ])
|
||||
(mod "SHIFT + 4" [ (lua "hl.dsp.window.move({ workspace = 4 })") ])
|
||||
(mod "SHIFT + 5" [ (lua "hl.dsp.window.move({ workspace = 5 })") ])
|
||||
(mod "SHIFT + 6" [ (lua "hl.dsp.window.move({ workspace = 6 })") ])
|
||||
(mod "SHIFT + 7" [ (lua "hl.dsp.window.move({ workspace = 7 })") ])
|
||||
(mod "SHIFT + 8" [ (lua "hl.dsp.window.move({ workspace = 8 })") ])
|
||||
(mod "SHIFT + 9" [ (lua "hl.dsp.window.move({ workspace = 9 })") ])
|
||||
|
||||
# Focus window
|
||||
(mod "LEFT" [ (lua "hl.dsp.focus({ direction=\"left\" })") ])
|
||||
(mod "RIGHT" [ (lua "hl.dsp.focus({ direction=\"right\" })") ])
|
||||
(mod "UP" [ (lua "hl.dsp.focus({ direction=\"up\" })") ])
|
||||
(mod "DOWN" [ (lua "hl.dsp.focus({ direction=\"down\" })") ])
|
||||
(mod "H" [ (lua "hl.dsp.focus({ direction=\"left\" })") ])
|
||||
(mod "L" [ (lua "hl.dsp.focus({ direction=\"right\" })") ])
|
||||
(mod "K" [ (lua "hl.dsp.focus({ direction=\"up\" })") ])
|
||||
(mod "J" [ (lua "hl.dsp.focus({ direction=\"down\" })") ])
|
||||
|
||||
# Move window
|
||||
(mod "SHIFT + LEFT" [ (lua "hl.dsp.window.move({ direction=\"left\" })") ])
|
||||
(mod "SHIFT + RIGHT" [ (lua "hl.dsp.window.move({ direction=\"right\" })") ])
|
||||
(mod "SHIFT + UP" [ (lua "hl.dsp.window.move({ direction=\"up\" })") ])
|
||||
(mod "SHIFT + DOWN" [ (lua "hl.dsp.window.move({ direction=\"down\" })") ])
|
||||
(mod "SHIFT + H" [ (lua "hl.dsp.window.move({ direction=\"left\" })") ])
|
||||
(mod "SHIFT + L" [ (lua "hl.dsp.window.move({ direction=\"right\" })") ])
|
||||
(mod "SHIFT + K" [ (lua "hl.dsp.window.move({ direction=\"up\" })") ])
|
||||
(mod "SHIFT + J" [ (lua "hl.dsp.window.move({ direction=\"down\" })") ])
|
||||
|
||||
# Resize window
|
||||
(mod "CONTROL + LEFT" [
|
||||
(lua "hl.dsp.window.resize({ x = -${resizeAmount}, y = 0, relative = true })")
|
||||
(lua "{ repeating = true }")
|
||||
])
|
||||
(mod "CONTROL + RIGHT" [
|
||||
(lua "hl.dsp.window.resize({ x = ${resizeAmount}, y = 0, relative = true })")
|
||||
(lua "{ repeating = true }")
|
||||
])
|
||||
(mod "CONTROL + UP" [
|
||||
(lua "hl.dsp.window.resize({ x = 0, y = -${resizeAmount}, relative = true })")
|
||||
(lua "{ repeating = true }")
|
||||
])
|
||||
(mod "CONTROL + DOWN" [
|
||||
(lua "hl.dsp.window.resize({ x = 0, y = ${resizeAmount}, relative = true })")
|
||||
(lua "{ repeating = true }")
|
||||
])
|
||||
(mod "CONTROL + H" [
|
||||
(lua "hl.dsp.window.resize({ x = -${resizeAmount}, y = 0, relative = true })")
|
||||
(lua "{ repeating = true }")
|
||||
])
|
||||
(mod "CONTROL + L" [
|
||||
(lua "hl.dsp.window.resize({ x = ${resizeAmount}, y = 0, relative = true })")
|
||||
(lua "{ repeating = true }")
|
||||
])
|
||||
(mod "CONTROL + K" [
|
||||
(lua "hl.dsp.window.resize({ x = 0, y = -${resizeAmount}, relative = true })")
|
||||
(lua "{ repeating = true }")
|
||||
])
|
||||
(mod "CONTROL + J" [
|
||||
(lua "hl.dsp.window.resize({ x = 0, y = ${resizeAmount}, relative = true })")
|
||||
(lua "{ repeating = true }")
|
||||
])
|
||||
|
||||
# TODO - replace with hyprlock?
|
||||
(mod "F1" [ (lua "hl.dsp.exec_cmd(\"${pkgs.systemd}/bin/loginctl lock-session\")") ])
|
||||
|
||||
# Screenshots
|
||||
{
|
||||
_args = [
|
||||
(lua "\"PRINT\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${exe pkgs.hyprshot} -m output --clipboard-only\")")
|
||||
];
|
||||
}
|
||||
{
|
||||
_args = [
|
||||
(lua "\"CTRL + PRINT\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${exe pkgs.hyprshot} -m region --clipboard-only\")")
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
_args = [
|
||||
(lua "\"CTRL + SHIFT + PRINT\"")
|
||||
(lua "hl.dsp.exec_cmd(\"HYPRSHOT_DIR=/home/felixalb/images/screenshots ${exe pkgs.hyprshot} -m region \")")
|
||||
];
|
||||
}
|
||||
|
||||
# Media controls
|
||||
{
|
||||
_args = [
|
||||
(lua "\"XF86AudioPlay\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${exe pkgs.playerctl} play-pause\")")
|
||||
(lua "{ locked = true }")
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
_args = [
|
||||
(lua "\"XF86AudioPause\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${exe pkgs.playerctl} play-pause\")")
|
||||
(lua "{ locked = true }")
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
_args = [
|
||||
(lua "\"XF86AudioPrev\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${exe pkgs.playerctl} previous\")")
|
||||
(lua "{ locked = true }")
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
_args = [
|
||||
(lua "\"XF86AudioNext\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${exe pkgs.playerctl} next\")")
|
||||
(lua "{ locked = true }")
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
_args = [
|
||||
(lua "\"XF86AudioMute\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle\")")
|
||||
(lua "{ locked = true, repeating = true }")
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
_args = [
|
||||
(lua "\"XF86AudioMicMute\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle\")")
|
||||
(lua "{ locked = true, repeating = true }")
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
_args = [
|
||||
(lua "\"XF86AudioLowerVolume\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-\")")
|
||||
(lua "{ locked = true, repeating = true }")
|
||||
];
|
||||
}
|
||||
{
|
||||
_args = [
|
||||
(lua "\"XF86AudioRaiseVolume\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+\")")
|
||||
(lua "{ locked = true, repeating = true }")
|
||||
];
|
||||
}
|
||||
|
||||
# Laptop controls
|
||||
{
|
||||
_args = [
|
||||
(lua "\"XF86MonBrightnessUp\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${exe pkgs.brightnessctl} s 10%+\")")
|
||||
(lua "{ locked = true, repeating = true }")
|
||||
];
|
||||
}
|
||||
{
|
||||
_args = [
|
||||
(lua "\"XF86MonBrightnessDown\"")
|
||||
(lua "hl.dsp.exec_cmd(\"${exe pkgs.brightnessctl} s 10%-\")")
|
||||
(lua "{ locked = true, repeating = true }")
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
+263
@@ -0,0 +1,263 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.programs.waybar;
|
||||
cfgs = cfg.settings.mainBar;
|
||||
in
|
||||
{
|
||||
programs.waybar = {
|
||||
systemd.enable = true;
|
||||
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 26;
|
||||
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
modules-center = [ "hyprland/window" ];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"network"
|
||||
"pulseaudio"
|
||||
"clock#date"
|
||||
"clock"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
persistent-workspaces = {
|
||||
"*" = 8;
|
||||
};
|
||||
};
|
||||
|
||||
"hyprland/window" = {
|
||||
"format" = "{initialTitle}";
|
||||
};
|
||||
|
||||
tray = {
|
||||
spacing = 10;
|
||||
};
|
||||
|
||||
clock = {
|
||||
"tooltip-format" = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
format = " {:%H:%M:%S}";
|
||||
"format-alt" = " {:%Y-%m-%d}";
|
||||
interval = 1;
|
||||
};
|
||||
|
||||
"clock#date" = {
|
||||
format = " {:%d.%m.%Y}";
|
||||
"tooltip-format" = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
|
||||
"battery" = {
|
||||
"states" = {
|
||||
"warning" = 30;
|
||||
"critical" = 15;
|
||||
};
|
||||
"format" = "{icon} {capacity}%";
|
||||
"format-charging" = " {capacity}%";
|
||||
"format-plugged" = " {capacity}%";
|
||||
"format-icons" = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
"on-click" = "ags -t quicksettings";
|
||||
};
|
||||
"pulseaudio" = {
|
||||
"format" = "{icon} {volume}% {format_source}";
|
||||
"format-bluetooth" = " {icon} {volume}% {format_source}";
|
||||
"format-bluetooth-muted" = " {icon} {format_source}";
|
||||
"format-muted" = " {format_source}";
|
||||
"format-source" = "";
|
||||
"format-source-muted" = "";
|
||||
"format-icons" = {
|
||||
"default" = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
"on-click" = "pavucontrol";
|
||||
};
|
||||
"network" = {
|
||||
"format-wifi" = " {essid}";
|
||||
"format-ethernet" = "⬇{bandwidthDownBytes} ⬆{bandwidthUpBytes}";
|
||||
"interval" = 3;
|
||||
"format-linked" = "{ifname} (No IP) ";
|
||||
"format" = "";
|
||||
"format-disconnected" = "";
|
||||
"on-click" = "alacritty -e nmtui";
|
||||
"tooltip-format" = " {bandwidthUpBits} {bandwidthDownBits}\n{ifname}\n{ipaddr}/{cidr}\n";
|
||||
"tooltip-format-wifi" =
|
||||
" {essid} {frequency}MHz\nStrength: {signaldBm}dBm ({signalStrength}%)\nIP: {ipaddr}/{cidr}\n {bandwidthUpBits} {bandwidthDownBits}";
|
||||
"min-length" = 10;
|
||||
"max-length" = 17;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style =
|
||||
let
|
||||
c = config.colors.defaultColorSet;
|
||||
in
|
||||
''
|
||||
/*
|
||||
*
|
||||
* Catppuccin Mocha palette
|
||||
* Maintainer: rubyowo
|
||||
*
|
||||
*/
|
||||
|
||||
@define-color background #1e1e2e;
|
||||
@define-color foreground #cdd6f4;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color subtext1 #bac2de;
|
||||
|
||||
@define-color surface0 #313244;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface2 #585b70;
|
||||
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay2 #9399b2;
|
||||
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color sky #89dceb;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color peach #fab387;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color red #f38ba8;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color rosewater #f5e0dc;
|
||||
|
||||
* {
|
||||
font-family: "Hack Nerd Font";
|
||||
font-size: 14px;
|
||||
min-height: 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
background-color: @background;
|
||||
color: @foreground;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.1s;
|
||||
}
|
||||
|
||||
#window {
|
||||
margin: 2;
|
||||
padding-left: 8;
|
||||
padding-right: 8;
|
||||
}
|
||||
|
||||
button {
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: inherit;
|
||||
border-top: 2px solid @hover;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 4px;
|
||||
color: gray;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
#workspaces button.empty {
|
||||
color: #404040;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
color: white;
|
||||
border-top: 2px solid @blue;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#pulseaudio,
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#wireplumber,
|
||||
#tray,
|
||||
#mode,
|
||||
#scratchpad {
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: @maroon;
|
||||
border-bottom: 2px solid @maroon;
|
||||
}
|
||||
|
||||
#clock.date {
|
||||
color: @mauve;
|
||||
border-bottom: 2px solid @mauve;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: @blue;
|
||||
border-bottom: 2px solid @blue;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: @yellow;
|
||||
border-bottom: 2px solid @yellow;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
margin-right: 12px;
|
||||
color: #7cb342;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#battery.charging,
|
||||
#battery.plugged {
|
||||
color: @green;
|
||||
border-bottom: 2px solid @green;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left>widget:first-child>#workspaces {
|
||||
margin-left: 0;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.user.services.waybar = lib.mkIf (cfg.enable && cfg.systemd.enable) {
|
||||
Service.Environment = [
|
||||
"DISPLAY=:0"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../../base.nix
|
||||
../../common/metrics-exporters.nix
|
||||
./hardware-configuration.nix
|
||||
./desktop.nix
|
||||
imports = [
|
||||
../../base.nix
|
||||
../../common/metrics-exporters.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Networking
|
||||
networking = {
|
||||
hostName = "sisko";
|
||||
# networkmanager.enable = true;
|
||||
@@ -23,11 +22,25 @@
|
||||
};
|
||||
hostId = "b716d781";
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Video
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
hardware.amdgpu.opencl.enable = true;
|
||||
|
||||
# Audio
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# Other hardware / devices
|
||||
hardware.rtl-sdr.enable = true;
|
||||
sops.defaultSopsFile = ../../secrets/sisko/sisko.yaml;
|
||||
environment.variables = { EDITOR = "vim"; };
|
||||
|
||||
users.users.felixalb.extraGroups = [
|
||||
"dialout"
|
||||
@@ -36,6 +49,32 @@
|
||||
"plugdev"
|
||||
];
|
||||
|
||||
# Desktop
|
||||
programs.hyprland = {
|
||||
# See configuration (through home-manager) in home/hypr
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
services.displayManager.ly.enable = true;
|
||||
services.xserver.enable = true;
|
||||
services.xserver.desktopManager.xfce.enable = true;
|
||||
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
packages = with pkgs; [
|
||||
fira-code
|
||||
font-awesome
|
||||
hack-font
|
||||
nerd-fonts.hack
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# Programs
|
||||
# TODO - Move to Home-Manager
|
||||
programs = {
|
||||
alvr = {
|
||||
enable = true;
|
||||
@@ -58,7 +97,12 @@
|
||||
|
||||
virt-manager.enable = true;
|
||||
};
|
||||
environment.variables = {
|
||||
SSH_AUTH_SOCK = "/run/user/${toString config.users.users.felixalb.uid}/keyring/ssh";
|
||||
EDITOR = "vim";
|
||||
};
|
||||
|
||||
# Virtualization
|
||||
virtualisation = {
|
||||
libvirtd.enable = true;
|
||||
spiceUSBRedirection.enable = true;
|
||||
@@ -71,6 +115,7 @@
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
|
||||
# Nix / meta
|
||||
nixpkgs.config = {
|
||||
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"discord"
|
||||
@@ -85,6 +130,7 @@
|
||||
rocmSupport = true;
|
||||
};
|
||||
|
||||
sops.defaultSopsFile = ../../secrets/sisko/sisko.yaml;
|
||||
services.fwupd.enable = true;
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
# Video
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
hardware.amdgpu.opencl.enable = true;
|
||||
services.displayManager.ly.enable = true;
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.xserver.desktopManager.xfce.enable = true;
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
# Audio
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# Misc
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
packages = with pkgs; [
|
||||
fira-code
|
||||
font-awesome
|
||||
hack-font
|
||||
nerd-fonts.hack
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
];
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
SSH_AUTH_SOCK = "/run/user/${toString config.users.users.felixalb.uid}/keyring/ssh";
|
||||
};
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Dark mode
|
||||
home-manager.users.felixalb = {
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gnome";
|
||||
style = "adwaita-dark";
|
||||
};
|
||||
}
|
||||
+28
-18
@@ -4,8 +4,12 @@
|
||||
imports = [
|
||||
./../../home/base.nix
|
||||
./../../home/alacritty.nix
|
||||
./../../home/hypr/default.nix
|
||||
./../../home/waybar.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# GUI Applications
|
||||
cantata
|
||||
@@ -41,19 +45,10 @@
|
||||
snicat
|
||||
|
||||
# Window Manager Extras
|
||||
bibata-cursors
|
||||
cliphist
|
||||
hyprcursor
|
||||
hypridle
|
||||
hyprlock
|
||||
hyprpaper
|
||||
hyprshot
|
||||
nautilus
|
||||
networkmanager
|
||||
rofi-rbw-wayland
|
||||
swaynotificationcenter
|
||||
waybar
|
||||
wl-clipboard
|
||||
|
||||
# Misc tools
|
||||
abcde
|
||||
@@ -95,7 +90,7 @@
|
||||
rbw = {
|
||||
enable = true;
|
||||
settings = {
|
||||
base_url = "https://pw.feal.no";
|
||||
base_url = "https://pw.home.feal.no";
|
||||
email = "felix@albrigtsen.it";
|
||||
pinentry = pkgs.pinentry-gnome3;
|
||||
};
|
||||
@@ -104,6 +99,7 @@
|
||||
enable = true;
|
||||
theme = "iggy";
|
||||
};
|
||||
waybar.enable = true;
|
||||
zsh = {
|
||||
shellAliases."rebuild" = "sudo nixos-rebuild switch --flake /config";
|
||||
prezto.pmodules = [ "ssh" ];
|
||||
@@ -111,6 +107,8 @@
|
||||
};
|
||||
|
||||
services = {
|
||||
gnome-keyring.enable = true;
|
||||
|
||||
mpd = let
|
||||
home = config.home.homeDirectory;
|
||||
in {
|
||||
@@ -127,17 +125,29 @@
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Modern-Ice";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
x11 = {
|
||||
enable = true;
|
||||
defaultCursor = true;
|
||||
|
||||
# Dark mode
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
gtk4.theme = config.gtk.theme;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "adwaita-dark";
|
||||
};
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user