about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-12-26 16:07:08 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-12-26 16:07:08 +0100
commita80614bddf6403bfd6b5b83416301883c23ca3bb (patch)
tree511435842dd6f22787d20f5e57d01ca554cd6c14
parent2ff7b710a72da306bcfb9ee261a0ac63529289c8 (diff)
downloaddots-a80614bddf6403bfd6b5b83416301883c23ca3bb.tar.gz
dots-a80614bddf6403bfd6b5b83416301883c23ca3bb.zip
Add home-manager
-rwxr-xr-xmodules/larbs.nix2
-rwxr-xr-xusers/pn.nix47
2 files changed, 44 insertions, 5 deletions
diff --git a/modules/larbs.nix b/modules/larbs.nix
index 2584737..993776c 100755
--- a/modules/larbs.nix
+++ b/modules/larbs.nix
@@ -12,7 +12,7 @@ let
     dmenu
     pndwm
     pndwmblocks
-    # larbs-scripts
+    larbs-scripts
     st
   ];
 in
diff --git a/users/pn.nix b/users/pn.nix
index 3a74358..0dcccb6 100755
--- a/users/pn.nix
+++ b/users/pn.nix
@@ -1,10 +1,49 @@
 ## My default user
 
-{
-  users.users.pn = {
-    isNormalUser = true;
-    extraGroups = [ "wheel" "audio" ];
+let
+  home-manager = builtins.fetchTarball {
+    url = "https://github.com/nix-community/home-manager/archive/master.tar.gz";
   };
+in
+  {
+
+    imports = [
+      (import "${home-manager}/nixos")
+    ];
+
+    users.users.pn = {
+      isNormalUser = true;
+      extraGroups = [ "wheel" "audio" ];
+    };
+
+    home-manager.users.pn = {
+      xsession = {
+        enable = true;
+        windowManager.command = "dbus-run-session -- dwm";
+        profileExtra = ''
+      # Fix Gnome Apps Slow  Start due to failing services
+      # Add this when you include flatpak in your system
+          dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
+
+          mpd &			# music player daemon-you might prefer it as a service though
+          remaps &		# run the remaps script, switching caps/esc and more; check it for more info
+          setbg &			# set the background with the `setbg` script
+      #xrdb $\{XDG_CONFIG_HOME:-$HOME/.config}/Xresources &	# Uncomment to use Xresources colors/settings on startup
+          xcompmgr &
+      # picom &
+          dunst &			# dunst for notifications
+          xset r rate 300 50 &	# Speed xrate up
+      # unclutter &		# Remove mouse when idle
+      #sxhkd &
+          dockd --daemon &
+          for app in `ls ~/.config/autostart/*.desktop`; do
+          $(grep '^Exec' $app | sed 's/^Exec=//') &
+          done
+          sleep .5 && screen-orient &
+        '';
+        scriptPath = ".xinitrc";
+      };
+    };
 
   ## Although it's less secure I tend not to have sensitive data on my machines
   security.sudo.wheelNeedsPassword = false;