From d4ca164ed334784964035c2ee62625eb72fccb34 Mon Sep 17 00:00:00 2001 From: Bun Date: Wed, 7 May 2025 14:35:27 -0400 Subject: [PATCH] Simplify Blender import, remove Rot8, standardize fastfetch import, add Teams (ew), split up environment vars, etc --- flake.lock | 15 ++++++----- flake.nix | 2 +- modules/home/files/default.nix | 2 ++ .../impermanence/default.nix | 0 .../home/programs/gui/librewolf/default.nix | 5 +++- .../misc/gaming/launchers/default.nix | 25 ++++++++++--------- modules/home/programs/misc/school/default.nix | 20 ++++++++++----- .../fastfetch/{ => configs}/config.jsonc | 0 .../fastfetch/{small => configs}/small.jsonc | 0 .../programs/terminal/fastfetch/default.nix | 9 ++++--- .../terminal/fastfetch/small/default.nix | 5 ---- .../home/programs/terminal/zoxide/default.nix | 5 +++- modules/home/services/default.nix | 1 - modules/home/settings/aliases/default.nix | 1 - modules/home/settings/default.nix | 1 + modules/home/settings/environment/default.nix | 7 ++++++ modules/home/settings/xdg/default.nix | 2 ++ modules/home/user/default.nix | 5 ---- modules/home/wms/programs/default.nix | 1 - modules/home/wms/sway/autostart/default.nix | 3 --- modules/home/wms/sway/rules/default.nix | 2 +- .../system/services/server/nfs/default.nix | 2 +- modules/system/users/main/default.nix | 8 +++--- 23 files changed, 68 insertions(+), 53 deletions(-) rename modules/home/{services => files}/impermanence/default.nix (100%) rename modules/home/programs/terminal/fastfetch/{ => configs}/config.jsonc (100%) rename modules/home/programs/terminal/fastfetch/{small => configs}/small.jsonc (100%) delete mode 100644 modules/home/programs/terminal/fastfetch/small/default.nix create mode 100644 modules/home/settings/environment/default.nix diff --git a/flake.lock b/flake.lock index 30b5dd6d..67ff2a5c 100644 --- a/flake.lock +++ b/flake.lock @@ -5,16 +5,19 @@ "nixpkgs": "nixpkgs" }, "locked": { + "dir": "blender", "lastModified": 1746378999, - "narHash": "sha256-EwX7RUS3+jAM8W6CT5RbUzBSakv1OYxhzeTFUptggUI=", + "narHash": "sha256-aF+uC/aYR4I7VxN9s0gQG1WRDTE0Re3jAMd0qBkWjV4=", + "owner": "edolstra", + "repo": "nix-warez", "rev": "85d76721132cc6631bbaa8c950d4d0f3aa4003fd", - "revCount": 137, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/blender-bin/1.0.15/01969c4d-b680-7b45-a6b4-65a828e5f108/source.tar.gz?rev=85d76721132cc6631bbaa8c950d4d0f3aa4003fd&revCount=137" + "type": "github" }, "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/blender-bin/1.0.13.tar.gz" + "dir": "blender", + "owner": "edolstra", + "repo": "nix-warez", + "type": "github" } }, "blobs": { diff --git a/flake.nix b/flake.nix index fa61744c..48728d61 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,7 @@ inputs.nixpkgs.follows = "unstable"; }; - blender.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.13.tar.gz"; + blender.url = "github:edolstra/nix-warez?dir=blender"; }; outputs = { diff --git a/modules/home/files/default.nix b/modules/home/files/default.nix index 0746509b..0983a710 100644 --- a/modules/home/files/default.nix +++ b/modules/home/files/default.nix @@ -1,5 +1,7 @@ { config, lib, ... }: { + imports = [ ./impermanence ]; + home.file = lib.mkIf config.home.desktop.enable { ".assets/wallpapers".source = ./wallpapers; ".assets/lockscreen".source = ./lockscreen; diff --git a/modules/home/services/impermanence/default.nix b/modules/home/files/impermanence/default.nix similarity index 100% rename from modules/home/services/impermanence/default.nix rename to modules/home/files/impermanence/default.nix diff --git a/modules/home/programs/gui/librewolf/default.nix b/modules/home/programs/gui/librewolf/default.nix index 25480847..136c711f 100644 --- a/modules/home/programs/gui/librewolf/default.nix +++ b/modules/home/programs/gui/librewolf/default.nix @@ -238,7 +238,10 @@ # Symlinks to Librewolf home = { - file.".librewolf".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.mozilla/firefox"; + file = { + ".librewolf".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.mozilla/firefox"; + ".mozilla/librewolf".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.mozilla/firefox"; + }; persistence."/persist${config.home.homeDirectory}".directories = [ ".mozilla" ]; }; }; diff --git a/modules/home/programs/misc/gaming/launchers/default.nix b/modules/home/programs/misc/gaming/launchers/default.nix index 338e83b9..9f0a8e44 100644 --- a/modules/home/programs/misc/gaming/launchers/default.nix +++ b/modules/home/programs/misc/gaming/launchers/default.nix @@ -1,18 +1,19 @@ { config, lib, pkgs, ... }: { config = lib.mkIf config.home.gaming.enable { - home.packages = with pkgs; [ - heroic - prismlauncher - steam - steam-run-free - ]; - - home.persistence."/persist${config.home.homeDirectory}".directories = [ - ".config/heroic" - ".local/share/PrismLauncher" - ".local/share/Steam" - ]; + home = { + packages = with pkgs; [ + heroic + prismlauncher + steam + steam-run-free + ]; + persistence."/persist${config.home.homeDirectory}".directories = [ + ".config/heroic" + ".local/share/PrismLauncher" + ".local/share/Steam" + ]; + }; nixpkgs.allowUnfreePackages = [ "steam" diff --git a/modules/home/programs/misc/school/default.nix b/modules/home/programs/misc/school/default.nix index 78f34ef8..404afcfe 100644 --- a/modules/home/programs/misc/school/default.nix +++ b/modules/home/programs/misc/school/default.nix @@ -1,9 +1,17 @@ { config, lib, pkgs, ... }: { - home.packages = with pkgs; lib.mkIf config.home.school.enable [ - freerdp - globalprotect-openconnect - gpauth - remmina - ]; + home = lib.mkIf config.home.school.enable { + packages = with pkgs; [ + freerdp + globalprotect-openconnect + gpauth + remmina + teams-for-linux + ]; + persistence."/persist${config.home.homeDirectory}".directories = [ + ".config/com.yuezk.qt" + ".config/remmina" + ".config/teams-for-linux" + ]; + }; } diff --git a/modules/home/programs/terminal/fastfetch/config.jsonc b/modules/home/programs/terminal/fastfetch/configs/config.jsonc similarity index 100% rename from modules/home/programs/terminal/fastfetch/config.jsonc rename to modules/home/programs/terminal/fastfetch/configs/config.jsonc diff --git a/modules/home/programs/terminal/fastfetch/small/small.jsonc b/modules/home/programs/terminal/fastfetch/configs/small.jsonc similarity index 100% rename from modules/home/programs/terminal/fastfetch/small/small.jsonc rename to modules/home/programs/terminal/fastfetch/configs/small.jsonc diff --git a/modules/home/programs/terminal/fastfetch/default.nix b/modules/home/programs/terminal/fastfetch/default.nix index b44f6259..ecaf8e3b 100644 --- a/modules/home/programs/terminal/fastfetch/default.nix +++ b/modules/home/programs/terminal/fastfetch/default.nix @@ -1,7 +1,8 @@ -{ ... }: +{ pkgs, ... }: { - imports = [ ./small ]; - programs.fastfetch.enable = true; - xdg.configFile."fastfetch/config.jsonc".source = ./config.jsonc; + + home.packages = with pkgs; [ (writeScriptBin "smallfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc") ]; + + xdg.configFile."fastfetch".source = ./configs; } diff --git a/modules/home/programs/terminal/fastfetch/small/default.nix b/modules/home/programs/terminal/fastfetch/small/default.nix deleted file mode 100644 index eb8c4eb5..00000000 --- a/modules/home/programs/terminal/fastfetch/small/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ (writeScriptBin "smallfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc") ]; - xdg.configFile."fastfetch/small.jsonc".source = ./small.jsonc; -} diff --git a/modules/home/programs/terminal/zoxide/default.nix b/modules/home/programs/terminal/zoxide/default.nix index 4ad919d8..ee6e4704 100644 --- a/modules/home/programs/terminal/zoxide/default.nix +++ b/modules/home/programs/terminal/zoxide/default.nix @@ -2,5 +2,8 @@ { programs.zoxide.enable = true; - home.persistence."/persist${config.home.homeDirectory}".directories = [ ".local/share/zoxide" ]; + home = { + shellAliases.cd = "z"; + persistence."/persist${config.home.homeDirectory}".directories = [ ".local/share/zoxide" ]; + }; } diff --git a/modules/home/services/default.nix b/modules/home/services/default.nix index e00c6408..7a788ba1 100644 --- a/modules/home/services/default.nix +++ b/modules/home/services/default.nix @@ -2,7 +2,6 @@ { imports = [ ./easyeffects - ./impermanence ./mpd ./playerctl ]; diff --git a/modules/home/settings/aliases/default.nix b/modules/home/settings/aliases/default.nix index 1131106e..ff62e202 100644 --- a/modules/home/settings/aliases/default.nix +++ b/modules/home/settings/aliases/default.nix @@ -8,7 +8,6 @@ # Shortcuts ff = "clear && fastfetch"; - copycat = "wl-copy <"; myip = "curl ifconfig.co"; seneca = "ssh jhampton1@matrix.senecapolytechnic.ca"; }; diff --git a/modules/home/settings/default.nix b/modules/home/settings/default.nix index b19d0d8d..2175a73e 100644 --- a/modules/home/settings/default.nix +++ b/modules/home/settings/default.nix @@ -4,6 +4,7 @@ ./aliases ./cursor ./dconf + ./environment ./fonts ./gtk ./locale diff --git a/modules/home/settings/environment/default.nix b/modules/home/settings/environment/default.nix new file mode 100644 index 00000000..44e0919b --- /dev/null +++ b/modules/home/settings/environment/default.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + home.sessionVariables = { + MANPAGER = "nvim +Man!"; + NIXPKGS_ALLOW_UNFREE = 1; + }; +} diff --git a/modules/home/settings/xdg/default.nix b/modules/home/settings/xdg/default.nix index fa35327e..25fda81c 100644 --- a/modules/home/settings/xdg/default.nix +++ b/modules/home/settings/xdg/default.nix @@ -4,4 +4,6 @@ ./defaults ./folders ]; + + home.preferXdgDirectories = true; } diff --git a/modules/home/user/default.nix b/modules/home/user/default.nix index 8ca14e0c..18c8f904 100644 --- a/modules/home/user/default.nix +++ b/modules/home/user/default.nix @@ -3,10 +3,5 @@ home = { username = "bun"; homeDirectory = "/home/${config.home.username}"; - sessionVariables = { - LIBVIRT_DEFAULT_URI = "qemu:///system"; - MANPAGER = "nvim +Man!"; - NIXPKGS_ALLOW_UNFREE = 1; - }; }; } diff --git a/modules/home/wms/programs/default.nix b/modules/home/wms/programs/default.nix index 677f9a8a..3391aa15 100644 --- a/modules/home/wms/programs/default.nix +++ b/modules/home/wms/programs/default.nix @@ -14,7 +14,6 @@ brightnessctl hyprpicker libnotify - rot8 shotman wdisplays wl-clipboard-rs diff --git a/modules/home/wms/sway/autostart/default.nix b/modules/home/wms/sway/autostart/default.nix index de2171d9..02e86307 100644 --- a/modules/home/wms/sway/autostart/default.nix +++ b/modules/home/wms/sway/autostart/default.nix @@ -9,9 +9,6 @@ { command = "foot -a music -T Music ncmpcpp"; } { command = "foot -a sound -T Sound pulsemixer"; } - # Daemons and tray - { command = "rot8"; } - # Foreground { command = "thunderbird"; } { command = "vesktop"; } diff --git a/modules/home/wms/sway/rules/default.nix b/modules/home/wms/sway/rules/default.nix index 8f7a07e9..a563fa35 100644 --- a/modules/home/wms/sway/rules/default.nix +++ b/modules/home/wms/sway/rules/default.nix @@ -54,7 +54,7 @@ # Communication "7:${config.ws.w7}" = [ - { app_id = "MiscBrowser"; } + { app_id = "teams-for-linux"; } { app_id = "vesktop"; } ]; "9:${config.ws.w9}" = [{ app_id = "thunderbird"; }]; diff --git a/modules/system/services/server/nfs/default.nix b/modules/system/services/server/nfs/default.nix index d04f92f0..b08ba2a4 100644 --- a/modules/system/services/server/nfs/default.nix +++ b/modules/system/services/server/nfs/default.nix @@ -3,7 +3,7 @@ imports = [ ./user ]; config = lib.mkIf config.services.nfs.server.enable { - services.nfs.server.exports = "/storage *(rw,sync,no_subtree_check)"; + services.nfs.server.exports = "/storage *(rw)"; networking.firewall.extraInputRules = "ip saddr { 10.0.0.0/8, 11.0.0.0/8, ${config.secrets.ips.bun} } tcp dport 2049 accept"; }; } diff --git a/modules/system/users/main/default.nix b/modules/system/users/main/default.nix index e5dba59f..f15624ec 100644 --- a/modules/system/users/main/default.nix +++ b/modules/system/users/main/default.nix @@ -30,21 +30,21 @@ "wheel" "audio" - "video" - "render" "input" - "disk" + "render" + "video" "dialout" + "disk" "rtkit" "kvm" "libvirtd" "qemu-libvirtd" - "nginx" "minecraft" "nfsShare" + "nginx" ]; uid = 1000; shell = pkgs.zsh;