refactoring in to modules and things, color changes, niri testing

This commit is contained in:
Markus Heurung 2025-04-07 16:27:11 +02:00
parent 585438f1ce
commit 326acd2c65
9 changed files with 366 additions and 167 deletions

108
flake.lock generated
View file

@ -399,6 +399,64 @@
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz"
}
},
"niri": {
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1743943715,
"narHash": "sha256-9xCTf79Naq7mxvqtjgbcU9ZlNwubAep0qlwrL3GqZQQ=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "f53eac2ea3c72dd4e9739228660f661eb27359d0",
"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": 1743923080,
"narHash": "sha256-Hb3t6FoJycnqIZmu3c6K1bJGndBsrDw8IQtM2ieLbzU=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "430b155929a60644ea223012ee0c1389fc5e3755",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1742422364,
@ -414,6 +472,22 @@
"type": "indirect"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1743813633,
"narHash": "sha256-BgkBz4NpV6Kg8XF7cmHDHRVGZYnKbvG0Y4p+jElwxaM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7819a0d29d1dd2bc331bec4b327f0776359b1fa6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
@ -486,6 +560,7 @@
"inputs": {
"home-manager": "home-manager",
"lix-module": "lix-module",
"niri": "niri",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim",
"sops-nix": "sops-nix",
@ -697,6 +772,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": 1743346993,
"narHash": "sha256-i7rWd/5BcqLgQEtB5L/6gKN5R5GUJcmm34F+iBivH60=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "45c055696437a08e3989d9b91d9c617b84cc2bc3",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github"
}
}
},
"root": "root",

View file

