helm/users/profiles/desktop/default.nix

299 lines
7.9 KiB
Nix
Raw Normal View History

2021-11-29 04:11:58 -08:00
{ pkgs, config, lib, ... }:
let
dracula-gtk = pkgs.fetchFromGitHub {
owner = "dracula";
repo = "gtk";
rev = "502f212d83bc67e8f0499574546b99ec6c8e16f9";
sha256 = "1wx9nzq7cqyvpaq4j60bs8g7gh4jk8qg4016yi4c331l4iw1ymsa";
};
in
2021-10-04 08:22:19 -07:00
{
# TODO modularize
2021-10-12 05:35:18 -07:00
#imports = [ ./xdg.nix ];
2021-10-04 08:22:19 -07:00
2021-12-11 17:45:31 -08:00
services = {
gnome.gnome-keyring.enable = true;
upower.enable = true;
dbus = {
enable = true;
packages = [ pkgs.gnome3.dconf ];
};
};
2022-03-21 21:32:23 -07:00
2021-12-11 17:45:31 -08:00
security.pam.services.sddm.enableGnomeKeyring = true;
2021-10-13 05:52:50 -07:00
home-manager.users.anish.xdg.enable = true; # This doesn't seem to do anything so we have below
2021-11-13 09:47:38 -08:00
home-manager.users.anish.xdg.configHome = "/home/anish/.config"; # TODO bad hard coded
home-manager.users.anish.xdg.configFile = {
2022-03-21 21:32:23 -07:00
"Kvantum/Dracula/Dracula.kvconfig".source = "${dracula-gtk}/kde/kvantum/Dracula-purple-solid/Dracula-purple-solid.kvconfig";
"Kvantum/Dracula/Dracula.svg".source = "${dracula-gtk}/kde/kvantum/Dracula-purple-solid/Dracula-purple-solid.svg";
"Kvantum/kvantum.kvconfig".text = "[General]\ntheme=Dracula";
};
2021-10-13 05:52:50 -07:00
environment.sessionVariables = rec {
XDG_CACHE_HOME = "\${HOME}/.cache";
2021-10-13 05:52:50 -07:00
XDG_CONFIG_HOME = "\${HOME}/.config";
XDG_BIN_HOME = "\${HOME}/.local/bin";
XDG_DATA_HOME = "\${HOME}/.local/share";
2021-10-13 05:52:50 -07:00
PATH = [
2021-10-13 05:52:50 -07:00
"\${XDG_BIN_HOME}"
];
};
2021-11-29 04:11:58 -08:00
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"ripcord"
"vcv-rack"
];
2021-10-13 05:52:50 -07:00
environment.systemPackages = with pkgs; [
2021-11-13 09:47:38 -08:00
# TODO move somewhere meaningful
signal-desktop # bridge to sealight?
scrot
2021-11-29 04:11:58 -08:00
ripcord
2021-12-27 00:27:49 -08:00
feh
xkblayout-state
2021-11-13 09:47:38 -08:00
sublime-music
2022-02-08 02:03:49 -08:00
vcv-rack
2022-03-21 21:32:23 -07:00
zathura
2021-11-29 04:11:58 -08:00
calibre
nheko
2022-02-08 02:03:49 -08:00
mpv
2021-12-11 17:45:31 -08:00
scrot
2021-11-13 09:47:38 -08:00
newsflash
zeal
2021-10-13 05:52:50 -07:00
xclip
xdotool
rofi
2022-04-15 08:20:42 -07:00
rofimoji
2022-04-11 00:31:29 -07:00
obs-studio
2021-10-13 05:52:50 -07:00
lightdm
dunst
libnotify
(polybar.override {
pulseSupport = true;
nlSupport = true;
})
2021-10-12 05:35:18 -07:00
];
2021-10-04 08:22:19 -07:00
2021-10-13 05:52:50 -07:00
location.provider = "geoclue2";
services = {
redshift = {
enable = true;
temperature = {
day = 5500;
night = 3700;
};
};
xserver = {
enable = true;
layout = "us,dvorak";
2021-10-13 05:52:50 -07:00
desktopManager.wallpaper.mode = "fill";
displayManager = {
defaultSession = "none+bspwm";
sessionCommands = ''
${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF
#define blk #1F2430
#define bblk #F28779
#define red #A6CC70
#define bred #FFCC66
#define grn #5CCFE6
#define bgrn #F29E74
#define ylw #77A8D9
#define bylw #5C6773
#define blu #707A8C
#define bblu #F27983
#define mag #BAE67E
#define bmag #FFD580
#define cyn #73D0FF
#define bcyn #FFA759
#define wht #95E6CB
#define bwht #CBCCC6
#define bg blk
#define fg wht
*.foreground: fg
*.background: bg
*.cursorColor: mag
*.color0: blk
*.color8: bblk
*.color1: red
*.color9: bred
*.color2: grn
*.color10: bgrn
*.color3: ylw
*.color11: bylw
*.color4: blu
*.color12: bblu
*.color5: mag
*.color13: bmag
*.color6: cyn
*.color14: bcyn
*.color7: wht
*.color15: bwht
! greys
*.color234: #1E2029
*.color235: #282a36
*.color236: #373844
*.color237: #44475a
*.color239: #565761
*.color240: #6272a4
*.color241: #b6b6b2
2022-02-08 02:03:49 -08:00
xsetroot -cursor_name left_ptr
2021-10-13 05:52:50 -07:00
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"
2022-04-19 00:53:23 -07:00
active-monitor=1
2021-10-13 05:52:50 -07:00
'';
};
windowManager.bspwm.enable = true;
#windowManager.bspwm.configFile = "/home/anish/.bspwm/bspwmrc";
windowManager.bspwm.sxhkd.configFile = "/home/anish/.config/sxhkdrc";
2021-10-12 05:35:18 -07:00
};
2021-10-10 06:59:41 -07:00
};
2021-10-04 08:22:19 -07:00
2021-10-13 05:52:50 -07:00
fonts.fonts = with pkgs; [
fira-code
fira-code-symbols
hermit
#hack
siji
font-awesome-ttf
proggyfonts
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
];
2021-10-04 08:22:19 -07:00
2021-10-13 05:52:50 -07:00
home-manager.users.anish = {
2021-10-12 05:35:18 -07:00
# Install themes
home.packages = with pkgs; [
ayu-theme-gtk
2021-10-12 05:35:18 -07:00
dracula-theme
capitaine-cursors
2021-10-12 05:35:18 -07:00
paper-icon-theme
libsForQt5.qtstyleplugin-kvantum
qt5ct
gtk-engine-murrine
gtk_engines
2021-10-12 05:35:18 -07:00
];
2021-10-04 08:22:19 -07:00
2021-10-13 05:52:50 -07:00
xresources.properties = {
"Xcursor.theme" = "Paper";
2021-10-13 05:52:50 -07:00
#"Xcursor.size"= 64;
"*.foreground" = "#95E6CB";
"*.background" = "#1F2430";
"*.cursorColor" = "#BAE67E";
2021-10-13 05:52:50 -07:00
# Black
2022-03-21 21:32:23 -07:00
"*.color0" = "#1F2430";
"*.color8" = "#F28779";
# Red
2022-03-21 21:32:23 -07:00
"*.color1" = "#A6CC70";
"*.color9" = "#FFCC66";
# Green
2022-03-21 21:32:23 -07:00
"*.color2" = "#5CCFE6";
"*.color10" = "#F29E74";
2021-10-13 05:52:50 -07:00
# Yellow
2022-03-21 21:32:23 -07:00
"*.color3" = "#77A8D9";
"*.color11" = "#5C6773";
# Blue
2022-03-21 21:32:23 -07:00
"*.color4" = "#707A8C";
"*.color12" = "#F27983";
# Magenta
2022-03-21 21:32:23 -07:00
"*.color5" = "#BAE67E";
"*.color13" = "#FFD580";
# Cyan
2022-03-21 21:32:23 -07:00
"*.color6" = "#73D0FF";
"*.color14" = "#FFA759";
# White
2022-03-21 21:32:23 -07:00
"*.color7" = "#95E6CB";
"*.color15" = "#CBCCC6";
2021-10-13 05:52:50 -07:00
# Bold, Italic, Underline
"*.colorBD" = "#e6e1cf";
2021-10-13 05:52:50 -07:00
};
2021-10-04 08:22:19 -07:00
2021-10-12 05:35:18 -07:00
# 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;
2022-03-21 21:32:23 -07:00
".config/zathura/zathurarc".source = ./zathurarc;
2021-10-13 05:52:50 -07:00
".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=Capitaine Cursors - White
2021-10-13 05:52:50 -07:00
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)
2021-10-13 05:52:50 -07:00
".config/gtk-2.0/gtkrc".text = ''
gtk-theme-name=Ayu-Mirage
gtk-icon-theme-name=Capitaine Cursors - White
2021-10-13 05:52:50 -07:00
gtk-font-name="Sans 10"
'';
2022-03-21 21:59:23 -07:00
# TODO hardcoded
2022-03-21 21:32:23 -07:00
".local/bin/passmenu".source = ./bin/passmenu;
".local/bin/powermenu".source = ./bin/powermenu;
".local/bin/screenshot".source = ./bin/screenshot;
2021-10-04 08:22:19 -07:00
};
qt = {
enable = true;
platformTheme = "gtk";
style = { name = "qt5ct-style"; };
2022-03-21 21:32:23 -07:00
};
2021-10-04 08:22:19 -07:00
# 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 = ''
2021-10-12 05:35:18 -07:00
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;
2021-10-04 08:25:59 -07:00
services.mpris-proxy.enable = true; # bluetooth media control
2021-10-12 05:35:18 -07:00
};
2021-10-04 08:22:19 -07:00
}