Boilerplate reduction (I understand strings in nix now!)
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user