@ -2,13 +2,11 @@
description = "muhh configs for all nix managed things";
inputs = {
# nixpkgs.url = "nixpkgs/release-24.05";
nixpkgs.url = "nixpkgs/nixos-unstable";
# hardware.url = "nixos/nixos-hardware";
home-manager = {
# url = "github:nix-community/home-manager/release-24.05";
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -18,6 +16,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
@ -44,9 +47,10 @@
nixpkgs,
home-manager,
lix-module,
niri,
nixvim,
sops-nix,
stylix,
nixvim,
# secret-config,
...
} @ inputs: let
@ -59,9 +63,10 @@
cube = lib.nixosSystem {
inherit system;
modules = [
./hosts/cube.nix
lix-module.nixosModules.default
sops-nix.nixosModules.sops
niri.nixosModules.niri
./hosts/cube.nix
];
};
muhhStar = lib.nixosSystem {
@ -90,6 +95,7 @@
];
};
modules = [
niri.homeModules.niri
nixvim.homeManagerModules.nixvim
sops-nix.homeManagerModules.sops
stylix.homeManagerModules.stylix

139
home.nix
View file

@ -2,6 +2,7 @@
{
imports = [
modules/gnome
modules/niri
modules/sway
];
@ -15,6 +16,7 @@
_1password-cli
_1password-gui
atkinson-hyperlegible
atkinson-monolegible
alacritty
blueman
brightnessctl
@ -49,9 +51,11 @@
pamixer
pavucontrol
powertop
prettyping
qutebrowser
rclone
rockbox-utility
rose-pine-cursor
signal-desktop
solargraph
sops
@ -66,8 +70,6 @@
wl-clipboard
wl-mirror
sway-launcher-desktop
swaynotificationcenter
swayosd
vivaldi
xdg-utils
zellij
@ -123,6 +125,7 @@
};
};
};
programs = {
atuin = {
enable = true;
@ -157,13 +160,9 @@
};
fish = {
enable = true;
loginShellInit = ''
# if test (tty) = /dev/tty1
# exec sway
# end
'';
shellAliases = {
cat = "bat";
ping = "prettyping";
};
};
fzf = {
@ -462,7 +461,6 @@
enable = true;
enableFishIntegration = true;
};
swaylock.enable = true;
waybar = {
enable = true;
systemd.enable = true;
@ -554,31 +552,6 @@
};
gnome-keyring.enable = true;
playerctld.enable = true;
swayidle = {
enable = true;
events = [
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
];
timeouts = [
{
timeout = 300;
command = "${pkgs.swaylock}/bin/swaylock -fF";
}
{
timeout = 330;
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
}
];
};
swaync = {
enable = true;
};
swayosd = {
enable = true;
display = "DP-1";
};
syncthing = {
enable = true;
# dataDir = "/home/muhh/Sync";
@ -606,11 +579,19 @@
polarity = "dark";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-city-terminal-dark.yaml";
base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml";
#base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml";
base16Scheme = ./share/themes/flexoki-light.yaml;
cursor = {
name = "Rosé Pine";
package = pkgs.rose-pine-cursor;
size = 48;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.iosevka;
name = "Iosevka Nerd Font";
# package = pkgs.atkinson-monolegible;
# name = "Atkinson Monolegible";
};
sizes = {
terminal = 14;
@ -618,96 +599,6 @@
};
};
wayland.windowManager = {
sway = {
enable = true;
extraConfig = ''
smart_gaps inverse_outer
'';
config = {
bars = [];
window = {
commands = [
{
command = "floating enable, sticky enable, resize set 20 ppt 40 ppt, border pixel 10";
criteria = {
app_id = "^launcher";
};
}
];
};
gaps = {
inner = 30;
vertical = 50;
horizontal = 400;
# smartGaps = true;
smartBorders = "on";
};
input = {
"type:keyboard" = {
xkb_layout = "eu";
xkb_options = "compose:rwin";
};
"type:touchpad" = {
tap = "enabled";
natural_scroll = "enabled";
dwt = "enabled";
accel_profile = "adaptive";
pointer_accel = "0.5";
};
};
keybindings = let
modifier = config.wayland.windowManager.sway.config.modifier;
in lib.mkOptionDefault {
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86MonBrightnessUp" = "exec brightnessctl set 10%+";
"XF86MonBrightnessDown" = "exec brightnessctl set 10%-";
"XF86AudioPlay" = "exec playerctl play-pause";
"XF86AudioNext" = "exec playerctl next";
"XF86AudioPrev" = "exec playerctl previous";
"${modifier}+o" = "for_window [class=obsidian] scratchpad show";
};
menu = "kitty --app-id launcher -e sway-launcher-desktop";
modifier = "Mod4";
output = {
DP-1 = {
resolution = "3840x2160@30Hz";
position = "1280 0";
# background = "/home/muhh/Sync/Backgrounds/wald.jpg fill";
scale = "1.5";
};
HDMI-A-1 = {
resolution = "1920x1080@60.000Hz";
transform = "180";
position = "0 0";
scale = "1.5";
# background = "/home/muhh/Sync/Backgrounds/pfuetze.jpg fill";
};
};
seat = {
"*" = {
hide_cursor = "5000";
};
};
terminal = "kitty";
window = {
titlebar = false;
};
workspaceOutputAssign =
map (x: {
workspace = x;
output = "DP-1";
}) ["1" "2" "3" "4" "5" "6" "7"]
++ map (x: {
workspace = x;
output = "HDMI-A-1";
}) ["8" "9" "10"];
};
wrapperFeatures.gtk = true;
};
};
# catppuccin = {
# enable = true;
# flavor = "mocha";

View file

@ -29,7 +29,6 @@
networking.networkmanager.enable = true;
networking.hosts = {
# "178.63.121.197" = ["www.boell.de"];
"127.0.0.1" = ["muhh.local"];
};
@ -55,6 +54,19 @@
openFirewall = true;
};
services.envfs.enable = true;
services.xserver.displayManager = {
gdm = {
enable = true;
};
};
services.displayManager = {
# defaultSession = "niri";
ly = {
enable = false;
settings = {};
};
};
services.flatpak.enable = true;
services.fwupd.enable = true;
services.openssh = {
@ -78,6 +90,9 @@
user = "plex";
group = "plex";
};
services.jellyfin = {
enable = true;
};
services.tailscale = {
enable = true;
@ -117,14 +132,13 @@
toolbox
vim
wget
# ] ++ [
# inputs.zen-browser.packages.x86_64-linux.default
];
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
atkinson-hyperlegible
atkinson-monolegible
nerd-fonts.iosevka
# secret-config.packages.x86_64-linux.default
];

View file

@ -1,2 +1 @@
{
}
{}

View file

