diff --git a/flake.lock b/flake.lock index 86eb2c9..c59b34f 100644 --- a/flake.lock +++ b/flake.lock @@ -640,6 +640,21 @@ "type": "indirect" } }, + "nixpkgs-staging-next": { + "locked": { + "lastModified": 1711995917, + "narHash": "sha256-KffQxoGwUTz4gaKp1woRXgunuJ+pjRd7KYjjJZuAb7c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4cad0502dbb4e9ca487b7b59d8f936d5ad64b7f8", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "staging-next", + "type": "indirect" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1706487304, @@ -877,6 +892,7 @@ "nix-straight": "nix-straight", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs-staging-next": "nixpkgs-staging-next", "org-nursery": "org-nursery", "org-side-tree": "org-side-tree", "org-timeblock": "org-timeblock", diff --git a/flake.nix b/flake.nix index 8064182..32507ec 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,10 @@ { description = "Flake of LibrePhoenix"; - outputs = inputs@{ self, nixpkgs, nixpkgs-stable, emacs-pin-nixpkgs, kdenlive-pin-nixpkgs, - home-manager, nix-doom-emacs, nix-straight, stylix, blocklist-hosts, - hyprland-plugins, rust-overlay, org-nursery, org-yaap, org-side-tree, - org-timeblock, phscroll, ... }: + outputs = inputs@{ self, nixpkgs, nixpkgs-staging-next, nixpkgs-stable, emacs-pin-nixpkgs, + kdenlive-pin-nixpkgs, home-manager, nix-doom-emacs, nix-straight, stylix, + blocklist-hosts, hyprland-plugins, rust-overlay, org-nursery, org-yaap, + org-side-tree, org-timeblock, phscroll, ... }: let # ---- SYSTEM SETTINGS ---- # systemSettings = { @@ -67,6 +67,10 @@ overlays = [ rust-overlay.overlays.default ]; }; + pkgs-staging-next = import nixpkgs-staging-next { + system = systemSettings.system; + }; + pkgs-stable = import nixpkgs-stable { system = systemSettings.system; config = { @@ -108,6 +112,7 @@ extraSpecialArgs = { # pass config variables from above inherit pkgs-stable; + inherit pkgs-staging-next; inherit pkgs-emacs; inherit pkgs-kdenlive; inherit systemSettings; @@ -134,6 +139,7 @@ specialArgs = { # pass config variables from above inherit pkgs-stable; + inherit pkgs-staging-next; inherit systemSettings; inherit userSettings; inherit (inputs) stylix; @@ -167,6 +173,7 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; nixpkgs-stable.url = "nixpkgs/nixos-23.11"; + nixpkgs-staging-next.url = "nixpkgs/staging-next"; emacs-pin-nixpkgs.url = "nixpkgs/f8e2ebd66d097614d51a56a755450d4ae1632df1"; kdenlive-pin-nixpkgs.url = "nixpkgs/cfec6d9203a461d9d698d8a60ef003cac6d0da94"; diff --git a/profiles/homelab/base.nix b/profiles/homelab/base.nix index cfb8a96..a62cbdc 100644 --- a/profiles/homelab/base.nix +++ b/profiles/homelab/base.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, systemSettings, userSettings, ... }: +{ lib, pkgs, pkgs-staging-next, systemSettings, userSettings, ... }: { imports = @@ -6,9 +6,17 @@ ../../system/hardware/time.nix # Network time sync ../../system/security/doas.nix ../../system/security/gpg.nix - ( import ../../system/app/docker.nix {storageDriver = "btrfs"; inherit userSettings pkgs lib;} ) + ( import ../../system/app/docker.nix {storageDriver = null; inherit pkgs userSettings lib;} ) ]; + # xz trojan https://github.com/NixOS/nixpkgs/issues/300055 + system.replaceRuntimeDependencies = [ + { + original = pkgs.xz; + replacement = pkgs-staging-next.xz; + } + ]; + # Fix nix path nix.nixPath = [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" "nixos-config=$HOME/dotfiles/system/configuration.nix" diff --git a/profiles/work/configuration.nix b/profiles/work/configuration.nix index 561aa66..4993aa1 100644 --- a/profiles/work/configuration.nix +++ b/profiles/work/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ pkgs, lib, systemSettings, userSettings, ... }: +{ pkgs, pkgs-staging-next, lib, systemSettings, userSettings, ... }: { imports = [ ../../system/hardware-configuration.nix @@ -16,7 +16,7 @@ (./. + "../../../system/wm"+("/"+userSettings.wm)+".nix") # My window manager #../../system/app/flatpak.nix ../../system/app/virtualization.nix - ( import ../../system/app/docker.nix {storageDriver = "btrfs"; inherit userSettings lib;} ) + ( import ../../system/app/docker.nix {storageDriver = null; inherit pkgs userSettings lib;} ) ../../system/security/doas.nix ../../system/security/gpg.nix ../../system/security/blocklist.nix @@ -27,6 +27,14 @@ ../../system/style/stylix.nix ]; + # xz trojan https://github.com/NixOS/nixpkgs/issues/300055 + system.replaceRuntimeDependencies = [ + { + original = pkgs.xz; + replacement = pkgs-staging-next.xz; + } + ]; + # Fix nix path nix.nixPath = [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" "nixos-config=$HOME/dotfiles/system/configuration.nix" diff --git a/profiles/work/home.nix b/profiles/work/home.nix index f535d01..52b76c2 100644 --- a/profiles/work/home.nix +++ b/profiles/work/home.nix @@ -50,6 +50,7 @@ xournalpp glib newsflash + foliate gnome.nautilus gnome.gnome-calendar gnome.seahorse @@ -94,7 +95,7 @@ vlc mpv yt-dlp - blender + blender-hip cura curaengine_stable (stdenv.mkDerivation { @@ -132,6 +133,7 @@ audio-recorder gnome.cheese ardour + rosegarden tenacity # Various dev packages diff --git a/profiles/wsl/configuration.nix b/profiles/wsl/configuration.nix index 9d83988..cc9532e 100644 --- a/profiles/wsl/configuration.nix +++ b/profiles/wsl/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ lib, pkgs, systemSettings, userSettings, ... }: +{ lib, pkgs, pkgs-staging-next, systemSettings, userSettings, ... }: with lib; let @@ -39,6 +39,14 @@ in }; + # xz trojan https://github.com/NixOS/nixpkgs/issues/300055 + system.replaceRuntimeDependencies = [ + { + original = pkgs.xz; + replacement = pkgs-staging-next.xz; + } + ]; + # Fix nix path nix.nixPath = [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" "nixos-config=$HOME/dotfiles/system/configuration.nix" diff --git a/system/app/docker.nix b/system/app/docker.nix index fa652cc..0923aaa 100644 --- a/system/app/docker.nix +++ b/system/app/docker.nix @@ -1,4 +1,4 @@ -{ lib, userSettings, storageDriver ? null, ... }: +{ pkgs, lib, userSettings, storageDriver ? null, ... }: assert lib.asserts.assertOneOf "storageDriver" storageDriver [ null @@ -18,4 +18,8 @@ assert lib.asserts.assertOneOf "storageDriver" storageDriver [ autoPrune.enable = true; }; users.users.${userSettings.username}.extraGroups = [ "docker" ]; + environment.systemPackages = with pkgs; [ + docker-compose + lazydocker + ]; } diff --git a/system/hardware-configuration.nix b/system/hardware-configuration.nix index fa864e7..893051f 100644 --- a/system/hardware-configuration.nix +++ b/system/hardware-configuration.nix @@ -8,10 +8,16 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "kvm-amd" "amdgpu" ]; + boot.initrd.kernelModules = [ "amdgpu" ]; + boot.kernelModules = [ "kvm-amd" "amdgpu" ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower amdgpu-pro ]; + hardware.opengl.extraPackages = [ pkgs.amdvlk ]; + hardware.opengl.extraPackages32 = [ pkgs.driversi686Linux.amdvlk ]; + + systemd.tmpfiles.rules = [ + "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" + ]; services.btrfs.autoScrub = { enable = true; diff --git a/system/hardware/kernel.nix b/system/hardware/kernel.nix index 7d7965a..d5e12cf 100644 --- a/system/hardware/kernel.nix +++ b/system/hardware/kernel.nix @@ -3,7 +3,4 @@ { boot.kernelPackages = pkgs.linuxPackages_zen; boot.consoleLogLevel = 0; - boot.extraModulePackages = with config.boot.kernelPackages; [ - zenpower - ]; } diff --git a/system/hardware/opengl.nix b/system/hardware/opengl.nix index 2d48cba..7e49f80 100644 --- a/system/hardware/opengl.nix +++ b/system/hardware/opengl.nix @@ -1,6 +1,9 @@ -{ ... }: +{ pkgs, ... }: { # OpenGL hardware.opengl.enable = true; + hardware.opengl.extraPackages = with pkgs; [ + rocmPackages.clr.icd + ]; } diff --git a/user/app/browser/qutebrowser.nix b/user/app/browser/qutebrowser.nix index 907c496..645542f 100644 --- a/user/app/browser/qutebrowser.nix +++ b/user/app/browser/qutebrowser.nix @@ -184,7 +184,8 @@ c.url.searchengines = {'DEFAULT': 'https://startpage.com/do/search?query={}', 'gl' : 'https://gitlab.com/search?search={}&nav_source=navbar', 'np' : 'https://github.com/search?q=repo%3ANixOS%2Fnixpkgs%20{}&type=code', 'wk' : 'https://en.wikipedia.org/w/index.php?fulltext=1&search={}&title=Special%3ASearch&ns0=1', - 'th' : 'https://www.thingiverse.com/search?q={}&page=1' + 'th' : 'https://www.thingiverse.com/search?q={}&page=1', + 'dh' : 'https://hub.docker.com/search?q={}' } config.set('completion.open_categories',["searchengines","quickmarks","bookmarks"]) diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el index b43a161..f54d629 100644 --- a/user/app/doom-emacs/config.el +++ b/user/app/doom-emacs/config.el @@ -190,6 +190,17 @@ ;; For camelCase (global-subword-mode 1) +;; Mini-frames +(setq mini-frame-show-parameters + '((left . 0.5) + (top . 10) + (width . 0.6) + (height . 15)) +) +(setq mini-frame-resize nil) +(setq mini-frame-standalone t) +(mini-frame-mode -1) ;; don't enable this for now since it's kinda slow on my system + ;;;------ Registers ------;;; (map! :leader diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index 61bda1d..d9b1858 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -253,6 +253,17 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu ;; For camelCase (global-subword-mode 1) +;; Mini-frames +(setq mini-frame-show-parameters + '((left . 0.5) + (top . 10) + (width . 0.6) + (height . 15)) +) +(setq mini-frame-resize nil) +(setq mini-frame-standalone t) +(mini-frame-mode -1) ;; don't enable this for now since it's kinda slow on my system + #+END_SRC ** Registers #+BEGIN_SRC emacs-lisp :tangle config.el @@ -1930,6 +1941,7 @@ Any git package can be configured for a particular commit or branch: (package! org-ql) (package! persist) (package! sudo-edit) +(package! mini-frame) #+END_SRC * Nix Integration In order to have Nix load my Doom Emacs configuration [[./doom.nix][doom.nix]], which I source in the =imports= block of my [[../../../profiles/work/home.nix][home.nix]]. diff --git a/user/app/doom-emacs/packages.el b/user/app/doom-emacs/packages.el index c590dfb..7961f59 100644 --- a/user/app/doom-emacs/packages.el +++ b/user/app/doom-emacs/packages.el @@ -30,3 +30,4 @@ (package! org-ql) (package! persist) (package! sudo-edit) +(package! mini-frame) diff --git a/user/app/ranger/rifle.conf b/user/app/ranger/rifle.conf index c6b144a..3239a03 100644 --- a/user/app/ranger/rifle.conf +++ b/user/app/ranger/rifle.conf @@ -76,7 +76,7 @@ ext nes, has fceux, X = fceux "$1" name ^[mM]akefile$ = make #----------- FL STUDIO -------------- -ext flp = flstudio "$@" +ext flp = flstudio "$@" & &>/dev/null #-------------------------------------------- # Scripts @@ -119,7 +119,7 @@ mime ^video, terminal, !X, has mplayer = mplayer -- "$@" #------------------------------------------- ext pdf, has atril, X, flag f = atril "$@" ext djvu, has atril, X, flag f = atril "$@" -ext epub, has atril, X, flag f = atril "$@" "atril" +ext epub, has foliate, X, flag f = foliate "$@" ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = soffice "$@" @@ -130,7 +130,7 @@ ext cbz, has zathura, X, flag f = zathura -- "$@" #------------------------------------------- # Images #------------------------------------------- -mime ^image, has krita, X, flag f = krita "$@" +mime ^image, has pinta, X, flag f = pinta "$@" mime ^image/svg, has inkscape, X, flag f = inkscape "$@" #------------------------------------------- @@ -213,10 +213,10 @@ label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" ###################################################################### # My applications -ext kra = krita "$@" -ext blend* = blender "$@" -ext helio = helio "$@" -ext kdenlive = kdenlive-accel "$@" +ext kra = krita "$@" & &>/dev/null +ext blend* = blender "$@" & &>/dev/null +ext helio = helio "$@" & &>/dev/null +ext kdenlive = kdenlive-accel "$@" & &>/dev/null # Execute a file as program/script. mime application/x-executable = "$1" diff --git a/user/wm/hyprland/hyprland.nix b/user/wm/hyprland/hyprland.nix index 782f43d..91095f2 100644 --- a/user/wm/hyprland/hyprland.nix +++ b/user/wm/hyprland/hyprland.nix @@ -88,6 +88,7 @@ bind=ALT,TAB,bringactivetotop bind=ALTSHIFT,TAB,cyclenext,prev bind=ALTSHIFT,TAB,bringactivetotop + bind=SUPER,TAB,exec,pypr expose bind=SUPER,V,exec,wl-copy $(wl-paste | tr '\n' ' ') bind=SUPERSHIFT,T,exec,screenshot-ocr @@ -195,6 +196,12 @@ windowrulev2 = workspace special silent,$pavucontrol windowrulev2 = opacity 0.80,$pavucontrol + $miniframe = title:\*Minibuf.* + windowrulev2 = float,$miniframe + windowrulev2 = size 64% 50%,$miniframe + windowrulev2 = move 18% 25%,$miniframe + windowrulev2 = animation popin 1 20,$miniframe + windowrulev2 = float,title:^(Kdenlive)$ windowrulev2 = float,class:^(pokefinder)$ @@ -209,6 +216,7 @@ windowrulev2 = opacity 0.75,title:\[.*\] - My Local Dashboard Awesome Homepage windowrulev2 = opacity 0.9,class:^(org.keepassxc.KeePassXC)$ windowrulev2 = opacity 0.75,class:^(org.gnome.Nautilus)$ + windowrulev2 = opacity 0.75,class:^(org.gnome.Nautilus)$ layerrule = blur,waybar @@ -280,6 +288,7 @@ polkit_gnome libva-utils gsettings-desktop-schemas + pyprland gnome.zenity wlr-randr wtype @@ -372,26 +381,11 @@ exit 0 '') - (pkgs.python3Packages.buildPythonPackage rec { - pname = "pyprland"; - version = "1.4.1"; - src = pkgs.fetchPypi { - inherit pname version; - sha256 = "sha256-JRxUn4uibkl9tyOe68YuHuJKwtJS//Pmi16el5gL9n8="; - }; - format = "pyproject"; - propagatedBuildInputs = with pkgs; [ - python3Packages.setuptools - python3Packages.poetry-core - poetry - ]; - doCheck = false; - }) ]; home.file.".config/hypr/pyprland.json".text = '' { "pyprland": { - "plugins": ["scratchpads", "magnify"] + "plugins": ["scratchpads", "magnify", "expose"] }, "scratchpads": { "term": { diff --git a/user/wm/input/nihongo.nix b/user/wm/input/nihongo.nix index 0d75797..9c6c017 100644 --- a/user/wm/input/nihongo.nix +++ b/user/wm/input/nihongo.nix @@ -84,28 +84,4 @@ # Interval of saving user data in minutes AutoSavePeriod=30 ''; - home.file.".config/fcitx5/profile".text = '' - [Groups/0] - # Group Name - Name=Default - # Layout - Default Layout=us - # Default Input Method - DefaultIM=mozc - - [Groups/0/Items/0] - # Name - Name=keyboard-us - # Layout - Layout= - - [Groups/0/Items/1] - # Name - Name=mozc - # Layout - Layout= - - [GroupOrder] - 0=Default - ''; }