Compare commits

..

1 Commits

Author SHA1 Message Date
felixalb ffc0cb5222 defiant: update to nixos 26.05 2026-05-31 22:04:48 +02:00
24 changed files with 142 additions and 1073 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
{
system.autoUpgrade = {
enable = true;
flake = "git+https://git.feal.no/felixalb/nixos-config.git";
flake = "git+https://git.feal.no/felixalb/nixos-config.git?ref=nixos-26.05"; # TODO - restore to main
flags = [
# Override nixpkgs (only). Notably does not include home-manager, sops or other utility/application flake inputs.
"--refresh"
+1 -1
View File
@@ -1,6 +1,6 @@
[
{ # Worf
publicKey = "4buTx2yGpQMvCw6q+COySRHiS4acf1F09WryiDNQ428=";
publicKey = "kW8SyzCh2tw8GzZV6bPn+IQVNUoUhseNfEm3rHnR1So=";
allowedIPs = [
"10.100.0.4/32"
];
-47
View File
@@ -1,47 +0,0 @@
{
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;
};
};
};
}
-45
View File
@@ -1,45 +0,0 @@
{
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";
};
};
}
-180
View File
@@ -1,180 +0,0 @@
{
lib,
config,
osConfig,
...
}:
{
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
"sisko" = [
"hyprctl hyprpaper wallpaper 'DP-1, ${wpDir}/Ultrawide_Stray_City.png'"
"hyprctl hyprpaper wallpaper 'DP-2, ${wpDir}/cyberpunk-gas-station-1.jpg'"
];
"fa-t14-2025" = [
"hyprctl hyprpaper wallpaper ', ${wpDir}/mktv-wallpaper-01.png'"
];
}
."${osConfig.networking.hostName}"
)
)
+ ''
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
{
output = "desc:Lenovo Group Limited 0x403D";
mode = "highres@highrr";
position = "0x0";
scale = "1";
supports_hdr = 1;
}
{
output = "desc:Samsung Electric Company LS32D70xE HK2XC00156";
mode = "3840x2160@30.00";
position = "-3840x0";
scale = "1";
}
{
output = "desc:Samsung Electric Company C24F390 H4ZM501656";
mode = "1920x1080@60.00";
position = "-5760x0";
scale = "1";
}
# 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 = lib.mkDefault "us";
kb_variant = lib.mkDefault "intl";
kb_model = "";
kb_options = "ctrl:nocaps";
kb_rules = "";
follow_mouse = 1;
sensitivity = 0;
touchpad = {
natural_scroll = false;
};
};
};
};
};
}
-47
View File
@@ -1,47 +0,0 @@
{
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;
}
];
};
};
};
}
-17
View File
@@ -1,17 +0,0 @@
{ 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";
};
};
}
-291
View File
@@ -1,291 +0,0 @@
{
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 }")
])
# Scroll through workspaces on this monitor
(mod "mouse_up" [
(lua "hl.dsp.focus({ workspace = \"r+1\" })")
])
(mod "mouse_down" [
(lua "hl.dsp.focus({ workspace = \"r-1\" })")
])
# 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/Pictures/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 }")
];
}
];
};
};
}
-21
View File
@@ -130,27 +130,6 @@ in {
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
" Show non-ascii characters (except norwegian æøå)
highlight nonascii ctermbg=214 guibg=#FFA500 " orange
function! HighlightNonAscii()
" delete the old match if it exists
let s:matchid = get(s:, 'matchid', -1)
if s:matchid != -1
try
call matchdelete(s:matchid)
catch /E803/
" matchid does not exist, pass
endtry
endif
" Skip popups like telescope
if &buftype ==# ""
let s:matchid = matchadd('nonascii', '[^\x00-\x7FæøåÆØÅ]', 100)
else
let s:matchid = -1
endif
endfunction
autocmd BufEnter * call HighlightNonAscii()
" Disable search highlights
map <Leader><Space> :noh<CR>
-264
View File
@@ -1,264 +0,0 @@
{ 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"
"battery"
"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"
];
};
}
+2 -12
View File
@@ -49,23 +49,13 @@
security.polkit.enable = true; # Required for nextcloud
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"nvidia-kernel-modules"
"nvidia-settings"
"nvidia-x11"
"nvidia-x11"
"nvidia-settings"
];
hardware.nvidia = {
modesetting.enable = true;
open = false;
# https://github.com/sircam-html/nixos-conf/blob/main/guides/nvidia-nixos-guide.md
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "580.142";
sha256_64bit = "sha256-IJFfzz/+icNVDPk7YKBKKFRTFQ2S4kaOGRGkNiBEdWM=";
sha256_aarch64 = "sha256-0000000000000000000000000000000000000000000=";
openSha256 = "sha256-0000000000000000000000000000000000000000000=";
settingsSha256 = "sha256-BnrIlj5AvXTfqg/qcBt2OS9bTDDZd3uhf5jqOtTMTQM=";
persistencedSha256 = "sha256-0000000000000000000000000000000000000000000=";
};
};
hardware.graphics.enable = true;
-1
View File
@@ -4,7 +4,6 @@
"/export/riker-backup" = {
device = "/tank/backup/riker";
options = [ "bind" ];
fsType = "none";
};
};
-1
View File
@@ -9,7 +9,6 @@
zfs = {
extraPools = [ "tank" ];
requestEncryptionCredentials = false;
forceImportRoot = false;
};
supportedFilesystems = [ "zfs" ];
};
-1
View File
@@ -5,7 +5,6 @@
device = "/tank/nvr/frigate";
depends = [ "/tank/nvr/frigate" ];
options = [ "bind" ];
fsType = "none";
};
};
+2 -2
View File
@@ -5,7 +5,7 @@ let
in {
services.nextcloud = {
enable = true;
package = pkgs.nextcloud33;
package = pkgs.nextcloud32;
inherit hostName;
home = "/tank/nextcloud";
https = true;
@@ -75,7 +75,7 @@ in {
environment.systemPackages = [
cfg.occ # "occ CMD" in the docs -> "sudo -u nextcloud nextcloud-occ CMD"
pkgs.nodejs # For Recognize; Put /run/current-system/sw/bin/node in the "node_binary" field in the web UI -> Memories
pkgs.nodejs_20 # For Recognize; Put /run/current-system/sw/bin/node in the "node_binary" field in the web UI -> Memories
];
sops.secrets."nextcloud/adminpass" = {
+1 -1
View File
@@ -11,7 +11,7 @@
fileSystems."/var/lib/libvirt/images" = {
device = "/tank/iso";
options = [ "bind" ];
fsType = "none";
fsType = "auto";
};
# On a gui-enabled machine, connect with:
+1 -1
View File
@@ -44,7 +44,7 @@ in {
ui = {
THEMES="gitea,arc-green,nord";
DEFAULT_THEME="nord";
#DEFAULT_THEME="nord";
};
};
+2 -2
View File
@@ -16,10 +16,10 @@ in {
privateKeyFile = "/etc/wireguard/defiant.private";
postSetup = ''
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -d 192.168.10.0/24 -o enp3s0 -j MASQUERADE
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -d 192.168.10.0/24 -o eth0 -j MASQUERADE
'';
postShutdown = ''
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -d 192.168.10.0/24 -o enp3s0 -j MASQUERADE
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -d 192.168.10.0/24 -o eth0 -j MASQUERADE
'';
peers = (import ../../../common/wireguard-peers.nix);
+10 -17
View File
@@ -1,16 +1,12 @@
{
config,
pkgs,
lib,
...
}:
{ config, pkgs, lib, ... }:
{
imports = [
../../base.nix
./hardware-configuration.nix
imports =
[
../../base.nix
./hardware-configuration.nix
./desktop.nix
./desktop.nix
];
networking = {
@@ -53,13 +49,10 @@
console.keyMap = "no";
nixpkgs.config = {
allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"microsoft-edge"
"securecrt"
"securefx"
];
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"securecrt"
"securefx"
];
};
system.stateVersion = "25.05";
+1 -8
View File
@@ -1,9 +1,4 @@
{
config,
pkgs,
lib,
...
}:
{ config, pkgs, lib, ... }:
{
hardware.graphics.enable = true;
services.xserver = {
@@ -17,9 +12,7 @@
services.gnome.gnome-keyring.enable = true;
programs.hyprland = {
# See configuration (through home-manager) in home/hypr
enable = true;
withUWSM = true;
xwayland.enable = true;
};
+24 -30
View File
@@ -1,13 +1,10 @@
{ pkgs, lib, ... }:
let
emailAddress = "felix.albrigtsen@mktv.no";
in
{
in {
imports = [
./../../home/base.nix
./../../home/alacritty.nix
./../../home/waybar.nix
./../../home/hypr
];
home.packages = with pkgs; [
@@ -22,9 +19,7 @@ in
iperf3
jq
libreoffice
microsoft-edge
mpv
nixpkgs-2211.remmina
oauth2ms
oldssh
openssl
@@ -34,42 +29,43 @@ in
traceroute
virt-manager
w3m
nixpkgs-2211.remmina
unstable.microsoft-edge
# (unstable.microsoft-edge.overrideAttrs ({ installPhase ? "", ... }: {
# installPhase = installPhase + ''
# ln -s $out/bin/microsoft-edge $out/bin/microsoft-edge-stable
# '';
# }))
# Window Manager Extras
bibata-cursors
brightnessctl
cliphist
hyprcursor
hypridle
hyprlock
hyprpaper
hyprshot
nautilus
rofi-rbw-wayland
swaynotificationcenter
waybar
wl-clipboard
(python312.withPackages (
ps: with ps; [
numpy
pycryptodome
requests
]
))
(python312.withPackages (ps: with ps; [
numpy
pycryptodome
requests
]))
];
wayland.windowManager.hyprland = {
enable = true;
# Override settings from home/hypr/hyprland.nix
settings.config.input = {
kb_layout = "no";
kb_variant = "";
};
};
programs = {
aerc = {
enable = true;
package = pkgs.aerc;
};
firefox = {
enable = true;
configPath = ".mozilla/firefox"; # Old default before 26.05
};
firefox.enable = true;
git.settings.user.email = emailAddress;
rbw = {
enable = true;
@@ -77,7 +73,7 @@ in
base_url = "https://vault.mktv.no";
email = emailAddress;
pinentry = pkgs.pinentry-rofi;
lock_timeout = 60 * 60 * 8;
lock_timeout = 60*60*8;
};
};
rofi = {
@@ -85,12 +81,10 @@ in
# theme = "iggy";
theme = "Arc-Dark";
};
waybar.enable = true;
zsh = {
shellAliases = {
"kssh" = "ssh -t controlnode ssh";
"ossh" =
"oldssh -oHostKeyAlgorithms=+ssh-dss -oCiphers=+aes256-cbc -oKexAlgorithms=+diffie-hellman-group14-sha1";
"ossh" = "oldssh -oHostKeyAlgorithms=+ssh-dss -oCiphers=+aes256-cbc -oKexAlgorithms=+diffie-hellman-group14-sha1";
"rebuild" = "sudo nixos-rebuild switch --flake /config";
};
prezto.pmodules = [ "ssh" ];
+9 -55
View File
@@ -1,13 +1,14 @@
{ config, pkgs, lib, ... }:
{
imports = [
../../base.nix
../../common/metrics-exporters.nix
./hardware-configuration.nix
imports =
[
../../base.nix
../../common/metrics-exporters.nix
./hardware-configuration.nix
./desktop.nix
];
# Networking
networking = {
hostName = "sisko";
# networkmanager.enable = true;
@@ -22,25 +23,11 @@
};
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"
@@ -49,32 +36,6 @@
"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;
@@ -97,12 +58,7 @@
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;
@@ -115,7 +71,6 @@
virtualisation.docker.enable = true;
virtualisation.oci-containers.backend = "docker";
# Nix / meta
nixpkgs.config = {
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"discord"
@@ -130,7 +85,6 @@
rocmSupport = true;
};
sops.defaultSopsFile = ../../secrets/sisko/sisko.yaml;
services.fwupd.enable = true;
system.stateVersion = "24.11";
}
+70
View File
@@ -0,0 +1,70 @@
{ 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";
};
}
+18 -28
View File
@@ -4,12 +4,8 @@
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
@@ -45,10 +41,19 @@
snicat
# Window Manager Extras
bibata-cursors
cliphist
hyprcursor
hypridle
hyprlock
hyprpaper
hyprshot
nautilus
networkmanager
rofi-rbw-wayland
swaynotificationcenter
waybar
wl-clipboard
# Misc tools
abcde
@@ -90,7 +95,7 @@
rbw = {
enable = true;
settings = {
base_url = "https://pw.home.feal.no";
base_url = "https://pw.feal.no";
email = "felix@albrigtsen.it";
pinentry = pkgs.pinentry-gnome3;
};
@@ -99,7 +104,6 @@
enable = true;
theme = "iggy";
};
waybar.enable = true;
zsh = {
shellAliases."rebuild" = "sudo nixos-rebuild switch --flake /config";
prezto.pmodules = [ "ssh" ];
@@ -107,8 +111,6 @@
};
services = {
gnome-keyring.enable = true;
mpd = let
home = config.home.homeDirectory;
in {
@@ -125,29 +127,17 @@
};
};
# Dark mode
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
home.pointerCursor = {
name = "Bibata-Modern-Ice";
package = pkgs.bibata-cursors;
size = 24;
gtk.enable = true;
x11 = {
enable = true;
defaultCursor = true;
};
};
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;