@ -1,9 +1,14 @@
{ lib, config, pkgs, home, ... }:
{
home.packages = with pkgs; [
xwayland-satellite
];
programs.niri = {
enable = true;
settings = {
environment = {
"DISPLAY" = ":0";
"NIXOS_OZONE_WL" = "1";
"QT_QPA_PLATFORM" = "wayland";
};
@ -23,8 +28,9 @@
"Mod+Shift+Slash".action.show-hotkey-overlay = {};
# Suggested binds for running programs: terminal, app launcher, screen locker.
"Mod+T".action.spawn = "alacritty";
# "Mod+T".action.spawn = "alacritty";
"Mod+D".action.spawn = "fuzzel";
"Mod+Return".action.spawn = "kitty";
"Super+Alt+L".action.spawn = "swaylock";
# You can also use a shell. Do this if you need pipes, multiple commands, etc.
@ -61,14 +67,14 @@
"Mod+K".action.focus-window-up = {};
"Mod+L".action.focus-column-right = {};
"Mod+Ctrl+Left".action.move-column-left = {};
"Mod+Ctrl+Down".action.move-window-down = {};
"Mod+Ctrl+Up".action.move-window-up = {};
"Mod+Ctrl+Right".action.move-column-right = {};
"Mod+Ctrl+H".action.move-column-left = {};
"Mod+Ctrl+J".action.move-window-down = {};
"Mod+Ctrl+K".action.move-window-up = {};
"Mod+Ctrl+L".action.move-column-right = {};
"Mod+Shift+Left".action.move-column-left = {};
"Mod+Shift+Down".action.move-window-down = {};
"Mod+Shift+Up".action.move-window-up = {};
"Mod+Shift+Right".action.move-column-right = {};
"Mod+Shift+H".action.move-column-left = {};
"Mod+Shift+J".action.move-window-down = {};
"Mod+Shift+K".action.move-window-up = {};
"Mod+Shift+L".action.move-column-right = {};
# Alternative commands that move across workspaces when reaching
# the first or last window in a column.
@ -82,14 +88,14 @@
"Mod+Ctrl+Home".action.move-column-to-first = {};
"Mod+Ctrl+End".action.move-column-to-last = {};
"Mod+Shift+Left".action.focus-monitor-left = {};
"Mod+Shift+Down".action.focus-monitor-down = {};
"Mod+Shift+Up".action.focus-monitor-up = {};
"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+Ctrl+Left".action.focus-monitor-left = {};
"Mod+Ctrl+Down".action.focus-monitor-down = {};
"Mod+Ctrl+Up".action.focus-monitor-up = {};
"Mod+Ctrl+Right".action.focus-monitor-right = {};
"Mod+Ctrl+H".action.focus-monitor-left = {};
"Mod+Ctrl+J".action.focus-monitor-down = {};
"Mod+Ctrl+K".action.focus-monitor-up = {};
"Mod+Ctrl+L".action.focus-monitor-right = {};
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = {};
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = {};
@ -112,19 +118,19 @@
"Mod+Page_Up".action.focus-workspace-up = {};
"Mod+U".action.focus-workspace-down = {};
"Mod+I".action.focus-workspace-up = {};
"Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = {};
"Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = {};
"Mod+Ctrl+U".action.move-column-to-workspace-down = {};
"Mod+Ctrl+I".action.move-column-to-workspace-up = {};
"Mod+Shift+Page_Down".action.move-column-to-workspace-down = {};
"Mod+Shift+Page_Up".action.move-column-to-workspace-up = {};
"Mod+Shift+U".action.move-column-to-workspace-down = {};
"Mod+Shift+I".action.move-column-to-workspace-up = {};
# Alternatively, there are commands to move just a single window:
# Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
# ...
"Mod+Shift+Page_Down".action.move-workspace-down = {};
"Mod+Shift+Page_Up".action.move-workspace-up = {};
"Mod+Shift+U".action.move-workspace-down = {};
"Mod+Shift+I".action.move-workspace-up = {};
"Mod+Ctrl+Page_Down".action.move-workspace-down = {};
"Mod+Ctrl+Page_Up".action.move-workspace-up = {};
"Mod+Ctrl+U".action.move-workspace-down = {};
"Mod+Ctrl+I".action.move-workspace-up = {};
# You can bind mouse wheel scroll ticks using the following syntax.
# These binds will change direction based on the natural-scroll setting.
@ -187,15 +193,15 @@
"Mod+7".action.focus-workspace = 7;
"Mod+8".action.focus-workspace = 8;
"Mod+9".action.focus-workspace = 9;
"Mod+Ctrl+1".action.move-column-to-workspace = 1;
"Mod+Ctrl+2".action.move-column-to-workspace = 2;
"Mod+Ctrl+3".action.move-column-to-workspace = 3;
"Mod+Ctrl+4".action.move-column-to-workspace = 4;
"Mod+Ctrl+5".action.move-column-to-workspace = 5;
"Mod+Ctrl+6".action.move-column-to-workspace = 6;
"Mod+Ctrl+7".action.move-column-to-workspace = 7;
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
"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;
# Alternatively, there are commands to move just a single window:
# Mod+Ctrl+1 { move-window-to-workspace 1; }
@ -261,12 +267,20 @@
};
};
outputs = {
"DP-1" = {
position = { x = 0; y = 0; };
scale = 1.3334;
};
"HDMI-A-1" = {
position = { x = 1920; y = 0; };
transform = {
flipped = true;
};
};
};
spawn-at-startup = [
{ command = [ "xwayland-satellite" ]; }
];
};
};
}

