1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00

HOME-MNGR reorganisation of home manager

Resolves #2

Signed-off-by: Stefan Ellmauthaler <stefan.ellmauthaler@tu-dresden.de>
This commit is contained in:
Stefan Ellmauthaler 2021-11-12 12:42:52 +01:00
parent aad6472126
commit 9db55ae17f
11 changed files with 632 additions and 613 deletions

View File

@ -1,10 +1,11 @@
{ config, pkgs, lib, ... }:
{
#imports = [ <home-manager/nixos> ];
imports = [
./ellmau
];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
users.ellmau = (import ./ellmau/home.nix);
};
}

View File

@ -1,120 +1,122 @@
{ pkgs, lib, ...}:
{ config, pkgs, lib, ...}:
{
programs.autorandr = {
enable = true;
profiles = {
"home" = {
fingerprint = {
DP-1 = "00ffffffffffff0009d1507945540000221e0104b54627783f5995af4f42af260f5054a56b80d1c0b300a9c08180810081c0010101014dd000a0f0703e8030203500ba892100001a000000ff004e384c30323634373031390a20000000fd00283c87873c010a202020202020000000fc0042656e5120455733323730550a01bc02033af1515d5e5f6061101f222120051404131203012309070783010000e200c06d030c0020003878200060010203e305e001e6060501544c2ca36600a0f0701f8030203500ba892100001a565e00a0a0a029502f203500ba892100001abf650050a0402e6008200808ba892100001c000000000000000000000000000000bf";
eDP-1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
};
config = {
eDP-1.enable = false;
DP-1 = {
enable = true;
crtc = 1;
primary = true;
position = "0x0";
mode = "3840x2160";
dpi = 96;
home-manager.users.ellmau = {
programs.autorandr = {
enable = true;
profiles = {
"home" = {
fingerprint = {
DP-1 = "00ffffffffffff0009d1507945540000221e0104b54627783f5995af4f42af260f5054a56b80d1c0b300a9c08180810081c0010101014dd000a0f0703e8030203500ba892100001a000000ff004e384c30323634373031390a20000000fd00283c87873c010a202020202020000000fc0042656e5120455733323730550a01bc02033af1515d5e5f6061101f222120051404131203012309070783010000e200c06d030c0020003878200060010203e305e001e6060501544c2ca36600a0f0701f8030203500ba892100001a565e00a0a0a029502f203500ba892100001abf650050a0402e6008200808ba892100001c000000000000000000000000000000bf";
eDP-1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
};
config = {
eDP-1.enable = false;
DP-1 = {
enable = true;
crtc = 1;
primary = true;
position = "0x0";
mode = "3840x2160";
dpi = 96;
};
};
};
};
"mobile" = {
fingerprint.eDP-1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
config = {
eDP-1 = {
enable = true;
primary = true;
mode = "3840x2160";
dpi = 192;
"mobile" = {
fingerprint.eDP-1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
config = {
eDP-1 = {
enable = true;
primary = true;
mode = "3840x2160";
dpi = 192;
};
};
};
};
"work" = {
fingerprint = {
eDP-1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
DP-2 = "00ffffffffffff0010acb5414c4133452c1e0104b53c22783eee95a3544c99260f5054a54b00e1c0d100d1c0b300a94081808100714f4dd000a0f0703e803020350055502100001a000000ff0031444e593132330a2020202020000000fd00184b1e8c36010a202020202020000000fc0044454c4c205532373230510a2001af020319f14c101f2005140413121103020123097f0783010000a36600a0f0703e803020350055502100001a565e00a0a0a029503020350055502100001a114400a0800025503020360055502100001a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d9";
};
config = {
eDP-1 = {
enable = true;
crtc = 0;
position = "3840x0";
mode = "3840x2160";
#dpi = 288;
dpi = 96;
"work" = {
fingerprint = {
eDP-1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
DP-2 = "00ffffffffffff0010acb5414c4133452c1e0104b53c22783eee95a3544c99260f5054a54b00e1c0d100d1c0b300a94081808100714f4dd000a0f0703e803020350055502100001a000000ff0031444e593132330a2020202020000000fd00184b1e8c36010a202020202020000000fc0044454c4c205532373230510a2001af020319f14c101f2005140413121103020123097f0783010000a36600a0f0703e803020350055502100001a565e00a0a0a029503020350055502100001a114400a0800025503020360055502100001a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d9";
};
DP-2 = {
enable = true;
primary = true;
mode = "3840x2160";
#dpi = 144;
dpi = 96;
position = "0x0";
config = {
eDP-1 = {
enable = true;
crtc = 0;
position = "3840x0";
mode = "3840x2160";
#dpi = 288;
dpi = 96;
};
DP-2 = {
enable = true;
primary = true;
mode = "3840x2160";
#dpi = 144;
dpi = 96;
position = "0x0";
};
};
};
};
"home-nuc" = {
fingerprint = {
DP-2 = "00ffffffffffff0009d1507945540000221e0104b54627783f5995af4f42af260f5054a56b80d1c0b300a9c08180810081c0010101014dd000a0f0703e8030203500ba892100001a000000ff004e384c30323634373031390a20000000fd00283c87873c010a202020202020000000fc0042656e5120455733323730550a01bc02033af1515d5e5f6061101f222120051404131203012309070783010000e200c06d030c0020003878200060010203e305e001e6060501544c2ca36600a0f0701f8030203500ba892100001a565e00a0a0a029502f203500ba892100001abf650050a0402e6008200808ba892100001c000000000000000000000000000000bf";
};
config = {
DP-2 = {
enable = true;
crtc = 1;
primary = true;
position = "0x0";
mode = "3840x2160";
dpi = 96;
"home-nuc" = {
fingerprint = {
DP-2 = "00ffffffffffff0009d1507945540000221e0104b54627783f5995af4f42af260f5054a56b80d1c0b300a9c08180810081c0010101014dd000a0f0703e8030203500ba892100001a000000ff004e384c30323634373031390a20000000fd00283c87873c010a202020202020000000fc0042656e5120455733323730550a01bc02033af1515d5e5f6061101f222120051404131203012309070783010000e200c06d030c0020003878200060010203e305e001e6060501544c2ca36600a0f0701f8030203500ba892100001a565e00a0a0a029502f203500ba892100001abf650050a0402e6008200808ba892100001c000000000000000000000000000000bf";
};
config = {
DP-2 = {
enable = true;
crtc = 1;
primary = true;
position = "0x0";
mode = "3840x2160";
dpi = 96;
};
};
};
};
"e3027" = {
fingerprint = {
e-DP1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
DP-1 = "00ffffffffffff004ca306a7010101011715010380a05a780ade50a3544c99260f5054a10800814081c0950081809040b300a9400101283c80a070b023403020360040846300001a9e20009051201f304880360040846300001c000000fd0017550f5c11000a202020202020000000fc004550534f4e20504a0a202020200116020328f651901f202205140413030212110706161501230907078301000066030c00100080e200fd023a801871382d40582c450040846300001e011d801871382d40582c450040846300001e662156aa51001e30468f330040846300001e302a40c8608464301850130040846300001e00000000000000000000000000000089";
};
config = {
eDP-1 = {
enable = true;
crtc = 0;
position = "0x0";
mode = "3840x2160";
"e3027" = {
fingerprint = {
e-DP1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
DP-1 = "00ffffffffffff004ca306a7010101011715010380a05a780ade50a3544c99260f5054a10800814081c0950081809040b300a9400101283c80a070b023403020360040846300001a9e20009051201f304880360040846300001c000000fd0017550f5c11000a202020202020000000fc004550534f4e20504a0a202020200116020328f651901f202205140413030212110706161501230907078301000066030c00100080e200fd023a801871382d40582c450040846300001e011d801871382d40582c450040846300001e662156aa51001e30468f330040846300001e302a40c8608464301850130040846300001e00000000000000000000000000000089";
};
DP-1 = {
enable = true;
crtc = 1;
position = "3840x0";
mode = "1920x1200";
config = {
eDP-1 = {
enable = true;
crtc = 0;
position = "0x0";
mode = "3840x2160";
};
DP-1 = {
enable = true;
crtc = 1;
position = "3840x0";
mode = "1920x1200";
};
};
};
};
"e3027-clone" = {
fingerprint = {
e-DP1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
DP-1 = "00ffffffffffff004ca306a7010101011715010380a05a780ade50a3544c99260f5054a10800814081c0950081809040b300a9400101283c80a070b023403020360040846300001a9e20009051201f304880360040846300001c000000fd0017550f5c11000a202020202020000000fc004550534f4e20504a0a202020200116020328f651901f202205140413030212110706161501230907078301000066030c00100080e200fd023a801871382d40582c450040846300001e011d801871382d40582c450040846300001e662156aa51001e30468f330040846300001e302a40c8608464301850130040846300001e00000000000000000000000000000089";
};
config = {
eDP-1 = {
enable = true;
crtc = 0;
position = "0x0";
mode = "1920x1200";
"e3027-clone" = {
fingerprint = {
e-DP1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
DP-1 = "00ffffffffffff004ca306a7010101011715010380a05a780ade50a3544c99260f5054a10800814081c0950081809040b300a9400101283c80a070b023403020360040846300001a9e20009051201f304880360040846300001c000000fd0017550f5c11000a202020202020000000fc004550534f4e20504a0a202020200116020328f651901f202205140413030212110706161501230907078301000066030c00100080e200fd023a801871382d40582c450040846300001e011d801871382d40582c450040846300001e662156aa51001e30468f330040846300001e302a40c8608464301850130040846300001e00000000000000000000000000000089";
};
DP-1 = {
enable = true;
crtc = 1;
position = "0x0";
mode = "1920x1200";
config = {
eDP-1 = {
enable = true;
crtc = 0;
position = "0x0";
mode = "1920x1200";
};
DP-1 = {
enable = true;
crtc = 1;
position = "0x0";
mode = "1920x1200";
};
};
};
};
};
hooks.postswitch = {
"polybar" = "systemctl --user restart polybar.service";
hooks.postswitch = {
"polybar" = "systemctl --user restart polybar.service";
};
};
};
}

76
users/ellmau/default.nix Normal file
View File

@ -0,0 +1,76 @@
{ config, pkgs, lib, ...}:
{
imports = [
./autorandr.nix
./dunst.nix
./git.nix
./gpg.nix
./i3.nix
./nextcloud.nix
./polybar.nix
./zsh.nix
];
home-manager.users.ellmau = {
home.packages = [
pkgs.htop
pkgs.pavucontrol
pkgs.jabref
pkgs.libreoffice-fresh
pkgs.nixfmt
pkgs.nixpkgs-fmt
pkgs.nix-prefetch-github
pkgs.neofetch
pkgs.jitsi-meet-electron
pkgs.skypeforlinux
pkgs.zoom-us
pkgs.element-desktop
pkgs.signal-desktop
];
services = {
udiskie = {
enable = true;
automount = true;
notify = true;
tray = "auto";
};
blueman-applet.enable = true;
network-manager-applet.enable = true ;
gnome-keyring = {
enable = true;
components = [ "pkcs11" "secrets" "ssh" ];
};
};
xdg = {
enable = true;
};
programs.direnv = {
enable = true;
enableZshIntegration = true;
};
xsession = {
numlock.enable = true;
profileExtra = ''
if [ $(hostname) = 'stel-xps' ]; then
brightnessctl s 50%
fi
'';
};
home.file.".background-image".source = ../common/wallpaper/nix-wallpaper-nineish-dark-gray.png;
programs.home-manager = {
enable = true;
};
};
}

View File

@ -1,37 +1,39 @@
{ pkgs, ...}:
{ config, pkgs, ...}:
{
services.dunst = {
enable = true;
iconTheme = {
package = pkgs.numix-icon-theme;
name = "Numix";
size = "26";
};
settings = {
global = {
geometry = "800x5-30+50";
transparency = 10;
frame_color = "#839496";
font = "Hasklug Nerd Font 10";
timeout = 5;
follow = "mouse";
markup = "full";
icon_position = "left";
history_length = 32;
dmenu = "${pkgs.rofi}/bin/rofi -dmenu";
word_wrap = true;
home-manager.users.ellmau = {
services.dunst = {
enable = true;
iconTheme = {
package = pkgs.numix-icon-theme;
name = "Numix";
size = "26";
};
urgency_critical = {
foreground = "#fdf6e3";
background = "#dc322f";
};
urgency_normal = {
foreground = "#fdf6e3";
background = "#859900";
};
urgency_low = {
foreground = "#fdf6e3";
background = "#2aa198";
settings = {
global = {
geometry = "800x5-30+50";
transparency = 10;
frame_color = "#839496";
font = "Hasklug Nerd Font 10";
timeout = 5;
follow = "mouse";
markup = "full";
icon_position = "left";
history_length = 32;
dmenu = "${pkgs.rofi}/bin/rofi -dmenu";
word_wrap = true;
};
urgency_critical = {
foreground = "#fdf6e3";
background = "#dc322f";
};
urgency_normal = {
foreground = "#fdf6e3";
background = "#859900";
};
urgency_low = {
foreground = "#fdf6e3";
background = "#2aa198";
};
};
};
};

View File

@ -1,31 +1,33 @@
{ config, pkgs, ...}:
{
programs= {
git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "Stefan Ellmauthaler";
userEmail = "stefan.ellmauthaler@tu-dresden.de";
extraConfig = {
core = { editor = "emacsclient"; };
gpg = {
format = "x509";
program = "gpgsm";
home-manager.users.ellmau = {
programs= {
git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "Stefan Ellmauthaler";
userEmail = "stefan.ellmauthaler@tu-dresden.de";
extraConfig = {
core = { editor = "emacsclient"; };
gpg = {
format = "x509";
program = "gpgsm";
};
user = { signingKey = "0x4998BEEE"; };
init = { defaultBranch = "main";};
branch = { autosetuprebase = "always";};
};
user = { signingKey = "0x4998BEEE"; };
init = { defaultBranch = "main";};
branch = { autosetuprebase = "always";};
};
gh = {
enable = true;
};
};
gh = {
enable = true;
};
};
xdg = {
configFile."gh/config.yml" = {
source = conf/gh/config.yml;
xdg = {
configFile."gh/config.yml" = {
source = conf/gh/config.yml;
};
};
};
}

View File

@ -1,15 +1,17 @@
{ config, pkgs, lib, ...}:
{
home.file = {
".gnupg/gpgsm.conf".text = ''
home-manager.users.ellmau = {
home.file = {
".gnupg/gpgsm.conf".text = ''
keyserver ldap.pca.dfn.de::::o=DFN-Verein,c=DE
'';
".gnupg/dirmngr_ldapservers.conf".text = "ldap.pca.dfn.de:389:::o=DFN-Verein,c=de,o=DFN-Verein,c=de";
".gnupg/trustlist.txt".source = ./conf/gpgsm/trustlist.txt;
".gnupg/chain.txt".source = ./conf/gpgsm/chain.txt;
".gnupg/dirmngr_ldapservers.conf".text = "ldap.pca.dfn.de:389:::o=DFN-Verein,c=de,o=DFN-Verein,c=de";
".gnupg/trustlist.txt".source = ./conf/gpgsm/trustlist.txt;
".gnupg/chain.txt".source = ./conf/gpgsm/chain.txt;
};
programs.gpg.enable = true;
};
programs.gpg.enable = true;
}

View File

@ -1,73 +0,0 @@
{ pkgs, lib, ... }:
{
imports =
[
./autorandr.nix
./dunst.nix
./git.nix
./gpg.nix
./i3.nix
./nextcloud.nix
./polybar.nix
./zsh.nix
];
home.packages = [
pkgs.htop
pkgs.pavucontrol
pkgs.jabref
pkgs.libreoffice-fresh
pkgs.nixfmt
pkgs.nixpkgs-fmt
pkgs.nix-prefetch-github
pkgs.neofetch
pkgs.jitsi-meet-electron
pkgs.skypeforlinux
pkgs.zoom-us
pkgs.element-desktop
pkgs.signal-desktop
];
services = {
udiskie = {
enable = true;
automount = true;
notify = true;
tray = "auto";
};
blueman-applet.enable = true;
network-manager-applet.enable = true ;
gnome-keyring = {
enable = true;
components = [ "pkcs11" "secrets" "ssh" ];
};
};
xdg = {
enable = true;
};
programs.direnv = {
enable = true;
enableZshIntegration = true;
};
xsession = {
numlock.enable = true;
profileExtra = ''
if [ $(hostname) = 'stel-xps' ]; then
brightnessctl s 50%
fi
'';
};
home.file.".background-image".source = ../common/wallpaper/nix-wallpaper-nineish-dark-gray.png;
programs.home-manager = {
enable = true;
};
}

View File

@ -1,9 +1,11 @@
{ config, pkgs, lib, ...}:
{
xdg = {
configFile."i3" = {
source = conf/i3;
recursive = true;
home-manager.users.ellmau = {
xdg = {
configFile."i3" = {
source = conf/i3;
recursive = true;
};
};
};
}

View File

@ -1,8 +1,9 @@
{ pkgs, ... }:
{
services.nextcloud-client = {
enable = true;
startInBackground = true;
home-manager.users.ellmau = {
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
};
}

View File

@ -1,349 +1,350 @@
{ pkgs, ...}:
{
services.polybar = {
enable = true;
package = pkgs.polybarFull;
settings =
let
# solarized theme colours ~ https://en.wikipedia.org/wiki/Solarized
home-manager.users.ellmau = {
services.polybar = {
enable = true;
package = pkgs.polybarFull;
settings =
let
# solarized theme colours ~ https://en.wikipedia.org/wiki/Solarized
#content tones
Base01 = "#586e75";
Base00 = "#657b83";
Base0 = "#839496";
Base1 = "#93a1a1";
# background tones
Base2 = "#eee8d5";
Base3 = "#fdf6e3";
# accent tones
Yellow = "#b58900";
Orange = "#cb4b16";
Red = "#dc322f";
Magenta = "#d33682";
Violet = "#6c71c4";
Blue = "#268bd2";
Cyan = "#2aa198";
Green = "#859900";
#content tones
Base01 = "#586e75";
Base00 = "#657b83";
Base0 = "#839496";
Base1 = "#93a1a1";
# background tones
Base2 = "#eee8d5";
Base3 = "#fdf6e3";
# accent tones
Yellow = "#b58900";
Orange = "#cb4b16";
Red = "#dc322f";
Magenta = "#d33682";
Violet = "#6c71c4";
Blue = "#268bd2";
Cyan = "#2aa198";
Green = "#859900";
foreground_col = Base3;
background_col = Base01;
foreground_col = Base3;
background_col = Base01;
# old bg/fg stuff
#foreground_col = "#eee8d5";
#background_col = "#6c71c4";
foreground_altcol = "#66deff";
primary_col = "#ffb52a";
secondary_col = "#e60053";
alert_col = "#dc322f";
# old bg/fg stuff
#foreground_col = "#eee8d5";
#background_col = "#6c71c4";
foreground_altcol = "#66deff";
primary_col = "#ffb52a";
secondary_col = "#e60053";
alert_col = "#dc322f";
dpi = ''
dpi = ''
''${env:DPI:0}
'';
#polyheight = 60;
#polyheight = 60;
fonts = [
"Hasklig:style=Regular"
"all-the-icons:style=Regular"
"Webdings:style=Regular"
"Noto Emoji:scale=10"
"Unifont:style=Regular"
"Material Icons:size=12;0"
"Weather Icons:size=12;0"
"Hasklug Nerd Font,Hasklig Medium:style=Medium,Regular"
];
in
{
"bar/main" = {
font = fonts;
modules = {
left = "i3 xwindow";
center = "";
right = " xbacklight xkeyboard eth wlan battery date powermenu dunst volume ";
};
fonts = [
"Hasklig:style=Regular"
"all-the-icons:style=Regular"
"Webdings:style=Regular"
"Noto Emoji:scale=10"
"Unifont:style=Regular"
"Material Icons:size=12;0"
"Weather Icons:size=12;0"
"Hasklug Nerd Font,Hasklig Medium:style=Medium,Regular"
];
in
{
"bar/main" = {
font = fonts;
modules = {
left = "i3 xwindow";
center = "";
right = " xbacklight xkeyboard eth wlan battery date powermenu dunst volume ";
};
background = background_col;
foreground = foreground_col;
background = background_col;
foreground = foreground_col;
monitor = ''
monitor = ''
''${env:MONITOR:}
'';
width = "100%";
#height = polyheight;
padding = 0;
padding-right = 2;
radius = 14;
module-margin = 1;
line-size = 2;
width = "100%";
#height = polyheight;
padding = 0;
padding-right = 2;
radius = 14;
module-margin = 1;
line-size = 2;
dpi-x = dpi;
dpi-y = dpi;
dpi-x = dpi;
dpi-y = dpi;
tray = {
position = "right";
padding = 2;
background = Base2;
};
};
"bar/aux" = {
font = fonts;
modules = {
left = "i3";
center = "";
right = " xbacklight xkeyboard eth wlan battery date powermenu volume ";
tray = {
position = "right";
padding = 2;
background = Base2;
};
};
"bar/aux" = {
font = fonts;
modules = {
left = "i3";
center = "";
right = " xbacklight xkeyboard eth wlan battery date powermenu volume ";
};
background = background_col;
foreground = foreground_col;
background = background_col;
foreground = foreground_col;
monitor = ''
monitor = ''
''${env:MONITOR:}
'';
width = "100%";
#height = polyheight;
radius = 14;
module-margin = 1;
line-size = 2;
width = "100%";
#height = polyheight;
radius = 14;
module-margin = 1;
line-size = 2;
dpi-x = dpi;
dpi-y = dpi;
dpi-x = dpi;
dpi-y = dpi;
};
"module/volume" = {
type = "internal/pulseaudio";
format.volume = "<ramp-volume> <label-volume>";
label.muted.text = "🔇";
label.muted.foreground = "#666";
ramp.volume = ["🔈" "🔉" "🔊"];
click.right = "${pkgs.pavucontrol}/bin/pavucontrol &";
# format-volume-underline = Base2;
# format-muted-underline = Base2;
};
"module/i3" = {
type = "internal/i3";
format = "<label-state> <label-mode>";
index-sort = "true";
wrapping-scroll = "false";
#; Only show workspaces on the same output as the bar
pin-workspaces = "true";
label-mode-padding = "2";
label-mode-foreground = "#000";
label-mode-background = primary_col;
#; focused = Active workspace on focused monitor
label-focused = "%name%";
#;label-focused-background = ${colors.background-alt}
#;label-focused-background = #9f78e1
label-focused-background = foreground_col;
label-focused-underline= foreground_col;
label-focused-foreground = background_col;
label-focused-padding = "2";
#; unfocused = Inactive workspace on any monitor
label-unfocused = "%name%";
label-unfocused-padding = "2";
label-unfocused-underline = foreground_col;
#; visible = Active workspace on unfocused monitor
label-visible = "%name%";
label-visible-background = Violet;
label-visible-underline = Yellow;
label-visible-padding = 2;
#; urgent = Workspace with urgency hint set
label-urgent = "%name%";
label-urgent-background = alert_col;
label-urgent-foreground = primary_col;
label-urgent-padding = "2";
#; Separator in between workspaces
#; label-separator = |
};
"module/xkeyboard" = {
type = "internal/xkeyboard";
blacklist-0 = "num lock";
interval = "5";
format-prefix = ''""'';
format-prefix-foreground = foreground_altcol;
format-prefix-underline = secondary_col;
label-layout = "%layout%";
label-layout-underline = secondary_col;
label-indicator-padding = "2";
label-indicator-margin = "1";
label-indicator-background = secondary_col;
label-indicator-underline = secondary_col;
};
"module/wlan" = {
type = "internal/network";
interface = "wlp0s20f3";
interval = "3.0";
format-connected = " <ramp-signal> <label-connected>";
format-connected-underline = "#9f78e1";
label-connected = "%essid%";
ramp-signal-0 = ''"0.0"'';
ramp-signal-1 = ''"0.5"'';
ramp-signal-2 = ''"1.0"'';
ramp-signal-3 = ''"1.0"'';
ramp-signal-4 = ''"1.0"'';
format-disconnected = "";
# ;format-disconnected = <label-disconnected>
#;format-disconnected-underline = ${self.format-connected-underline}
#;label-disconnected = %ifname% disconnected
#;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-foreground = foreground_altcol;
};
"module/eth" = {
type = "internal/network";
interface = "eno1";
interval = "3.0";
format-connected-underline = "#55aa55";
format-connected = " <label-connected>";
format-connected-prefix-foreground = foreground_altcol;
label-connected = "%local_ip%";
format-disconnected = "";
format-disconnected-background = "#5479b7";
#;format-disconnected = <label-disconnected>
#;format-disconnected-underline = ${self.format-connected-underline}
#;label-disconnected = %ifname% disconnected
#;label-disconnected-foreground = ${colors.foreground-alt}
};
"module/date" = {
type = "internal/date";
interval = "5";
date = ''" %Y-%m-%d"'';
date-alt = ''" %Y-%m-%d"'';
time = "%H:%M";
time-alt = "%H:%M:%S";
#format-prefix = "";
#format-prefix-foreground = foreground_altcol;
format-underline = "#0a6cf5";
label = "%{A1:${pkgs.tray-calendar}/bin/traycalendar --no-tray:}%{A} %date% %time%";
};
"module/battery" = {
type = "internal/battery";
battery = "BAT0";
adapter = "ADP1";
full-at = "98";
format-charging-background= "#689d6a";
format-charging-prefix = ''" "'';
format-charging = "<label-charging>";
format-discharging-prefix = ''" "'';
format-discharging = "<label-discharging>";
format-discharging-background= "#689d6a";
format-full-prefix = ''" "'';
format-charging-underline = "#ffaa55";
format-full-prefix-foreground = foreground_altcol;
format-full-underline = "#ffaa55";
ormat-full-padding = "1";
format-charging-padding = "1";
format-discharging-padding = "1";
};
"module/temperature" = {
type = "internal/temperature";
thermal-zone = "0";
warn-temperature = "60";
format = "<ramp> <label>";
format-underline = "#f50a4d";
format-warn = "<ramp> <label-warn>";
format-warn-underline = "#f50a4d";
label = " %temperature-c%";
label-warn = "%temperature-c%";
label-warn-foreground = secondary_col;
ramp-0 = "l";
ramp-1 = "m";
ramp-2 = "h";
ramp-foreground = foreground_altcol;
};
"module/powermenu" = {
type = "custom/menu";
expand-right = "true";
format-spacing = "1";
label-open = ''""'';
label-open-foreground = secondary_col;
label-close = " cancel";
label-close-foreground = secondary_col;
label-separator = "|";
label-separator-foreground = foreground_altcol;
menu-0-0 = "reboot";
menu-0-0-exec = "menu-open-1";
menu-0-1 = "power off";
menu-0-1-exec = "menu-open-2";
menu-1-0 = "cancel";
menu-1-0-exec = "menu-open-0";
menu-1-1 = "reboot";
menu-1-1-exec = "sudo reboot";
menu-2-0 = "power off";
menu-2-0-exec = "sudo poweroff";
menu-2-1 = "cancel";
menu-2-1-exec = "menu-open-0";
};
"module/xbacklight" = {
type = "internal/xbacklight";
format = "<label> <bar>";
label = "BL";
bar-width = "10";
bar-indicator = "|";
bar-indicator-foreground = "#fff";
bar-indicator-font = "2";
bar-fill = "";
bar-fill-font = "2";
bar-fill-foreground = "#9f78e1";
bar-empty = "";
bar-empty-font = "2";
bar-empty-foreground = foreground_altcol;
};
"module/dunst" = {
type = "custom/script";
exec = "PATH=${pkgs.dbus}/bin/:$PATH ${pkgs.dunst}/bin/dunstctl is-paused | ${pkgs.gnugrep}/bin/grep -q true && echo || echo ";
interval = 10;
click-left = "PATH=${pkgs.dbus}/bin/:$PATH ${pkgs.dunst}/bin/dunstctl set-paused toggle";
};
"module/xwindow" = {
type = "internal/xwindow";
format = "<label>";
format-background = Cyan;
format-foreground = foreground_col;
format-padding = 2;
label-maxlen = 50;
label = "%title%";
};
};
"module/volume" = {
type = "internal/pulseaudio";
format.volume = "<ramp-volume> <label-volume>";
label.muted.text = "🔇";
label.muted.foreground = "#666";
ramp.volume = ["🔈" "🔉" "🔊"];
click.right = "${pkgs.pavucontrol}/bin/pavucontrol &";
# format-volume-underline = Base2;
# format-muted-underline = Base2;
};
"module/i3" = {
type = "internal/i3";
format = "<label-state> <label-mode>";
index-sort = "true";
wrapping-scroll = "false";
#; Only show workspaces on the same output as the bar
pin-workspaces = "true";
label-mode-padding = "2";
label-mode-foreground = "#000";
label-mode-background = primary_col;
#; focused = Active workspace on focused monitor
label-focused = "%name%";
#;label-focused-background = ${colors.background-alt}
#;label-focused-background = #9f78e1
label-focused-background = foreground_col;
label-focused-underline= foreground_col;
label-focused-foreground = background_col;
label-focused-padding = "2";
#; unfocused = Inactive workspace on any monitor
label-unfocused = "%name%";
label-unfocused-padding = "2";
label-unfocused-underline = foreground_col;
#; visible = Active workspace on unfocused monitor
label-visible = "%name%";
label-visible-background = Violet;
label-visible-underline = Yellow;
label-visible-padding = 2;
#; urgent = Workspace with urgency hint set
label-urgent = "%name%";
label-urgent-background = alert_col;
label-urgent-foreground = primary_col;
label-urgent-padding = "2";
#; Separator in between workspaces
#; label-separator = |
};
"module/xkeyboard" = {
type = "internal/xkeyboard";
blacklist-0 = "num lock";
interval = "5";
format-prefix = ''""'';
format-prefix-foreground = foreground_altcol;
format-prefix-underline = secondary_col;
label-layout = "%layout%";
label-layout-underline = secondary_col;
label-indicator-padding = "2";
label-indicator-margin = "1";
label-indicator-background = secondary_col;
label-indicator-underline = secondary_col;
};
"module/wlan" = {
type = "internal/network";
interface = "wlp0s20f3";
interval = "3.0";
format-connected = " <ramp-signal> <label-connected>";
format-connected-underline = "#9f78e1";
label-connected = "%essid%";
ramp-signal-0 = ''"0.0"'';
ramp-signal-1 = ''"0.5"'';
ramp-signal-2 = ''"1.0"'';
ramp-signal-3 = ''"1.0"'';
ramp-signal-4 = ''"1.0"'';
format-disconnected = "";
# ;format-disconnected = <label-disconnected>
#;format-disconnected-underline = ${self.format-connected-underline}
#;label-disconnected = %ifname% disconnected
#;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-foreground = foreground_altcol;
};
"module/eth" = {
type = "internal/network";
interface = "eno1";
interval = "3.0";
format-connected-underline = "#55aa55";
format-connected = " <label-connected>";
format-connected-prefix-foreground = foreground_altcol;
label-connected = "%local_ip%";
format-disconnected = "";
format-disconnected-background = "#5479b7";
#;format-disconnected = <label-disconnected>
#;format-disconnected-underline = ${self.format-connected-underline}
#;label-disconnected = %ifname% disconnected
#;label-disconnected-foreground = ${colors.foreground-alt}
};
"module/date" = {
type = "internal/date";
interval = "5";
date = ''" %Y-%m-%d"'';
date-alt = ''" %Y-%m-%d"'';
time = "%H:%M";
time-alt = "%H:%M:%S";
#format-prefix = "";
#format-prefix-foreground = foreground_altcol;
format-underline = "#0a6cf5";
label = "%{A1:${pkgs.tray-calendar}/bin/traycalendar --no-tray:}%{A} %date% %time%";
};
"module/battery" = {
type = "internal/battery";
battery = "BAT0";
adapter = "ADP1";
full-at = "98";
format-charging-background= "#689d6a";
format-charging-prefix = ''" "'';
format-charging = "<label-charging>";
format-discharging-prefix = ''" "'';
format-discharging = "<label-discharging>";
format-discharging-background= "#689d6a";
format-full-prefix = ''" "'';
format-charging-underline = "#ffaa55";
format-full-prefix-foreground = foreground_altcol;
format-full-underline = "#ffaa55";
ormat-full-padding = "1";
format-charging-padding = "1";
format-discharging-padding = "1";
};
"module/temperature" = {
type = "internal/temperature";
thermal-zone = "0";
warn-temperature = "60";
format = "<ramp> <label>";
format-underline = "#f50a4d";
format-warn = "<ramp> <label-warn>";
format-warn-underline = "#f50a4d";
label = " %temperature-c%";
label-warn = "%temperature-c%";
label-warn-foreground = secondary_col;
ramp-0 = "l";
ramp-1 = "m";
ramp-2 = "h";
ramp-foreground = foreground_altcol;
};
"module/powermenu" = {
type = "custom/menu";
expand-right = "true";
format-spacing = "1";
label-open = ''""'';
label-open-foreground = secondary_col;
label-close = " cancel";
label-close-foreground = secondary_col;
label-separator = "|";
label-separator-foreground = foreground_altcol;
menu-0-0 = "reboot";
menu-0-0-exec = "menu-open-1";
menu-0-1 = "power off";
menu-0-1-exec = "menu-open-2";
menu-1-0 = "cancel";
menu-1-0-exec = "menu-open-0";
menu-1-1 = "reboot";
menu-1-1-exec = "sudo reboot";
menu-2-0 = "power off";
menu-2-0-exec = "sudo poweroff";
menu-2-1 = "cancel";
menu-2-1-exec = "menu-open-0";
};
"module/xbacklight" = {
type = "internal/xbacklight";
format = "<label> <bar>";
label = "BL";
bar-width = "10";
bar-indicator = "|";
bar-indicator-foreground = "#fff";
bar-indicator-font = "2";
bar-fill = "";
bar-fill-font = "2";
bar-fill-foreground = "#9f78e1";
bar-empty = "";
bar-empty-font = "2";
bar-empty-foreground = foreground_altcol;
};
"module/dunst" = {
type = "custom/script";
exec = "PATH=${pkgs.dbus}/bin/:$PATH ${pkgs.dunst}/bin/dunstctl is-paused | ${pkgs.gnugrep}/bin/grep -q true && echo || echo ";
interval = 10;
click-left = "PATH=${pkgs.dbus}/bin/:$PATH ${pkgs.dunst}/bin/dunstctl set-paused toggle";
};
"module/xwindow" = {
type = "internal/xwindow";
format = "<label>";
format-background = Cyan;
format-foreground = foreground_col;
format-padding = 2;
label-maxlen = 50;
label = "%title%";
};
};
script = ''
script = ''
for m in $(polybar --list-monitors | ${pkgs.gnugrep}/bin/grep '(primary)' | ${pkgs.coreutils}/bin/cut -d":" -f1); do
MONITOR=$m polybar --reload main &
done;
@ -351,5 +352,6 @@
MONITOR=$m polybar --reload aux &
done;
'';
};
};
}

View File

@ -1,12 +1,13 @@
{ pkgs, ... }:
{
programs = {
zsh = {
enable = true;
defaultKeymap = "emacs";
oh-my-zsh.enable = false;
# remove extra stuff on the right side of the prompt
initExtra = ''
home-manager.users.ellmau = {
programs = {
zsh = {
enable = true;
defaultKeymap = "emacs";
oh-my-zsh.enable = false;
# remove extra stuff on the right side of the prompt
initExtra = ''
unset RPS1
# Color man pages
export LESS_TERMCAP_mb=$'\E[01;32m'
@ -18,56 +19,57 @@
export LESS_TERMCAP_us=$'\E[01;36m'
export LESS=-R
'';
shellAliases = {
cp = "cp -i";
ls = "exa --icons --git";
ll = "exa --long --icons --binary --group";
llg = "exa --long --icons --grid --binary --group";
lal = "ll --all";
lla = "ll --all";
emacsc = "emacsclient -n";
shellAliases = {
cp = "cp -i";
ls = "exa --icons --git";
ll = "exa --long --icons --binary --group";
llg = "exa --long --icons --grid --binary --group";
lal = "ll --all";
lla = "ll --all";
emacsc = "emacsclient -n";
};
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.4.0";
sha256 = "037wz9fqmx0ngcwl9az55fgkipb745rymznxnssr3rx9irb6apzg";
};
}
];
};
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.4.0";
sha256 = "037wz9fqmx0ngcwl9az55fgkipb745rymznxnssr3rx9irb6apzg";
};
}
];
};
starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = false;
format = "$all";
username.show_always = false;
git_commit.tag_disabled = false;
hostname.ssh_only = false;
directory.truncate_to_repo = true;
starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = false;
format = "$all";
username.show_always = false;
git_commit.tag_disabled = false;
hostname.ssh_only = false;
directory.truncate_to_repo = true;
};
};
zoxide = {
enable = true;
enableZshIntegration = true;
};
bat = {
enable = true;
config = { theme = "ansi"; };
};
exa = {
enable = true;
enableAliases = false;
};
};
zoxide = {
enable = true;
enableZshIntegration = true;
};
bat = {
enable = true;
config = { theme = "ansi"; };
};
exa = {
enable = true;
enableAliases = false;
};
};
}