Concatenating strings in nix is weird

This commit is contained in:
Emmet 2023-06-21 10:14:07 -05:00
parent 75968e28eb
commit f81bab144d

View file

@ -3,28 +3,25 @@
outputs = { self, nixpkgs, home-manager, nix-doom-emacs, stylix, eaf, eaf-browser, org-nursery, blocklist-hosts, rust-overlay, ... }@inputs: outputs = { self, nixpkgs, home-manager, nix-doom-emacs, stylix, eaf, eaf-browser, org-nursery, blocklist-hosts, rust-overlay, ... }@inputs:
let let
# --- SYSTEM SETTINGS --- # # ---- SYSTEM SETTINGS ---- #
system = "x86_64-linux"; # system arch system = "x86_64-linux"; # system arch
hostname = "snowfire"; # hostname hostname = "snowfire"; # hostname
profile = "personal"; # select a profile defined from my profiles directory profile = "personal"; # select a profile defined from my profiles directory
timezone = "America/Chicago"; # select timezone timezone = "America/Chicago"; # select timezone
locale = "en_US.UTF-8"; # select locale locale = "en_US.UTF-8"; # select locale
# ---- USER SETTINGS ---- # # ----- USER SETTINGS ----- #
name = "emmet"; # username name = "emmet"; # username
email = "librephoenix3@pm.me"; # email (used for certain configurations) email = "librephoenix3@pm.me"; # email (used for certain configurations)
dotfilesDir = "~/.dotfiles"; # absolute path of the repo dotfilesDir = "~/.dotfiles"; # absolute path of the repo
theme = "ayu-dark"; # selcted theme from my themes directory theme = "ayu-dark"; # selcted theme from my themes directory
wm = "xmonad"; # Selected window manager or desktop environment wm = "xmonad"; # Selected window manager or desktop environment
# ---- CALCULATIONS ----- # # --- PATH CALCULATIONS -- #
profileWithSlash = "/" + profile; # I honestly don't know why this is necessary homeNixPath = ./. + "/profiles"+("/"+profile)+"/home.nix";
wmWithSlash = "/" + wm; # Don't understand this either configurationNixPath = ./. + "/profiles"+("/"+profile)+"/configuration.nix";
homeNixPath = ./. + "/profiles" + profileWithSlash + "/home.nix"; systemWMNixPath = ./. + "/system/wm"+("/"+wm)+".nix";
configurationNixPath = ./. + "/profiles" + profileWithSlash + "/configuration.nix"; userWMNixPath = ./. + "/user/wm"+("/"+wm+"/"+wm)+".nix";
systemWMNixPath = ./. + "/system/wm" + wmWithSlash + ".nix";
userWMNixPath = ./. + "/user/wm" + wmWithSlash + wmWithSlash + ".nix";
themePolarityPath = "/themes/"+theme+"/polarity.txt"; themePolarityPath = "/themes/"+theme+"/polarity.txt";
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + themePolarityPath)); themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + themePolarityPath));
backgroundUrlPath = "/themes/"+theme+"/backgroundurl.txt"; backgroundUrlPath = "/themes/"+theme+"/backgroundurl.txt";
@ -53,11 +50,11 @@
myHomeDir = "/home/"+name; myHomeDir = "/home/"+name;
myEmail = email; myEmail = email;
myDotfilesDir = dotfilesDir; myDotfilesDir = dotfilesDir;
inherit userWMNixPath;
myTheme = theme; myTheme = theme;
myThemePolarity = themePolarity; myThemePolarity = themePolarity;
myBackgroundUrl = backgroundUrl; myBackgroundUrl = backgroundUrl;
myBackgroundSha256 = backgroundSha256; myBackgroundSha256 = backgroundSha256;
inherit userWMNixPath;
inherit (inputs) nix-doom-emacs; inherit (inputs) nix-doom-emacs;
inherit (inputs) stylix; inherit (inputs) stylix;
inherit (inputs) eaf; inherit (inputs) eaf;
@ -75,11 +72,11 @@
myHostname = hostname; myHostname = hostname;
myTimezone = timezone; myTimezone = timezone;
myLocale = locale; myLocale = locale;
inherit systemWMNixPath;
myTheme = theme; myTheme = theme;
myThemePolarity = themePolarity; myThemePolarity = themePolarity;
myBackgroundUrl = backgroundUrl; myBackgroundUrl = backgroundUrl;
myBackgroundSha256 = backgroundSha256; myBackgroundSha256 = backgroundSha256;
inherit systemWMNixPath;
inherit (inputs) stylix; inherit (inputs) stylix;
inherit (inputs) blocklist-hosts; inherit (inputs) blocklist-hosts;
}; };