diff --git a/.gitignore b/.gitignore index fa69a9b..5b9b339 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ ./secrets/secrets.yaml.priv ./secrets/secrets.priv.yaml.gpg +.aider* +.env diff --git a/flake.nix b/flake.nix index 9da7a40..9f04ccc 100644 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,10 @@ description = "My System flake"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager/release-24.11"; + home-manager.url = "github:nix-community/home-manager/release-25.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; nix-colors.url = "github:misterio77/nix-colors"; diff --git a/home/common/fonts.nix b/home/common/fonts.nix index 21d99c8..74ce28c 100644 --- a/home/common/fonts.nix +++ b/home/common/fonts.nix @@ -2,9 +2,15 @@ { home.packages = with pkgs; [ + nerd-fonts._0xproto + _0xproto noto-fonts noto-fonts-cjk-sans noto-fonts-emoji + noto-fonts-color-emoji + noto-fonts-emoji-blob-bin + unicode-emoji + liberation_ttf fira-code fira-code-symbols @@ -13,7 +19,7 @@ font-awesome font-awesome_5 font-awesome_4 - pkgs.nerd-fonts._0xproto + nerd-fonts._0xproto ]++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); diff --git a/home/gunalx/fcitx5.nix b/home/gunalx/fcitx5.nix index 7c9d019..fd327ae 100644 --- a/home/gunalx/fcitx5.nix +++ b/home/gunalx/fcitx5.nix @@ -1,162 +1,45 @@ -{ pkgs, lib, config, ... }: -let - im = config.i18n.inputMethod; - cfg = im.fcitx5; - fcitx5Package = pkgs.libsForQt5.fcitx5-with-addons.override { inherit (cfg) addons; }; -in +{ pkgs, lib, ... }: + { i18n.inputMethod = { - enabled = "fcitx5"; - fcitx5.addons = with pkgs; [ - fcitx5-mozc - fcitx5-gtk - fcitx5-chinese-addons - ]; - }; + enable = true; + type = "fcitx5"; - + fcitx5 = { + # 1) Load the GTK bridge, the classic UI and the Catppuccin theme package + addons = with pkgs; [ + fcitx5-gtk + fcitx5-mozc + catppuccin-fcitx5 + ]; - xdg.configFile = let - format = pkgs.formats.iniWithGlobalSection { }; - in { - "fcitx5/profile" = { - force = true; - source = format.generate "fcitx5-profile" { - sections = { - "Groups/0" = { - Name = "Default"; - "Default Layout" = "us"; - DefaultIM = "mozc"; - }; - "Groups/0/Items/0" = { - Name = "keyboard-us"; - Layout = ""; - }; - "Groups/0/Items/1" = { - Name = "keyboard-no"; - Layout = ""; - }; - "Groups/0/Items/2" = { - Name = "mozc"; - Layout = ""; - }; + # 2) Install the Catppuccin theme under $XDG_DATA_HOME/fcitx5/themes/catppuccin + themes = { + catppuccin = { + highlightImage = "${pkgs.catppuccin-fcitx5}/share/fcitx5/themes/catppuccin/highlight.svg"; + panelImage = "${pkgs.catppuccin-fcitx5}/share/fcitx5/themes/catppuccin/panel.svg"; + theme = "${pkgs.catppuccin-fcitx5}/share/fcitx5/themes/catppuccin/theme.conf"; + }; + }; # i18n.inputMethod.fcitx5.themes. … [source_id=2] + settings = { + # 3) Tell the classic UI to use “catppuccin” + addons.classicui.globalSection = { + Theme = "catppuccin"; + }; - "Groups/1" = { - Name = "Default"; - "Default Layout" = "jp"; - DefaultIM = "mozc"; - }; - "Groups/1/Items/0" = { - Name = "keyboard-us"; - Layout = ""; - }; - "Groups/1/Items/1" = { - Name = "keyboard-no"; - Layout = ""; - }; - "Groups/1/Items/2" = { - Name = "mozc"; - Layout = ""; - }; - - - GroupOrder = { - "0" = "Default"; - "1" = "Secondary"; - }; - + # 4) Your other config (hotkey, layouts, IM engines…) + globalOptions."Global" = { + TriggerKey = "Control+space"; + }; + inputMethod."Default" = { + Enabled = "xkb:us::eng,xkb:no::nob,xkb:jp::jpn,mozc"; }; }; }; - - "fcitx5/config".source = format.generate "fcitx5-config" { - sections = { - Hotkey = { - # Enumerate when press trigger key repeatedly - EnumerateWithTriggerKeys = "True"; - # Temporally switch between first and current Input Method - AltTriggerKeys = ""; - # Enumerate Input Method Forward - EnumerateForwardKeys = ""; - # Enumerate Input Method Backward - EnumerateBackwardKeys = ""; - # Skip first input method while enumerating - EnumerateSkipFirst = "False"; - }; - - "Hotkey/TriggerKeys" = { - "0" = "Control+space"; - "1" = "Zenkaku_Hankaku"; - "2" = "Hangul"; - }; - - "Hotkey/EnumerateGroupForwardKeys"."0" = "Super+space"; - "Hotkey/EnumerateGroupBackwardKeys"."0" = "Shift+Super+space"; - "Hotkey/ActivateKeys"."0" = "Hangul_Hanja"; - "Hotkey/DeactivateKeys"."0" = "Hangul_Romaja"; - "Hotkey/PrevPage"."0" = "Up"; - "Hotkey/NextPage"."0" = "Down"; - "Hotkey/PrevCandidate"."0" = "Shift+Tab"; - "Hotkey/NextCandidate"."0" = "Tab"; - "Hotkey/TogglePreedit"."0" = "Control+Alt+P"; - - Behaviour = { - # Active By Default - ActiveByDefault = "False"; - # Share Input State - ShareInputState = "All"; - # Show preedit in application - PreeditEnabledByDefault = "True"; - # Show Input Method Information when switch input method - ShowInputMethodInformation = "True"; - # Show Input Method Information when changing focus - showInputMethodInformationWhenFocusIn = "False"; - # Show compact input method information - CompactInputMethodInformation = "True"; - # Show first input method information - ShowFirstInputMethodInformation = "True"; - # Default page size - DefaultPageSize = 5; - # Override Xkb Option - OverrideXkbOption = "False"; - # Custom Xkb Option - CustomXkbOption = ""; - # Force Enabled Addons - EnabledAddons = ""; - # Force Disabled Addons - DisabledAddons = ""; - # Preload input method to be used by default - PreloadInputMethod = "True"; - # Allow input method in the password field - AllowInputMethodForPassword = "False"; - # Show preedit text when typing password - ShowPreeditForPassword = "False"; - # Interval of saving user data in minutes - AutoSavePeriod = 30; - }; - }; - }; - - "fcitx5/conf/classicui.conf".source = format.generate "fcitx5-classicui.conf" { - globalSection = { - Theme = "Material-Color"; - PerScreenDPI = "True"; - # Font = ""; - "Vertical Candidate List" = "True"; - }; - }; }; - xdg.dataFile."fcitx5/themes/Material-Color" = { - recursive = true; - source = "${pkgs.fcitx5-material-color}/share/fcitx5/themes/Material-Color-teal"; - }; - - systemd.user.services.fcitx5-daemon = { - Service.Restart="on-failure"; - Service.ExecStart = lib.mkForce "${fcitx5Package}/bin/fcitx5"; - Service.ExecReload = "/bin/kill -HUP $MAINPID"; - }; + # 5) Force your own ExecStart so you never get “conflicting definition” errors + systemd.user.services.fcitx5-daemon.Service.ExecStart = + lib.mkForce "${pkgs.fcitx5-with-addons}/bin/fcitx5"; } - diff --git a/home/gunalx/fonts.nix b/home/gunalx/fonts.nix deleted file mode 100644 index ec49006..0000000 --- a/home/gunalx/fonts.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ pkgs, lib, ... }: -{ - - home.packages = with pkgs; [ - nerdfonts - noto-fonts - noto-fonts-cjk-sans - noto-fonts-emoji - liberation_ttf - fira-code - fira-code-symbols - nerdfonts - ubuntu_font_family - zpix-pixel-font - _0xproto - font-awesome - font-awesome_5 - font-awesome_4 - - ]; - - fonts.fontconfig.enable = true; - fonts.fontconfig.defaultFonts = { - emoji = ["noto-fonts-emoji font-awesome"]; - monospace = ["0xproto" "zpix" "fira-code"]; - serif = [ "Noto Serif" "Source Han Serif" ]; - sansSerif = [ "Noto Sans" "Source Han Sans" ]; - }; - - - -} - diff --git a/home/gunalx/full.nix b/home/gunalx/full.nix index 4a3117f..0642d56 100644 --- a/home/gunalx/full.nix +++ b/home/gunalx/full.nix @@ -5,6 +5,7 @@ ./code.nix ./sway.nix ./niri.nix + ../common/fonts.nix ./colors.nix #./stylix.nix diff --git a/home/gunalx/niri.nix b/home/gunalx/niri.nix index 6c24fc4..4a5b647 100644 --- a/home/gunalx/niri.nix +++ b/home/gunalx/niri.nix @@ -600,8 +600,6 @@ in wdisplays swww - wleave - xwayland-satellite #bar applets and notifications @@ -624,6 +622,13 @@ in emote + + xdg-desktop-portal-gtk + xdg-desktop-portal + xdg-desktop-portal-wlr + xdg-desktop-portal-gnome + + #fonts _0xproto font-awesome diff --git a/home/gunalx/sway.nix b/home/gunalx/sway.nix index bac6842..3b0e0bd 100644 --- a/home/gunalx/sway.nix +++ b/home/gunalx/sway.nix @@ -13,11 +13,11 @@ in imports = [ ./waybar.nix ./foot.nix - ./fonts.nix ./fcitx5.nix ./kanshi.nix ./swaylock.nix ./mako.nix + ./wlogout.nix #./assets/wallpapers ]; @@ -48,7 +48,6 @@ in #swaybg swww - wleave #bar applets and notifications waybar @@ -85,17 +84,6 @@ in slurp #fonts - nerdfonts - noto-fonts - noto-fonts-cjk-sans - noto-fonts-emoji - liberation_ttf - fira-code - fira-code-symbols - nerdfonts - ubuntu_font_family - zpix-pixel-font - _0xproto font-awesome font-awesome_5 font-awesome_4 @@ -287,7 +275,7 @@ in { #"ctrl+space" = "exec xkb_switch_layout next"; #TODO:verify "${cfg.config.modifier}+tab" = "${menu}"; "Alt+tab" = "workspace back_and_forth"; - "XF86PowerOff" = "exec ${pkgs.wleave}/bin/wleave"; + "XF86PowerOff" = "exec ${pkgs.wlogout}/bin/wlogout"; }; }; diff --git a/home/gunalx/waybar.nix b/home/gunalx/waybar.nix index 2b6cee8..f4b42c4 100644 --- a/home/gunalx/waybar.nix +++ b/home/gunalx/waybar.nix @@ -20,7 +20,7 @@ in { "height": 36, "spacing": 2, - "modules-left": [ "custom/launcher", "sway/workspaces","niri/workspaces"], + "modules-left": [ "custom/overview", "custom/launcher", "sway/workspaces","niri/workspaces"], "modules-center": ["niri/window"], "modules-right": [ "idle_inhibitor","backlight","pulseaudio","keyboard-state", @@ -55,6 +55,13 @@ in "on-click": "niri msg workspace {index}" }, + "custom:overview": { + "format": "", + "tooltip": "Toggle Overview", + "on-click": "niri msg action toggle-overview" + }, + + "niri/window": { "format": "{title}" }, @@ -116,13 +123,6 @@ in "states": { "warning": 30, "critical": 15 } }, - "power-profiles-daemon": { - "format": "{icon}", - "format-icons": { - "performance":"","balanced":"","power-saver":"" - }, - "on-click": "systemctl --user power-profiles-daemon set balanced" - }, "power-profiles-daemon": { "format": "{icon}", @@ -139,25 +139,25 @@ in "clock": { "format": "{:%H:%M}", "format-alt": "{:%Y-%m-%d}", - "tooltip": true, - "tooltip-format": "{calendar}", - "calendar": { - "mode": "month", - "mode-mon-col": 3, - "weeks-pos": "right", - "on-scroll": 1, - "format": { - "months": "{}", - "days": "{}", - "weeks": "W{}", - "weekdays": "{}", - "today": "{}" - } - }, - "actions": { - "on-click-right": "mode", - "on-scroll-up": "shift_up", - "on-scroll-down": "shift_down" + "tooltip": true, + "tooltip-format": "{calendar}", + "calendar": { + "mode": "month", + "mode-mon-col": 3, + "weeks-pos": "right", + "on-scroll": 1, + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + "actions": { + "on-click-right": "mode", + "on-scroll-up": "shift_up", + "on-scroll-down": "shift_down" } }, @@ -168,7 +168,7 @@ in "custom/power": { "format": "⏻", "tooltip": "exit", - "on-click": "wleave" + "on-click": "wlogout || wleave" } } '') @@ -193,7 +193,7 @@ in /* Module blocks */ #idle_inhibitor,#backlight,#pulseaudio,#keyboard-state, #network,#cpu,#memory,#temperature,#battery, - #power-profiles-daemon,#clock,#tray,#custom-power,#custom-launcher,#niri-window { + #power-profiles-daemon,#clock,#tray,#custom-power,#custom-launcher,#custom-overview,#niri-window { background-color: ${toRGBA palette.base01 "0.4"}; border-radius: 8px; margin: 0 6px; @@ -205,7 +205,7 @@ in #idle_inhibitor:hover,#backlight:hover,#pulseaudio:hover, #keyboard-state:hover,#network:hover,#cpu:hover,#memory:hover, #temperature:hover,#battery:hover,#power-profiles-daemon:hover, - #clock:hover,#tray:hover,#custom-power:hover,#custom-launcher:hover,#niri-window:hover { + #clock:hover,#tray:hover,#custom-power:hover,#custom-launcher:hover,#custom-overview:hover,#niri-window:hover { background-color: ${toRGBA palette.base02 "0.5"}; } diff --git a/home/gunalx/wlogout.nix b/home/gunalx/wlogout.nix index 70c16be..ba194af 100644 --- a/home/gunalx/wlogout.nix +++ b/home/gunalx/wlogout.nix @@ -20,7 +20,7 @@ in { programs.wlogout = { enable = true; - package = pkgs.wleave; + package = pkgs.wlogout; # Your button layout layout = [ diff --git a/home/root/fonts.nix b/home/root/fonts.nix deleted file mode 100644 index ec49006..0000000 --- a/home/root/fonts.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ pkgs, lib, ... }: -{ - - home.packages = with pkgs; [ - nerdfonts - noto-fonts - noto-fonts-cjk-sans - noto-fonts-emoji - liberation_ttf - fira-code - fira-code-symbols - nerdfonts - ubuntu_font_family - zpix-pixel-font - _0xproto - font-awesome - font-awesome_5 - font-awesome_4 - - ]; - - fonts.fontconfig.enable = true; - fonts.fontconfig.defaultFonts = { - emoji = ["noto-fonts-emoji font-awesome"]; - monospace = ["0xproto" "zpix" "fira-code"]; - serif = [ "Noto Serif" "Source Han Serif" ]; - sansSerif = [ "Noto Sans" "Source Han Sans" ]; - }; - - - -} - diff --git a/machines/aragon/configuration.nix b/machines/aragon/configuration.nix index 151a595..3f3b9f6 100644 --- a/machines/aragon/configuration.nix +++ b/machines/aragon/configuration.nix @@ -63,7 +63,7 @@ users.users.gunalx = { isNormalUser = true; description = "Adrian Gunnar Lauterer"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ "networkmanager" "wheel" "input" ]; packages = with pkgs; [ ]; }; diff --git a/profiles/base.nix b/profiles/base.nix index bba286b..0227b55 100644 --- a/profiles/base.nix +++ b/profiles/base.nix @@ -28,6 +28,7 @@ imports = sops atuin upower + nvtopPackages.full ]; #just allow unfree, im fine with it. diff --git a/profiles/desktop.nix b/profiles/desktop.nix index ce60656..2f7bf37 100644 --- a/profiles/desktop.nix +++ b/profiles/desktop.nix @@ -13,21 +13,25 @@ imports = ]; - environment.systemPackages = with pkgs; [ - openscad - - #cura # broken - prusa-slicer + environment.systemPackages = with pkgs; [ + libnotify + openscad + + #cura # broken + prusa-slicer - #libsForQt5.qt5ct - #qt6Packages.qt6ct - where-is-my-sddm-theme - - swww + #libsForQt5.qt5ct + #qt6Packages.qt6ct + where-is-my-sddm-theme + + swww ]; fonts.packages = with pkgs; [ + nerd-fonts._0xproto + _0xproto + noto-fonts noto-fonts-cjk-sans noto-fonts-emoji @@ -37,10 +41,11 @@ imports = mplus-outline-fonts.githubRelease dina-font proggyfonts - nerdfonts + #nerdfonts ubuntu_font_family - ]; + ] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); + # Enable CUPS to print documents. services.printing.enable = false; #temp off because of CVE diff --git a/profiles/development.nix b/profiles/development.nix index 3ea7726..dac5b04 100644 --- a/profiles/development.nix +++ b/profiles/development.nix @@ -8,6 +8,15 @@ imports = ]; environment.systemPackages = with pkgs; [ + zed-editor-fhs + aider-chat + + python3Full + uv + python3Packages.pip + python3Packages.uv + poetry + texliveFull diff --git a/profiles/sway.nix b/profiles/sway.nix index be0e206..46cd0fe 100644 --- a/profiles/sway.nix +++ b/profiles/sway.nix @@ -41,7 +41,7 @@ imports = workstyle #swayest-workstyle #migth switch to this. autotiling-rs - wleave + wlogout pass-wayland