summaryrefslogtreecommitdiff
path: root/modules/home
diff options
context:
space:
mode:
Diffstat (limited to 'modules/home')
-rw-r--r--modules/home/default.nix6
-rw-r--r--modules/home/firefox.nix27
-rw-r--r--modules/home/gtk-bookmarks.nix8
-rw-r--r--modules/home/initial-home-setup.nix4
-rw-r--r--modules/home/resources/activation-scripts/clone-repos.sh8
5 files changed, 30 insertions, 23 deletions
diff --git a/modules/home/default.nix b/modules/home/default.nix
index b44f360..8748fb9 100644
--- a/modules/home/default.nix
+++ b/modules/home/default.nix
@@ -1,12 +1,11 @@
-{ lib, userDetails, ... }: {
+{ lib, userDetails, homeStateVersion, ... }: {
home = {
username = userDetails.username;
homeDirectory = userDetails.home.root;
- stateVersion = "24.05";
+ stateVersion = homeStateVersion;
};
imports = [
- ./alacritty.nix
#./chrome.nix
./firefox.nix
./git.nix
@@ -18,7 +17,6 @@
./wallpapers.nix
];
- alacritty.enable = lib.mkDefault true;
theme.mint.enable = lib.mkDefault true;
wallpapers.enable = lib.mkDefault false;
}
diff --git a/modules/home/firefox.nix b/modules/home/firefox.nix
index 5e015ff..9d4bb4e 100644
--- a/modules/home/firefox.nix
+++ b/modules/home/firefox.nix
@@ -1,29 +1,33 @@
{ pkgs, userDetails, ... }: {
programs.firefox = {
- # TODO see if there is way to login to moz account in profile
enable = true;
- arkenfox = {
- enable = true;
- };
+ arkenfox.enable = true;
profiles = let
search = {
engines = {
"Timmy Search" = {
- urls = [{ template = "https://search.tjkeller.xyz/search?q={searchTerms}"; }]; # Don't know how to do w/ POST but I prefer GET anyways
+ urls = [{
+ template = "https://search.tjkeller.xyz/search";
+ params = [ { name = "q"; value = "{searchTerms}"; } ];
+ }];
iconURI = "https://search.tjkeller.xyz/static/themes/simple/img/favicon.svg"; # TODO doesn't seem to work
};
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
- params = [
- { name = "type"; value = "packages"; }
- { name = "query"; value = "{searchTerms}"; }
- ];
+ params = [ { name = "query"; value = "{searchTerms}"; } ];
}];
-
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
+ "NixOS Options" = {
+ urls = [{
+ template = "https://search.nixos.org/options";
+ params = [ { name = "query"; value = "{searchTerms}"; } ];
+ }];
+ icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
+ definedAliases = [ "@no" ];
+ };
};
default = "Timmy Search";
privateDefault = "Timmy Search";
@@ -46,7 +50,7 @@
"app.normandy.first_run" = false;
"browser.aboutConfig.showWarning" = false; # arkenfox does
- "browser.download.dir" = userDetails.home.downloads; # FF will create this dir if it doesn't exist
+ "browser.download.dir" = userDetails.home.downloads;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.urlbar.suggest.topsites" = false;
@@ -54,7 +58,6 @@
"dom.push.enabled" = false; #
"extensions.pocket.enabled" = false;
"general.smoothScroll" = false;
- #identity.fxaccounts.account.device.name = "timmy’s Firefox on nixos"; # HOSTNAME
};
workSettings = settings // {
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; # Use builtin dark theme instead of system theme
diff --git a/modules/home/gtk-bookmarks.nix b/modules/home/gtk-bookmarks.nix
index 067543d..e6c1ec7 100644
--- a/modules/home/gtk-bookmarks.nix
+++ b/modules/home/gtk-bookmarks.nix
@@ -8,10 +8,10 @@
};
config = {
- gtk.gtk3.bookmarks = with userDetails; [
- "file://${home.downloads} Downloads"
- "file://${home.documents} Documents"
- "file://${home.pictures} Pictures"
+ gtk.gtk3.bookmarks = with userDetails.home; [
+ "file://${downloads} Downloads"
+ "file://${documents} Documents"
+ "file://${pictures} Pictures"
] ++ config.additional-gtk-bookmarks;
};
}
diff --git a/modules/home/initial-home-setup.nix b/modules/home/initial-home-setup.nix
index 046f5a5..6aa6ac7 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 = lib.hm.dag.entryAfter ["writeBoundary"] ''
- run mkdir -p $VERBOSE_ARG "${userDetails.home.downloads}"
+ createDirs = with userDetails.home; lib.hm.dag.entryAfter ["writeBoundary"] ''
+ run mkdir -p $VERBOSE_ARG "${downloads}" "${documents}" "${pictures}"
'';
};
}
diff --git a/modules/home/resources/activation-scripts/clone-repos.sh b/modules/home/resources/activation-scripts/clone-repos.sh
index 887968b..eaee4dc 100644
--- a/modules/home/resources/activation-scripts/clone-repos.sh
+++ b/modules/home/resources/activation-scripts/clone-repos.sh
@@ -3,8 +3,14 @@
server="https://git.tjkeller.xyz/"
clonemissing() {
+ # pull and return if already existing
+ if [ -d "$2"/.git ]; then
+ run cd $VERBOSE_ARG "$2"
+ run git pull $VERBOSE_ARG || echo "$2: failed to pull from remote"
+ return
+ fi
+
# clone to $2
- [ -d "$2"/.git ] && return
run mkdir -p $VERBOSE_ARG "$2"
run git clone $VERBOSE_ARG "$server$1" "$2"