Initial changes to add stylix again

Add stylix with theme, font and image configuration.

Change all relevant (current) options to that nix evaluates without
error, not fully tested yet though.

Remove plasma manager and associated components.

Condensed some files - remove some standalone files for packages with
much smaller configuration now that they're not being manually themed.
This commit is contained in:
Evie Litherland-Smith 2024-09-19 08:05:48 +01:00
parent 2da141afe7
commit 2ac1d1a63e
24 changed files with 465 additions and 1158 deletions

View file

@ -18,6 +18,157 @@
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1622559957,
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"type": "github"
}
},
"base16-foot": {
"flake": false,
"locked": {
"lastModified": 1696725948,
"narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=",
"owner": "tinted-theming",
"repo": "base16-foot",
"rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-foot",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1720809814,
"narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "34f41987bec14c0f3f6b2155c19787b1f6489625",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-kitty": {
"flake": false,
"locked": {
"lastModified": 1665001328,
"narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=",
"owner": "kdrag0n",
"repo": "base16-kitty",
"rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805",
"type": "github"
},
"original": {
"owner": "kdrag0n",
"repo": "base16-kitty",
"type": "github"
}
},
"base16-tmux": {
"flake": false,
"locked": {
"lastModified": 1696725902,
"narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=",
"owner": "tinted-theming",
"repo": "base16-tmux",
"rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-tmux",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1716150083,
"narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"type": "github"
}
},
"base16_2": {
"inputs": {
"fromYaml": "fromYaml_2"
},
"locked": {
"lastModified": 1708890466,
"narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "665b3c6748534eb766c777298721cece9453fdae",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": [
"stylix",
"systems"
]
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
@ -34,6 +185,39 @@
"type": "github"
}
},
"fromYaml_2": {
"flake": false,
"locked": {
"lastModified": 1689549921,
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1713702291,
"narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934",
"type": "github"
},
"original": {
"owner": "GNOME",
"ref": "46.1",
"repo": "gnome-shell",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -125,29 +309,6 @@
"type": "github"
}
},
"plasma-manager": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1725575977,
"narHash": "sha256-1e9zB0dMRwdAbhxVATlL25rExMDh4gZ/3AXdkpU8408=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "b82b9ba85c156a5e7f865cc94ed2a4df20cbbf39",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "plasma-manager",
"type": "github"
}
},
"root": {
"inputs": {
"base16": "base16",
@ -155,10 +316,59 @@
"iosevka-custom": "iosevka-custom",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_2",
"plasma-manager": "plasma-manager",
"stylix": "stylix",
"tt-schemes": "tt-schemes"
}
},
"stylix": {
"inputs": {
"base16": "base16_2",
"base16-fish": "base16-fish",
"base16-foot": "base16-foot",
"base16-helix": "base16-helix",
"base16-kitty": "base16-kitty",
"base16-tmux": "base16-tmux",
"base16-vim": "base16-vim",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"gnome-shell": "gnome-shell",
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1726497442,
"narHash": "sha256-fieyqmLEJQqqnuJcg2CAnQ8kHapXHhg9rL48NNWjnPw=",
"owner": "danth",
"repo": "stylix",
"rev": "149b313ddf91c3cc94309170498b162cec666675",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tt-schemes": {
"flake": false,
"locked": {

View file

@ -12,8 +12,8 @@
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
stylix = {
url = "github:danth/stylix";
inputs = {
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";

View file

@ -10,6 +10,7 @@
{
imports = [
inputs.home-manager.nixosModules.home-manager
inputs.stylix.nixosModules.stylix
./${hostName}.nix
./hardware-configuration/${hostName}.nix
];
@ -210,6 +211,33 @@
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";
console.useXkbConfig = true;
stylix = {
enable = true;
image = ./home/wallpapers/landscapes/tropic_island_day.jpg;
base16Scheme = "${inputs.tt-schemes}/base16/one-light.yaml";
opacity.popups = 0.8;
cursor = {
package = pkgs.volantes-cursors;
name = "volantes_cursors";
size = 32;
};
fonts =
let
proportional = {
package = inputs.iosevka-custom.outputs.packages.${pkgs.system}.iosevka-custom-aile;
name = inputs.iosevka-custom.outputs.names.iosevka-custom-aile;
};
monospace = {
package = inputs.iosevka-custom.outputs.packages.${pkgs.system}.iosevka-custom-nerdfont;
name = inputs.iosevka-custom.outputs.names.iosevka-custom-nerdfont;
};
in
{
inherit monospace;
serif = proportional;
sansSerif = proportional;
};
};
fonts = {
packages =
(with inputs.iosevka-custom.outputs.packages.${pkgs.system}; [

View file

@ -1,68 +0,0 @@
{ config, fonts, ... }:
{
programs.alacritty = {
enable = true;
settings = {
shell = "${config.programs.fish.package}/bin/fish";
font = {
size = fonts.sizes.applications;
normal = {
family = fonts.monospace.name;
style = "Regular";
};
};
window = {
dynamic_title = true;
padding = {
x = 5;
y = 5;
};
};
live_config_reload = true;
selection.save_to_clipboard = true;
mouse.hide_when_typing = true;
colors =
let
mapColours =
isBright:
(builtins.listToAttrs (
builtins.map
(col: {
# Alacritty uses Yellow instead of Orange for BASE09
name = if col == "orange" then "yellow" else col;
value = "0x${config.scheme.${if isBright then "bright-${col}" else col}}";
})
[
"red"
"orange"
"green"
"cyan"
"blue"
"magenta"
]
));
mapNamedColours = mapColours false;
mapNamedBrightColours = mapColours true;
in
{
draw_bold_text_with_bright_colors = false;
primary = {
background = "0x${config.scheme.base00}";
foreground = "0x${config.scheme.base05}";
};
cursor = {
cursor = "0x${config.scheme.base05}";
text = "0x${config.scheme.base00}";
};
normal = {
black = "0x${config.scheme.base00-hex}";
white = "0x${config.scheme.base05-hex}";
} // mapNamedColours;
bright = {
black = "0x${config.scheme.base03-hex}";
white = "0x${config.scheme.base07-hex}";
} // mapNamedBrightColours;
};
};
};
}

View file

@ -1,19 +0,0 @@
{ config, accentColourName, ... }:
{
services.avizo = {
enable = true;
settings.default =
let
sc = config.scheme;
rgba =
colourName: "${sc."${colourName}-rgb-r"}, ${sc."${colourName}-rgb-g"}, ${sc."${colourName}-rgb-b"}";
in
{
background = "rgba(${rgba "base00"}, 0.9)";
bar-bg-color = "rgba(${rgba "base00"}, 0.9)";
bar-fg-color = "rgba(${rgba "base05"}, 1.0)";
border-color = "rgba(${rgba accentColourName}, 1.0)";
image-opacity = "1.0";
};
};
}

View file

@ -1,92 +0,0 @@
{ scheme, accentColourName }:
with scheme.withHashtag;
''
@define-color accent_color ${scheme.withHashtag."${accentColourName}-hex"};
@define-color accent_bg_color ${scheme.withHashtag."${accentColourName}-hex"};
@define-color accent_fg_color ${base00-hex};
@define-color destructive_color ${base08-hex};
@define-color destructive_bg_color ${base08-hex};
@define-color destructive_fg_color ${base00-hex};
@define-color success_color ${base0B-hex};
@define-color success_bg_color ${base0B-hex};
@define-color success_fg_color ${base00-hex};
@define-color warning_color ${base0A-hex};
@define-color warning_bg_color ${base0A-hex};
@define-color warning_fg_color ${base00-hex};
@define-color error_color ${base08-hex};
@define-color error_bg_color ${base08-hex};
@define-color error_fg_color ${base00-hex};
@define-color window_bg_color ${base00-hex};
@define-color window_fg_color ${base05-hex};
@define-color view_bg_color ${base00-hex};
@define-color view_fg_color ${base05-hex};
@define-color headerbar_bg_color ${base01-hex};
@define-color headerbar_fg_color ${base05-hex};
@define-color headerbar_border_color rgba(${scheme.base01-dec-r}, ${scheme.base01-dec-g}, ${scheme.base01-dec-b}, 0.7);
@define-color headerbar_backdrop_color @window_bg_color;
@define-color headerbar_shade_color rgba(0, 0, 0, 0.07);
@define-color headerbar_darker_shade_color rgba(0, 0, 0, 0.07);
@define-color sidebar_bg_color ${base01-hex};
@define-color sidebar_fg_color ${base05-hex};
@define-color sidebar_backdrop_color @window_bg_color;
@define-color sidebar_shade_color rgba(0, 0, 0, 0.07);
@define-color secondary_sidebar_bg_color @sidebar_bg_color;
@define-color secondary_sidebar_fg_color @sidebar_fg_color;
@define-color secondary_sidebar_backdrop_color @sidebar_backdrop_color;
@define-color secondary_sidebar_shade_color @sidebar_shade_color;
@define-color card_bg_color ${base01-hex};
@define-color card_fg_color ${base05-hex};
@define-color card_shade_color rgba(0, 0, 0, 0.07);
@define-color dialog_bg_color ${base01-hex};
@define-color dialog_fg_color ${base05-hex};
@define-color popover_bg_color ${base01-hex};
@define-color popover_fg_color ${base05-hex};
@define-color popover_shade_color rgba(0, 0, 0, 0.07);
@define-color shade_color rgba(0, 0, 0, 0.07);
@define-color scrollbar_outline_color ${base02-hex};
@define-color blue_1 ${base0D-hex};
@define-color blue_2 ${base0D-hex};
@define-color blue_3 ${base0D-hex};
@define-color blue_4 ${base0D-hex};
@define-color blue_5 ${base0D-hex};
@define-color green_1 ${base0B-hex};
@define-color green_2 ${base0B-hex};
@define-color green_3 ${base0B-hex};
@define-color green_4 ${base0B-hex};
@define-color green_5 ${base0B-hex};
@define-color yellow_1 ${base0A-hex};
@define-color yellow_2 ${base0A-hex};
@define-color yellow_3 ${base0A-hex};
@define-color yellow_4 ${base0A-hex};
@define-color yellow_5 ${base0A-hex};
@define-color orange_1 ${base09-hex};
@define-color orange_2 ${base09-hex};
@define-color orange_3 ${base09-hex};
@define-color orange_4 ${base09-hex};
@define-color orange_5 ${base09-hex};
@define-color red_1 ${base08-hex};
@define-color red_2 ${base08-hex};
@define-color red_3 ${base08-hex};
@define-color red_4 ${base08-hex};
@define-color red_5 ${base08-hex};
@define-color purple_1 ${base0E-hex};
@define-color purple_2 ${base0E-hex};
@define-color purple_3 ${base0E-hex};
@define-color purple_4 ${base0E-hex};
@define-color purple_5 ${base0E-hex};
@define-color brown_1 ${base0F-hex};
@define-color brown_2 ${base0F-hex};
@define-color brown_3 ${base0F-hex};
@define-color brown_4 ${base0F-hex};
@define-color brown_5 ${base0F-hex};
@define-color light_1 ${base01-hex};
@define-color light_2 ${base01-hex};
@define-color light_3 ${base01-hex};
@define-color light_4 ${base01-hex};
@define-color light_5 ${base01-hex};
@define-color dark_1 ${base01-hex};
@define-color dark_2 ${base01-hex};
@define-color dark_3 ${base01-hex};
@define-color dark_4 ${base01-hex};
@define-color dark_5 ${base01-hex};
''

View file

@ -1,5 +1,6 @@
{ pkgs, ... }:
{
stylix.targets.firefox.profileNames = [ "default" ];
programs = {
browserpass = {
enable = true;

View file

@ -3,7 +3,6 @@
imports = [
inputs.base16.homeManagerModule
inputs.nix-index-database.hmModules.nix-index
inputs.plasma-manager.homeManagerModules.plasma-manager
./shell/default.nix
./services/password-store/default.nix
./scripts/default.nix

View file

@ -2,36 +2,37 @@
{
imports = [
./sway/default.nix
./alacritty/default.nix
./emacs/default.nix
./browser/default.nix
./zathura/default.nix
./services/email/default.nix
];
home = {
packages = with pkgs; [
libreoffice-fresh
webcord
signal-desktop
teams-for-linux
];
pointerCursor =
let
name = if config.scheme.variant == "light" then "volantes_cursors" else "volantes_light_cursors";
in
{
inherit name;
package = pkgs.volantes-cursors;
size = 32;
gtk.enable = config.gtk.enable;
x11 = {
enable = true;
defaultCursor = name;
};
};
};
home.packages = with pkgs; [
libreoffice-fresh
webcord
signal-desktop
teams-for-linux
];
services.syncthing.enable = true;
programs.mpv.enable = true;
programs = {
mpv.enable = true;
alacritty = {
enable = true;
settings = {
shell = "${config.programs.fish.package}/bin/fish";
window = {
dynamic_title = true;
padding = {
x = 5;
y = 5;
};
};
live_config_reload = true;
selection.save_to_clipboard = true;
mouse.hide_when_typing = true;
};
};
};
xdg = {
mime.enable = true;
mimeApps =
@ -67,24 +68,4 @@
};
};
};
xresources.properties = with config.scheme.withHashtag; {
"*background" = base00;
"*foreground" = base05;
"*color0" = base00;
"*color1" = red;
"*color2" = green;
"*color3" = yellow;
"*color4" = blue;
"*color5" = magenta;
"*color6" = cyan;
"*color7" = base04;
"*color8" = base01;
"*color9" = red;
"*color10" = green;
"*color11" = yellow;
"*color12" = blue;
"*color13" = magenta;
"*color14" = cyan;
"*color15" = base05;
};
}

View file

@ -6,6 +6,7 @@
}:
{
imports = [ ../shell/default.nix ];
stylix.targets.emacs.enable = false;
services.emacs = {
enable = true;
package = config.programs.emacs.finalPackage;

View file

@ -1,48 +0,0 @@
{ config, fonts, ... }:
{
programs.foot = {
enable = true;
server.enable = true;
settings = {
main = {
term = "xterm-256color";
locked-title = false;
font = "${fonts.monospace.name}:size=${toString fonts.sizes.applications}";
dpi-aware = false;
pad = "10x10";
};
bell = {
urgent = false;
notify = false;
visual = false;
};
cursor = {
blink = true;
};
mouse = {
hide-when-typing = true;
};
colors = with config.scheme; rec {
alpha = 0.85;
background = base00;
foreground = base05;
regular0 = base02;
regular1 = red;
regular2 = green;
regular3 = yellow;
regular4 = blue;
regular5 = magenta;
regular6 = cyan;
regular7 = base05;
bright0 = base04;
bright1 = regular1;
bright2 = regular2;
bright3 = regular3;
bright4 = regular4;
bright5 = regular5;
bright6 = regular6;
bright7 = base05;
};
};
};
}

View file

@ -1,44 +0,0 @@
{
config,
fonts,
accentColourName,
...
}:
{
programs.fuzzel = {
enable = true;
settings = {
main = {
dpi-aware = false;
font = "${fonts.monospace.name}:size=${toString fonts.sizes.popups}";
icon-theme = config.gtk.iconTheme.name;
icons-enabled = true;
fields = "filename,name,generic,categories";
fuzzy = true;
filter-desktop = true;
terminal = "${config.programs.alacritty.package}/bin/alacritty -e";
lines = 24;
width = 80;
tabs = 4;
layer = "overlay";
};
colors =
let
sc = config.scheme;
in
{
background = "${sc.base00}cc"; # 80% Opacity
text = "${sc.base05}ff";
match = "${sc.red}ff";
selection = "${sc.base01}ff";
selection-text = "${sc.base05}ff";
selection-match = "${sc.red}ff";
border = "${sc.${accentColourName}}ff";
};
border = {
width = 1;
radius = 5;
};
};
};
}

View file

@ -1,9 +0,0 @@
{ ... }:
{
imports = [ ./desktop.nix ];
programs.plasma = {
configFile = {
bluedevilglobalrc.Global.launchState.value = "disable";
};
};
}

View file

@ -1,31 +0,0 @@
{
config,
fonts,
accentColourName,
...
}:
{
services.mako =
let
sc = config.scheme.withHashtag;
in
{
enable = true;
anchor = "top-right";
font = "${fonts.monospace.name} ${toString fonts.sizes.popups}";
width = 600;
height = 600;
layer = "top";
markup = true;
maxVisible = 10;
icons = true;
iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}";
textColor = "${sc.base05}ff";
progressColor = "over ${sc.red}ff";
backgroundColor = "${sc.base00}cc";
borderColor = "${sc.${accentColourName}}ff";
borderRadius = 5;
borderSize = 1;
defaultTimeout = 0;
};
}

View file

@ -1,144 +0,0 @@
{
config,
pkgs,
fonts,
accentColourName,
...
}:
{
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
terminal =
with config.programs;
"${if alacritty.enable then alacritty.package else pkgs.alacritty}/bin/alacritty";
font = fonts.monospace.name;
location = "center";
plugins = with pkgs; [ rofi-emoji ];
extraConfig = {
modi = "run,drun,ssh,window,emoji,combi";
combi-modi = "drun,ssh,window,emoji";
sidebar-mode = true;
sort = true;
sorting-method = "fzf";
matching = "fuzzy";
icon-theme = config.gtk.iconTheme.name;
show-icons = true;
application-fallback-icon = "application-x-addon";
drun-display-format = "{icon} {name} ({categories})";
disable-history = false;
hide-scrollbar = true;
display-run = " 󰅴 Run ";
display-drun = " 󱓞 Apps ";
display-ssh = " 󰢹 SSH ";
display-window = " 󰧨 Move ";
display-emoji = " 󰞅 Emoji ";
display-combi = " 󰛡 Combi ";
};
theme =
with builtins;
let
inherit (config.lib.formats.rasi) mkLiteral;
sc = config.scheme;
bg = mkLiteral "rgba (${sc.base00-rgb-r}, ${sc.base00-rgb-g}, ${sc.base00-rgb-b}, 80%)";
bg2 = mkLiteral "rgba (${sc.base01-rgb-r}, ${sc.base01-rgb-g}, ${sc.base01-rgb-b}, 100%)";
fg = mkLiteral sc.withHashtag.base05;
fg2 = mkLiteral sc.withHashtag.base04;
border = mkLiteral sc.withHashtag.${accentColour};
blue = mkLiteral sc.withHashtag.blue;
in
{
"*" = {
background-color = mkLiteral "transparent";
text-color = fg;
font = with fonts; "${monospace.name} ${toString sizes.popups}";
};
window = {
height = mkLiteral "75%";
width = mkLiteral "75%";
border = mkLiteral "1px";
border-color = border;
border-radius = mkLiteral "5px";
background-color = bg;
};
inputbar = {
children = map mkLiteral [
"prompt"
"entry"
];
padding = mkLiteral "2px";
};
prompt = {
background-color = bg2;
padding = mkLiteral "6px";
text-color = blue;
border-radius = mkLiteral "5px";
margin = mkLiteral "20px 0px 0px 20px";
};
textbox-prompt-colon = {
expand = false;
str = "=";
};
entry = {
padding = mkLiteral "6px";
margin = mkLiteral "20px 0px 0px 10px";
};
listview = {
border = mkLiteral "0px 0px 0px";
padding = mkLiteral "6px 0px 0px";
margin = mkLiteral "10px 0px 0px 20px";
columns = 2;
lines = 5;
};
element = {
padding = mkLiteral "5px";
};
"element-icon" = {
size = mkLiteral "25px";
};
"element selected" = {
background-color = bg2;
text-color = blue;
border-radius = mkLiteral "5px";
};
mode-switcher = {
spacing = 0;
};
button = {
padding = mkLiteral "10px";
text-color = fg2;
border-radius = mkLiteral "5px";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.5";
};
"button selected" = {
background-color = bg2;
text-color = blue;
};
message = {
margin = mkLiteral "2px";
padding = mkLiteral "2px";
border-radius = mkLiteral "5px";
};
textbox = {
padding = mkLiteral "6px";
margin = mkLiteral "20px 0px 0px 20px";
text-color = blue;
};
};
};
}

View file

@ -1,17 +1,14 @@
{ pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
imports = [
./bat.nix
./bottom.nix
./direnv.nix
./eza.nix
./fastfetch.nix
./fzf.nix
./git.nix
./readline.nix
./ssh.nix
./starship.nix
./zellij.nix
];
home.packages = with pkgs; [
rclone
@ -20,10 +17,84 @@
];
programs = {
bash.enable = true;
fastfetch.enable = true;
fish.enable = true;
fd.enable = true;
jq.enable = true;
nix-index.enable = true;
ripgrep.enable = true;
bat = {
enable = true;
config.style = "plain,numbers,changes";
};
bottom = {
enable = true;
settings = {
flags = {
group_processes = true;
temperature_type = "celsius";
battery = true;
enable_gpu = true;
enable_cache_memory = true;
};
colors =
let
rainbow = with config.scheme.withHashtag; [
red
yellow
green
cyan
blue
magenta
];
in
{
cpu_core_colors = rainbow;
gpu_core_colors = rainbow;
};
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
eza = {
enable = true;
git = true;
icons = true;
extraOptions = [ "--octal-permissions" ];
};
fzf = {
enable = true;
defaultCommand = "${pkgs.fd}/bin/fd --type f";
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
fileWidgetCommand = "${pkgs.fd}/bin/fd --type f";
};
readline = {
enable = true;
variables = {
bell-style = "visible";
blink-matching-paren = "On";
colored-completion-prefix = "On";
colored-stats = "On";
completion-ignore-case = "On";
completion-map-case = "On";
editing-mode = "emacs";
expand-tilde = "On";
horizontal-scroll-mode = "On";
mark-directories = "On";
mark-symlinked-directories = "On";
visible-stats = "On";
};
};
zellij = {
enable = true;
settings = {
default_mode = "locked";
mouse_mode = true;
copy_command = lib.mkIf config.wayland.windowManager.sway.enable "wl-copy";
copy_on_select = true;
};
};
};
}

View file

@ -2,20 +2,10 @@
config,
lib,
pkgs,
fonts,
accentColourName,
...
}:
{
imports = [
../avizo/default.nix
../fuzzel/default.nix
../mako/default.nix
../swaylock/default.nix
../swayidle/default.nix
../waybar/default.nix
../wlogout/default.nix
];
imports = [ ./waybar/default.nix ];
home.packages = with pkgs; [
ffmpeg
grim
@ -29,15 +19,88 @@
swaymsg exec "${protonmail-bridge}/bin/protonmail-bridge -n"
'')
];
programs.waybar.systemd.target = "sway-session.target";
programs = {
waybar.systemd.target = "sway-session.target";
swaylock.enable = true;
fuzzel = {
enable = true;
settings = {
main = {
icon-theme = config.gtk.iconTheme.name;
icons-enabled = true;
fields = "filename,name,generic,categories";
fuzzy = true;
filter-desktop = true;
terminal = "${config.programs.alacritty.package}/bin/alacritty -e";
lines = 24;
width = 80;
tabs = 4;
layer = "overlay";
};
border = {
width = 1;
radius = 5;
};
};
};
wlogout = {
enable = true;
layout = [
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
}
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
}
{
label = "logout";
action = "swaymsg exit";
text = "Logout";
keybind = "l";
}
];
};
};
services = {
kanshi.systemdTarget = "sway-session.target";
gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
avizo.enable = true;
avizo = {
enable = true;
settings.default.image-opacity = lib.mkForce "1.0";
};
kdeconnect = {
enable = true;
indicator = true;
};
mako = {
enable = true;
anchor = "top-right";
width = 600;
height = 600;
layer = "top";
markup = true;
maxVisible = 10;
icons = true;
iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}";
borderRadius = 5;
borderSize = 1;
defaultTimeout = 0;
};
swayidle = {
enable = true;
timeouts = [
{
timeout = 60 * 15; # 15 minutes
command = "swaylock";
}
];
};
udiskie = {
enable = true;
notify = true;
@ -45,21 +108,13 @@
tray = "never";
};
};
gtk =
let
toCapital = import ../lib/to_capital.nix lib;
in
{
enable = true;
theme = {
package = pkgs.materia-theme;
name = "Materia-${config.scheme.variant}";
};
iconTheme = {
package = pkgs.papirus-icon-theme.override { color = "violet"; };
name = "Papirus-${toCapital config.scheme.variant}";
};
gtk = {
enable = true;
iconTheme = {
package = pkgs.papirus-icon-theme.override { color = "violet"; };
name = "Papirus-${(import ../lib/to_capital.nix lib) config.scheme.variant}";
};
};
wayland.windowManager.sway = {
enable = true;
package = pkgs.swayfx.overrideAttrs (old: {
@ -94,80 +149,10 @@
inner = 5;
outer = 0;
};
fonts = {
names = [ fonts.monospace.name ];
style = "regular";
size = fonts.sizes.desktop * 1.0;
};
colors =
let
sc = config.scheme.withHashtag;
text = toString sc.base05;
indicator = toString sc.${accentColourName};
background = toString sc.base00;
in
{
inherit background;
focused =
let
border = toString sc.${accentColourName};
in
{
inherit
background
text
indicator
border
;
childBorder = border;
};
focusedInactive =
let
border = toString sc.base04;
in
{
inherit
background
text
indicator
border
;
childBorder = border;
};
unfocused =
let
border = toString sc.base03;
in
{
inherit
background
text
indicator
border
;
childBorder = border;
};
urgent =
let
border = toString sc.red;
in
{
inherit
background
text
indicator
border
;
childBorder = border;
};
};
startup = [
{ command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; }
{ command = "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n"; }
{ command = "${pkgs.dex}/bin/dex -a"; }
{
command = "${pkgs.swaybg}/bin/swaybg -m fill -i ${../wallpapers/landscapes/tropic_island_day.jpg}";
}
{ command = "${config.services.mako.package}/bin/mako"; }
];
window = {

View file

@ -1,13 +0,0 @@
{ ... }:
{
imports = [ ../swaylock/default.nix ];
services.swayidle = {
enable = true;
timeouts = [
{
timeout = 60 * 15; # 15 minutes
command = "swaylockfx";
}
];
};
}

View file

@ -1,52 +0,0 @@
{
config,
pkgs,
accentColourName,
...
}:
{
home.packages = with pkgs; [
(writeShellScriptBin "swaylockfx" ''
${swaylock-effects}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse
'')
];
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
# Settings are specifically for swaylock-effects
settings =
let
sc = config.scheme;
in
{
indicator-radius = 100;
indicator-thickness = 10;
indicator-caps-lock = true;
ignore-empty-password = true;
show-failed-attempts = true;
effect-blur = "5x3";
effect-vignette = "0.5:0.5";
grace = 2;
fade-in = 0.2;
bs-hl-color = sc.base06;
caps-lock-bs-hl-color = sc.base06;
caps-lock-key-hl-color = sc.green;
inside-color = "${sc.base00}cc";
key-hl-color = sc.green;
layout-bg-color = "${sc.base00}cc";
layout-border-color = sc.${accentColourName};
layout-text-color = sc.base05;
ring-color = sc.${accentColourName};
ring-clear-color = sc.base06;
ring-caps-lock-color = sc.base09;
ring-ver-color = sc.blue;
ring-wrong-color = sc.red;
separator-color = sc.base01;
text-color = sc.base05;
text-clear-color = sc.base06;
text-caps-lock-color = sc.base09;
text-ver-color = sc.blue;
text-wrong-color = sc.red;
};
};
}

View file

@ -1,363 +0,0 @@
{
config,
pkgs,
fonts,
accentColourName,
...
}:
{
home.packages = [ pkgs.swaynotificationcenter ];
xdg.configFile."swaync/style.css".text =
let
sc = config.scheme.withHashtag;
alpha = "0.85";
alpha-background = "rgba(${config.scheme.base00-rgb-r}, ${config.scheme.base00-rgb-g}, ${config.scheme.base00-rgb-b}, ${alpha})";
in
''
* {
all: unset;
font-size: 1.2rem;
font-family: "${fonts.monospace.name}";
transition: 200ms;
box-shadow: none;
}
.floating-notifications.background .notification-row .notification-background {
border-radius: 5px;
border: 1px solid ${sc.${accentColourName}};
margin: 18px;
background-color: ${alpha-background};
color: ${sc.base05};
padding: 0;
}
.floating-notifications.background
.notification-row
.notification-background
.notification {
padding: 7px;
border-radius: 5px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content {
margin: 7px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.summary {
color: ${sc.base05};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.time {
color: ${sc.base04};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.body {
color: ${sc.base05};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> * {
min-height: 3.4em;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action {
border-radius: 5px;
background-color: ${sc.base01};
color: ${sc.base05};
margin: 7px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:hover {
background-color: ${sc.base01};
color: ${sc.base05};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:active {
background-color: ${sc.blue};
color: ${sc.base00};
}
.floating-notifications.background
.notification-row
.notification-background
.close-button {
margin: 7px;
padding: 2px;
border-radius: 5px;
background-color: ${sc.red};
color: ${sc.base00};
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:hover {
background-color: ${sc.red};
color: ${sc.base00};
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:active {
background-color: ${sc.red};
color: ${sc.base00};
}
.control-center {
border-radius: 5px;
border: 1px solid ${sc.${accentColourName}};
margin: 18px;
background-color: ${alpha-background};
color: ${sc.base05};
padding: 14px;
}
.control-center .widget-title {
color: ${sc.base05};
font-size: 1.3em;
}
.control-center .widget-title button {
border-radius: 7px;
background-color: ${sc.base01};
color: ${sc.base05};
padding: 8px;
}
.control-center .widget-title button:hover {
background-color: ${sc.base02};
color: ${sc.base05};
}
.control-center .widget-title button:active {
background-color: ${sc.base03};
color: ${sc.base05};
}
.control-center .notification-row .notification-background {
border-radius: 5px;
background-color: ${sc.base01};
color: ${sc.base05};
margin-top: 14px;
}
.control-center .notification-row .notification-background .notification {
padding: 7px;
border-radius: 7px;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content {
margin: 7px;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.summary {
color: ${sc.base05};
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.time {
color: ${sc.base04};
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.body {
color: ${sc.base05};
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> * {
min-height: 3.4em;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action {
border-radius: 7px;
background-color: ${sc.base00};
color: ${sc.base05};
margin: 7px;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:hover {
background-color: ${sc.base01};;
color: ${sc.base05};
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:active {
background-color: ${sc.blue};
color: ${sc.base05};
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
background-color: ${sc.red};
color: ${sc.base00};
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: ${sc.red};
color: ${sc.base00};
}
.control-center
.notification-row
.notification-background
.close-button:active {
background-color: ${sc.red};
color: ${sc.base00};
}
.control-center .notification-row .notification-background:hover {
background-color: ${sc.base00};
color: ${sc.base05};
}
.control-center .notification-row .notification-background:active {
background-color: ${sc.blue};
color: ${sc.base05};
}
progressbar,
progress,
trough {
border-radius: 12.6px;
}
.notification.critical progress {
background-color: ${sc.red};
}
.notification.low progress,
.notification.normal progress {
background-color: ${sc.blue};
}
trough {
background-color: ${sc.base00};
}
.control-center trough {
background-color: ${sc.base03};
}
.control-center-dnd {
margin-top: 5px;
border-radius: 8px;
background: ${sc.base00};
border: 1px solid ${sc.base03};
}
.control-center-dnd:checked {
background: ${sc.base00};
}
.control-center-dnd slider {
background: ${sc.base03};
border-radius: 8px;
}
.widget-dnd {
margin: 0px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: ${sc.base00};
border: 1px solid ${sc.base03};
}
.widget-dnd > switch:checked {
background: ${sc.base00};
}
.widget-dnd > switch slider {
background: ${sc.base01};
border-radius: 8px;
border: 1px solid ${sc.${accentColourName}};
}
'';
}

View file

@ -1,61 +0,0 @@
{ config, fonts, ... }:
{
programs.wlogout = {
enable = true;
layout = [
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
}
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
}
{
label = "logout";
action = "swaymsg exit";
text = "Logout";
keybind = "l";
}
];
style =
let
sc = config.scheme.withHashtag;
in
''
* {
font-size: ${toString fonts.sizes.popups}px;
font-family: "${fonts.sansSerif.name}";
}
window {
border: none;
background-color: transparent;
}
button {
background-color: ${sc.base00};
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
box-shadow: none;
margin: 5px;
color: ${sc.base05};
}
button:hover {
background-color: ${sc.base01};
color: ${sc.base05};
}
button:focus {
background-color: ${sc.base02};
color: ${sc.base05};
}
'';
};
}

View file

@ -1,39 +1,15 @@
{ config, fonts, ... }:
{ ... }:
{
# TODO add emacs keybinds
programs.zathura =
let
sc = config.scheme.withHashtag;
in
{
enable = true;
options = {
adjust-open = "best-fit";
database = "null";
dbus-service = true;
sandbox = "normal";
scroll-page-aware = true;
synctex = true;
font = "${fonts.monospace.name} ${toString fonts.sizes.applications}";
# Colour scheme
default-bg = sc.base00;
default-fg = sc.base05;
# completion-bg = "";
# completion-fg = "";
# completion-group-bg = "";
# completion-group-fg = "";
# completion-highlight-bg = "";
# completion-highlight-fg = "";
# inputbar-bg = "";
# inputbar-fg = "";
# notification-bg = "";
# notification-fg = "";
# notification-error-bg = "";
# notification-error-fg = "";
# notification-warning-bg = "";
# notification-warning-fg = "";
# statusbar-bg = "";
# statusbar-fg = "";
};
programs.zathura = {
enable = true;
options = {
adjust-open = "best-fit";
database = "null";
dbus-service = true;
sandbox = "normal";
scroll-page-aware = true;
synctex = true;
};
};
}

View file

@ -1,7 +1,6 @@
{ pkgs, username, ... }:
{ pkgs, ... }:
{
imports = [ ./desktop.nix ];
home-manager.users.${username}.imports = [ ./home/laptop.nix ];
environment.systemPackages = [ pkgs.acpi ];
powerManagement.enable = true;
services.auto-cpufreq = {