diff options
Diffstat (limited to 'nix/modules')
| -rw-r--r-- | nix/modules/configuration.nix | 35 | ||||
| -rw-r--r-- | nix/modules/home/default.nix | 8 | ||||
| -rw-r--r-- | nix/modules/home/emacs.nix | 1 | ||||
| -rw-r--r-- | nix/modules/home/fcitx.nix | 4 | ||||
| -rw-r--r-- | nix/modules/home/hyprland.nix | 22 | ||||
| -rw-r--r-- | nix/modules/home/user.nix | 4 | ||||
| -rw-r--r-- | nix/modules/home/waybar.nix | 468 | ||||
| -rw-r--r-- | nix/modules/home/zsh.nix | 2 | ||||
| -rw-r--r-- | nix/modules/ngircd.nix | 2 | ||||
| -rw-r--r-- | nix/modules/nvidia.nix | 4 | ||||
| -rw-r--r-- | nix/modules/ollama.nix | 5 | ||||
| -rw-r--r-- | nix/modules/pipewire.nix | 6 | ||||
| -rw-r--r-- | nix/modules/xserver.nix | 1 |
13 files changed, 285 insertions, 277 deletions
diff --git a/nix/modules/configuration.nix b/nix/modules/configuration.nix index 7b862f9..c906529 100644 --- a/nix/modules/configuration.nix +++ b/nix/modules/configuration.nix @@ -99,17 +99,17 @@ kernelParams = [ "usbcore.autosuspend=-1" - "debugfs=off" + # "debugfs=off" "page_alloc.shuffle=1" "slab_nomerge" - "page_poison=1" + # "page_poison=1" # madaidan "pti=on" "randomize_kstack_offset=on" "vsyscall=none" "module.sig_enforce=1" - "lockdown=confidentiality" + # "lockdown=confidentiality" # cpu "spectre_v2=on" @@ -122,14 +122,10 @@ "extra_latent_entropy" # mineral - "init_on_alloc=1" + # "init_on_alloc=1" "random.trust_cpu=off" "random.trust_bootloader=off" - "intel_iommu=on" - "amd_iommu=force_isolation" - "iommu=force" - "iommu.strict=1" - "init_on_free=1" + # "init_on_free=1" "quiet" "loglevel=0" ]; @@ -240,8 +236,8 @@ graphics.enable = ! config.monorepo.profiles.ttyonly.enable; bluetooth = { - enable = true; - powerOnBoot = true; + enable = lib.mkDefault (! config.monorepo.profiles.ttyonly.enable); + powerOnBoot = lib.mkDefault (! config.monorepo.profiles.ttyonly.enable); }; }; @@ -264,15 +260,15 @@ # Misc. udev = { extraRules = ''''; - packages = with pkgs; [ + packages = if config.monorepo.profiles.workstation.enable then with pkgs; [ platformio-core platformio-core.udev openocd - ]; + ] else []; }; - printing.enable = true; - udisks2.enable = true; + printing.enable = lib.mkDefault config.monorepo.profiles.workstation.enable; + udisks2.enable = (! config.monorepo.profiles.ttyonly.enable); }; programs = { @@ -421,11 +417,20 @@ }; nixpkgs.config.permittedInsecurePackages = [ + "python3.13-ecdsa-0.19.1" "olm-3.2.16" ]; nix = { settings = { + max-jobs = 4; + cores = 0; + substituters = [ + "https://cache.nixos-cuda.org" + ]; + trusted-public-keys = [ + "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" + ]; experimental-features = "nix-command flakes ca-derivations"; trusted-users = [ "@wheel" ]; }; diff --git a/nix/modules/home/default.nix b/nix/modules/home/default.nix index c3bcfbf..f8a1ad5 100644 --- a/nix/modules/home/default.nix +++ b/nix/modules/home/default.nix @@ -109,7 +109,7 @@ (if config.monorepo.profiles.lang-python.enable then (with pkgs; [ poetry python3 - python312Packages.jedi + python314Packages.python-lsp-server ]) else []) ++ (if config.monorepo.profiles.lang-sol.enable then (with pkgs; [ @@ -151,13 +151,13 @@ (if config.monorepo.profiles.lang-nix.enable then (with pkgs; [ nil nixd - nixfmt-rfc-style + nixfmt nix-prefetch-scripts ]) else []) ++ (if config.monorepo.profiles.crypto.enable then (with pkgs; [ bitcoin - electrum + # electrum monero-cli monero-gui ]) else []) @@ -168,7 +168,7 @@ ]) else []) ++ (if config.monorepo.profiles.music.enable then (with pkgs; [ - mpc-cli + mpc sox ]) else []) ++ diff --git a/nix/modules/home/emacs.nix b/nix/modules/home/emacs.nix index 6e36837..2b7840d 100644 --- a/nix/modules/home/emacs.nix +++ b/nix/modules/home/emacs.nix @@ -28,7 +28,6 @@ epkgs.elfeed-org epkgs.elfeed-tube epkgs.elfeed-tube-mpv - epkgs.ellama epkgs.elpher epkgs.ement epkgs.emmet-mode diff --git a/nix/modules/home/fcitx.nix b/nix/modules/home/fcitx.nix index bedfdf2..b4bb965 100644 --- a/nix/modules/home/fcitx.nix +++ b/nix/modules/home/fcitx.nix @@ -5,8 +5,8 @@ enable = lib.mkDefault config.monorepo.profiles.graphics.enable; fcitx5.addons = with pkgs; [ fcitx5-gtk - fcitx5-chinese-addons - fcitx5-configtool + qt6Packages.fcitx5-chinese-addons + qt6Packages.fcitx5-configtool fcitx5-mozc fcitx5-rime ]; diff --git a/nix/modules/home/hyprland.nix b/nix/modules/home/hyprland.nix index 1d29b74..de343b5 100644 --- a/nix/modules/home/hyprland.nix +++ b/nix/modules/home/hyprland.nix @@ -8,10 +8,12 @@ settings = { "$mod" = "SUPER"; bezier = [ - "overshot,0,1,0,0.95" + "overshot, 0.05, 0.9, 0.1, 1.05" ]; animation = [ - "workspaces, 1, 10, overshot" + # "workspaces, 1, 10, overshot" + "windows, 1, 2, default" + "workspaces, 1, 2, default, slidefade 20%" ]; exec-once = [ "waybar" @@ -30,10 +32,11 @@ "__GLX_VENDOR_LIBRARY_NAME,nvidia" "ELECTRON_OZONE_PLATFORM_HINT,auto" ]; - layerrule = [ - "blur,waybar" - ]; + # layerrule = [ + # "blur:top,waybar" + # ]; monitor = [ + "DP-4,2560x1440@165.000000,0x0,1" "Unknown-1,disable" ]; windowrulev2 = [ @@ -134,15 +137,14 @@ }; rounding = 5; }; - device = { - name = "beken-usb-gaming-mouse-1"; - sensitivity = -0.5; - }; input = { + scroll_method = "on_button_down"; + scroll_button = 276; + sensitivity = -0.5; kb_options = "caps:swapescape"; repeat_delay = 300; repeat_rate = 50; - natural_scroll = true; + natural_scroll = false; touchpad = { natural_scroll = true; disable_while_typing = true; diff --git a/nix/modules/home/user.nix b/nix/modules/home/user.nix index 3cd4190..c97347e 100644 --- a/nix/modules/home/user.nix +++ b/nix/modules/home/user.nix @@ -60,12 +60,12 @@ magic-wormhole stow # fonts - nerd-fonts.iosevka noto-fonts noto-fonts-cjk-sans noto-fonts-emoji fira-code font-awesome_6 victor-mono + nerd-fonts.iosevka noto-fonts noto-fonts-cjk-sans noto-fonts-color-emoji fira-code font-awesome_6 victor-mono (aspellWithDicts (dicts: with dicts; [ en en-computers en-science ])) # Misc. - pinentry + pinentry-gnome3 x11_ssh_askpass xdg-utils acpilight diff --git a/nix/modules/home/waybar.nix b/nix/modules/home/waybar.nix index 8e797a5..31fe6c0 100644 --- a/nix/modules/home/waybar.nix +++ b/nix/modules/home/waybar.nix @@ -1,274 +1,276 @@ { lib, config, ... }: -{ - programs.waybar = { - enable = lib.mkDefault config.monorepo.profiles.hyprland.enable; - style = '' - * { - border: none; - border-radius: 0px; - font-family: Iosevka Nerd Font, FontAwesome, Noto Sans CJK; - font-size: 14px; - font-style: normal; - min-height: 0; - } + { + programs.waybar = { + enable = lib.mkDefault config.monorepo.profiles.hyprland.enable; + style = '' + * { + border: none; + border-radius: 0px; + font-family: Iosevka Nerd Font, FontAwesome, Noto Sans CJK; + font-size: 14px; + font-style: normal; + min-height: 0; + } - window#waybar { - background: rgba(30, 30, 46, 0.5); - border-bottom: 1px solid #45475a; - color: #cdd6f4; - } + window#waybar { + background: rgba(30, 30, 46, 0.5); + border-bottom: 1px solid #45475a; + color: #cdd6f4; + } - #workspaces { - background: #45475a; - margin: 5px 5px 5px 5px; - padding: 0px 5px 0px 5px; - border-radius: 16px; - border: solid 0px #f4d9e1; - font-weight: normal; - font-style: normal; - } - #workspaces button { - padding: 0px 5px; + #workspaces { + background: #45475a; + margin: 5px 5px 5px 5px; + padding: 0px 5px 0px 5px; border-radius: 16px; - color: #a6adc8; - } + border: solid 0px #f4d9e1; + font-weight: normal; + font-style: normal; + } + #workspaces button { + padding: 0px 5px; + border-radius: 16px; + color: #a6adc8; + } - #workspaces button.active { - color: #f4d9e1; - background-color: transparent; - border-radius: 16px; - } + #workspaces button.active { + color: #f4d9e1; + background-color: transparent; + border-radius: 16px; + } - #workspaces button:hover { - background-color: #cdd6f4; - color: black; - border-radius: 16px; - } + #workspaces button:hover { + background-color: #cdd6f4; + color: black; + border-radius: 16px; + } - #custom-date, #clock, #battery, #pulseaudio, #network, #custom-randwall, #custom-launcher { - background: transparent; - padding: 5px 5px 5px 5px; - margin: 5px 5px 5px 5px; - border-radius: 8px; - border: solid 0px #f4d9e1; - } + #custom-date, #clock, #battery, #pulseaudio, #network, #custom-randwall, #custom-launcher { + background: transparent; + padding: 5px 5px 5px 5px; + margin: 5px 5px 5px 5px; + border-radius: 8px; + border: solid 0px #f4d9e1; + } - #custom-date { - color: #D3869B; - } + #custom-date { + color: #D3869B; + } - #custom-power { - color: #24283b; - background-color: #db4b4b; - border-radius: 5px; - margin-right: 10px; - margin-top: 5px; - margin-bottom: 5px; - margin-left: 0px; - padding: 5px 10px; - } + #custom-power { + color: #24283b; + background-color: #db4b4b; + border-radius: 5px; + margin-right: 10px; + margin-top: 5px; + margin-bottom: 5px; + margin-left: 0px; + padding: 5px 10px; + } - #tray { - background: #45475a; - margin: 5px 5px 5px 5px; - border-radius: 16px; - padding: 0px 5px; - /*border-right: solid 1px #282738;*/ - } + #tray { + background: #45475a; + margin: 5px 5px 5px 5px; + border-radius: 16px; + padding: 0px 5px; + /*border-right: solid 1px #282738;*/ + } - #clock { - color: #cdd6f4; - background-color: #45475a; - border-radius: 0px 0px 0px 24px; - padding-left: 13px; - padding-right: 15px; - margin-right: 0px; - margin-left: 10px; - margin-top: 0px; - margin-bottom: 0px; - font-weight: bold; - /*border-left: solid 1px #282738;*/ - } + #clock { + color: #cdd6f4; + background-color: #45475a; + border-radius: 0px 0px 0px 24px; + padding-left: 13px; + padding-right: 15px; + margin-right: 0px; + margin-left: 10px; + margin-top: 0px; + margin-bottom: 0px; + font-weight: bold; + /*border-left: solid 1px #282738;*/ + } - #battery { - color: #89b4fa; - } + #battery { + color: #89b4fa; + } - #battery.charging { - color: #a6e3a1; - } + #battery.charging { + color: #a6e3a1; + } - #battery.warning:not(.charging) { - background-color: #f7768e; - color: #f38ba8; - border-radius: 5px 5px 5px 5px; - } + #battery.warning:not(.charging) { + background-color: #f7768e; + color: #f38ba8; + border-radius: 5px 5px 5px 5px; + } - #backlight { - background-color: #24283b; - color: #db4b4b; - border-radius: 0px 0px 0px 0px; - margin: 5px; - margin-left: 0px; - margin-right: 0px; - padding: 0px 0px; - } + #backlight { + background-color: #24283b; + color: #db4b4b; + border-radius: 0px 0px 0px 0px; + margin: 5px; + margin-left: 0px; + margin-right: 0px; + padding: 0px 0px; + } - #network { - color: #f4d9e1; - border-radius: 8px; - margin-right: 5px; - } + #network { + color: #f4d9e1; + border-radius: 8px; + margin-right: 5px; + } - #pulseaudio { - color: #f4d9e1; - border-radius: 8px; - margin-left: 0px; - } - - #pulseaudio.muted { - background: transparent; - color: #928374; - border-radius: 8px; - margin-left: 0px; - } + #pulseaudio { + color: #f4d9e1; + border-radius: 8px; + margin-left: 0px; + } - #custom-randwall { - color: #f4d9e1; - border-radius: 8px; - margin-right: 0px; - } + #pulseaudio.muted { + background: transparent; + color: #928374; + border-radius: 8px; + margin-left: 0px; + } - #custom-launcher { - color: #e5809e; - background-color: #45475a; - border-radius: 0px 24px 0px 0px; - margin: 0px 0px 0px 0px; - padding: 0 20px 0 13px; - /*border-right: solid 1px #282738;*/ - font-size: 20px; - } + #custom-randwall { + color: #f4d9e1; + border-radius: 8px; + margin-right: 0px; + } - #custom-launcher button:hover { - background-color: #FB4934; - color: transparent; - border-radius: 8px; - margin-right: -5px; - margin-left: 10px; - } + #custom-launcher { + color: #e5809e; + background-color: #45475a; + border-radius: 0px 24px 0px 0px; + margin: 0px 0px 0px 0px; + padding: 0 20px 0 13px; + /*border-right: solid 1px #282738;*/ + font-size: 20px; + } - #custom-playerctl { - background: #45475a; - padding-left: 15px; - padding-right: 14px; - border-radius: 16px; - /*border-left: solid 1px #282738;*/ - /*border-right: solid 1px #282738;*/ - margin-top: 5px; - margin-bottom: 5px; - margin-left: 0px; - font-weight: normal; - font-style: normal; - font-size: 16px; - } + #custom-launcher button:hover { + background-color: #FB4934; + color: transparent; + border-radius: 8px; + margin-right: -5px; + margin-left: 10px; + } - #custom-playerlabel { - background: transparent; - padding-left: 10px; - padding-right: 15px; - border-radius: 16px; + #custom-playerctl { + background: #45475a; + padding-left: 15px; + padding-right: 14px; + border-radius: 16px; /*border-left: solid 1px #282738;*/ /*border-right: solid 1px #282738;*/ margin-top: 5px; margin-bottom: 5px; + margin-left: 0px; font-weight: normal; font-style: normal; - } + font-size: 16px; + } - #window { - background: #45475a; - padding-left: 15px; - padding-right: 15px; - border-radius: 16px; - /*border-left: solid 1px #282738;*/ - /*border-right: solid 1px #282738;*/ - margin-top: 5px; - margin-bottom: 5px; - font-weight: normal; - font-style: normal; - } + #custom-playerlabel { + background: transparent; + padding-left: 10px; + padding-right: 15px; + border-radius: 16px; + /*border-left: solid 1px #282738;*/ + /*border-right: solid 1px #282738;*/ + margin-top: 5px; + margin-bottom: 5px; + font-weight: normal; + font-style: normal; + } - #custom-wf-recorder { - padding: 0 20px; - color: #e5809e; - background-color: #1E1E2E; - } + #window { + background: #45475a; + padding-left: 15px; + padding-right: 15px; + border-radius: 16px; + /*border-left: solid 1px #282738;*/ + /*border-right: solid 1px #282738;*/ + margin-top: 5px; + margin-bottom: 5px; + font-weight: normal; + font-style: normal; + } - #cpu { - background-color: #45475a; - /*color: #FABD2D;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 10px 0px 10px; - font-weight: bold; - } + #custom-wf-recorder { + padding: 0 20px; + color: #e5809e; + background-color: #1E1E2E; + } - #memory { - background-color: #45475a; - /*color: #83A598;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 10px 0px 10px; - font-weight: bold; - } + #cpu { + background-color: #45475a; + /*color: #FABD2D;*/ + border-radius: 16px; + margin: 5px; + margin-left: 5px; + margin-right: 5px; + padding: 0px 10px 0px 10px; + font-weight: bold; + } - #disk { - background-color: #45475a; - /*color: #8EC07C;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 10px 0px 10px; - font-weight: bold; - } + #memory { + background-color: #45475a; + /*color: #83A598;*/ + border-radius: 16px; + margin: 5px; + margin-left: 5px; + margin-right: 5px; + padding: 0px 10px 0px 10px; + font-weight: bold; + } - #custom-hyprpicker { - background-color: #45475a; - /*color: #8EC07C;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 11px 0px 9px; - font-weight: bold; - } - ''; - settings = { - mainBar = { - layer = "top"; - position = "top"; - height = 50; + #disk { + background-color: #45475a; + /*color: #8EC07C;*/ + border-radius: 16px; + margin: 5px; + margin-left: 5px; + margin-right: 5px; + padding: 0px 10px 0px 10px; + font-weight: bold; + } - output = config.monorepo.vars.monitors; + #custom-hyprpicker { + background-color: #45475a; + /*color: #8EC07C;*/ + border-radius: 16px; + margin: 5px; + margin-left: 5px; + margin-right: 5px; + padding: 0px 11px 0px 9px; + font-weight: bold; + } + ''; + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 50; - modules-left = [ "hyprland/workspaces" ]; - modules-center = [ "hyprland/window" ]; - modules-right = [ "battery" "clock" ]; + output = config.monorepo.vars.monitors; - battery = { - format = "{icon} {capacity}%"; - format-icons = ["" "" "" "" "" ]; - }; + modules-left = [ "hyprland/workspaces" ]; + modules-center = [ "hyprland/window" ]; + modules-right = [ "battery" "clock" ]; + + battery = { + format = "{icon} {capacity}%"; + format-icons = ["" "" "" "" "" ]; + }; - clock = { - format = "⏰ {:%a %d, %b %H:%M}"; + clock = { + format = "⏰ {:%a %d, %b %H:%M}"; + }; }; }; }; - }; -} + } +#+end_src +** diff --git a/nix/modules/home/zsh.nix b/nix/modules/home/zsh.nix index 6753547..31468e1 100644 --- a/nix/modules/home/zsh.nix +++ b/nix/modules/home/zsh.nix @@ -37,7 +37,7 @@ usite = "cd ~/src/publish-org-roam-ui && bash local.sh && rm -rf ~/website_html/graph_view; cp -r ~/src/publish-org-roam-ui/out ~/website_html/graph_view && rsync -azvP --chmod=\"Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r\" ~/website_html/ root@${config.monorepo.vars.remoteHost}:/var/www/${config.monorepo.vars.internetName}-website/"; sai = "eval \"$(ssh-agent -s)\" && ssh-add ~/.ssh/id_ed25519 && ssh-add -l"; - i3 = "exec ${pkgs.i3-gaps}/bin/i3"; + i3 = "exec ${pkgs.i3}/bin/i3"; }; loginExtra = '' if [[ "$(tty)" = "/dev/tty1" ]]; then diff --git a/nix/modules/ngircd.nix b/nix/modules/ngircd.nix index c8348bf..b6c6842 100644 --- a/nix/modules/ngircd.nix +++ b/nix/modules/ngircd.nix @@ -6,7 +6,7 @@ [Global] Name = ${config.monorepo.vars.orgHost} Info = NullRing IRC Instance - Listen = 0.0.0.0 + Listen = ::,0.0.0.0 MotdFile = /etc/motd.txt Network = NullRing Ports = 6667 diff --git a/nix/modules/nvidia.nix b/nix/modules/nvidia.nix index 2973386..f6a398a 100644 --- a/nix/modules/nvidia.nix +++ b/nix/modules/nvidia.nix @@ -3,7 +3,7 @@ hardware = { graphics.extraPackages = (if config.monorepo.profiles.cuda.enable then with pkgs; [ - vaapiVdpau + libva-vdpau-driver libvdpau-va-gl nvidia-vaapi-driver ] else []); @@ -15,7 +15,7 @@ finegrained = false; }; nvidiaSettings = lib.mkDefault config.monorepo.profiles.cuda.enable; - open = lib.mkDefault false; + open = config.monorepo.profiles.cuda.enable; package = config.boot.kernelPackages.nvidiaPackages.stable; }; }; diff --git a/nix/modules/ollama.nix b/nix/modules/ollama.nix index bfa0cf3..357f6a3 100644 --- a/nix/modules/ollama.nix +++ b/nix/modules/ollama.nix @@ -1,8 +1,9 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: { + # services.open-webui.enable = lib.mkDefault (!config.monorepo.profiles.server.enable); services.ollama = { enable = lib.mkDefault (!config.monorepo.profiles.server.enable); - acceleration = if (config.monorepo.profiles.workstation.enable) then "cuda" else null; + package = if (config.monorepo.profiles.workstation.enable) then pkgs.ollama-cuda else pkgs.ollama-vulkan; loadModels = if (config.monorepo.profiles.workstation.enable) then [ "qwen3:30b" "qwen3-coder:latest" diff --git a/nix/modules/pipewire.nix b/nix/modules/pipewire.nix index 1ed2082..4ca3610 100644 --- a/nix/modules/pipewire.nix +++ b/nix/modules/pipewire.nix @@ -13,9 +13,9 @@ pipewire."92-low-latency" = { "context.properties" = { "default.clock.rate" = 48000; - "default.clock.quantum" = 256; - "default.clock.min-quantum" = 32; - "default.clock.max-quantum" = 512; + "default.clock.quantum" = 512; + "default.clock.min-quantum" = 512; + "default.clock.max-quantum" = 1024; }; pipewire-pulse."92-low-latency" = { "context.properties" = [ diff --git a/nix/modules/xserver.nix b/nix/modules/xserver.nix index 0d5b29c..29aec23 100644 --- a/nix/modules/xserver.nix +++ b/nix/modules/xserver.nix @@ -9,7 +9,6 @@ windowManager = { i3 = { enable = ! config.monorepo.profiles.ttyonly.enable; - package = pkgs.i3-gaps; }; }; |
