working install, many things broken

This commit is contained in:
Anish L 2021-10-12 22:35:18 +10:00
parent 6e4f0f3aaf
commit 5371aeaa2a
11 changed files with 363 additions and 265 deletions

View file

@ -127,10 +127,11 @@
users = digga.lib.rakeLeaves ./users; users = digga.lib.rakeLeaves ./users;
}; };
suites = with profiles; rec { suites = with profiles; rec {
base = [ core users.nixos users.root nvim users.anish ]; # TODO make anish non gui base = [ core users.root nvim users.anish ]; # TODO make anish non gui
sealight = [ base ]; # matrix rsshub backup wireguard sealight = [ base ]; # matrix rsshub backup wireguard
mossnet = [ base ]; # shaarli wallabag nextcloud taskwarrior headphones mossnet = [ base ]; # shaarli wallabag nextcloud taskwarrior headphones
curve = [ base desktop ]; graphical = [ base users.profiles.firefox users.profiles.desktop ];
curve = [ graphical ];
}; };
}; };
}; };
@ -142,7 +143,7 @@
profiles = digga.lib.rakeLeaves ./users/profiles; profiles = digga.lib.rakeLeaves ./users/profiles;
suites = with profiles; rec { suites = with profiles; rec {
base = [ direnv git ]; base = [ direnv git ];
gui = [ base firefox desktop ]; #gui = [ base profiles.firefox profiles.desktop ];
}; };
}; };
users = { users = {

View file

@ -3,11 +3,16 @@
imports = [ imports = [
./configuration.nix ./configuration.nix
profiles.users.anish profiles.users.anish
#profiles.users.profiles.firefox
#profiles.users.profiles.desktop
] ++ suites.curve; ] ++ suites.curve;
home-manager.users.anish = { suites, ... }: { #home-manager.users.anish = { suites, ... }: {
imports = suites.gui; # imports = [
}; # profiles.users.profiles.desktop
# profiles.users.profiles.firefox
# ];
#};
#bud.enable = true; #bud.enable = true;
} }

View file

@ -2,46 +2,46 @@
{ {
#imports = [ ./music.nix ] #imports = [ ./music.nix ]
environment.systemPackages = with pkgs; [ # environment.systemPackages = with pkgs; [
lightdm # lightdm
dunst # dunst
libnotify # libnotify
(polybar.override { # (polybar.override {
pulseSupport = true; # pulseSupport = true;
nlSupport = true; # nlSupport = true;
}) # })
]; # ];
#
services = { # services = {
picom.enable = true; # picom.enable = true;
#redshift.enable = true; # #redshift.enable = true;
xserver = { # xserver = {
enable = true; # enable = true;
displayManager = { # displayManager = {
defaultSession = "none+bspwm"; # defaultSession = "none+bspwm";
lightdm.enable = true; # lightdm.enable = true;
#lightdm.greeters.mini.enable = true; # lightdm.greeters.mini.enable = true;
#lightdm.greeters.mini.user = "anish"; # TODO hardcoded # lightdm.greeters.mini.user = "anish"; # TODO hardcoded
}; # };
windowManager.bspwm.enable = true; # windowManager.bspwm.enable = true;
windowManager.bspwm.configFile = "/home/anish/.bspwm/bspwmrc"; # windowManager.bspwm.configFile = "/home/anish/.bspwm/bspwmrc";
windowManager.bspwm.sxhkd.configFile = "/home/anish/sxhkdrc"; # windowManager.bspwm.sxhkd.configFile = "/home/anish/sxhkdrc";
#windowManager.default = "bspwm"; # #windowManager.default = "bspwm";
}; # };
}; # };
#
#systemd.user.services."dunst" = { # #systemd.user.services."dunst" = {
# enable = true; # # enable = true;
# description = ""; # # description = "";
# wantedBy = [ "default.target" ]; # # wantedBy = [ "default.target" ];
# serviceConfig.Restart = "always"; # # serviceConfig.Restart = "always";
# serviceConfig.RestartSec = 2; # # serviceConfig.RestartSec = 2;
# serviceConfig.ExecStart = "${pkgs.dunst}/bin/dunst"; # # serviceConfig.ExecStart = "${pkgs.dunst}/bin/dunst";
#}; # #};
services.xserver.displayManager.lightdm.greeters.mini.extraConfig = '' # services.xserver.displayManager.lightdm.greeters.mini.extraConfig = ''
text-color = "#ff79c6" # text-color = "#ff79c6"
password-background-color = "#1E2029" # password-background-color = "#1E2029"
window-color = "#181a23" # window-color = "#181a23"
border-color = "#181a23" # border-color = "#181a23"
''; # '';
} }

