summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/home/default.nix3
-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/userdirs.nix5
-rw-r--r--modules/hosts/hp-envy-office/home.nix4
-rw-r--r--modules/root/normaluser.nix2
-rw-r--r--modules/root/secrets.nix2
8 files changed, 19 insertions, 13 deletions
diff --git a/modules/home/default.nix b/modules/home/default.nix
index 8748fb9..c6278f2 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;
};
@@ -14,6 +14,7 @@
./initial-home-setup.nix
./pcmanfm.nix # TODO mk name changeable & doesn't seem to work right now
./theme.nix
+ ./userdirs.nix
./wallpapers.nix
];
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/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;
+}
diff --git a/modules/hosts/hp-envy-office/home.nix b/modules/hosts/hp-envy-office/home.nix
index ed02130..2e4f61f 100644
--- a/modules/hosts/hp-envy-office/home.nix
+++ b/modules/hosts/hp-envy-office/home.nix
@@ -5,8 +5,8 @@
theme.mint.icons.color = "Green";
wallpapers.enable = true;
- additional-gtk-bookmarks = with userDetails; [
- "file://${home.documents}/src/sites/admin Admin"
+ additional-gtk-bookmarks = with userDetails.userDirs; [
+ "file://${documents}/src/sites/admin Admin"
"file:///media/chexx/chexx cHEXx"
];
}
diff --git a/modules/root/normaluser.nix b/modules/root/normaluser.nix
index b4be0cc..88eb338 100644
--- a/modules/root/normaluser.nix
+++ b/modules/root/normaluser.nix
@@ -4,7 +4,7 @@
};
users.users.${userDetails.username} = {
description = userDetails.fullname;
- #home = userDetails.home.root;
+ #home = userDetails.home;
isNormalUser = true;
hashedPasswordFile = config.sops.secrets.hashed-root-password.path;
extraGroups = [
diff --git a/modules/root/secrets.nix b/modules/root/secrets.nix
index 47262fd..045e3f4 100644
--- a/modules/root/secrets.nix
+++ b/modules/root/secrets.nix
@@ -4,7 +4,7 @@
sops = {
defaultSopsFile = ./resources/secrets/secrets.yaml;
defaultSopsFormat = "yaml";
- age.keyFile = "${userDetails.home.root}/.config/sops/age/keys.txt";
+ age.keyFile = "${userDetails.home}/.config/sops/age/keys.txt";
secrets = {
wpa_supplicant-conf = { };