From 13cc8234e18aca94867b696dfbd5d6c5385681f9 Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Sat, 21 Jun 2025 11:30:35 +0800 Subject: [PATCH] feat: move to umport for automatic module import --- flake.nix | 37 +- lib/stdlib-extended.nix | 1 + lib/umport.nix | 48 +++ modules/cli/default.nix | 9 - modules/cli/media/default.nix | 9 - modules/cli/monitor/default.nix | 6 - modules/cli/shell/default.nix | 6 - modules/coding/default.nix | 8 - modules/coding/editor/default.nix | 7 - modules/coding/langs/default.nix | 11 - modules/default.nix | 24 -- modules/desktop/browser/default.nix | 9 - modules/desktop/default.nix | 14 - modules/desktop/gaming/default.nix | 7 - modules/desktop/media/default.nix | 11 - modules/desktop/notify/default.nix | 7 - modules/desktop/screencast/default.nix | 6 - modules/desktop/terminal/default.nix | 9 - modules/desktop/wm/default.nix | 7 - modules/desktop/wm/niri/config.nix | 484 +++++++++++++------------ modules/desktop/wm/niri/default.nix | 4 - modules/i18n/default.nix | 6 - 22 files changed, 314 insertions(+), 416 deletions(-) create mode 100644 lib/umport.nix delete mode 100644 modules/cli/default.nix delete mode 100644 modules/cli/media/default.nix delete mode 100644 modules/cli/monitor/default.nix delete mode 100644 modules/cli/shell/default.nix delete mode 100644 modules/coding/default.nix delete mode 100644 modules/coding/editor/default.nix delete mode 100644 modules/coding/langs/default.nix delete mode 100644 modules/default.nix delete mode 100644 modules/desktop/browser/default.nix delete mode 100644 modules/desktop/default.nix delete mode 100644 modules/desktop/gaming/default.nix delete mode 100644 modules/desktop/media/default.nix delete mode 100644 modules/desktop/notify/default.nix delete mode 100644 modules/desktop/screencast/default.nix delete mode 100644 modules/desktop/terminal/default.nix delete mode 100644 modules/desktop/wm/default.nix delete mode 100644 modules/i18n/default.nix diff --git a/flake.nix b/flake.nix index 9e1b8c9..9dcabe5 100644 --- a/flake.nix +++ b/flake.nix @@ -77,11 +77,10 @@ }) (builtins.attrNames (builtins.readDir ./config/hosts)) ); - lib = nixpkgs.lib.extend ( + lib = (import ./lib/stdlib-extended.nix nixpkgs.lib).extend ( final: prev: { inherit (inputs.home-manager.lib) hm; inherit infuse; - my = import ./lib { lib = final; }; } ); infuse = (import inputs.infuse { inherit (nixpkgs) lib; }).v1.infuse; @@ -168,21 +167,29 @@ outputs hostname ; - sopsRoot = ./secrets; } // vars; - modules = [ - ./modules - ./config/base.nix - ./config/hosts/${hostname} - inputs.chaotic.nixosModules.default - inputs.sops-nix.nixosModules.sops - inputs.impermanence.nixosModules.impermanence - inputs.home-manager.nixosModules.default - inputs.niri.nixosModules.niri - home - pkgsConf - ]; + modules = + (lib.umport { + paths = [ ./modules ]; + exclude = [ + ./modules/virt/types + ./modules/desktop/wm/niri/waybar + ]; + recursive = true; + }) + ++ [ + (lib.mkAliasOptionModule [ "my" "home" ] [ "home-manager" "users" vars.username ]) + ./config/base.nix + ./config/hosts/${hostname} + inputs.chaotic.nixosModules.default + inputs.sops-nix.nixosModules.sops + inputs.impermanence.nixosModules.impermanence + inputs.home-manager.nixosModules.default + inputs.niri.nixosModules.niri + home + pkgsConf + ]; } ); }; diff --git a/lib/stdlib-extended.nix b/lib/stdlib-extended.nix index 3730146..bd042ee 100644 --- a/lib/stdlib-extended.nix +++ b/lib/stdlib-extended.nix @@ -9,5 +9,6 @@ in stdlib.extend ( self: super: { my = mkMyLib { lib = self; }; + umport = import ./umport.nix { lib = self; }; } ) diff --git a/lib/umport.nix b/lib/umport.nix new file mode 100644 index 0000000..ca0c9af --- /dev/null +++ b/lib/umport.nix @@ -0,0 +1,48 @@ +# This function is modified from: +# https://github.com/yunfachi/nypkgs/blob/master/lib/umport.nix +# +# !!! REMOVING THIS NOTICE VIOLATES THE MIT LICENSE OF THE UMPORT PROJECT !!! +# This notice must be retained in all copies of this function, including modified versions! +# The MIT License can be found here: +# https://github.com/yunfachi/nypkgs/blob/master/LICENSE +{ lib, ... }: +let + umport = + { + path ? null, + paths ? [ ], + include ? [ ], + exclude ? [ ], + recursive ? true, + }: + with lib; + with fileset; + let + excludedFiles = filter (path: pathIsRegularFile path) exclude; + excludedDirs = filter (path: pathIsDirectory path) exclude; + isExcluded = + path: + if elem path excludedFiles then + true + else + (filter (excludedDir: lib.path.hasPrefix excludedDir path) excludedDirs) != [ ]; + in + unique ( + (filter + (file: pathIsRegularFile file && hasSuffix ".nix" (builtins.toString file) && !isExcluded file) + ( + concatMap ( + _path: + if recursive then + toList _path + else + mapAttrsToList ( + name: type: _path + (if type == "directory" then "/${name}/default.nix" else "/${name}") + ) (builtins.readDir _path) + ) (unique (if path == null then paths else [ path ] ++ paths)) + ) + ) + ++ (if recursive then concatMap (path: toList path) (unique include) else unique include) + ); +in +umport diff --git a/modules/cli/default.nix b/modules/cli/default.nix deleted file mode 100644 index a988716..0000000 --- a/modules/cli/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - imports = [ - ./all.nix - ./media - ./misc - ./monitor - ./shell - ]; -} diff --git a/modules/cli/media/default.nix b/modules/cli/media/default.nix deleted file mode 100644 index fd567db..0000000 --- a/modules/cli/media/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - imports = [ - ./all.nix - ./ffmpeg.nix - ./mpd - ./cava - ./go-musicfox - ]; -} diff --git a/modules/cli/monitor/default.nix b/modules/cli/monitor/default.nix deleted file mode 100644 index aa7f538..0000000 --- a/modules/cli/monitor/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./all.nix - ./btop - ]; -} diff --git a/modules/cli/shell/default.nix b/modules/cli/shell/default.nix deleted file mode 100644 index 4fe6f81..0000000 --- a/modules/cli/shell/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./all.nix - ./zsh.nix - ]; -} diff --git a/modules/coding/default.nix b/modules/coding/default.nix deleted file mode 100644 index f1159e7..0000000 --- a/modules/coding/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - ./all.nix - ./misc.nix - ./langs - ./editor - ]; -} diff --git a/modules/coding/editor/default.nix b/modules/coding/editor/default.nix deleted file mode 100644 index f36aba5..0000000 --- a/modules/coding/editor/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./all.nix - ./neovim - ./vscode - ]; -} diff --git a/modules/coding/langs/default.nix b/modules/coding/langs/default.nix deleted file mode 100644 index 60e0821..0000000 --- a/modules/coding/langs/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - imports = [ - ./all.nix - ./c.nix - ./go.nix - ./js.nix - ./rust.nix - ./python.nix - ./lua.nix - ]; -} diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index 23f9e77..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - lib, - username, - ... -}: -{ - imports = [ - ./cli - ./coding - ./virt - ./desktop - ./i18n - ./nix.nix - ./sops.nix - ./gpg.nix - ./time.nix - ./user.nix - ./xdg.nix - ./persist.nix - ./getty-autologin.nix - - (lib.mkAliasOptionModule [ "my" "home" ] [ "home-manager" "users" username ]) - ]; -} diff --git a/modules/desktop/browser/default.nix b/modules/desktop/browser/default.nix deleted file mode 100644 index f625f73..0000000 --- a/modules/desktop/browser/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - imports = [ - ./all.nix - ./firefox.nix - ./librewolf.nix - ./chromium.nix - ./zen.nix - ]; -} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix deleted file mode 100644 index 1729aa9..0000000 --- a/modules/desktop/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - imports = [ - ./all.nix - ./browser - ./gaming - ./media - ./notify - ./screencast - ./terminal - ./wm - ./style - ./quickshell - ]; -} diff --git a/modules/desktop/gaming/default.nix b/modules/desktop/gaming/default.nix deleted file mode 100644 index 9fa871c..0000000 --- a/modules/desktop/gaming/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./all.nix - ./minecraft.nix - ./steam.nix - ]; -} diff --git a/modules/desktop/media/default.nix b/modules/desktop/media/default.nix deleted file mode 100644 index 5e35784..0000000 --- a/modules/desktop/media/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - imports = [ - ./all.nix - ./mpv.nix - ./shotwell.nix - ./thunderbird.nix - ./vlc.nix - ./spotify.nix - ./spotube.nix - ]; -} diff --git a/modules/desktop/notify/default.nix b/modules/desktop/notify/default.nix deleted file mode 100644 index f257d05..0000000 --- a/modules/desktop/notify/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./all.nix - ./dunst - ./swaync - ]; -} diff --git a/modules/desktop/screencast/default.nix b/modules/desktop/screencast/default.nix deleted file mode 100644 index b6571dc..0000000 --- a/modules/desktop/screencast/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./all.nix - ./obs-studio.nix - ]; -} diff --git a/modules/desktop/terminal/default.nix b/modules/desktop/terminal/default.nix deleted file mode 100644 index 6c683b8..0000000 --- a/modules/desktop/terminal/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - imports = [ - ./all.nix - ./alacritty - ./foot - ./kitty - ./ghostty - ]; -} diff --git a/modules/desktop/wm/default.nix b/modules/desktop/wm/default.nix deleted file mode 100644 index 97df618..0000000 --- a/modules/desktop/wm/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./all.nix - ./cage.nix - ./niri - ]; -} diff --git a/modules/desktop/wm/niri/config.nix b/modules/desktop/wm/niri/config.nix index 7922a2e..7684844 100644 --- a/modules/desktop/wm/niri/config.nix +++ b/modules/desktop/wm/niri/config.nix @@ -5,255 +5,257 @@ ... }: { - my.home.programs.niri.settings = { - input = { - focus-follows-mouse = { - enable = true; - max-scroll-amount = "40%"; + config = lib.mkIf config.my.desktop.wm.niri.enable { + my.home.programs.niri.settings = { + input = { + focus-follows-mouse = { + enable = true; + max-scroll-amount = "40%"; + }; + workspace-auto-back-and-forth = true; }; - workspace-auto-back-and-forth = true; - }; - layout = { - gaps = 23; - center-focused-column = "never"; - always-center-single-column = true; - focus-ring.enable = false; - border = { + layout = { + gaps = 23; + center-focused-column = "never"; + always-center-single-column = true; + focus-ring.enable = false; + border = { + enable = true; + width = 4; + + inactive.color = "#2e2e3eee"; + active.gradient = { + from = "#6186d6ee"; + to = "#cba6f7ee"; + angle = 180; + relative-to = "workspace-view"; + }; + }; + preset-column-widths = [ + { proportion = 0.33333; } + { proportion = 0.4; } + { proportion = 0.5; } + { proportion = 0.6; } + { proportion = 0.66667; } + ]; + default-column-width.proportion = 0.4; + background-color = "transparent"; + }; + + animations = { enable = true; - width = 4; - - inactive.color = "#2e2e3eee"; - active.gradient = { - from = "#6186d6ee"; - to = "#cba6f7ee"; - angle = 180; - relative-to = "workspace-view"; + slowdown = 1.5; + workspace-switch.kind.spring = { + damping-ratio = 1.0; + stiffness = 1000; + epsilon = 0.0001; }; }; - preset-column-widths = [ - { proportion = 0.33333; } - { proportion = 0.4; } - { proportion = 0.5; } - { proportion = 0.6; } - { proportion = 0.66667; } + + prefer-no-csd = true; + hotkey-overlay.skip-at-startup = true; + + clipboard.disable-primary = true; + + layer-rules = [ + { + matches = [ { namespace = "^wallpaper$"; } ]; + place-within-backdrop = true; + } ]; - default-column-width.proportion = 0.4; - background-color = "transparent"; - }; + overview.workspace-shadow.enable = false; - animations = { - enable = true; - slowdown = 1.5; - workspace-switch.kind.spring = { - damping-ratio = 1.0; - stiffness = 1000; - epsilon = 0.0001; + window-rules = [ + { + geometry-corner-radius = { + bottom-left = 14.; + bottom-right = 14.; + top-left = 14.; + top-right = 14.; + }; + clip-to-geometry = true; + draw-border-with-background = false; + } + { + matches = [ { app-id = "kitty|foot|Alacritty|ghostty|chromium-browser|zen-beta|wofi"; } ]; + opacity = 0.8; + } + { + matches = [ { app-id = "org.gnome.Nautilus|nemo"; } ]; + opacity = 0.6; + } + ]; + + environment = { + QT_QPA_PLATFORM = "wayland;xcb"; + XDG_SESSION_TYPE = "wayland"; + XDG_CURRENT_DESKTOP = "niri"; + XDG_SESSION_DESKTOP = "niri"; + QT_AUTO_SCREEN_SCALE_FACTOR = "1"; }; + + spawn-at-startup = map (c: { command = c; }) [ + [ "${lib.getExe' pkgs.swaynotificationcenter "swaync"}" ] + [ + "${lib.getExe pkgs.swaybg}" + "-m" + "fill" + "-i" + (toString ./wallpaper.png) + ] + [ + "wl-paste" + "--type" + "text" + "--watch" + "cliphist" + "store" + ] + [ + "wl-paste" + "--type" + "image" + "--watch" + "cliphist" + "store" + ] + ]; + + binds = + with config.my.home.lib.niri.actions; + { + "Ctrl+Alt+T".action.spawn = [ + "kitty" + "-1" + ]; + "Mod+T".action.spawn = [ + "kitty" + "-1" + ]; + "Mod+Return".action.spawn = [ + "kitty" + "-1" + ]; + "Mod+G".action.spawn = [ "zen-beta" ]; + "Mod+E".action.spawn = [ "nemo" ]; + "Mod+R".action.spawn = [ + "sh" + "-c" + "pkill wofi || wofi --color ~/.config/wal/colors" + ]; + "Mod+V".action.spawn = [ + "sh" + "-c" + "pkill ${lib.getExe pkgs.wofi} || ${lib.getExe pkgs.cliphist} list | wofi --dmenu --color ~/.config/wal/colors | cliphist decode | wl-copy" + ]; + + "XF86AudioRaiseVolume" = { + allow-when-locked = true; + action.spawn = [ + "pamixer" + "-i" + "2" + ]; + }; + "XF86AudioLowerVolume" = { + allow-when-locked = true; + action.spawn = [ + "pamixer" + "-d" + "2" + ]; + }; + "XF86AudioMute" = { + allow-when-locked = true; + action.spawn = [ + "playerctl" + "-i" + "firefox,chromium,zen" + "play-pause" + ]; + }; + "Mod+XF86AudioRaiseVolume" = { + allow-when-locked = true; + action.spawn = [ + "playerctl" + "-i" + "firefox,chromium,zen" + "next" + ]; + }; + "Mod+XF86AudioLowerVolume" = { + allow-when-locked = true; + action.spawn = [ + "playerctl" + "-i" + "firefox,chromium,zen" + "previous" + ]; + }; + + "Mod+Q".action = close-window; + + "Mod+Left".action = focus-column-left; + "Mod+Right".action = focus-column-right; + "Mod+Up".action = focus-window-up; + "Mod+Down".action = focus-window-down; + + "Mod+Ctrl+Left".action = move-column-left; + "Mod+Ctrl+Right".action = move-column-right; + "Mod+Ctrl+Up".action = move-window-up; + "Mod+Ctrl+Down".action = move-window-down; + + "Mod+Alt+Left".action = consume-or-expel-window-left; + "Mod+Alt+Right".action = consume-or-expel-window-right; + + "Mod+Shift+Left".action = focus-monitor-left; + "Mod+Shift+Right".action = focus-monitor-right; + "Mod+Shift+Up".action = focus-monitor-up; + "Mod+Shift+Down".action = focus-monitor-down; + + "Mod+Shift+Ctrl+Left".action = move-column-to-monitor-left; + "Mod+Shift+Ctrl+Right".action = move-column-to-monitor-right; + "Mod+Shift+Ctrl+Up".action = move-column-to-monitor-up; + "Mod+Shift+Ctrl+Down".action = move-column-to-monitor-down; + + "Mod+Page_Up".action = focus-workspace-up; + "Mod+Page_Down".action = focus-workspace-down; + + "Mod+Ctrl+Page_Up".action = move-column-to-workspace-up; + "Mod+Ctrl+Page_Down".action = move-column-to-workspace-down; + + "Mod+Shift+Page_Up".action = move-workspace-up; + "Mod+Shift+Page_Down".action = move-workspace-down; + + "Mod+L".action = switch-preset-column-width; + "Mod+Shift+L".action = reset-window-height; + "Mod+M".action = maximize-column; + "Mod+Shift+M".action = fullscreen-window; + "Mod+C".action = center-column; + "Mod+F".action = toggle-window-floating; + "Mod+H".action = expand-column-to-available-width; + + "Mod+Minus".action.set-column-width = "-10%"; + "Mod+Equal".action.set-column-width = "+10%"; + "Mod+Shift+Minus".action.set-window-height = "-10%"; + "Mod+Shift+Equal".action.set-window-height = "+10%"; + + "Ctrl+Alt+A".action = screenshot; + "Print".action.screenshot-screen = [ ]; + "Alt+Print".action = screenshot-window; + + "Mod+Shift+E".action = quit; + + "Mod+O".action = toggle-overview; + "Super+Tab".action = toggle-overview; + } + // lib.attrsets.mergeAttrsList ( + map (n: { + "Mod+${toString n}".action.focus-workspace = n; + "Mod+Shift+${toString n}".action.move-column-to-workspace = n; + }) (lib.range 0 9) + ); }; - - prefer-no-csd = true; - hotkey-overlay.skip-at-startup = true; - - clipboard.disable-primary = true; - - layer-rules = [ - { - matches = [ { namespace = "^wallpaper$"; } ]; - place-within-backdrop = true; - } - ]; - overview.workspace-shadow.enable = false; - - window-rules = [ - { - geometry-corner-radius = { - bottom-left = 14.; - bottom-right = 14.; - top-left = 14.; - top-right = 14.; - }; - clip-to-geometry = true; - draw-border-with-background = false; - } - { - matches = [ { app-id = "kitty|foot|Alacritty|ghostty|chromium-browser|zen-beta|wofi"; } ]; - opacity = 0.8; - } - { - matches = [ { app-id = "org.gnome.Nautilus|nemo"; } ]; - opacity = 0.6; - } - ]; - - environment = { - QT_QPA_PLATFORM = "wayland;xcb"; - XDG_SESSION_TYPE = "wayland"; - XDG_CURRENT_DESKTOP = "niri"; - XDG_SESSION_DESKTOP = "niri"; - QT_AUTO_SCREEN_SCALE_FACTOR = "1"; - }; - - spawn-at-startup = map (c: { command = c; }) [ - [ "${lib.getExe' pkgs.swaynotificationcenter "swaync"}" ] - [ - "${lib.getExe pkgs.swaybg}" - "-m" - "fill" - "-i" - (toString ./wallpaper.png) - ] - [ - "wl-paste" - "--type" - "text" - "--watch" - "cliphist" - "store" - ] - [ - "wl-paste" - "--type" - "image" - "--watch" - "cliphist" - "store" - ] - ]; - - binds = - with config.my.home.lib.niri.actions; - { - "Ctrl+Alt+T".action.spawn = [ - "kitty" - "-1" - ]; - "Mod+T".action.spawn = [ - "kitty" - "-1" - ]; - "Mod+Return".action.spawn = [ - "kitty" - "-1" - ]; - "Mod+G".action.spawn = [ "zen-beta" ]; - "Mod+E".action.spawn = [ "nemo" ]; - "Mod+R".action.spawn = [ - "sh" - "-c" - "pkill wofi || wofi --color ~/.config/wal/colors" - ]; - "Mod+V".action.spawn = [ - "sh" - "-c" - "pkill ${lib.getExe pkgs.wofi} || ${lib.getExe pkgs.cliphist} list | wofi --dmenu --color ~/.config/wal/colors | cliphist decode | wl-copy" - ]; - - "XF86AudioRaiseVolume" = { - allow-when-locked = true; - action.spawn = [ - "pamixer" - "-i" - "2" - ]; - }; - "XF86AudioLowerVolume" = { - allow-when-locked = true; - action.spawn = [ - "pamixer" - "-d" - "2" - ]; - }; - "XF86AudioMute" = { - allow-when-locked = true; - action.spawn = [ - "playerctl" - "-i" - "firefox,chromium,zen" - "play-pause" - ]; - }; - "Mod+XF86AudioRaiseVolume" = { - allow-when-locked = true; - action.spawn = [ - "playerctl" - "-i" - "firefox,chromium,zen" - "next" - ]; - }; - "Mod+XF86AudioLowerVolume" = { - allow-when-locked = true; - action.spawn = [ - "playerctl" - "-i" - "firefox,chromium,zen" - "previous" - ]; - }; - - "Mod+Q".action = close-window; - - "Mod+Left".action = focus-column-left; - "Mod+Right".action = focus-column-right; - "Mod+Up".action = focus-window-up; - "Mod+Down".action = focus-window-down; - - "Mod+Ctrl+Left".action = move-column-left; - "Mod+Ctrl+Right".action = move-column-right; - "Mod+Ctrl+Up".action = move-window-up; - "Mod+Ctrl+Down".action = move-window-down; - - "Mod+Alt+Left".action = consume-or-expel-window-left; - "Mod+Alt+Right".action = consume-or-expel-window-right; - - "Mod+Shift+Left".action = focus-monitor-left; - "Mod+Shift+Right".action = focus-monitor-right; - "Mod+Shift+Up".action = focus-monitor-up; - "Mod+Shift+Down".action = focus-monitor-down; - - "Mod+Shift+Ctrl+Left".action = move-column-to-monitor-left; - "Mod+Shift+Ctrl+Right".action = move-column-to-monitor-right; - "Mod+Shift+Ctrl+Up".action = move-column-to-monitor-up; - "Mod+Shift+Ctrl+Down".action = move-column-to-monitor-down; - - "Mod+Page_Up".action = focus-workspace-up; - "Mod+Page_Down".action = focus-workspace-down; - - "Mod+Ctrl+Page_Up".action = move-column-to-workspace-up; - "Mod+Ctrl+Page_Down".action = move-column-to-workspace-down; - - "Mod+Shift+Page_Up".action = move-workspace-up; - "Mod+Shift+Page_Down".action = move-workspace-down; - - "Mod+L".action = switch-preset-column-width; - "Mod+Shift+L".action = reset-window-height; - "Mod+M".action = maximize-column; - "Mod+Shift+M".action = fullscreen-window; - "Mod+C".action = center-column; - "Mod+F".action = toggle-window-floating; - "Mod+H".action = expand-column-to-available-width; - - "Mod+Minus".action.set-column-width = "-10%"; - "Mod+Equal".action.set-column-width = "+10%"; - "Mod+Shift+Minus".action.set-window-height = "-10%"; - "Mod+Shift+Equal".action.set-window-height = "+10%"; - - "Ctrl+Alt+A".action = screenshot; - "Print".action.screenshot-screen = [ ]; - "Alt+Print".action = screenshot-window; - - "Mod+Shift+E".action = quit; - - "Mod+O".action = toggle-overview; - "Super+Tab".action = toggle-overview; - } - // lib.attrsets.mergeAttrsList ( - map (n: { - "Mod+${toString n}".action.focus-workspace = n; - "Mod+Shift+${toString n}".action.move-column-to-workspace = n; - }) (lib.range 0 9) - ); }; } diff --git a/modules/desktop/wm/niri/default.nix b/modules/desktop/wm/niri/default.nix index 756d1ce..ceefb7e 100644 --- a/modules/desktop/wm/niri/default.nix +++ b/modules/desktop/wm/niri/default.nix @@ -14,10 +14,6 @@ in enable = lib.mkEnableOption "Niri"; }; - imports = [ - (lib.mkIf cfg.enable (import ./config.nix args)) - ]; - config = lib.mkIf cfg.enable { security.pam.services.login.enableGnomeKeyring = true; my.persist.homeDirs = [ diff --git a/modules/i18n/default.nix b/modules/i18n/default.nix deleted file mode 100644 index 86b50fb..0000000 --- a/modules/i18n/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./fcitx5.nix - ./locale.nix - ]; -}