Compare commits
No commits in common. "4386de1eba8f6e94effeff99db91130392aaeb48" and "6956361274182d5381ccf25d0ee4b896964ddefd" have entirely different histories.
4386de1eba
...
6956361274
22 changed files with 26 additions and 594 deletions
|
@ -65,7 +65,6 @@
|
||||||
hyprlock = flake "github:hyprwm/hyprlock" // unstable "nixpkgs";
|
hyprlock = flake "github:hyprwm/hyprlock" // unstable "nixpkgs";
|
||||||
hyprpaper = flake "github:hyprwm/hyprpaper" // unstable "nixpkgs";
|
hyprpaper = flake "github:hyprwm/hyprpaper" // unstable "nixpkgs";
|
||||||
hyprpicker = flake "github:hyprwm/hyprpicker" // unstable "nixpkgs";
|
hyprpicker = flake "github:hyprwm/hyprpicker" // unstable "nixpkgs";
|
||||||
niri = flake "github:sodiboo/niri-flake" // unstable "nixpkgs";
|
|
||||||
nix-flatpak = flake "github:gmodena/nix-flatpak?ref=v0.5.1";
|
nix-flatpak = flake "github:gmodena/nix-flatpak?ref=v0.5.1";
|
||||||
nix-vscode-extensions = flake "github:nix-community/nix-vscode-extensions" // unstable "nixpkgs";
|
nix-vscode-extensions = flake "github:nix-community/nix-vscode-extensions" // unstable "nixpkgs";
|
||||||
nixd = flake "github:nix-community/nixd" // unstable "nixpkgs";
|
nixd = flake "github:nix-community/nixd" // unstable "nixpkgs";
|
||||||
|
@ -132,7 +131,6 @@
|
||||||
inputs.arion.nixosModules.arion
|
inputs.arion.nixosModules.arion
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.fw-fanctrl.nixosModules.default
|
inputs.fw-fanctrl.nixosModules.default
|
||||||
inputs.niri.nixosModules.niri
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.${config.custom.username}.imports = [
|
home-manager.users.${config.custom.username}.imports = [
|
||||||
|
|
110
flake.lock
generated
110
flake.lock
generated
|
@ -1744,64 +1744,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"niri": {
|
|
||||||
"inputs": {
|
|
||||||
"niri-stable": "niri-stable",
|
|
||||||
"niri-unstable": "niri-unstable",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs-unstable"
|
|
||||||
],
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable_4",
|
|
||||||
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
|
||||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1734836603,
|
|
||||||
"narHash": "sha256-aRB/OEMtWwv1fVMhIJdGzt1emRrn001AamOtsXglAU0=",
|
|
||||||
"owner": "sodiboo",
|
|
||||||
"repo": "niri-flake",
|
|
||||||
"rev": "9afc24d82ebabdd2b0b7dba8a5f1ce1b42a81fc1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "sodiboo",
|
|
||||||
"repo": "niri-flake",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"niri-stable": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731483594,
|
|
||||||
"narHash": "sha256-Qjf7alRbPPERfiZsM9EMKX+HwjESky1tieh5PJIkLwE=",
|
|
||||||
"owner": "YaLTeR",
|
|
||||||
"repo": "niri",
|
|
||||||
"rev": "75c79116a7e40cbc0e110ce0cdd500e896458679",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "YaLTeR",
|
|
||||||
"ref": "v0.1.10.1",
|
|
||||||
"repo": "niri",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"niri-unstable": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1734725239,
|
|
||||||
"narHash": "sha256-ItBmHHSikVrkkh2wD6U0A8pxG1Tk0s90pH9RlK9OB/A=",
|
|
||||||
"owner": "YaLTeR",
|
|
||||||
"repo": "niri",
|
|
||||||
"rev": "b014c267ae199f7022bf691333e64ad6d05907f1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "YaLTeR",
|
|
||||||
"repo": "niri",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix": {
|
"nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_4",
|
"flake-compat": "flake-compat_4",
|
||||||
|
@ -2179,22 +2121,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_4": {
|
"nixpkgs-stable_4": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1734529975,
|
|
||||||
"narHash": "sha256-ze3IJksru9dN0keqUxY0WNf8xrwfs8Ty/z9v/keyBbg=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "72d11d40b9878a67c38f003c240c2d2e1811e72a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-24.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable_5": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733730953,
|
"lastModified": 1733730953,
|
||||||
"narHash": "sha256-dlK7n82FEyZlHH7BFHQAM5tua+lQO1Iv7aAtglc1O5s=",
|
"narHash": "sha256-dlK7n82FEyZlHH7BFHQAM5tua+lQO1Iv7aAtglc1O5s=",
|
||||||
|
@ -2390,14 +2316,13 @@
|
||||||
"hyprpicker": "hyprpicker",
|
"hyprpicker": "hyprpicker",
|
||||||
"jovian-nixos": "jovian-nixos",
|
"jovian-nixos": "jovian-nixos",
|
||||||
"lifx-cli": "lifx-cli",
|
"lifx-cli": "lifx-cli",
|
||||||
"niri": "niri",
|
|
||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
"nix-index-database-stable": "nix-index-database-stable",
|
"nix-index-database-stable": "nix-index-database-stable",
|
||||||
"nix-index-database-unstable": "nix-index-database-unstable",
|
"nix-index-database-unstable": "nix-index-database-unstable",
|
||||||
"nix-vscode-extensions": "nix-vscode-extensions",
|
"nix-vscode-extensions": "nix-vscode-extensions",
|
||||||
"nixd": "nixd",
|
"nixd": "nixd",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_5",
|
"nixpkgs-stable": "nixpkgs-stable_4",
|
||||||
"nixpkgs-staging-next": "nixpkgs-staging-next",
|
"nixpkgs-staging-next": "nixpkgs-staging-next",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"steamtinkerlaunch": "steamtinkerlaunch",
|
"steamtinkerlaunch": "steamtinkerlaunch",
|
||||||
|
@ -2730,39 +2655,6 @@
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"xwayland-satellite-stable": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1730166465,
|
|
||||||
"narHash": "sha256-nq7bouXQXaaPPo/E+Jbq+wNHnatD4dY8OxSrRqzvy6s=",
|
|
||||||
"owner": "Supreeeme",
|
|
||||||
"repo": "xwayland-satellite",
|
|
||||||
"rev": "a713cf46cb7db84a0d1b57c3a397c610cad3cf98",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "Supreeeme",
|
|
||||||
"ref": "v0.5",
|
|
||||||
"repo": "xwayland-satellite",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"xwayland-satellite-unstable": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1734745564,
|
|
||||||
"narHash": "sha256-JQNl4pqonVVPQ2JzEOLUcPVRNj//FFFNRDyvQoOkG7s=",
|
|
||||||
"owner": "Supreeeme",
|
|
||||||
"repo": "xwayland-satellite",
|
|
||||||
"rev": "94da1af75326d89ecb12aba0cc9362e93ffdc766",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "Supreeeme",
|
|
||||||
"repo": "xwayland-satellite",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
@ -95,10 +95,6 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
url = "github:Rawa/lifx-cli";
|
url = "github:Rawa/lifx-cli";
|
||||||
};
|
};
|
||||||
niri = {
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
||||||
url = "github:sodiboo/niri-flake";
|
|
||||||
};
|
|
||||||
nix-flatpak.url = "github:gmodena/nix-flatpak?ref=v0.5.1";
|
nix-flatpak.url = "github:gmodena/nix-flatpak?ref=v0.5.1";
|
||||||
nix-index-database-stable = {
|
nix-index-database-stable = {
|
||||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||||
|
|
|
@ -54,19 +54,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${config.custom.username} = {
|
home-manager.users.${config.custom.username} = {
|
||||||
programs.niri.settings.outputs = {
|
|
||||||
"eDP-1" = {
|
|
||||||
background-color = "#073642";
|
|
||||||
|
|
||||||
mode = with config.custom; {
|
|
||||||
inherit width height;
|
|
||||||
refresh = refresh + 0.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
scale = config.custom.scale;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
device = [
|
device = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@ in {
|
||||||
# TODO: Use option for border size
|
# TODO: Use option for border size
|
||||||
border = mkOption {default = 2;};
|
border = mkOption {default = 2;};
|
||||||
|
|
||||||
gap = mkOption {default = 15;};
|
gap = mkOption {default = 5;};
|
||||||
padding = mkOption {default = 51;}; # ?? journalctl --user -u waybar.service | grep height:
|
padding = mkOption {default = 51;}; # ?? journalctl --user -u waybar.service | grep height:
|
||||||
rounding = mkOption {default = 10;};
|
rounding = mkOption {default = 10;};
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ with lib; {
|
||||||
#// gnome.enable = true;
|
#// gnome.enable = true;
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
#// kde.enable = true;
|
#// kde.enable = true;
|
||||||
niri.enable = true;
|
|
||||||
#// sway.enable = true;
|
#// sway.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,16 @@ in {
|
||||||
options.custom.desktops.hyprland.binds.enable = mkOption {default = false;};
|
options.custom.desktops.hyprland.binds.enable = mkOption {default = false;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
age.secrets = let
|
||||||
|
secret = filename: {
|
||||||
|
file = "${inputs.self}/secrets/${filename}";
|
||||||
|
owner = config.custom.username;
|
||||||
|
group = "users";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
"desktop/vm/myndows.pass" = secret "desktop/vm/myndows.pass";
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users.${config.custom.username} = {
|
home-manager.users.${config.custom.username} = {
|
||||||
wayland.windowManager.hyprland.settings = let
|
wayland.windowManager.hyprland.settings = let
|
||||||
# Reverse mods and key for alphabetical sorting
|
# Reverse mods and key for alphabetical sorting
|
||||||
|
|
|
@ -1,125 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
audio = "~/.local/bin/audio";
|
|
||||||
cat = "${pkgs.coreutils}/bin/cat";
|
|
||||||
clipse = "${pkgs.clipse}/bin/clipse";
|
|
||||||
codium = "${config.home-manager.users.${config.custom.username}.programs.vscode.package}/bin/codium";
|
|
||||||
gnome-text-editor = "${pkgs.gnome-text-editor}/bin/gnome-text-editor";
|
|
||||||
hyprlock = "${config.home-manager.users.${config.custom.username}.programs.hyprlock.package}/bin/hyprlock";
|
|
||||||
hyprpicker = "${pkgs.hyprpicker}/bin/hyprpicker";
|
|
||||||
inhibit = config.home-manager.users.${config.custom.username}.home.file.".local/bin/inhibit".source;
|
|
||||||
jq = "${pkgs.jq}/bin/jq";
|
|
||||||
kill = "${pkgs.procps}/bin/kill";
|
|
||||||
kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty";
|
|
||||||
left = config.home-manager.users.${config.custom.username}.home.file.".local/bin/left".source;
|
|
||||||
libreoffice = "${config.custom.programs.libreoffice.package}/bin/libreoffice";
|
|
||||||
loginctl = "${pkgs.systemd}/bin/loginctl";
|
|
||||||
menu = config.home-manager.users.${config.custom.username}.home.file.".local/bin/menu".source;
|
|
||||||
nautilus = "${pkgs.nautilus}/bin/nautilus";
|
|
||||||
networkmanager_dmenu = "${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu";
|
|
||||||
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
|
||||||
niri = "${config.programs.niri.package}/bin/niri";
|
|
||||||
obsidian = "${pkgs.obsidian}/bin/obsidian";
|
|
||||||
onlyoffice-desktopeditors = "${pkgs.onlyoffice-bin}/bin/onlyoffice-desktopeditors --system-title-bar --xdg-desktop-portal";
|
|
||||||
pkill = "${pkgs.procps}/bin/pkill";
|
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
|
||||||
power = config.home-manager.users.${config.custom.username}.home.file.".local/bin/power".source;
|
|
||||||
remote = config.home-manager.users.${config.custom.username}.home.file.".local/bin/remote".source;
|
|
||||||
rofi-rbw = "${pkgs.rofi-rbw}/bin/rofi-rbw";
|
|
||||||
rm = "${pkgs.coreutils}/bin/rm";
|
|
||||||
sleep = "${pkgs.coreutils}/bin/sleep";
|
|
||||||
smile = "${pkgs.smile}/bin/smile";
|
|
||||||
steam = "${config.programs.steam.package}/bin/steam";
|
|
||||||
swayosd-client = "${pkgs.swayosd}/bin/swayosd-client";
|
|
||||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
|
||||||
toggle = "~/.local/bin/toggle";
|
|
||||||
virt-manager = "${config.programs.virt-manager.package}/bin/virt-manager";
|
|
||||||
vrr = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vrr".source;
|
|
||||||
walker = "${config.home-manager.users.${config.custom.username}.programs.walker.package}/bin/walker";
|
|
||||||
waydroid = "${pkgs.waydroid}/bin/waydroid";
|
|
||||||
window = config.home-manager.users.${config.custom.username}.home.file.".local/bin/window".source;
|
|
||||||
workspace = config.home-manager.users.${config.custom.username}.home.file.".local/bin/workspace".source;
|
|
||||||
zoom = config.home-manager.users.${config.custom.username}.home.file.".local/bin/zoom".source;
|
|
||||||
|
|
||||||
cfg = config.custom.desktops.niri.binds;
|
|
||||||
in {
|
|
||||||
options.custom.desktops.niri.binds = {
|
|
||||||
enable = mkOption {default = false;};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
home-manager.users.${config.custom.username} = {
|
|
||||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Key-Bindings
|
|
||||||
#?? Mod = Super/Win, Alt when nested; Mod5 = AltGr
|
|
||||||
#?? wev
|
|
||||||
programs.niri.settings.binds = let
|
|
||||||
# Swap modifiers and key for alphabetical sorting
|
|
||||||
#?? (key "KEY" "MODIFIERS" (ACTION "ARGUMENT"))
|
|
||||||
key = key: modifiers: action: {
|
|
||||||
name = "${
|
|
||||||
if (isString modifiers)
|
|
||||||
then "${modifiers}+"
|
|
||||||
else ""
|
|
||||||
}${key}";
|
|
||||||
value = {inherit action;};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
listToAttrs (with config.home-manager.users.${config.custom.username}.lib.niri.actions; [
|
|
||||||
(key "0" "Mod" (spawn [swayosd-client "--output-volume" "mute-toggle"]))
|
|
||||||
(key "A" "Mod" focus-column-or-monitor-left)
|
|
||||||
(key "A" "Mod+Shift" move-column-left-or-to-monitor-left)
|
|
||||||
(key "Apostrophe" "Mod" screenshot)
|
|
||||||
(key "Apostrophe" "Mod+Ctrl+Shift" screenshot-screen)
|
|
||||||
(key "Apostrophe" "Mod+Shift" screenshot-window)
|
|
||||||
(key "Backslash" "Mod" (spawn inhibit))
|
|
||||||
(key "Bracketleft" "Mod" (switch-layout "prev"))
|
|
||||||
(key "Bracketright" "Mod" (switch-layout "next"))
|
|
||||||
(key "Delete" "Ctrl+Alt" quit)
|
|
||||||
(key "Delete" "Mod" (spawn [playerctl] "play-pause"))
|
|
||||||
(key "Down" "Mod" (spawn [swayosd-client "--brightness" "lower"]))
|
|
||||||
(key "Equal" "Mod" (spawn [swayosd-client "--output-volume" "raise"]))
|
|
||||||
(key "L" "Mod+Shift" suspend)
|
|
||||||
(key "L" "Mod" (spawn [hyprlock "--immediate" "&" niri "msg" "power-off-monitors"]))
|
|
||||||
(key "Left" "Mod" (spawn [playerctl "previous"]))
|
|
||||||
(key "Minus" "Mod" (spawn [swayosd-client "--output-volume" "lower"]))
|
|
||||||
(key "Q" "Mod" close-window)
|
|
||||||
(key "R" "Mod" focus-window-or-workspace-down)
|
|
||||||
(key "R" "Mod+Shift" move-window-down-or-to-workspace-down)
|
|
||||||
(key "Return" "Mod" maximize-column)
|
|
||||||
(key "Return" "Mod+Shift" fullscreen-window)
|
|
||||||
(key "Right" "Mod" (spawn [playerctl "next"]))
|
|
||||||
(key "S" "Mod" focus-column-or-monitor-right)
|
|
||||||
(key "S" "Mod+Shift" move-column-right-or-to-monitor-right)
|
|
||||||
(key "Slash" "Mod+Shift" show-hotkey-overlay)
|
|
||||||
(key "T" "Mod" (spawn kitty))
|
|
||||||
(key "Up" "Mod" (spawn [swayosd-client "--brightness" "raise"]))
|
|
||||||
(key "W" "Mod" focus-window-or-workspace-up)
|
|
||||||
(key "W" "Mod+Shift" move-window-up-or-to-workspace-up)
|
|
||||||
(key "X" "Mod" switch-preset-column-width)
|
|
||||||
(key "Z" "Mod" switch-preset-window-height)
|
|
||||||
|
|
||||||
# BUG: Release binds execute with all binds involving that modifier
|
|
||||||
# https://github.com/YaLTeR/niri/issues/605
|
|
||||||
#// (key "Super_L" "Mod" spawn menu)
|
|
||||||
(key "Space" "Mod" (spawn menu))
|
|
||||||
|
|
||||||
# Media keys
|
|
||||||
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
|
||||||
(key "XF86AudioMute" null (spawn [swayosd-client "--output-volume" "mute-toggle"])) # F1
|
|
||||||
(key "XF86AudioLowerVolume" null (spawn [swayosd-client "--output-volume" "lower"])) # F2
|
|
||||||
(key "XF86AudioRaiseVolume" null (spawn [swayosd-client "--output-volume" "raise"])) # F3
|
|
||||||
(key "XF86AudioPrev" null (spawn [playerctl "previous"])) # F4
|
|
||||||
(key "XF86AudioPlay" null (spawn [playerctl "play-pause"])) # F5
|
|
||||||
(key "XF86AudioNext" null (spawn [playerctl "next"])) # F6
|
|
||||||
(key "XF86MonBrightnessDown" null (spawn [swayosd-client "--brightness" "lower"])) # F7
|
|
||||||
(key "XF86MonBrightnessUp" null (spawn [swayosd-client "--brightness" "raise"])) # F8
|
|
||||||
(key "XF86AudioMedia" null (spawn [notify-send "test"])) # F12
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.custom.desktops.niri;
|
|
||||||
in {
|
|
||||||
options.custom.desktops.niri = {
|
|
||||||
enable = mkOption {default = false;};
|
|
||||||
xwayland = mkOption {default = true;};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
custom.desktops.niri = mkIf config.custom.full {
|
|
||||||
binds.enable = true;
|
|
||||||
input.enable = true;
|
|
||||||
layout.enable = true;
|
|
||||||
misc.enable = true;
|
|
||||||
rules.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# https://github.com/YaLTeR/niri
|
|
||||||
# https://github.com/sodiboo/niri-flake
|
|
||||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md
|
|
||||||
programs.niri = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.niri; # nixpkgs
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.overlays = [inputs.niri.overlays.niri];
|
|
||||||
|
|
||||||
#!! Disabled bundled KDE polkit agent
|
|
||||||
# https://github.com/sodiboo/niri-flake?tab=readme-ov-file#additional-notes
|
|
||||||
systemd.user.services.niri-flake-polkit.enable = false;
|
|
||||||
|
|
||||||
# Enable rootless Xwayland
|
|
||||||
custom.services.xwayland-satellite.enable = cfg.xwayland;
|
|
||||||
|
|
||||||
home-manager.users.${config.custom.username} = {
|
|
||||||
programs.niri.package = config.programs.niri.package;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,56 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.custom.desktops.niri.input;
|
|
||||||
in {
|
|
||||||
options.custom.desktops.niri.input = {
|
|
||||||
enable = mkOption {default = false;};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
home-manager.users.${config.custom.username} = {
|
|
||||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Input
|
|
||||||
programs.niri.settings.input = {
|
|
||||||
keyboard = {
|
|
||||||
repeat-delay = 300;
|
|
||||||
repeat-rate = 40;
|
|
||||||
};
|
|
||||||
|
|
||||||
touchpad = {
|
|
||||||
accel-profile = "adaptive";
|
|
||||||
accel-speed = 0.3;
|
|
||||||
click-method = "clickfinger"; # Multi-finger click
|
|
||||||
dwt = true; # Disable while typing
|
|
||||||
dwtp = true; # Disable while trackpointing
|
|
||||||
scroll-factor = 0.5;
|
|
||||||
};
|
|
||||||
|
|
||||||
mouse = {
|
|
||||||
# BUG: Applies to trackball device, switch to "flat" when per-device configuration is supported
|
|
||||||
# https://github.com/YaLTeR/niri/issues/371
|
|
||||||
accel-profile = "adaptive";
|
|
||||||
|
|
||||||
accel-speed = 0.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
trackball = {
|
|
||||||
accel-profile = "adaptive";
|
|
||||||
accel-speed = 0.5;
|
|
||||||
middle-emulation = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
power-key-handling.enable = false;
|
|
||||||
|
|
||||||
focus-follows-mouse = {
|
|
||||||
enable = true;
|
|
||||||
max-scroll-amount = "70%";
|
|
||||||
};
|
|
||||||
|
|
||||||
workspace-auto-back-and-forth = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,66 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.custom.desktops.niri.layout;
|
|
||||||
in {
|
|
||||||
options.custom.desktops.niri.layout = {
|
|
||||||
enable = mkOption {default = false;};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
home-manager.users.${config.custom.username} = {
|
|
||||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
|
|
||||||
programs.niri.settings.layout = let
|
|
||||||
gap = config.custom.gap / 2;
|
|
||||||
in {
|
|
||||||
gaps = gap;
|
|
||||||
#// center-focused-column = "always";
|
|
||||||
always-center-single-column = true;
|
|
||||||
|
|
||||||
# TODO: Uncomment after next release > v1.10.1
|
|
||||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Layout#empty-workspace-above-first
|
|
||||||
#// empty-workspace-above-first = true;
|
|
||||||
|
|
||||||
preset-column-widths = [
|
|
||||||
{proportion = 0.5;}
|
|
||||||
{proportion = 0.3;}
|
|
||||||
{proportion = 1.0;}
|
|
||||||
{proportion = 0.7;} # Default
|
|
||||||
];
|
|
||||||
|
|
||||||
default-column-width = {proportion = 0.7;};
|
|
||||||
|
|
||||||
preset-window-heights = [
|
|
||||||
{proportion = 0.7;}
|
|
||||||
{proportion = 0.5;}
|
|
||||||
{proportion = 0.3;}
|
|
||||||
{proportion = 1.0;} # Default
|
|
||||||
];
|
|
||||||
|
|
||||||
border = {
|
|
||||||
enable = true;
|
|
||||||
width = config.custom.border;
|
|
||||||
active.color = "#d33682";
|
|
||||||
inactive.color = "#586e75";
|
|
||||||
};
|
|
||||||
|
|
||||||
focus-ring.enable = false;
|
|
||||||
|
|
||||||
insert-hint = {
|
|
||||||
enable = true;
|
|
||||||
display.color = "#d3368280";
|
|
||||||
};
|
|
||||||
|
|
||||||
struts = {
|
|
||||||
left = gap;
|
|
||||||
right = gap;
|
|
||||||
top = gap;
|
|
||||||
bottom = gap;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
niri = "${config.programs.niri.package}/bin/niri";
|
|
||||||
|
|
||||||
cfg = config.custom.desktops.niri.misc;
|
|
||||||
in {
|
|
||||||
options.custom.desktops.niri.misc = {
|
|
||||||
enable = mkOption {default = false;};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
home-manager.users.${config.custom.username} = {
|
|
||||||
programs.niri.settings = {
|
|
||||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous
|
|
||||||
|
|
||||||
# HACK: Inherit home-manager environment variables in lieu of upstream fix
|
|
||||||
# https://github.com/nix-community/home-manager/issues/2659
|
|
||||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous#environment
|
|
||||||
environment = mapAttrs (name: value: builtins.toString value) config.home-manager.users.${config.custom.username}.home.sessionVariables;
|
|
||||||
|
|
||||||
cursor = {
|
|
||||||
hide-after-inactive-ms = 1000 * 15; # Milliseconds
|
|
||||||
hide-when-typing = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
hotkey-overlay.skip-at-startup = true;
|
|
||||||
prefer-no-csd = true; # Electron windows have odd borders otherwise
|
|
||||||
|
|
||||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Switch-Events
|
|
||||||
switch-events = {
|
|
||||||
# Turn display off while inhibiting suspend
|
|
||||||
lid-close.action.spawn = [niri "msg" "action" "power-off-monitors"];
|
|
||||||
lid-open.action.spawn = [niri "msg" "action" "power-on-monitors"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.custom.desktops.niri.rules;
|
|
||||||
in {
|
|
||||||
options.custom.desktops.niri.rules = {
|
|
||||||
enable = mkOption {default = false;};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
home-manager.users.${config.custom.username} = {
|
|
||||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
|
||||||
programs.niri.settings.window-rules = [
|
|
||||||
{
|
|
||||||
geometry-corner-radius = let
|
|
||||||
radius = config.custom.rounding + 0.0; # Convert to float
|
|
||||||
in {
|
|
||||||
top-left = radius;
|
|
||||||
top-right = radius;
|
|
||||||
bottom-right = radius;
|
|
||||||
bottom-left = radius;
|
|
||||||
};
|
|
||||||
|
|
||||||
clip-to-geometry = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -32,7 +32,7 @@ in {
|
||||||
search.placeholder = "";
|
search.placeholder = "";
|
||||||
|
|
||||||
# HACK: Window client required to send Esc key on Hyprland
|
# HACK: Window client required to send Esc key on Hyprland
|
||||||
#// as_window = true; # Disable layer
|
as_window = true; # Disable layer
|
||||||
|
|
||||||
# https://github.com/abenz1267/walker/wiki/Modules
|
# https://github.com/abenz1267/walker/wiki/Modules
|
||||||
# https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/tree/master/Papirus/64x64
|
# https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/tree/master/Papirus/64x64
|
||||||
|
|
|
@ -60,9 +60,7 @@ in {
|
||||||
systemd.enable = true; # Start on login
|
systemd.enable = true; # Start on login
|
||||||
|
|
||||||
# ?? waybar --log-level debug
|
# ?? waybar --log-level debug
|
||||||
style = let
|
style = ''
|
||||||
gap = toString config.custom.gap;
|
|
||||||
in ''
|
|
||||||
* {
|
* {
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
color: #93a1a1;
|
color: #93a1a1;
|
||||||
|
@ -72,7 +70,7 @@ in {
|
||||||
}
|
}
|
||||||
|
|
||||||
.horizontal > box {
|
.horizontal > box {
|
||||||
margin: 0 ${gap}px ${gap}px;
|
margin: 0 ${toString config.custom.gap}px ${toString config.custom.gap}px;
|
||||||
}
|
}
|
||||||
|
|
||||||
${readFile ./style.css}
|
${readFile ./style.css}
|
||||||
|
@ -127,7 +125,7 @@ in {
|
||||||
reload_style_on_change = true; # Reload CSS when modified
|
reload_style_on_change = true; # Reload CSS when modified
|
||||||
|
|
||||||
## GLOBAL ##
|
## GLOBAL ##
|
||||||
layer = "top";
|
layer = "bottom";
|
||||||
position = "bottom";
|
position = "bottom";
|
||||||
|
|
||||||
## POSITION ##
|
## POSITION ##
|
||||||
|
@ -136,8 +134,7 @@ in {
|
||||||
"custom/inhibitor"
|
"custom/inhibitor"
|
||||||
"custom/vpn"
|
"custom/vpn"
|
||||||
"custom/vm"
|
"custom/vm"
|
||||||
(mkIf config.custom.desktops.hyprland.enable "hyprland/workspaces")
|
"hyprland/workspaces"
|
||||||
(mkIf config.custom.desktops.niri.enable "niri/workspaces")
|
|
||||||
];
|
];
|
||||||
modules-center = [
|
modules-center = [
|
||||||
"clock"
|
"clock"
|
||||||
|
@ -217,27 +214,6 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/Alexays/Waybar/wiki/Module:-Niri
|
|
||||||
# https://www.nerdfonts.com/cheat-sheet
|
|
||||||
"niri/workspaces" = {
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
android = "";
|
|
||||||
dropdown = "";
|
|
||||||
game = "";
|
|
||||||
hidden = "";
|
|
||||||
music = "";
|
|
||||||
office = "";
|
|
||||||
password = "";
|
|
||||||
pip = "";
|
|
||||||
scratchpad = "";
|
|
||||||
steam = "";
|
|
||||||
terminal = "";
|
|
||||||
vm = "";
|
|
||||||
wallpaper = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
cava = cava-config;
|
cava = cava-config;
|
||||||
|
|
||||||
# https://github.com/Alexays/Waybar/wiki/Module:-Clock
|
# https://github.com/Alexays/Waybar/wiki/Module:-Clock
|
||||||
|
|
|
@ -42,7 +42,7 @@ tooltip label {
|
||||||
|
|
||||||
.horizontal > box {
|
.horizontal > box {
|
||||||
background: #002b36;
|
background: #002b36;
|
||||||
border: 2px #586e75 solid;
|
border: 2px #073642 solid;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,9 +41,9 @@ _build() {
|
||||||
else
|
else
|
||||||
# Build current system
|
# Build current system
|
||||||
if [[ "${argc_builder:-}" == nh ]]; then
|
if [[ "${argc_builder:-}" == nh ]]; then
|
||||||
nh os "$1" -- --show-trace ${argc_extra:+"${argc_extra[@]}"}
|
nh os "$1" -- ${argc_extra:+"${argc_extra[@]}"}
|
||||||
elif [[ "${argc_builder:-}" == nixos ]]; then
|
elif [[ "${argc_builder:-}" == nixos ]]; then
|
||||||
sudo nixos-rebuild "$1" --show-trace ${argc_extra:+"${argc_extra[@]}"}
|
sudo nixos-rebuild "$1" ${argc_extra:+"${argc_extra[@]}"}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
|
Hyprland = "${config.programs.hyprland.package}/bin/Hyprland";
|
||||||
systemd-cat = "${pkgs.systemd}/bin/systemd-cat";
|
systemd-cat = "${pkgs.systemd}/bin/systemd-cat";
|
||||||
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
|
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
|
||||||
|
|
||||||
|
@ -20,10 +21,9 @@ in {
|
||||||
|
|
||||||
settings.default_session = {
|
settings.default_session = {
|
||||||
command = lib.concatStringsSep " " [
|
command = lib.concatStringsSep " " [
|
||||||
tuigreet
|
"${tuigreet}"
|
||||||
"--session-wrapper '${systemd-cat} --identifier wm'" # ?? journalctl --identifier wm
|
"--session-wrapper '${systemd-cat} --identifier wm'" # ?? journalctl --identifier wm
|
||||||
"--remember"
|
"--remember"
|
||||||
"--remember-user-session"
|
|
||||||
"--time"
|
"--time"
|
||||||
"--asterisks"
|
"--asterisks"
|
||||||
"--window-padding 1"
|
"--window-padding 1"
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
xwayland-satellite = "${pkgs.xwayland-satellite}/bin/xwayland-satellite";
|
|
||||||
|
|
||||||
cfg = config.custom.services.xwayland-satellite;
|
|
||||||
in {
|
|
||||||
options.custom.services.xwayland-satellite.enable = mkOption {default = false;};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
# HACK: Use official module if added
|
|
||||||
# BUG: Fractional scaling is currently not supported
|
|
||||||
# https://github.com/Supreeeme/xwayland-satellite/issues/11
|
|
||||||
# Rootless Xwayland support as a user service
|
|
||||||
# https://github.com/Supreeeme/xwayland-satellite
|
|
||||||
|
|
||||||
# https://github.com/Supreeeme/xwayland-satellite/blob/main/resources/xwayland-satellite.service
|
|
||||||
systemd.user.services.xwayland-satellite = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
unitConfig = {
|
|
||||||
Description = "Xwayland outside your Wayland";
|
|
||||||
BindsTo = ["graphical-session.target"];
|
|
||||||
PartOf = ["graphical-session.target"];
|
|
||||||
After = ["graphical-session.target"];
|
|
||||||
Requisite = ["graphical-session.target"];
|
|
||||||
};
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "notify";
|
|
||||||
NotifyAccess = "all";
|
|
||||||
ExecStart = xwayland-satellite;
|
|
||||||
StandardOutput = "journal";
|
|
||||||
};
|
|
||||||
|
|
||||||
wantedBy = ["graphical-session.target"];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.sessionVariables = {
|
|
||||||
DISPLAY = ":0"; # Assume first display
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -25,7 +25,7 @@ in {
|
||||||
#// i18n.defaultLocale = "C.UTF-8";
|
#// i18n.defaultLocale = "C.UTF-8";
|
||||||
|
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
GDK_SCALE = mkIf (!config.custom.services.xwayland-satellite.enable) (toString config.custom.scale); # Steam HiDPI
|
GDK_SCALE = toString config.custom.scale; # Steam HiDPI
|
||||||
|
|
||||||
# https://wiki.nixos.org/wiki/Wayland#Electron_and_Chromium
|
# https://wiki.nixos.org/wiki/Wayland#Electron_and_Chromium
|
||||||
NIXOS_OZONE_WL = mkIf cfg.wayland "1";
|
NIXOS_OZONE_WL = mkIf cfg.wayland "1";
|
||||||
|
|
|
@ -12,15 +12,13 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# Bypass password prompts
|
# Bypass password prompts
|
||||||
security = {
|
security = {
|
||||||
sudo = {
|
sudo.wheelNeedsPassword = false;
|
||||||
enable = true;
|
|
||||||
wheelNeedsPassword = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# https://wiki.nixos.org/wiki/Sway#Using_Home_Manager
|
# https://wiki.nixos.org/wiki/Sway#Using_Home_Manager
|
||||||
# https://wiki.archlinux.org/title/Polkit#Bypass_password_prompt
|
|
||||||
polkit = {
|
polkit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
# https://wiki.archlinux.org/title/Polkit#Bypass_password_prompt
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
polkit.addRule(function(action, subject) {
|
polkit.addRule(function(action, subject) {
|
||||||
if (subject.isInGroup("wheel")) { return polkit.Result.YES; }
|
if (subject.isInGroup("wheel")) { return polkit.Result.YES; }
|
||||||
|
|
|
@ -27,16 +27,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
age.secrets = let
|
|
||||||
secret = filename: {
|
|
||||||
file = "${inputs.self}/secrets/${filename}";
|
|
||||||
owner = config.custom.username;
|
|
||||||
group = "users";
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
"desktop/vm/myndows.pass" = secret "desktop/vm/myndows.pass";
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
# https://wiki.nixos.org/wiki/Libvirt
|
# https://wiki.nixos.org/wiki/Libvirt
|
||||||
# https://libvirt.org
|
# https://libvirt.org
|
||||||
|
|
Loading…
Add table
Reference in a new issue