yep, more dotfiles

move stylix config to its fragment

wiro.world 22b57673 f9ea089e

verified
Changed files
+99 -71
home-manager
+1
home-manager/fragments/default.nix
···
./launcher.nix
./rust.nix
./shell.nix
+
./stylix.nix
./swaybar.nix
./sway.nix
./thunderbird.nix
-7
home-manager/fragments/foot.nix
···
# TODO: promising but too buggy
# server.enable = true;
-
-
settings = {
-
colors = {
-
background = "000000";
-
foreground = "ffffff";
-
};
-
};
};
};
}
+1 -1
home-manager/fragments/kitty.nix
···
Kitty related
Depends on:
-
- (Darwin) `fish` program: lauches fish on startup
+
- (Darwin) `fish` program: launches fish on startup
Has weird behavior if set as login shell
'';
+63
home-manager/fragments/stylix.nix
···
+
{ self
+
, config
+
, lib
+
, pkgs
+
, ...
+
}:
+
+
let
+
inherit (self.inputs) stylix;
+
+
cfg = config.local.fragment.stylix;
+
in
+
{
+
imports = [ stylix.homeModules.stylix ];
+
+
options.local.fragment.stylix.enable = lib.mkEnableOption ''
+
Stylix related
+
'';
+
+
config = lib.mkIf cfg.enable {
+
specialisation.light.configuration = {
+
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/one-light.yaml";
+
};
+
+
stylix = {
+
enable = true;
+
base16Scheme = lib.mkDefault "${pkgs.base16-schemes}/share/themes/onedark-dark.yaml";
+
+
image = ../../assets/wallpaper-binary-cloud.png;
+
+
fonts = {
+
sansSerif = { package = pkgs.inter; name = "Inter"; };
+
serif = { package = pkgs.merriweather; name = "Merriweather"; };
+
monospace = { package = pkgs.nerd-fonts.jetbrains-mono; name = "JetBrainsMono Nerd Font"; };
+
+
sizes = {
+
applications = 12;
+
terminal = 10;
+
+
desktop = 12;
+
popups = 14;
+
};
+
};
+
+
opacity = {
+
popups = 0.8;
+
};
+
+
cursor = {
+
name = "Bibata-Modern-Ice";
+
package = pkgs.bibata-cursors;
+
size = 24;
+
};
+
+
icons = {
+
enable = true;
+
package = pkgs.papirus-icon-theme;
+
light = "Papirus Light";
+
dark = "Papirus Dark";
+
};
+
};
+
};
+
}
+11 -23
home-manager/fragments/sway.nix
···
ignore-empty-password = true;
show-failed-attempts = true;
-
image = toString ../../assets/wallpaper-binary-cloud.png;
-
+
# relies on custom swaylock version in `overlays/patches.nix`
indicator-y-position = -100;
indicator-x-position = 100;
};
···
services.mako = {
enable = true;
settings = {
-
icons = true;
-
width = 500;
-
max-visible = 3;
+
max-visible = 5;
sort = "-priority";
-
default-timeout = 5000;
+
default-timeout = 3 * 1000;
layer = "overlay";
-
border-size = 0;
+
border-size = 2;
border-radius = 5;
+
"mode=dnd".invisible = 1;
+
"urgency=critical" = {
-
background-color = theme.withHashtag.base0F;
-
};
-
-
"mode=dnd" = {
-
invisible = 1;
+
invisible = 0;
+
default-timeout = 0;
};
};
};
gtk = {
enable = true;
-
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
-
-
iconTheme = { name = "Papirus"; package = pkgs.papirus-icon-theme; };
};
services.swayidle =
···
"type:touch" = { events = "disabled"; };
};
-
output."*".bg = "#000000 solid_color";
-
-
seat = {
-
"seat0" = {
-
xcursor_theme = "Bibata-Modern-Ice";
-
# disable cursor when typing or on purpose
-
hide_cursor = "when-typing enable";
-
};
+
seat."*" = {
+
# disable cursor when typing or on purpose
+
hide_cursor = "when-typing enable";
};
bindkeysToCode = true;
+18 -14
home-manager/fragments/swaybar.nix
···
integrated-keyboard-id = "1:1:AT_Translated_Set_2_keyboard";
integrated-keyboard-id-bis = "1:1:kanata";
+
swaymsg = lib.getExe' pkgs.sway "swaymsg";
in
{
···
bars.default = {
theme = "modern";
icons = "awesome6";
+
+
settings.icon_format = " <span font_family='FontAwesome6'>{icon}</span> ";
+
blocks = [
{
block = "custom";
command = ''
-
echo 󰌌 $(swaymsg --raw --type get_inputs \
+
echo 󰌌 $(swaymsg --raw --type get_inputs \
| jq --raw-output '
.[]
| select(.identifier=="${integrated-keyboard-id}")
···
command = "echo  $(${lib.getExe' pkgs.mako "makoctl"} mode)";
click = [{
button = "left";
+
# Toggle DND mode
cmd = "${lib.getExe' pkgs.mako "makoctl"} mode -t dnd";
update = true;
}];
···
{ block = "music"; }
{
-
block = "memory";
-
format = " $icon $mem_used_percents.eng(w:2) ";
-
}
-
{
-
format = " 󰌌 $variant";
+
format = " 󰌌 $variant";
block = "keyboard_layout";
driver = "sway";
}
···
};
};
-
wayland.windowManager.sway.config.bars = [{
-
statusCommand = "${lib.getExe pkgs.i3status-rust} ${config.home.homeDirectory}/${config.xdg.configFile."i3status-rust/config-default.toml".target}";
-
hiddenState = "hide";
-
mode = "hide";
-
fonts.size = 11.0;
+
wayland.windowManager.sway.config.bars = [
+
({
+
statusCommand = "${lib.getExe pkgs.i3status-rust} ${config.home.homeDirectory}/${config.xdg.configFile."i3status-rust/config-default.toml".target}";
-
# Would be nice to have rounded corners and padding when appearing
+
hiddenState = "hide";
+
mode = "hide";
-
extraConfig = "icon_theme Papirus";
-
}];
+
# TODO: fix color theme on the bar
+
# TODO: would be nice to have rounded corners and padding when appearing
+
+
extraConfig = "icon_theme Papirus";
+
} // config.stylix.targets.sway.exportedBarConfig)
+
];
};
}
+5 -26
home-manager/profiles/desktop.nix
···
-
{ self
-
, config
+
{ config
, pkgs
, isDarwin
, ...
}:
-
let
-
inherit (self.inputs) stylix;
-
in
{
-
imports = [
-
stylix.homeModules.stylix
-
{
-
stylix.enable = true;
-
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/onedark.yaml";
-
stylix.fonts = {
-
sansSerif = { package = pkgs.inter; name = "Inter"; };
-
serif = { package = pkgs.merriweather; name = "Merriweather"; };
-
monospace = { package = pkgs.nerd-fonts.jetbrains-mono; name = "JetBrainsMono Nerd Font"; };
-
};
-
stylix.cursor = {
-
name = "Bibata-Modern-Ice";
-
package = pkgs.bibata-cursors;
-
size = 10;
-
};
-
}
-
];
-
config = {
assertions = [
{ assertion = !isDarwin; message = "this is a HM non-darwin config"; }
···
compose-key.enable = true;
epita.enable = true;
firefox.enable = true;
-
foot.enable = true;
git.enable = true;
helix.enable = true;
imv.enable = true;
jujutsu.enable = true;
+
kitty.enable = true;
rust.enable = true;
shell.enable = true;
+
stylix.enable = true;
sway.enable = true;
thunderbird.enable = true;
tools.enable = true;
···
home = {
sessionVariables = {
# Quick access to `~/Development` folder
-
DEV = "${config.home.homeDirectory}/Development";
+
dev = "${config.home.homeDirectory}/Development";
-
# Would love to get rid of the Desktop folder
+
# Would love to get rid of the Desktop folder ☹
XDG_DESKTOP_DIR = "$HOME";
# Makes electron apps use ozone and not crash because xwayland is not there