helm/users/profiles/desktop/default.nix
2021-11-14 03:47:38 +10:00

221 lines
5.9 KiB
Nix

{pkgs, config, ...}:
{
#imports = [ ./xdg.nix ];
home-manager.users.anish.xdg.enable = true; # This doesn't seem to do anything so we have below
home-manager.users.anish.xdg.configHome = "/home/anish/.config"; # TODO bad hard coded
environment.sessionVariables = rec {
XDG_CACHE_HOME = "\${HOME}/.cache";
XDG_CONFIG_HOME = "\${HOME}/.config";
XDG_BIN_HOME = "\${HOME}/.local/bin";
XDG_DATA_HOME = "\${HOME}/.local/share";
PATH = [
"\${XDG_BIN_HOME}"
];
};
environment.systemPackages = with pkgs; [
# TODO move somewhere meaningful
tdesktop # TODO get rid of this once bridged on sealight
sublime-music
nheko
newsflash
zeal
xclip
xdotool
rofi
lightdm
dunst
libnotify
(polybar.override {
pulseSupport = true;
nlSupport = true;
})
];
location.provider = "geoclue2";
services = {
redshift = {
enable = true;
temperature = {
day = 5500;
night = 3700;
};
};
xserver = {
enable = true;
desktopManager.wallpaper.mode = "fill";
displayManager = {
defaultSession = "none+bspwm";
sessionCommands = ''
${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF
*.foreground: #e6e1cf
*.background: #0f1419
*.cursorColor: #f29718
! Black
*.color0: #000000
*.color8: #323232
! Red
*.color1: #ff3333
*.color9: #ff6565
! Green
*.color2: #b8cc52
*.color10: #eafe84
! Yellow
*.color3: #e7c547
*.color11: #fff779
! Blue
*.color4: #36a3d9
*.color12: #68d5ff
! Magenta
*.color5: #f07178
*.color13: #ffa3aa
! Cyan
*.color6: #95e6cb
*.color14: #c7fffd
! White
*.color7: #ffffff
*.color15: #ffffff
! Bold, Italic, Underline
*.colorBD: #e6e1cf
!*.colorIT:
!*.colorUL:
EOF
'';
lightdm.enable = true;
lightdm.greeters.mini.enable = true;
lightdm.greeters.mini.user = "anish"; # TODO hardcoded
lightdm.background = "/etc/nixos/users/profiles/desktop/background.jpg";
lightdm.greeters.mini.extraConfig = ''
text-color = "#ff79c6"
password-background-color = "#1E2029"
window-color = "#181a23"
border-color = "#181a23"
'';
};
windowManager.bspwm.enable = true;
#windowManager.bspwm.configFile = "/home/anish/.bspwm/bspwmrc";
windowManager.bspwm.sxhkd.configFile = "/home/anish/.config/sxhkdrc";
};
};
fonts.fonts = with pkgs; [
fira-code
fira-code-symbols
hermit
#hack
siji
font-awesome-ttf
proggyfonts
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
];
home-manager.users.anish = {
# Install themes
home.packages = with pkgs; [
dracula-theme
paper-icon-theme
];
xresources.properties = {
"Xcursor.theme"= "Paper";
#"Xcursor.size"= 64;
"*.foreground"= "#e6e1cf";
"*.background"= "#0f1419";
"*.cursorColor"= "#f29718";
# Black
"*.color0"= "#000000";
"*.color8"= "#323232";
# Red
"*.color1"= "#ff3333";
"*.color9"= "#ff6565";
# Green
"*.color2"= "#b8cc52";
"*.color10"= "#eafe84";
# Yellow
"*.color3"= "#e7c547";
"*.color11"= "#fff779";
# Blue
"*.color4"= "#36a3d9";
"*.color12"= "#68d5ff";
# Magenta
"*.color5"= "#f07178";
"*.color13"= "#ffa3aa";
# Cyan
"*.color6"= "#95e6cb";
"*.color14"= "#c7fffd";
# White
"*.color7"= "#ffffff";
"*.color15"= "#ffffff";
# Bold, Italic, Underline
"*.colorBD"= "#e6e1cf";
};
# Move required config files around
home.file = {
".config/bspwm/rc.d/polybar".source = ./run.sh;
".config/bspwm/bspwmrc".source = ./bspwmrc;
".config/sxhkdrc".source = ./sxhkdrc;
".config/rofi/theme" = {
source = ./rofi;
recursive = true;
};
".config/polybar" = {
source = ./polybar;
recursive = true;
};
".config/dunst/dunstrc".source = ./dunstrc;
".config/kitty/kitty.conf".source = ./kitty.conf;
".config/kitty/ayu.conf".source = ./ayu-kitty.conf;
".background-image".source = ./background.jpg;
# gtk3 theme
".config/gtk-3.0/settings.ini".text = ''
[Settings]
gtk-theme-name=Dracula
gtk-icon-theme-name=Paper
gtk-cursor-theme-name=Paper
gtk-fallback-icon-theme=gnome
gtk-application-prefer-dark-theme=true
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=none
'';
# GTK2 global theme (widget and icon theme)
".config/gtk-2.0/gtkrc".text = ''
gtk-theme-name=Dracula
gtk-icon-theme-name=Paper
gtk-font-name="Sans 10"
'';
"$XDG_BIN_HOME/passmenu".source = ./bin/passmenu;
"$XDG_BIN_HOME/powermenu".source = ./bin/powermenu;
};
# Compositor
services.picom = {
enable = true;
fade = true;
fadeDelta = 1;
fadeSteps = [ "0.01" "0.022" ];
shadow = true;
shadowOffsets = [ (-10) (-10) ];
shadowOpacity = "0.22";
# activeOpacity = "1.00";
# inactiveOpacity = "0.92";
extraOptions = ''
shadow-radius = 12;
# blur-background = true;
# blur-background-frame = true;
# blur-background-fixed = true;
blur-kern = "7x7box";
blur-strength = 320;
'';
};
programs.autorandr.enable = true;
services.udiskie.automount = true;
};
}