View file

@ -0,0 +1,123 @@
{ lib, config, pkgs, ... }:
{
programs = {
swaylock.enable = true;
};
services = {
swayidle = {
enable = true;
events = [
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
];
timeouts = [
{
timeout = 300;
command = "${pkgs.swaylock}/bin/swaylock -fF";
}
{
timeout = 330;
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
}
];
};
swaync = {
enable = true;
};
swayosd = {
enable = true;
display = "DP-1";
};
};
wayland.windowManager = {
sway = {
enable = true;
extraConfig = ''
smart_gaps inverse_outer
'';
config = {
bars = [];
window = {
commands = [
{
command = "floating enable, sticky enable, resize set 20 ppt 40 ppt, border pixel 10";
criteria = {
app_id = "^launcher";
};
}
];
};
gaps = {
inner = 30;
vertical = 50;
horizontal = 400;
# smartGaps = true;
smartBorders = "on";
};
input = {
"type:keyboard" = {
xkb_layout = "eu";
xkb_options = "compose:rwin";
};
"type:touchpad" = {
tap = "enabled";
natural_scroll = "enabled";
dwt = "enabled";
accel_profile = "adaptive";
pointer_accel = "0.5";
};
};
keybindings = let
modifier = config.wayland.windowManager.sway.config.modifier;
in lib.mkOptionDefault {
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86MonBrightnessUp" = "exec brightnessctl set 10%+";
"XF86MonBrightnessDown" = "exec brightnessctl set 10%-";
"XF86AudioPlay" = "exec playerctl play-pause";
"XF86AudioNext" = "exec playerctl next";
"XF86AudioPrev" = "exec playerctl previous";
"${modifier}+o" = "for_window [class=obsidian] scratchpad show";
};
menu = "kitty --app-id launcher -e sway-launcher-desktop";
modifier = "Mod4";
output = {
DP-1 = {
resolution = "3840x2160@30Hz";
position = "1280 0";
# background = "/home/muhh/Sync/Backgrounds/wald.jpg fill";
scale = "1.5";
};
HDMI-A-1 = {
resolution = "1920x1080@60.000Hz";
transform = "180";
position = "0 0";
scale = "1.5";
# background = "/home/muhh/Sync/Backgrounds/pfuetze.jpg fill";
};
};
seat = {
"*" = {
hide_cursor = "5000";
};
};
terminal = "kitty";
window = {
titlebar = false;
};
workspaceOutputAssign =
map (x: {
workspace = x;
output = "DP-1";
}) ["1" "2" "3" "4" "5" "6" "7"]
++ map (x: {
workspace = x;
output = "HDMI-A-1";
}) ["8" "9" "10"];
};
wrapperFeatures.gtk = true;
};
};
}

View file

@ -0,0 +1,22 @@
scheme: "Flexoki Dark"
author: "Kepano"
base00: "#100F0F" # Background
base01: "#1C1B1A" # Background 2
base02: "#282726" # UI background / selection
base03: "#575653" # Comments
base04: "#878580" # Operators / Inactive
base05: "#CECDC3" # Default foreground
base06: "#DAD8CE" # Light fg 1
base07: "#FFFCF0" # Light fg 2
# Base16 semantic colors (mapped from official values)
base08: "#AF3029" # Red (e.g. errors)
base09: "#BC5215" # Orange (e.g. control keywords)
base0A: "#AD8301" # Yellow (e.g. constants)
base0B: "#66800B" # Green (e.g. strings)
base0C: "#24837B" # Cyan (e.g. punctuation)
base0D: "#205EA6" # Blue (e.g. functions)
base0E: "#5E409D" # Purple (e.g. types)
base0F: "#A02F6F" # Magenta (e.g. special built-ins)

View file

@ -0,0 +1,22 @@
scheme: "Flexoki Light"
author: "Kepano"
base00: "#FFFCF0" # background (paper)
base01: "#F2F0E5" # subtle background
base02: "#E6E4D9" # selection bg / alt bg
base03: "#DAD8CE" # comments
base04: "#878580" # midtone (e.g. inactive UI)
base05: "#403E3C" # default text
base06: "#2F2E2D" # strong text
base07: "#1C1B1A" # strongest text
# Semantic colors — taken from official sources
base08: "#AF3029" # red (errors)
base09: "#BC5215" # orange (keywords)
base0A: "#AD8301" # yellow (constants, numbers)
base0B: "#66800B" # green (strings)
base0C: "#24837B" # cyan (punctuation, operators)
base0D: "#205EA6" # blue (functions)
base0E: "#5E409D" # purple (types)
base0F: "#A02F6F" # magenta (special/built-ins)