From f828268b14dc3d091fb80701f069102fcd28bc4c Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 2 Dec 2024 20:59:00 +0100 Subject: [PATCH] 24.11 Vicuna --- configuration.nix | 2 +- flake.nix | 4 +- home-modules/fish.nix | 12 +-- home-modules/hyprland.nix | 122 +++++++++++----------- home.nix | 2 +- system-modules/hardware-configuration.nix | 2 +- system-modules/nvidia.nix | 7 +- system-modules/ollama.nix | 3 +- 8 files changed, 78 insertions(+), 76 deletions(-) diff --git a/configuration.nix b/configuration.nix index 9e989cb..20bd41d 100755 --- a/configuration.nix +++ b/configuration.nix @@ -117,7 +117,7 @@ xwayland.enable = true; }; - system.stateVersion = "24.05"; + system.stateVersion = "24.11"; nixpkgs.config.allowUnfree = true; diff --git a/flake.nix b/flake.nix index 3311f3f..e186242 100755 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,10 @@ description = "Multisystem NixOS Flake of Lennart J. Kurzweg"; inputs = { - nixpkgs = { url = "nixpkgs/nixos-24.05"; }; + nixpkgs = { url = "nixpkgs/nixos-24.11"; }; nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; }; nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; }; - home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + home-manager = { url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; }; diff --git a/home-modules/fish.nix b/home-modules/fish.nix index bff6943..0307a45 100755 --- a/home-modules/fish.nix +++ b/home-modules/fish.nix @@ -27,7 +27,7 @@ $(echo -e "$logo" | sed -n 7p): fish $(fish --version | rev | cut -f 1 -d' ' | rev) $(echo -e "$logo" | sed -n 8p): ''$(uname -r) $(echo -e "$logo" | sed -n 9p): $($EDITOR --version | head -n 1 | sed -E 's-(.+?) \(.*-\1-g') - $(echo -e "$logo" | sed -n 10p): $(yazi --version | yazi --version | sed -E 's-(.*?) \(.*-\1-g') + $(echo -e "$logo" | sed -n 10p): $(yazi --version | sed -E 's-(.*?) \(.*-\1-g') $(echo -e "$logo" | sed -n 11p): $(starship --version | head -n 1) " echo -e "$msg" @@ -85,20 +85,18 @@ # ya = "yazi"; # function # nxfiglet = "figlet"; }; - interactiveShellInit = '' + interactiveShellInit = /* fish */ '' set -g fish_greeting if not set -q IN_NIX_SHELL - nxfetch - # yazi if set -q SESSION_FROM_DE - set -e SESSION_FROM_DE set tmp (mktemp -t "yazi-cwd.XXXXX") - yazi $argv --cwd-file="$tmp" + yazi --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - cd -- "$cwd" + builtin cd -- "$cwd" end rm -f -- "$tmp" end + nxfetch end ''; functions = { diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index bb527f9..9f6a82f 100755 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -92,47 +92,49 @@ in { "${main.name}, ${main.resolution}, ${main.position}, ${main.scale}" ])); - workspace = - let - d1 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); - d2 = if host == "NxXPS" then monitors.xps.second.name else (if host == "NxNORTH" then monitors.north.left.name else monitors.ace.main.name); - d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); - # d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.right.name else monitors.ace.main.name); - compact = "gapsin:0, gapsout:0, bordersize:1, rounding:false"; - in - [ - "11, monitor:${d1}, default:true" - "12, monitor:${d1}" - "13, monitor:${d1}" - "14, monitor:${d1}" - "15, monitor:${d1}" - "16, monitor:${d1}" - "17, monitor:${d1}" - "18, monitor:${d1}" - "19, monitor:${d1}" - "10, monitor:${d1}, ${compact}" - "100, monitor:${d1}, ${compact}" - "21, monitor:${d2}, default:true, ${compact}" - "22, monitor:${d2}" - "23, monitor:${d2}" - "24, monitor:${d2}" - "25, monitor:${d2}" - "26, monitor:${d2}" - "27, monitor:${d2}" - "28, monitor:${d2}" - "29, monitor:${d2}" - "20, monitor:${d2}" - "31, monitor:${d3}, default:${let x = if host == "NxNORTH" then "true" else "false"; in x}" - "32, monitor:${d3}" - "33, monitor:${d3}" - "34, monitor:${d3}" - "35, monitor:${d3}" - "36, monitor:${d3}" - "37, monitor:${d3}" - "38, monitor:${d3}" - "39, monitor:${d3}" - "30, monitor:${d3}, ${compact}" - ]; + workspace = let + d1 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); + d2 = if host == "NxXPS" then monitors.xps.second.name else (if host == "NxNORTH" then monitors.north.left.name else monitors.ace.main.name); + d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); + # d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.right.name else monitors.ace.main.name); + compact = "gapsin:0, gapsout:0, bordersize:1, rounding:false"; + in [ + "11, monitor:${d1}, default:true" + "12, monitor:${d1}" + "13, monitor:${d1}" + "14, monitor:${d1}" + "15, monitor:${d1}" + "16, monitor:${d1}" + "17, monitor:${d1}" + "18, monitor:${d1}" + "19, monitor:${d1}" + "10, monitor:${d1}, ${compact}" + "100, monitor:${d1}, ${compact}" + "21, monitor:${d2}, default:true, ${compact}" + "22, monitor:${d2}" + "23, monitor:${d2}" + "24, monitor:${d2}" + "25, monitor:${d2}" + "26, monitor:${d2}" + "27, monitor:${d2}" + "28, monitor:${d2}" + "29, monitor:${d2}" + "20, monitor:${d2}" + "31, monitor:${d3}, default:${let x = if host == "NxNORTH" then "true" else "false"; in x}" + "32, monitor:${d3}" + "33, monitor:${d3}" + "34, monitor:${d3}" + "35, monitor:${d3}" + "36, monitor:${d3}" + "37, monitor:${d3}" + "38, monitor:${d3}" + "39, monitor:${d3}" + "30, monitor:${d3}, ${compact}" + ] ++ [ + # no gaps when only + "w[tv1], gapsout:0, gapsin:0" + "f[1], gapsout:0, gapsin:0" + ]; # "device:logitech-wireless-mouse-mx-master-1" = { # sensitivity = -0.2; @@ -175,12 +177,12 @@ in { decoration = { rounding = rice.rounding; - drop_shadow = false; - shadow_range = "20"; - shadow_offset = "0 0"; - shadow_render_power = "4"; - "col.shadow" = "rgba(${rice.lib.nohash rice.color.red.base}ff)"; - "col.shadow_inactive" = "rgba(${rice.lib.nohash rice.color.black.base}ff)"; + # drop_shadow = false; + # shadow_range = "20"; + # shadow_offset = "0 0"; + # shadow_render_power = "4"; + # "col.shadow" = "rgba(${rice.lib.nohash rice.color.red.base}ff)"; + # "col.shadow_inactive" = "rgba(${rice.lib.nohash rice.color.black.base}ff)"; active_opacity = "1.0"; inactive_opacity = "1.0"; @@ -229,7 +231,6 @@ in { dwindle = { preserve_split = true; # you probably want this - no_gaps_when_only = true; }; # master = { @@ -259,6 +260,11 @@ in { "opacity ${transparency},class:^(com.chatterino.*)$" "opacity ${transparency},class:^(chatterino)$" "bordercolor rgba(${rice.lib.nohash rice.color.magenta.bright}ff), pinned:1" + ] ++ [ + "bordersize 0, floating:0, onworkspace:w[tv1]" + "rounding 0, floating:0, onworkspace:w[tv1]" + "bordersize 0, floating:0, onworkspace:f[1]" + "rounding 0, floating:0, onworkspace:f[1]" ]; windowrule = [ @@ -275,12 +281,12 @@ in { "opacity ${transparency}, discord" "opacity ${transparency}, vesktop" "opacity ${transparency}, Element" - "opacity ${transparency}, thunderbird" + # "opacity ${transparency}, thunderbird" "opacity ${transparency}, lutris" "opacity ${transparency}, element" - "opacity ${transparency}, ^([sS]potify)$" - "opacity ${transparency}, virt-manager" - "opacity ${transparency}, thunar" + # "opacity ${transparency}, ^([sS]potify)$" + # "opacity ${transparency}, virt-manager" + # "opacity ${transparency}, thunar" "opacity ${transparency}, title:^(wlogout)$" "opaque, title:^(GNU Image Manipulation Program)$" "float, title:^(Picture-in-Picture)$" @@ -327,7 +333,7 @@ in { "SUPER, F1, workspace, 100" "SUPER SHIFT, F1, movetoworkspace, 100" # "SUPER, F2," - "SUPER, F3, toggleopaque" + # "SUPER, F3, toggleopaque" # "SUPER, F4," "SUPER, F5, exec, nx_gcal_event force-lookup" "SUPER SHIFT, F5, exec, nx_gcal_event reauthenticate" @@ -584,12 +590,10 @@ in { ''; }; - home.file = - let - m = if host == "NxXPS" then monitors.xps.main.name else monitors.north.main.name; - in - { - ".config/hypr/hyprlock.conf".text = '' + home.file = let + m = if host == "NxXPS" then monitors.xps.main.name else monitors.north.main.name; + in { + ".config/hypr/hyprlock.conf".text = '' background { monitor = ${m} diff --git a/home.nix b/home.nix index ec362ee..ce74e4c 100755 --- a/home.nix +++ b/home.nix @@ -72,7 +72,7 @@ imv mpv mediainfo exiftool ffmpeg pavucontrol - fontpreview gtk2fontsel + fontpreview lynx w3m browsh bat du-dust eza neofetch tldr fzf figlet ripgrep lolcat jq glow brightnessctl wev diff --git a/system-modules/hardware-configuration.nix b/system-modules/hardware-configuration.nix index 4e01f1b..0d4bc33 100755 --- a/system-modules/hardware-configuration.nix +++ b/system-modules/hardware-configuration.nix @@ -46,7 +46,7 @@ } else {}; hardware.opengl.extraPackages = if host == "NxXPS" then with pkgs; [ - (if (lib.versionOlder (lib.versions.majorMinor lib.version) "24.05") then vaapiIntel else intel-vaapi-driver) + (if (lib.versionOlder (lib.versions.majorMinor lib.version) "24.11") then vaapiIntel else intel-vaapi-driver) libvdpau-va-gl intel-media-driver ] else []; diff --git a/system-modules/nvidia.nix b/system-modules/nvidia.nix index 4921080..e346349 100755 --- a/system-modules/nvidia.nix +++ b/system-modules/nvidia.nix @@ -57,11 +57,10 @@ lib.mkIf nvidia.enable nvidiaSettings = true; # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.beta; }; - opengl = { + package = config.boot.kernelPackages.nvidiaPackages.beta; + }; + graphics = { enable = true; - driSupport = true; - driSupport32Bit = true; }; }; } diff --git a/system-modules/ollama.nix b/system-modules/ollama.nix index 284f5cd..3927290 100755 --- a/system-modules/ollama.nix +++ b/system-modules/ollama.nix @@ -19,7 +19,8 @@ in { package = p; enable = true; acceleration = lib.mkIf nvidia.enable "cuda"; - listenAddress = if host == "NxACE" then "0.0.0.0:11434" else "127.0.0.1:11434"; + host = if host == "NxACE" then "0.0.0.0" else "127.0.0.1"; + port = 11434; environmentVariables = { OLLAMA_ORIGINS = "*"; };