summaryrefslogtreecommitdiff
path: root/modules/home
diff options
context:
space:
mode:
Diffstat (limited to 'modules/home')
-rw-r--r--modules/home/default.nix5
-rw-r--r--modules/home/firefox.nix2
-rw-r--r--modules/home/gtk-bookmarks.nix10
-rw-r--r--modules/home/initial-home-setup.nix4
-rw-r--r--modules/home/resources/firefox/userChrome.css11
-rw-r--r--modules/home/theme-st.nix22
-rw-r--r--modules/home/theme.nix11
-rw-r--r--modules/home/userdirs.nix5
8 files changed, 58 insertions, 12 deletions
diff --git a/modules/home/default.nix b/modules/home/default.nix
index 8748fb9..9abf1b5 100644
--- a/modules/home/default.nix
+++ b/modules/home/default.nix
@@ -1,7 +1,7 @@
{ lib, userDetails, homeStateVersion, ... }: {
home = {
username = userDetails.username;
- homeDirectory = userDetails.home.root;
+ homeDirectory = userDetails.home;
stateVersion = homeStateVersion;
};
@@ -13,10 +13,13 @@
./htop.nix
./initial-home-setup.nix
./pcmanfm.nix # TODO mk name changeable & doesn't seem to work right now
+ ./theme-st.nix
./theme.nix
+ ./userdirs.nix
./wallpapers.nix
];
+ theme.st.enable = lib.mkDefault false;
theme.mint.enable = lib.mkDefault true;
wallpapers.enable = lib.mkDefault false;
}
diff --git a/modules/home/firefox.nix b/modules/home/firefox.nix
index 000277f..30fd08a 100644
--- a/modules/home/firefox.nix
+++ b/modules/home/firefox.nix
@@ -50,7 +50,7 @@
"app.normandy.first_run" = false;
"browser.aboutConfig.showWarning" = false; # arkenfox does
- "browser.download.dir" = userDetails.home.downloads;
+ #"browser.download.dir" = userDetails.userDirs.downloads;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.urlbar.suggest.topsites" = false;
diff --git a/modules/home/gtk-bookmarks.nix b/modules/home/gtk-bookmarks.nix
index e6c1ec7..24c6563 100644
--- a/modules/home/gtk-bookmarks.nix
+++ b/modules/home/gtk-bookmarks.nix
@@ -8,10 +8,10 @@
};
config = {
- gtk.gtk3.bookmarks = with userDetails.home; [
- "file://${downloads} Downloads"
- "file://${documents} Documents"
- "file://${pictures} Pictures"
- ] ++ config.additional-gtk-bookmarks;
+ gtk.gtk3.bookmarks = (
+ lib.mapAttrsToList (name: path:
+ "file://${path} ${lib.toUpper (lib.substring 0 1 name)}${lib.substring 1 (-1) name}"
+ ) userDetails.userDirs
+ ) ++ config.additional-gtk-bookmarks;
};
}
diff --git a/modules/home/initial-home-setup.nix b/modules/home/initial-home-setup.nix
index 6aa6ac7..4132386 100644
--- a/modules/home/initial-home-setup.nix
+++ b/modules/home/initial-home-setup.nix
@@ -15,8 +15,8 @@
export PATH="$HOME/.local/bin/misc:$PATH"
run mimewiz -i # already verbose
'';
- createDirs = with userDetails.home; lib.hm.dag.entryAfter ["writeBoundary"] ''
- run mkdir -p $VERBOSE_ARG "${downloads}" "${documents}" "${pictures}"
+ createDirs = lib.hm.dag.entryAfter ["writeBoundary"] ''
+ run mkdir -p $VERBOSE_ARG ${ lib.concatStringsSep " " (lib.attrValues userDetails.userDirs) }
'';
};
}
diff --git a/modules/home/resources/firefox/userChrome.css b/modules/home/resources/firefox/userChrome.css
index de0e112..624ab26 100644
--- a/modules/home/resources/firefox/userChrome.css
+++ b/modules/home/resources/firefox/userChrome.css
@@ -14,6 +14,17 @@
background: var(--toolbar-field-border-color) !important;
}
+/* Change background color of bookmarks toolbar */
+#PersonalToolbar {
+ background: var(--toolbox-bgcolor) !important;
+}
+
+/* Adjust spacing of toolbar items */
+#PlacesToolbarItems {
+ gap: .35rem;
+ margin-block: .2rem;
+}
+
/* Fix vertical spacing of tabs */
#TabsToolbar {
margin-top: -1px;
diff --git a/modules/home/theme-st.nix b/modules/home/theme-st.nix
new file mode 100644
index 0000000..bc22791
--- /dev/null
+++ b/modules/home/theme-st.nix
@@ -0,0 +1,22 @@
+{ config, lib, pkgs, ... }: {
+ options = {
+ theme.st = {
+ enable = lib.mkEnableOption "enables theming st with home manager";
+ font = lib.mkOption {
+ type = lib.types.str;
+ default = "JetBrainsMonoNL Nerd Font Mono:size=12:antialias=true:autohint=true";
+ };
+ };
+ };
+ config = let
+ themed-st = pkgs.st.overrideAttrs (old: {
+ buildInputs = old.buildInputs or [] ++ [ pkgs.makeWrapper ];
+ postInstall = old.postInstall or "" + ''
+ wrapProgram $out/bin/st \
+ --add-flags '-f${config.theme.st.font}'
+ '';
+ });
+ in {
+ home.packages = [ themed-st ];
+ };
+}
diff --git a/modules/home/theme.nix b/modules/home/theme.nix
index 4edaffa..2288610 100644
--- a/modules/home/theme.nix
+++ b/modules/home/theme.nix
@@ -47,15 +47,20 @@ in {
description = "default gtk font";
};
size = lib.mkOption {
- type = lib.types.int;
+ type = with lib.types; nullOr int;
default = null;
description = "default gtk font size";
};
};
};
theme.cursor = {
+ name = lib.mkOption {
+ type = lib.types.str;
+ default = "Adwaita";
+ description = "gtk cursor theme";
+ };
size = lib.mkOption {
- type = lib.types.int;
+ type = with lib.types; nullOr int;
default = null;
description = "gtk cursor size";
};
@@ -78,7 +83,7 @@ in {
size = config.theme.font.gtk.size;
};
cursorTheme = {
- name = "Adwaita";
+ name = config.theme.cursor.name;
size = config.theme.cursor.size;
};
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
diff --git a/modules/home/userdirs.nix b/modules/home/userdirs.nix
new file mode 100644
index 0000000..58c1d59
--- /dev/null
+++ b/modules/home/userdirs.nix
@@ -0,0 +1,5 @@
+{ userDetails, ... }: {
+ xdg.userDirs = {
+ enable = true;
+ } // userDetails.userDirs;
+}