View file

@ -10,13 +10,13 @@
extraGroups = [ "wheel" "audio" ]; extraGroups = [ "wheel" "audio" ];
}; };
#home-manager.programs.git = { home-manager.users.anish.programs.git = {
# userName = "Anish Lakhwara"; userName = "Anish Lakhwara";
# userEmail = "anish+git@lakhwara.com"; userEmail = "anish+git@lakhwara.com";
# delta.enable = true; delta.enable = true;
#};
home-manager.users.anish = { suites, ... }: {
imports = suites.gui;
}; };
#home-manager.users.anish = { suites, ... }: {
# imports = suites.gui;
#};
} }

View file

@ -0,0 +1,25 @@
#: This is a port of ayu Mirage color scheme
#: based on :
#: https://github.com/ayu-theme/ayu-colors
background #1F2430
foreground #CBCCC6
cursor #FFCC66
selection_background #33415E
color0 #000000
color8 #4D5566
color1 #FF3333
color9 #F27983
color2 #BAE67E
color10 #A6CC70
color3 #FFA759
color11 #F29E74
color4 #73D0FF
color12 #77A8D9
color5 #D4BFFF
color13 #A37ACC
color6 #95E6CB
color14 #4CBF99
color7 #ffffff
color15 #F0F0F0
selection_foreground #CBCCC6

View file

