From fd4756e92052de2e4fd47424acc7481130b965fe Mon Sep 17 00:00:00 2001 From: Emmet Date: Thu, 22 Jun 2023 14:53:10 -0500 Subject: [PATCH] Boilerplate reduction (I understand strings in nix now!) --- flake.nix | 62 ++++++++++++----------------- profiles/homelab/configuration.nix | 28 ++++++------- profiles/homelab/home.nix | 6 +-- profiles/personal/configuration.nix | 2 +- profiles/personal/home.nix | 6 +-- profiles/work/configuration.nix | 32 +++++++-------- profiles/work/home.nix | 8 ++-- system/README.org | 14 +++---- system/app/docker.nix | 4 +- system/security/doas.nix | 4 +- system/style/stylix.nix | 31 ++++++++------- user/README.org | 18 ++++----- user/app/doom-emacs/doom.nix | 7 ++-- user/app/doom-emacs/doom.org | 7 ++-- user/app/git/git.nix | 6 +-- user/bin/phoenix.nix | 10 ++--- user/style/stylix.nix | 35 ++++++++-------- 17 files changed, 136 insertions(+), 144 deletions(-) diff --git a/flake.nix b/flake.nix index dc438e8b..2777f742 100644 --- a/flake.nix +++ b/flake.nix @@ -11,23 +11,14 @@ locale = "en_US.UTF-8"; # select locale # ----- USER SETTINGS ----- # - name = "emmet"; # username + username = "emmet"; # username + name = "Emmet"; # name/identifier email = "librephoenix3@pm.me"; # email (used for certain configurations) - dotfilesDir = "~/.dotfiles"; # absolute path of the repo + dotfilesDir = "~/.dotfiles"; # absolute path of the repo locally theme = "ayu-dark"; # selcted theme from my themes directory wm = "xmonad"; # Selected window manager or desktop environment - - # --- PATH CALCULATIONS -- # - homeNixPath = ./. + "/profiles"+("/"+profile)+"/home.nix"; - configurationNixPath = ./. + "/profiles"+("/"+profile)+"/configuration.nix"; - systemWMNixPath = ./. + "/system/wm"+("/"+wm)+".nix"; - userWMNixPath = ./. + "/user/wm"+("/"+wm+"/"+wm)+".nix"; - themePolarityPath = "/themes/"+theme+"/polarity.txt"; - themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + themePolarityPath)); - backgroundUrlPath = "/themes/"+theme+"/backgroundurl.txt"; - backgroundUrl = builtins.readFile (./. + backgroundUrlPath); - backgroundSha256Path = "/themes/"+theme+"/backgroundsha256.txt"; - backgroundSha256 = builtins.readFile (./. + backgroundSha256Path); + font = "Inconsolata"; # Selected font + fontPkg = pkgs.inconsolata; # Font package # set pkgs to correct type pkgs = import nixpkgs { @@ -42,20 +33,17 @@ homeConfigurations = { emmet = home-manager.lib.homeManagerConfiguration { inherit pkgs; - modules = [ - homeNixPath - ]; + modules = [ (./. + "/profiles"+("/"+profile)+"/home.nix") ]; # load home.nix from profile extraSpecialArgs = { - myName = name; - myHostname = hostname; - myHomeDir = "/home/"+name; - myEmail = email; - myDotfilesDir = dotfilesDir; - myTheme = theme; - myThemePolarity = themePolarity; - myBackgroundUrl = backgroundUrl; - myBackgroundSha256 = backgroundSha256; - inherit userWMNixPath; + inherit username; + inherit name; + inherit hostname; + inherit email; + inherit dotfilesDir; + inherit theme; + inherit font; + inherit fontPkg; + inherit wm; inherit (inputs) nix-doom-emacs; inherit (inputs) stylix; inherit (inputs) eaf; @@ -67,17 +55,17 @@ nixosConfigurations = { snowfire = lib.nixosSystem { inherit system; - modules = [ configurationNixPath ]; + modules = [ (./. + "/profiles"+("/"+profile)+"/configuration.nix") ]; # load configuration.nix from profile specialArgs = { - myName = name; - myHostname = hostname; - myTimezone = timezone; - myLocale = locale; - myTheme = theme; - myThemePolarity = themePolarity; - myBackgroundUrl = backgroundUrl; - myBackgroundSha256 = backgroundSha256; - inherit systemWMNixPath; + inherit username; + inherit name; + inherit hostname; + inherit timezone; + inherit locale; + inherit theme; + inherit font; + inherit fontPkg; + inherit wm; inherit (inputs) stylix; inherit (inputs) blocklist-hosts; }; diff --git a/profiles/homelab/configuration.nix b/profiles/homelab/configuration.nix index efe2753f..99b3735e 100644 --- a/profiles/homelab/configuration.nix +++ b/profiles/homelab/configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, blocklist-hosts, myName, myHostname, myTimezone, myLocale, myTheme, myBackgroundUrl, myBackgroundSha256, ... }: +{ config, lib, pkgs, blocklist-hosts, username, hostname, timezone, locale, ... }: args@{ ... }: @@ -32,26 +32,26 @@ args@{ ... }: boot.loader.efi.efiSysMountPoint = "/boot/efi"; # Networking - networking.hostName = myHostname; # Define your hostname. + networking.hostName = hostname; # Define your hostname. networking.networkmanager.enable = true; # Use networkmanager # Timezone and locale - time.timeZone = myTimezone; # time zone - i18n.defaultLocale = myLocale; + time.timeZone = timezone; # time zone + i18n.defaultLocale = locale; i18n.extraLocaleSettings = { - LC_ADDRESS = myLocale; - LC_IDENTIFICATION = myLocale; - LC_MEASUREMENT = myLocale; - LC_MONETARY = myLocale; - LC_NAME = myLocale; - LC_NUMERIC = myLocale; - LC_PAPER = myLocale; - LC_TELEPHONE = myLocale; - LC_TIME = myLocale; + LC_ADDRESS = locale; + LC_IDENTIFICATION = locale; + LC_MEASUREMENT = locale; + LC_MONETARY = locale; + LC_NAME = locale; + LC_NUMERIC = locale; + LC_PAPER = locale; + LC_TELEPHONE = locale; + LC_TIME = locale; }; # User account - users.users.${myName} = { + users.users.${username} = { isNormalUser = true; description = "Emmet"; extraGroups = [ "networkmanager" "wheel" ]; diff --git a/profiles/homelab/home.nix b/profiles/homelab/home.nix index f89cbf5d..766f9f36 100644 --- a/profiles/homelab/home.nix +++ b/profiles/homelab/home.nix @@ -1,10 +1,10 @@ -{ config, lib, pkgs, python3Packages, nix-doom-emacs, stylix, myName, myEmail, myHomeDir, myDotfilesDir, myTheme, ... }: +{ config, lib, pkgs, python3Packages, nix-doom-emacs, stylix, username, email, dotfilesDir, theme, ... }: { # Home Manager needs a bit of information about you and the paths it should # manage. - home.username = myName; - home.homeDirectory = myHomeDir; + home.username = username; + home.homeDirectory = "/home/"+username; programs.home-manager.enable = true; diff --git a/profiles/personal/configuration.nix b/profiles/personal/configuration.nix index fa68449f..c7405268 100644 --- a/profiles/personal/configuration.nix +++ b/profiles/personal/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’). -{ config, lib, pkgs, blocklist-hosts, myName, myHostname, myTimezone, myLocale, myTheme, myBackgroundUrl, myBackgroundSha256, ... }: +{ config, lib, pkgs, blocklist-hosts, username, name, hostname, timezone, locale, wm, theme, ... }: { imports = [ ../work/configuration.nix # Personal is essentially work system + games diff --git a/profiles/personal/home.nix b/profiles/personal/home.nix index 058bcfd5..efedf8ce 100644 --- a/profiles/personal/home.nix +++ b/profiles/personal/home.nix @@ -1,10 +1,10 @@ -{ config, lib, pkgs, python3Packages, nix-doom-emacs, stylix, myName, myEmail, myHomeDir, myDotfilesDir, myTheme, ... }: +{ config, lib, pkgs, python3Packages, nix-doom-emacs, stylix, username, email, dotfilesDir, theme, ... }: { # Home Manager needs a bit of information about you and the paths it should # manage. - home.username = myName; - home.homeDirectory = myHomeDir; + home.username = username; + home.homeDirectory = "/home/"+username; programs.home-manager.enable = true; diff --git a/profiles/work/configuration.nix b/profiles/work/configuration.nix index 061e7b9e..a16f7817 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’). -{ config, lib, pkgs, blocklist-hosts, myName, myHostname, myTimezone, myLocale, systemWMNixPath, myTheme, myBackgroundUrl, myBackgroundSha256, ... }: +{ config, lib, pkgs, blocklist-hosts, username, name, hostname, timezone, locale, wm, theme, ... }: { imports = [ ../../system/hardware-configuration.nix @@ -10,7 +10,7 @@ ../../system/hardware/opengl.nix ../../system/hardware/printing.nix ../../system/hardware/bluetooth.nix - systemWMNixPath # My window manager selected from flake + (./. + "../../../system/wm"+("/"+wm)+".nix") # My window manager ../../system/app/flatpak.nix ../../system/security/doas.nix ../../system/security/gpg.nix @@ -41,28 +41,28 @@ boot.loader.efi.efiSysMountPoint = "/boot/efi"; # Networking - networking.hostName = myHostname; # Define your hostname. + networking.hostName = hostname; # Define your hostname. networking.networkmanager.enable = true; # Use networkmanager # Timezone and locale - time.timeZone = myTimezone; # time zone - i18n.defaultLocale = myLocale; + time.timeZone = timezone; # time zone + i18n.defaultLocale = locale; i18n.extraLocaleSettings = { - LC_ADDRESS = myLocale; - LC_IDENTIFICATION = myLocale; - LC_MEASUREMENT = myLocale; - LC_MONETARY = myLocale; - LC_NAME = myLocale; - LC_NUMERIC = myLocale; - LC_PAPER = myLocale; - LC_TELEPHONE = myLocale; - LC_TIME = myLocale; + LC_ADDRESS = locale; + LC_IDENTIFICATION = locale; + LC_MEASUREMENT = locale; + LC_MONETARY = locale; + LC_NAME = locale; + LC_NUMERIC = locale; + LC_PAPER = locale; + LC_TELEPHONE = locale; + LC_TIME = locale; }; # User account - users.users.${myName} = { + users.users.${username} = { isNormalUser = true; - description = "Emmet"; + description = name; extraGroups = [ "networkmanager" "wheel" ]; packages = with pkgs; []; uid = 1000; diff --git a/profiles/work/home.nix b/profiles/work/home.nix index 559e9001..fec6bfd0 100644 --- a/profiles/work/home.nix +++ b/profiles/work/home.nix @@ -1,17 +1,17 @@ -{ config, lib, pkgs, python3Packages, nix-doom-emacs, stylix, myName, myEmail, myHomeDir, myDotfilesDir, myTheme, userWMNixPath, ... }: +{ config, lib, pkgs, python3Packages, nix-doom-emacs, stylix, username, email, dotfilesDir, theme, wm, ... }: { # Home Manager needs a bit of information about you and the paths it should # manage. - home.username = myName; - home.homeDirectory = myHomeDir; + home.username = username; + home.homeDirectory = "/home/"+username; programs.home-manager.enable = true; imports = [ nix-doom-emacs.hmModule stylix.homeManagerModules.stylix - userWMNixPath # My window manager selected from flake + (./. + "../../../user/wm"+("/"+wm+"/"+wm)+".nix") # My window manager selected from flake ../../user/shell/sh.nix # My zsh and bash config ../../user/shell/cli-collection.nix # Useful CLI apps ../../user/bin/phoenix.nix # My nix command wrapper diff --git a/system/README.org b/system/README.org index 4d01cb8e..c15e2b3c 100644 --- a/system/README.org +++ b/system/README.org @@ -21,10 +21,10 @@ My system-level Nix modules are organized into this directory: Variables can be imported from [[../flake.nix][flake.nix]] by setting the =specialArgs= block inside the flake (see [[../flake.nix][my flake]] for more details). This allows variables to merely be managed in one place ([[../flake.nix][flake.nix]]) rather than having to manage them in multiple locations. I currently import the following variables to the system config: -- =myName= - Username -- =myHostname= - Hostname for machine -- =myTimezone= - Timezone for machine -- =myLocale= - Locale for machine -- =myTheme= - base16 theme stored in ../themes to be used -- =myBackgroundUrl= - Direct link to background wallpaper (used for login screen) -- =myBackgroundSha256= - Checksum for background image used when downloading +- =username= - Username +- =hostname= - Hostname for machine +- =timezone= - Timezone for machine +- =locale= - Locale for machine +- =theme= - base16 theme stored in ../themes to be used +- =backgroundUrl= - Direct link to background wallpaper (used for login screen) +- =backgroundSha256= - Checksum for background image used when downloading diff --git a/system/app/docker.nix b/system/app/docker.nix index d6866fc8..47d42216 100644 --- a/system/app/docker.nix +++ b/system/app/docker.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, myName, storageDriver ? null, ... }: +{ config, lib, pkgs, username, storageDriver ? null, ... }: assert lib.asserts.assertOneOf "storageDriver" storageDriver [ null @@ -17,5 +17,5 @@ assert lib.asserts.assertOneOf "storageDriver" storageDriver [ storageDriver = storageDriver; autoPrune.enable = true; }; - users.users.${myName}.extraGroups = [ "docker" ]; + users.users.${username}.extraGroups = [ "docker" ]; } diff --git a/system/security/doas.nix b/system/security/doas.nix index 3cb28601..a4021139 100644 --- a/system/security/doas.nix +++ b/system/security/doas.nix @@ -1,11 +1,11 @@ -{ config, myName, pkgs, ... }: +{ config, username, pkgs, ... }: { # Doas instead of sudo security.doas.enable = true; security.sudo.enable = false; security.doas.extraRules = [{ - users = [ "${myName}" ]; + users = [ "${username}" ]; keepEnv = true; persist = true; }]; diff --git a/system/style/stylix.nix b/system/style/stylix.nix index 4fb5b9b4..26138faa 100644 --- a/system/style/stylix.nix +++ b/system/style/stylix.nix @@ -1,33 +1,34 @@ -{ config, pkgs, stylix, myTheme, myThemePolarity, myBackgroundUrl, myBackgroundSha256, ... }: +{ config, lib, pkgs, stylix, theme, font, fontPkg, ... }: let - myFont = "Inconsolata"; - myFontPkg = pkgs.inconsolata; - myThemePath = "../../../themes/"+myTheme+"/"+myTheme+".yaml"; - myLightDMTheme = if myThemePolarity == "light" then "Adwaita" else "Adwaita-dark"; + themePath = "../../../themes/"+theme+"/"+theme+".yaml"; + themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../themes"+("/"+theme)+"/polarity.txt")); + myLightDMTheme = if themePolarity == "light" then "Adwaita" else "Adwaita-dark"; + backgroundUrl = builtins.readFile (./. + "../../../themes"+("/"+theme)+"/backgroundurl.txt"); + backgroundSha256 = builtins.readFile (./. + "../../../themes/"+("/"+theme)+"/backgroundsha256.txt"); in { imports = [ stylix.nixosModules.stylix ]; stylix.autoEnable = false; - stylix.polarity = myThemePolarity; + stylix.polarity = themePolarity; stylix.image = pkgs.fetchurl { - url = myBackgroundUrl; - sha256 = myBackgroundSha256; + url = backgroundUrl; + sha256 = backgroundSha256; }; - stylix.base16Scheme = ./. + myThemePath; + stylix.base16Scheme = ./. + themePath; stylix.fonts = { monospace = { - name = myFont; - package = myFontPkg; + name = font; + package = fontPkg; }; serif = { - name = myFont; - package = myFontPkg; + name = font; + package = fontPkg; }; sansSerif = { - name = myFont; - package = myFontPkg; + name = font; + package = fontPkg; }; emoji = { name = "Noto Color Emoji"; diff --git a/user/README.org b/user/README.org index a6a3741a..e903d5e8 100644 --- a/user/README.org +++ b/user/README.org @@ -41,12 +41,12 @@ My user-level Nix modules are organized into this directory: Variables can be imported from [[../flake.nix][flake.nix]] by setting the =extraSpecialArgs= block inside the flake (see [[../flake.nix][my flake]] for more details). This allows variables to merely be managed in one place ([[../flake.nix][flake.nix]]) rather than having to manage them in multiple locations. I currently import the following variables to the system config: -- =myName= - Username -- =myHostname= - Hostname for machine -- =myHomeDir= - Absolute path to home directory derived from =myName= -- =myEmail= - Email -- =myDotfilesDir= - Path to my dotfiles directory on the system -- =myTheme= - base16 theme stored in ../themes to be used -- =myThemePolarity= - whether theme is =light= or =dark= -- =myBackgroundUrl= - Direct link to background wallpaper (used for login screen) -- =myBackgroundSha256= - Checksum for background image used when downloading +- =username= - Username +- =hostname= - Hostname for machine +- =myHomeDir= - Absolute path to home directory derived from =username= +- =email= - Email +- =dotfilesDir= - Path to my dotfiles directory on the system +- =theme= - base16 theme stored in ../themes to be used +- =themePolarity= - whether theme is =light= or =dark= +- =backgroundUrl= - Direct link to background wallpaper (used for login screen) +- =backgroundSha256= - Checksum for background image used when downloading diff --git a/user/app/doom-emacs/doom.nix b/user/app/doom-emacs/doom.nix index d9738554..cd9bb0aa 100644 --- a/user/app/doom-emacs/doom.nix +++ b/user/app/doom-emacs/doom.nix @@ -1,6 +1,7 @@ -{ config, lib, pkgs, eaf, eaf-browser, org-nursery, myThemePolarity, ... }: +{ config, lib, pkgs, eaf, eaf-browser, org-nursery, theme, ... }: let - myDashboardLogo = ./. + "/nix-" + myThemePolarity + ".png"; + themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+theme)+"/polarity.txt")); + dashboardLogo = ./. + "/nix-" + themePolarity + ".png"; in { programs.doom-emacs = { @@ -78,7 +79,7 @@ in home.file.".emacs.d/org-nursery" = { source = "${org-nursery}"; }; - home.file.".emacs.d/dashboard-logo.png".source = myDashboardLogo; + home.file.".emacs.d/dashboard-logo.png".source = dashboardLogo; home.file.".emacs.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh" = { source = ./scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh; executable = true; diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index 76bc6f0b..c3868560 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -1409,9 +1409,10 @@ Any git package can be configured for a particular commit or branch: * 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 [[../../home.nix][home.nix]]. #+BEGIN_SRC nix :tangle doom.nix -{ config, lib, pkgs, eaf, eaf-browser, org-nursery, myThemePolarity, ... }: +{ config, lib, pkgs, eaf, eaf-browser, org-nursery, theme, ... }: let - myDashboardLogo = ./. + "/nix-" + myThemePolarity + ".png"; + themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+theme)+"/polarity.txt")); + dashboardLogo = ./. + "/nix-" + themePolarity + ".png"; in { programs.doom-emacs = { @@ -1489,7 +1490,7 @@ in home.file.".emacs.d/org-nursery" = { source = "${org-nursery}"; }; - home.file.".emacs.d/dashboard-logo.png".source = myDashboardLogo; + home.file.".emacs.d/dashboard-logo.png".source = dashboardLogo; home.file.".emacs.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh" = { source = ./scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh; executable = true; diff --git a/user/app/git/git.nix b/user/app/git/git.nix index 1cb24813..5d365562 100644 --- a/user/app/git/git.nix +++ b/user/app/git/git.nix @@ -1,10 +1,10 @@ -{ config, lib, pkgs, myName, myEmail, ... }: +{ config, lib, pkgs, username, email, ... }: { home.packages = [ pkgs.git ]; programs.git.enable = true; - programs.git.userName = myName; - programs.git.userEmail = myEmail; + programs.git.userName = username; + programs.git.userEmail = email; programs.git.extraConfig = { init.defaultBranch = "main"; }; diff --git a/user/bin/phoenix.nix b/user/bin/phoenix.nix index dd0acd0f..acfb9d61 100644 --- a/user/bin/phoenix.nix +++ b/user/bin/phoenix.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, myName, myDotfilesDir, ... }: +{ config, lib, pkgs, username, dotfilesDir, ... }: let # This sets up my "phoenix" script with my configuration paths @@ -6,12 +6,12 @@ let myPhoenixScript = '' if [ "$1" = "sync" ]; then if [ "$2" != "user" ]; then - pushd ''+myDotfilesDir+''; + pushd ''+dotfilesDir+''; sudo nixos-rebuild switch --flake .#; popd; elif [ "2" != "system" ]; then - pushd ''+myDotfilesDir+''; - home-manager switch --flake .#''+myName+''; + pushd ''+dotfilesDir+''; + home-manager switch --flake .#''+username+''; popd; which xmobar &> /dev/null && killall xmobar; which xmonad &> /dev/null && xmonad --recompile && xmonad --restart; @@ -19,7 +19,7 @@ let [ -f ~/.fehbg-stylix ] &> /dev/null && ~/.fehbg-stylix; fi elif [ "$1" = "update" ]; then - pushd ''+myDotfilesDir+''; + pushd ''+dotfilesDir+''; nix flake update; popd; if [ -d ~/.emacs.d/eaf/app/browser ] diff --git a/user/style/stylix.nix b/user/style/stylix.nix index 9a104c38..1fac7b62 100644 --- a/user/style/stylix.nix +++ b/user/style/stylix.nix @@ -1,32 +1,33 @@ -{ config, pkgs, myTheme, myThemePolarity, myBackgroundUrl, myBackgroundSha256, ... }: +{ config, lib, pkgs, theme, font, fontPkg, ... }: let - myFont = "Inconsolata"; - myFontPkg = pkgs.inconsolata; - myThemePath = "../../../themes/"+myTheme+"/"+myTheme+".yaml"; + themePath = "../../../themes"+("/"+theme+"/"+theme)+".yaml"; + themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../themes"+("/"+theme)+"/polarity.txt")); + backgroundUrl = builtins.readFile (./. + "../../../themes"+("/"+theme)+"/backgroundurl.txt"); + backgroundSha256 = builtins.readFile (./. + "../../../themes/"+("/"+theme)+"/backgroundsha256.txt"); in { - home.file.".currenttheme".text = myTheme; + home.file.".currenttheme".text = theme; stylix.autoEnable = false; - stylix.polarity = myThemePolarity; + stylix.polarity = themePolarity; stylix.image = pkgs.fetchurl { - url = myBackgroundUrl; - sha256 = myBackgroundSha256; + url = backgroundUrl; + sha256 = backgroundSha256; }; - stylix.base16Scheme = ./. + myThemePath; + stylix.base16Scheme = ./. + themePath; stylix.fonts = { monospace = { - name = myFont; - package = myFontPkg; + name = font; + package = fontPkg; }; serif = { - name = myFont; - package = myFontPkg; + name = font; + package = fontPkg; }; sansSerif = { - name = myFont; - package = myFontPkg; + name = font; + package = fontPkg; }; emoji = { name = "Noto Color Emoji"; @@ -51,8 +52,8 @@ in #!/bin/sh feh --no-fehbg --bg-fill ''+ pkgs.fetchurl { - url = myBackgroundUrl; - sha256 = myBackgroundSha256; + url = backgroundUrl; + sha256 = backgroundSha256; }+''; ''; home.file.".fehbg-stylix".executable = true;