Optimized some specialArgs and module argument use

This commit is contained in:
Emmet 2024-01-18 15:36:52 -06:00
parent 2d75530b6d
commit 18c8365f40
76 changed files with 282 additions and 284 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
{
# Module installing brave as default browser

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, wmType, font, ... }:
{ pkgs, ... }:
{
# Module installing as default browser

View file

@ -1,17 +1,17 @@
{ config, lib, pkgs, wmType, font, ... }:
{ pkgs, userSettings, ... }:
{
# Module installing librewolf as default browser
home.packages = if (wmType == "wayland") then [ pkgs.librewolf-wayland ]
home.packages = if (userSettings.wmType == "wayland") then [ pkgs.librewolf-wayland ]
else [ pkgs.librewolf ];
home.sessionVariables = if (wmType == "wayland")
home.sessionVariables = if (userSettings.wmType == "wayland")
then { DEFAULT_BROWSER = "${pkgs.librewolf-wayland}/bin/librewolf";}
else
{ DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf";};
home.file.".librewolf/librewolf.overrides.cfg".text = ''
defaultPref("font.name.serif.x-western","''+font+''");
defaultPref("font.name.serif.x-western","''+userSettings.font+''");
defaultPref("font.size.variable.x-western",20);
defaultPref("browser.toolbars.bookmarks.visibility","always");
@ -22,7 +22,7 @@
defaultPref("privacy.clearOnShutdown.cookies",true);
defaultPref("gfx.webrender.software.opengl",false);
defaultPref("webgl.disabled",true);
pref("font.name.serif.x-western","''+font+''");
pref("font.name.serif.x-western","''+userSettings.font+''");
pref("font.size.variable.x-western",20);
pref("browser.toolbars.bookmarks.visibility","always");

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, pkgs, dmenuCmd ? "rofi -dmenu", ... }:
{ lib, stdenv, fetchFromGitHub, dmenuCmd ? "rofi -dmenu", ... }:
let name = "qute-containers";
version = "unstable";

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, font, qute-containers, ... }:
{ config, pkgs, userSettings, ... }:
{
@ -194,7 +194,7 @@ c.colors.tabs.selected.even.fg = base05
c.colors.tabs.selected.even.bg = base02
c.colors.webpage.bg = base00
font = "''+font+''"
font = "''+userSettings.font+''"
c.fonts.default_family = font
c.fonts.default_size = '14pt'
@ -222,7 +222,7 @@ c.fonts.web.family.cursive = font
}
/*paragraphs*/
p {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:24px;
text-align:center;
@ -255,7 +255,7 @@ c.fonts.web.family.cursive = font
/*xmp tag style for ascii art*/
xmp {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:22px;
color: #''+config.lib.stylix.colors.base01+''
@ -340,7 +340,7 @@ Bard
}
/*paragraphs*/
p {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:24px;
text-align:center;
@ -373,7 +373,7 @@ Bard
/*xmp tag style for ascii art*/
xmp {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:22px;
color: #''+config.lib.stylix.colors.base01+''
@ -447,7 +447,7 @@ Bard
}
/*paragraphs*/
p {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:24px;
text-align:center;
@ -480,7 +480,7 @@ Bard
/*xmp tag style for ascii art*/
xmp {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:22px;
color: #''+config.lib.stylix.colors.base01+''
@ -554,7 +554,7 @@ Bard
}
/*paragraphs*/
p {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:24px;
text-align:center;
@ -587,7 +587,7 @@ Bard
/*xmp tag style for ascii art*/
xmp {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:22px;
color: #''+config.lib.stylix.colors.base01+''
@ -661,7 +661,7 @@ Bard
}
/*paragraphs*/
p {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:24px;
text-align:center;
@ -694,7 +694,7 @@ Bard
/*xmp tag style for ascii art*/
xmp {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:22px;
color: #''+config.lib.stylix.colors.base01+''
@ -768,7 +768,7 @@ Bard
}
/*paragraphs*/
p {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:24px;
text-align:center;
@ -801,7 +801,7 @@ Bard
/*xmp tag style for ascii art*/
xmp {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:22px;
color: #''+config.lib.stylix.colors.base01+''
@ -875,7 +875,7 @@ Bard
}
/*paragraphs*/
p {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:24px;
text-align:center;
@ -908,7 +908,7 @@ Bard
/*xmp tag style for ascii art*/
xmp {
font-family:''+font+'';
font-family:''+userSettings.font+'';
font-size:22px;
color: #''+config.lib.stylix.colors.base01+''

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, dmenu_command ? "rofi -show dmenu", ... }:
{ pkgs, dmenu_command ? "rofi -show dmenu", ... }:
{
home.packages = with pkgs; [ networkmanager_dmenu networkmanagerapplet ];

View file

@ -1,6 +1,8 @@
{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, org-yaap, org-side-tree, org-timeblock, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }:
{ config, lib, pkgs, userSettings, systemSettings,
eaf, eaf-browser, org-nursery, org-yaap,
org-side-tree, org-timeblock, phscroll, ... }:
let
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+theme)+"/polarity.txt"));
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+userSettings.theme)+"/polarity.txt"));
dashboardLogo = ./. + "/nix-" + themePolarity + ".png";
in
{
@ -139,14 +141,14 @@ in
;; Import relevant variables from flake into emacs
(setq user-full-name "''+name+''") ; name
(setq user-username "''+username+''") ; username
(setq user-mail-address "''+email+''") ; email
(setq user-home-directory "/home/''+username+''") ; absolute path to home directory as string
(setq user-default-roam-dir "''+defaultRoamDir+''") ; absolute path to home directory as string
(setq system-nix-profile "''+profile+''") ; what profile am I using?
(setq system-wm-type "''+wmType+''") ; wayland or x11?
(setq doom-font (font-spec :family "''+font+''" :size 20)) ; import font
(setq dotfiles-dir "''+dotfilesDir+''") ; import location of dotfiles directory
(setq user-full-name "''+userSettings.name+''") ; name
(setq user-username "''+userSettings.username+''") ; username
(setq user-mail-address "''+userSettings.email+''") ; email
(setq user-home-directory "/home/''+userSettings.username+''") ; absolute path to home directory as string
(setq user-default-roam-dir "''+userSettings.defaultRoamDir+''") ; absolute path to home directory as string
(setq system-nix-profile "''+systemSettings.profile+''") ; what profile am I using?
(setq system-wm-type "''+userSettings.wmType+''") ; wayland or x11?
(setq doom-font (font-spec :family "''+userSettings.font+''" :size 20)) ; import font
(setq dotfiles-dir "''+userSettings.dotfilesDir+''") ; import location of dotfiles directory
'';
}

View file

@ -1982,9 +1982,11 @@ 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 [[../../../profiles/work/home.nix][home.nix]].
#+BEGIN_SRC nix :tangle doom.nix
{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, org-yaap, org-side-tree, org-timeblock, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }:
{ config, lib, pkgs, userSettings, systemSettings,
eaf, eaf-browser, org-nursery, org-yaap,
org-side-tree, org-timeblock, phscroll, ... }:
let
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+theme)+"/polarity.txt"));
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+userSettings.theme)+"/polarity.txt"));
dashboardLogo = ./. + "/nix-" + themePolarity + ".png";
in
{
@ -2123,15 +2125,15 @@ in
;; Import relevant variables from flake into emacs
(setq user-full-name "''+name+''") ; name
(setq user-username "''+username+''") ; username
(setq user-mail-address "''+email+''") ; email
(setq user-home-directory "/home/''+username+''") ; absolute path to home directory as string
(setq user-default-roam-dir "''+defaultRoamDir+''") ; absolute path to home directory as string
(setq system-nix-profile "''+profile+''") ; what profile am I using?
(setq system-wm-type "''+wmType+''") ; wayland or x11?
(setq doom-font (font-spec :family "''+font+''" :size 20)) ; import font
(setq dotfiles-dir "''+dotfilesDir+''") ; import location of dotfiles directory
(setq user-full-name "''+userSettings.name+''") ; name
(setq user-username "''+userSettings.username+''") ; username
(setq user-mail-address "''+userSettings.email+''") ; email
(setq user-home-directory "/home/''+userSettings.username+''") ; absolute path to home directory as string
(setq user-default-roam-dir "''+userSettings.defaultRoamDir+''") ; absolute path to home directory as string
(setq system-nix-profile "''+systemSettings.profile+''") ; what profile am I using?
(setq system-wm-type "''+userSettings.wmType+''") ; wayland or x11?
(setq doom-font (font-spec :family "''+userSettings.font+''" :size 20)) ; import font
(setq dotfiles-dir "''+userSettings.dotfilesDir+''") ; import location of dotfiles directory
'';
}
#+END_SRC

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
{
home.packages = [ pkgs.flatpak ];

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, ... }:
let
myRetroarch =
(pkgs.retroarch.override {

View file

@ -1,10 +1,10 @@
{ config, lib, pkgs, name, email, ... }:
{ config, pkgs, userSettings, ... }:
{
home.packages = [ pkgs.git ];
programs.git.enable = true;
programs.git.userName = name;
programs.git.userEmail = email;
programs.git.userName = userSettings.name;
programs.git.userEmail = userSettings.email;
programs.git.extraConfig = {
init.defaultBranch = "main";
};

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, pkgs, ... }:
{
# nixpkgs.overlays = [

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, pkgs, ... }:
let myCbxScript = ''
# TODO fix this for wayland
#!/bin/sh

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ pkgs, lib, ... }:
{
home.packages = with pkgs; [

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ pkgs, lib, ... }:
{
home.packages = with pkgs; [

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, pkgs, ... }:
{
# Various packages related to virtualization, compatability and sandboxing