@ -15,6 +15,20 @@ bspc monitor $MONITOR -d {1,2,3,4,5}
bspc config remove_disabled_monitors true bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true bspc config remove_unplugged_monitors true
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config border_width 1
bspc config window_gap 4
bspc config normal_border_color "#181a23"
bspc config active_border_color "#181a23"
bspc config focused_border_color "#bd93f9"
bspc config presel_feedback_color "#bd93f9"
# Extra padding for polybar
bspc config -m primary top_padding 34
bspc config -m primary bottom_padding 0
# Rules # Rules
bspc rule -r '*' bspc rule -r '*'
@ -28,7 +42,7 @@ bspc rule -a 'Emacs:scratch' state=floating
bspc rule -a 'Emacs:emacs-everywhere' state=floating sticky=on bspc rule -a 'Emacs:emacs-everywhere' state=floating sticky=on
bspc rule -a '*:scratch' state=floating sticky=on center=on border=off rectangle=1000x800+0+0 bspc rule -a '*:scratch' state=floating sticky=on center=on border=off rectangle=1000x800+0+0
# # polybar
for file in $XDG_CONFIG_HOME/bspwm/rc.d/*; do for file in $XDG_CONFIG_HOME/bspwm/rc.d/*; do
source "$file" source "$file"
done done

View file

@ -1,45 +1,51 @@
{pkgs, ...}: {pkgs, ...}:
{ {
# Enable bspwm and sxhkd #imports = [ ./xdg.nix ];
xsession.windowManager.bspwm = {
environment.systemPackages = with pkgs; [
rofi
lightdm
dunst
libnotify
(polybar.override {
pulseSupport = true;
nlSupport = true;
})
];
services = {
picom.enable = true;
#redshift.enable = true;
xserver = {
enable = true; enable = true;
extraConfig = '' displayManager = {
bspc config remove_disabled_monitors true defaultSession = "none+bspwm";
bspc config remove_unplugged_monitors true lightdm.enable = true;
lightdm.greeters.mini.enable = true;
bspc config borderless_monocle true lightdm.greeters.mini.user = "anish"; # TODO hardcoded
bspc config gapless_monocle true lightdm.greeters.mini.extraConfig = ''
text-color = "#ff79c6"
bspc config border_width 1 password-background-color = "#1E2029"
bspc config window_gap 4 window-color = "#181a23"
border-color = "#181a23"
bspc config normal_border_color "#181a23"
bspc config active_border_color "#181a23"
bspc config focused_border_color "#bd93f9"
bspc config presel_feedback_color "#bd93f9"
# Extra padding for polybar
bspc config -m primary top_padding 34
bspc config -m primary bottom_padding 0
# Load polybar
for file in $XDG_CONFIG_HOME/bspwm/rc.d/*; do
source "$file"
done
''; '';
}; };
services.sxhkd.enable = true; windowManager.bspwm.enable = true;
#windowManager.bspwm.configFile = "/home/anish/.bspwm/bspwmrc";
windowManager.bspwm.sxhkd.configFile = "/home/anish/.config/sxhkdrc";
};
};
home-manager.users.anish = {
# Add gtk theme for Dracular and Paper # Add gtk theme for Dracular and Paper
# Set wallpaper # Set wallpaper
# Install themes # Install themes
# More nixOS Config home.packages = with pkgs; [
#packages = with pkgs; [ dracula-theme
# dracula-theme paper-icon-theme
# paper-icon-theme ];
#];
# Font stuff # Font stuff
#fonts = { #fonts = {
@ -59,28 +65,22 @@
# Move required config files around # Move required config files around
home.file = { home.file = {
"bspwm/rc.d/polybar".source = ./run.sh; ".config/bspwm/rc.d/polybar".source = ./run.sh;
"bspwm/bspwmrc".source = ./bspwmrc; ".config/bspwm/bspwmrc".source = ./bspwmrc;
"sxhkdrc".source = ./sxhkdrc; ".config/sxhkdrc".source = ./sxhkdrc;
"rofi/theme" = { ".config/rofi/theme" = {
source = ./rofi; source = ./rofi;
recursive = true; recursive = true;
}; };
"polybar" = { ".config/polybar" = {
source = ./polybar; source = ./polybar;
recursive = true; recursive = true;
}; };
"dunst/dunstrc".source = ./dunstrc; ".config/dunst/dunstrc".source = ./dunstrc;
".config/kitty/kitty.conf".source = ./kitty.conf;
".config/kitty/ayu.conf".source = ./ayu-kitty.conf;
}; };
# Login screen
# not a home-manager variable, just nixOS one
#services.xserver.displayManager.lightdm.greeters.mini.extraConfig = ''
# text-color = "#ff79c6"
# password-background-color = "#1E2029"
# window-color = "#181a23"
# border-color = "#181a23"
# '';
# Compositor # Compositor
services.picom = { services.picom = {
@ -104,4 +104,5 @@
programs.autorandr.enable = true; programs.autorandr.enable = true;
services.udiskie.automount = true; services.udiskie.automount = true;
};
} }

View file

@ -0,0 +1 @@
include ayu.conf

View file

@ -32,16 +32,13 @@ super + e
emacsclient --eval "(emacs-everywhere)" emacsclient --eval "(emacs-everywhere)"
super + space super + space
$DOTFILES_BIN/rofi/appmenu rofi -show drun -modi drun,run -show-icons -theme theme/appmenu.rasi
super + Tab super + Tab
$DOTFILES_BIN/rofi/windowmenu rofi -show window -show-icons -theme theme/windowmenu.rasi
super + p super + p
$DOTFILES_BIN/rofi/bwmenu $DOTFILES_BIN/rofi/passmenu
super + shift + p
$DOTFILES_BIN/rofi/bwmenu -r
super + slash super + slash
$DOTFILES_BIN/rofi/filemenu -x $DOTFILES_BIN/rofi/filemenu -x

View file

@ -0,0 +1,50 @@
# xdg.nix
#
# Set up and enforce XDG compliance. Other modules will take care of their own,
# but this takes care of the general cases.
{ config, home-manager, ... }:
{
### A tidy $HOME is a tidy mind
home-manager.users.anish.xdg.enable = true;
environment = {
sessionVariables = {
# These are the defaults, and xdg.enable does set them, but due to load
# order, they're not set before environment.variables are set, which could
# cause race conditions.
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_BIN_HOME = "$HOME/.local/bin";
};
variables = {
# Conform more programs to XDG conventions. The rest are handled by their
# respective modules.
__GL_SHADER_DISK_CACHE_PATH = "$XDG_CACHE_HOME/nv";
ASPELL_CONF = ''
per-conf $XDG_CONFIG_HOME/aspell/aspell.conf;
personal $XDG_CONFIG_HOME/aspell/en_US.pws;
repl $XDG_CONFIG_HOME/aspell/en.prepl;
'';
#CUDA_CACHE_PATH = "$XDG_CACHE_HOME/nv";
HISTFILE = "$XDG_DATA_HOME/bash/history";
INPUTRC = "$XDG_CONFIG_HOME/readline/inputrc";
LESSHISTFILE = "$XDG_CACHE_HOME/lesshst";
WGETRC = "$XDG_CONFIG_HOME/wgetrc";
# Tools I don't use
# SUBVERSION_HOME = "$XDG_CONFIG_HOME/subversion";
# BZRPATH = "$XDG_CONFIG_HOME/bazaar";
# BZR_PLUGIN_PATH = "$XDG_DATA_HOME/bazaar";
# BZR_HOME = "$XDG_CACHE_HOME/bazaar";
# ICEAUTHORITY = "$XDG_CACHE_HOME/ICEauthority";
};
# Move ~/.Xauthority out of $HOME (setting XAUTHORITY early isn't enough)
#extraInit = ''
# export XAUTHORITY=/tmp/Xauthority
# [ -e ~/.Xauthority ] && mv -f ~/.Xauthority "$XAUTHORITY"
#'';
};
}

View file

@ -1,6 +1,7 @@
{pkgs, ... }: {pkgs, ... }:
{ {
home-manager.users.anish = {
programs.browserpass.enable = true; programs.browserpass.enable = true;
programs.browserpass.browsers = [ "firefox" ]; programs.browserpass.browsers = [ "firefox" ];
#env.XDG_DEXSTOP_DIR = "$HOME/"; #env.XDG_DEXSTOP_DIR = "$HOME/";
@ -84,18 +85,20 @@
"datareporting.healthreport.service.enabled" = false; "datareporting.healthreport.service.enabled" = false;
"datareporting.policy.dataSubmissionEnabled" = false; "datareporting.policy.dataSubmissionEnabled" = false;
}; };
# Override? # Override?
#packages = with pkgs; [ home.packages = with pkgs; [
# firefox-bin firefox-bin
# (makeDesktopItem { (makeDesktopItem {
# name = "firefox-private"; name = "firefox-private";
# desktopName = "Firefox (Private)"; desktopName = "Firefox (Private)";
# genericName = "Open a private Firefox window"; genericName = "Open a private Firefox window";
# icon = "firefox"; icon = "firefox";
# exec = "${firefox-bin}/bin/firefox --private-window"; exec = "${firefox-bin}/bin/firefox --private-window";
# categories = "Network"; categories = "Network";
# }) })
# ]; ];
home.file = let cfgPath = ".mozilla/firefox"; in { home.file = let cfgPath = ".mozilla/firefox"; in {
"${cfgPath}/profiles.ini".text = '' "${cfgPath}/profiles.ini".text = ''
[Profile0] [Profile0]
@ -108,4 +111,5 @@
Version=2 Version=2
''; '';
}; };
};
} }