Major changes: switch to tracking nixos-23.11 and remove stylix.

Motivated by the xz backdoor bug, switch NixOS system to track 23.11
instead of unstable, and will bump version numbers as they come along
rather than do rolling release.
Reverted a couple of changes that were introduced in recent nixpkgs
versions, only major one was switching back to swaylock as hyprlock
isn't in nixpkgs 23.11

Remove stylix and replace with lower-level base16.nix, partly because
stylix was doing something strange pulling in extra flakes (and
breaking on 23.11), partly because I was most of the way there anyway.
Remove last references to stylix in config, mostly just changing
stylix.colors to scheme (from base16) and defining fonts in
specialArgs to be used in the same way as before.
This commit is contained in:
Evie Litherland-Smith 2024-03-31 12:59:24 +01:00
parent 6c9a91ded9
commit ecc9fae75a
26 changed files with 8294 additions and 398 deletions

View file

@ -5,11 +5,11 @@
"fromYaml": "fromYaml" "fromYaml": "fromYaml"
}, },
"locked": { "locked": {
"lastModified": 1708890466, "lastModified": 1709025227,
"narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", "narHash": "sha256-KXcORItjYJTdEO/BlBd0Uym1Xa3eBu43uvpFiWjJOdY=",
"owner": "SenchoPens", "owner": "SenchoPens",
"repo": "base16.nix", "repo": "base16.nix",
"rev": "665b3c6748534eb766c777298721cece9453fdae", "rev": "4e9b16c8b44958bc6bf46d99c3bb1b59c9c9c764",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -18,151 +18,6 @@
"type": "github" "type": "github"
} }
}, },
"base16-alacritty": {
"flake": false,
"locked": {
"lastModified": 1703982197,
"narHash": "sha256-TNxKbwdiUXGi4Z4chT72l3mt3GSvOcz6NZsUH8bQU/k=",
"owner": "aarowill",
"repo": "base16-alacritty",
"rev": "c95c200b3af739708455a03b5d185d3d2d263c6e",
"type": "github"
},
"original": {
"owner": "aarowill",
"repo": "base16-alacritty",
"type": "github"
}
},
"base16-alacritty-yaml": {
"flake": false,
"locked": {
"lastModified": 1674275109,
"narHash": "sha256-Adwx9yP70I6mJrjjODOgZJjt4OPPe8gJu7UuBboXO4M=",
"owner": "aarowill",
"repo": "base16-alacritty",
"rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7",
"type": "github"
},
"original": {
"owner": "aarowill",
"repo": "base16-alacritty",
"rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7",
"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": 1696727917,
"narHash": "sha256-FVrbPk+NtMra0jtlC5oxyNchbm8FosmvXIatkRbYy1g=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "dbe1480d99fe80f08df7970e471fac24c05f2ddb",
"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": 1663659192,
"narHash": "sha256-uJvaYYDMXvoo0fhBZUhN8WBXeJ87SRgof6GEK2efFT0=",
"owner": "chriskempson",
"repo": "base16-vim",
"rev": "3be3cd82cd31acfcab9a41bad853d9c68d30478d",
"type": "github"
},
"original": {
"owner": "chriskempson",
"repo": "base16-vim",
"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"
}
},
"fromYaml": { "fromYaml": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -179,23 +34,6 @@
"type": "github" "type": "github"
} }
}, },
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1698794309,
"narHash": "sha256-/TIkZ8y5Wv3QHLFp79Poao9fINurKs5pa4z0CRe+F8s=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "a7c169c6c29cf02a4c392fa0acbbc5f5072823e7",
"type": "github"
},
"original": {
"owner": "GNOME",
"ref": "45.1",
"repo": "gnome-shell",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -203,36 +41,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1711604890, "lastModified": 1710888565,
"narHash": "sha256-vbI/gxRTq/gHW1Q8z6D/7JG/qGNl3JTimUDX+MwnC3A=", "narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "3142bdcc470e1e291e1fbe942fd69e06bd00c5df", "rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1706001011,
"narHash": "sha256-J7Bs9LHdZubgNHZ6+eE/7C18lZ1P6S5/zdJSdXFItI4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3df2a80f3f85f91ea06e5e91071fa74ba92e5084",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -273,57 +91,42 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1711703276, "lastModified": 1711668574,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", "narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", "rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"ref": "nixos-unstable", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"base16": "base16",
"home-manager": "home-manager", "home-manager": "home-manager",
"iosevka-custom": "iosevka-custom", "iosevka-custom": "iosevka-custom",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"stylix": "stylix" "tt-schemes": "tt-schemes"
} }
}, },
"stylix": { "tt-schemes": {
"inputs": { "flake": false,
"base16": "base16",
"base16-alacritty": "base16-alacritty",
"base16-alacritty-yaml": "base16-alacritty-yaml",
"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",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1711224130, "lastModified": 1711623106,
"narHash": "sha256-RyOvyQASi5lvKLH5ISiGGkdX1eJxYF25aQALGfN9U0k=", "narHash": "sha256-mKmQPUbZaOOnpwmfGHm+iujAqGWqlTaBi16R/FUFQh4=",
"owner": "danth", "owner": "tinted-theming",
"repo": "stylix", "repo": "schemes",
"rev": "53d3e5d5b36a5227b906e00d7e884dcfb7852403", "rev": "45f3d879fb64276df7e69c18f7adbb88938e10e7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "danth", "owner": "tinted-theming",
"repo": "stylix", "repo": "schemes",
"type": "github" "type": "github"
} }
} }

View file

@ -7,23 +7,25 @@
}; };
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
iosevka-custom.url = "git+https://git.xenia.me.uk/pixelifytica/iosevka.git"; iosevka-custom.url = "git+https://git.xenia.me.uk/pixelifytica/iosevka.git";
base16.url = "github:SenchoPens/base16.nix";
tt-schemes = {
url = "github:tinted-theming/schemes";
flake = false;
};
}; };
outputs = { outputs = {
nixpkgs, nixpkgs,
home-manager, home-manager,
stylix,
iosevka-custom, iosevka-custom,
base16,
tt-schemes,
... ...
}: let }: let
systemConfig = { systemConfig = {
@ -39,6 +41,28 @@
inherit hostName user; inherit hostName user;
accentColour = "base07"; # catppuccin lavender accentColour = "base07"; # catppuccin lavender
catppuccinVariant = "Mocha"; catppuccinVariant = "Mocha";
fonts = with import nixpkgs {inherit system;};
with iosevka-custom.outputs; rec {
sizes = {
applications = 16;
desktop = 20;
popups = 20;
terminal = 16;
};
serif = sansSerif;
sansSerif = {
name = names."iosevka-custom-aile";
package = packages.${system}."iosevka-custom-aile";
};
monospace = {
name = names."iosevka-custom-nerdfont";
package = packages.${system}."iosevka-custom-nerdfont";
};
emoji = {
name = "EmojiOne Color";
package = emojione;
};
};
}; };
in in
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
@ -46,18 +70,21 @@
modules = modules =
[ [
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
stylix.nixosModules.stylix base16.nixosModule
./hosts/${hostName}/configuration.nix ./hosts/${hostName}/configuration.nix
./hosts/${hostName}/hardware-configuration.nix ./hosts/${hostName}/hardware-configuration.nix
./system/default.nix ./system/default.nix
({ ({
config,
lib, lib,
pkgs, pkgs,
catppuccinVariant ? "Mocha",
... ...
}: { }: {
scheme = "${tt-schemes}/base16/catppuccin-${lib.strings.toLower catppuccinVariant}.yaml";
nix = { nix = {
enable = true; enable = true;
package = pkgs.nixVersions.nix_2_21; package = pkgs.nixVersions.nix_2_19;
settings = { settings = {
cores = 0; cores = 0;
max-jobs = "auto"; max-jobs = "auto";
@ -83,17 +110,6 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
networking = {inherit hostName;}; networking = {inherit hostName;};
programs.${defaultUserShell}.enable = true; programs.${defaultUserShell}.enable = true;
stylix.fonts = with iosevka-custom.outputs; rec {
serif = sansSerif;
sansSerif = {
name = names."iosevka-custom-aile";
package = packages.${system}."iosevka-custom-aile";
};
monospace = {
name = names."iosevka-custom-nerdfont";
package = packages.${system}."iosevka-custom-nerdfont";
};
};
system = {inherit stateVersion;}; system = {inherit stateVersion;};
users = { users = {
defaultUserShell = pkgs.${defaultUserShell}; defaultUserShell = pkgs.${defaultUserShell};
@ -117,7 +133,7 @@
}; };
}; };
home-manager = { home-manager = {
extraSpecialArgs = specialArgs; extraSpecialArgs = {inherit (config) scheme;} // specialArgs;
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users = { users = {

View file

@ -1,9 +1,9 @@
{config, ...}: { {fonts, ...}: {
programs.alacritty = let programs.alacritty = let
catppuccin-mocha = builtins.fromTOML (builtins.readFile ./catppuccin-mocha.toml); catppuccin-mocha = builtins.fromTOML (builtins.readFile ./catppuccin-mocha.toml);
in { in {
enable = true; enable = true;
settings = with config.stylix; settings =
{ {
font = { font = {
size = fonts.sizes.applications; size = fonts.sizes.applications;
@ -13,7 +13,7 @@
}; };
}; };
window = { window = {
opacity = opacity.terminal; opacity = 0.8;
dynamic_title = true; dynamic_title = true;
padding = { padding = {
x = 10; x = 10;

View file

@ -1,20 +1,19 @@
{ {
config, scheme,
accentColour ? "base07", accentColour ? "base07",
... ...
}: { }: {
services.avizo = { services.avizo = {
enable = true; enable = true;
settings.default = with config.stylix; settings.default = with scheme; let
with config.lib.stylix.colors; let accent = {
accent = with config.lib.stylix; { r = scheme."${accentColour}-rgb-r";
r = colors."${accentColour}-rgb-r"; g = scheme."${accentColour}-rgb-g";
g = colors."${accentColour}-rgb-g"; b = scheme."${accentColour}-rgb-b";
b = colors."${accentColour}-rgb-b";
}; };
in { in {
background = "rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, ${toString opacity.popups})"; background = "rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.8)";
bar-bg-color = "rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, ${toString opacity.popups})"; bar-bg-color = "rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.8)";
bar-fg-color = "rgba(${base05-rgb-r}, ${base05-rgb-g}, ${base05-rgb-b}, 1.0)"; bar-fg-color = "rgba(${base05-rgb-r}, ${base05-rgb-g}, ${base05-rgb-b}, 1.0)";
border-color = "rgba(${accent.r}, ${accent.g}, ${accent.b}, 1.0)"; border-color = "rgba(${accent.r}, ${accent.g}, ${accent.b}, 1.0)";
image-opacity = "1.0"; image-opacity = "1.0";

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

21
home/bat/default.nix Normal file
View file

@ -0,0 +1,21 @@
{
lib,
catppuccinVariant ? "Mocha",
...
}: {
xdg.configFile = let
variants = ["Latte" "Frappe" "Macchiato" "Mocha"];
mkVariant = variant: let
fname = "catppuccin${variant}.tmTheme";
in {
name = "bat/themes/${fname}";
value = {source = ./. + "/${fname}";};
};
in
builtins.listToAttrs
(lib.lists.forEach variants mkVariant);
programs.bat = {
enable = true;
config.theme = "catppuccin${catppuccinVariant}";
};
}

View file

@ -1,12 +1,11 @@
{ {
config, scheme,
accentColour ? "base07", accentColour ? "base07",
... ...
}: { }: {
programs.bottom = { programs.bottom = {
enable = true; enable = true;
settings.colors = with config.lib.stylix; settings.colors = with scheme.withHashtag; let
with colors.withHashtag; let
rainbow = [red yellow green cyan blue magenta]; rainbow = [red yellow green cyan blue magenta];
in { in {
table_header_color = base05; table_header_color = base05;
@ -18,9 +17,9 @@
swap_color = blue; swap_color = blue;
rx_color = green; rx_color = green;
tx_color = blue; tx_color = blue;
widget_title_color = colors.withHashtag.${accentColour}; widget_title_color = scheme.withHashtag.${accentColour};
border_color = base02; border_color = base02;
highlighted_border_color = colors.withHashtag.${accentColour}; highlighted_border_color = scheme.withHashtag.${accentColour};
text_color = base05; text_color = base05;
graph_color = base04; graph_color = base04;
cursor_color = base02; cursor_color = base02;

View file

@ -1,16 +1,16 @@
{config, ...}: { {scheme, ...}: {
programs.cava = { programs.cava = {
enable = true; enable = true;
settings = { settings = {
color = with config.lib.stylix.colors; { color = with scheme.withHashtag; {
gradient = 1; gradient = 1;
gradient_count = 6; gradient_count = 6;
gradient_color_1 = "'${withHashtag.red}'"; gradient_color_1 = "'${red}'";
gradient_color_2 = "'${withHashtag.yellow}'"; gradient_color_2 = "'${yellow}'";
gradient_color_3 = "'${withHashtag.green}'"; gradient_color_3 = "'${green}'";
gradient_color_4 = "'${withHashtag.cyan}'"; gradient_color_4 = "'${cyan}'";
gradient_color_5 = "'${withHashtag.blue}'"; gradient_color_5 = "'${blue}'";
gradient_color_6 = "'${withHashtag.magenta}'"; gradient_color_6 = "'${magenta}'";
}; };
}; };
}; };

View file

@ -1,9 +1,6 @@
{ {pkgs, ...}: {
config,
pkgs,
...
}: {
imports = [ imports = [
./bat/default.nix
./git/default.nix ./git/default.nix
./ssh/default.nix ./ssh/default.nix
./nushell/default.nix ./nushell/default.nix
@ -12,21 +9,9 @@
./bottom/default.nix ./bottom/default.nix
./scripts/default.nix ./scripts/default.nix
]; ];
stylix.targets = {
bat.enable = true;
fzf.enable = true;
zellij.enable = true;
};
programs = { programs = {
bash.enable = true; bash.enable = true;
carapace.enable = true; carapace.enable = true;
bat = {
enable = true;
config.theme =
if config.stylix.targets.bat.enable
then "base16-stylix"
else "dracula";
};
eza = { eza = {
enable = true; enable = true;
git = true; git = true;
@ -50,9 +35,5 @@
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d"; changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
fileWidgetCommand = "${pkgs.fd}/bin/fd --type f"; fileWidgetCommand = "${pkgs.fd}/bin/fd --type f";
}; };
zellij = {
enable = true;
settings.default_layout = "compact";
};
}; };
} }

View file

@ -1,6 +1,7 @@
{ {
config, config,
pkgs, pkgs,
fonts,
... ...
}: { }: {
imports = [../git/default.nix ../prog/default.nix]; imports = [../git/default.nix ../prog/default.nix];
@ -10,13 +11,12 @@
# git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.config/emacs # git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.config/emacs
enable = true; enable = true;
package = pkgs.emacs29-pgtk; package = pkgs.emacs29-pgtk;
extraConfig = with builtins; extraConfig = let
with config; let
shell = "${pkgs.zsh}/bin/zsh"; shell = "${pkgs.zsh}/bin/zsh";
font = "${stylix.fonts.monospace.name}-${toString stylix.fonts.sizes.applications}"; font = "${fonts.monospace.name}-${toString fonts.sizes.applications}";
fixed-font-family = "${stylix.fonts.monospace.name}"; fixed-font-family = "${fonts.monospace.name}";
variable-font-family = "${stylix.fonts.sansSerif.name}"; variable-font-family = "${fonts.sansSerif.name}";
alpha = "${toString (floor (mul stylix.opacity.applications 100))}"; alpha = "80";
in '' in ''
(customize-set-variable 'shell-file-name "${shell}") (customize-set-variable 'shell-file-name "${shell}")
(add-to-list 'initial-frame-alist '(font . "${font}")) (add-to-list 'initial-frame-alist '(font . "${font}"))

View file

@ -1,4 +1,8 @@
{config, ...}: { {
fonts,
scheme,
...
}: {
programs.foot = { programs.foot = {
enable = true; enable = true;
server.enable = true; server.enable = true;
@ -7,7 +11,7 @@
# term = "xterm-256color"; # term = "xterm-256color";
title = "foot"; title = "foot";
locked-title = "no"; locked-title = "no";
font = with config.stylix.fonts; "${monospace.name}:size=${toString sizes.applications}"; font = with fonts; "${monospace.name}:size=${toString sizes.applications}";
dpi-aware = "no"; dpi-aware = "no";
pad = "10x10"; pad = "10x10";
}; };
@ -18,8 +22,8 @@
}; };
cursor = {blink = "yes";}; cursor = {blink = "yes";};
mouse = {hide-when-typing = "no";}; mouse = {hide-when-typing = "no";};
colors = with config.lib.stylix.colors; rec { colors = with scheme; rec {
alpha = config.stylix.opacity.terminal; alpha = 0.8;
background = base00; background = base00;
foreground = base05; foreground = base05;
regular0 = base02; regular0 = base02;

View file

@ -2,17 +2,19 @@
config, config,
lib, lib,
pkgs, pkgs,
fonts,
scheme,
accentColour ? "base07", accentColour ? "base07",
catppuccinVariant ? "Mocha", catppuccinVariant ? "Mocha",
... ...
}: { }: {
stylix.targets.xresources.enable = true;
imports = [ imports = [
../default.nix ../default.nix
../email/default.nix ../email/default.nix
../password-store/default.nix ../password-store/default.nix
../waybar/default.nix ../waybar/default.nix
../rofi/default.nix ../rofi/default.nix
../swaylock/default.nix
../swaync/default.nix ../swaync/default.nix
../avizo/default.nix ../avizo/default.nix
../alacritty/default.nix ../alacritty/default.nix
@ -37,7 +39,7 @@
zellij.settings.copy_command = "wl-copy"; zellij.settings.copy_command = "wl-copy";
}; };
services = { services = {
gpg-agent.pinentryPackage = pkgs.pinentry-gtk2; gpg-agent.pinentryFlavor = "gtk2";
avizo.enable = true; avizo.enable = true;
syncthing.enable = true; syncthing.enable = true;
udiskie = { udiskie = {
@ -59,6 +61,13 @@
}; };
name = "Papirus-Dark"; name = "Papirus-Dark";
}; };
cursorTheme = let
variant = "${lib.strings.toLower catppuccinVariant}Dark";
in {
package = pkgs.catppuccin-cursors.${variant};
name = "Catppuccin-${catppuccinVariant}-Dark-Cursors";
size = 32;
};
theme = { theme = {
package = with lib.strings; package = with lib.strings;
pkgs.catppuccin-gtk.override { pkgs.catppuccin-gtk.override {
@ -81,8 +90,8 @@
"XDG_SESSION_DESKTOP=Hyprland" "XDG_SESSION_DESKTOP=Hyprland"
"GDK_BACKEND=wayland,x11" "GDK_BACKEND=wayland,x11"
"GTK_THEME,${gtk.theme.name}" "GTK_THEME,${gtk.theme.name}"
"XCURSOR_THEME,${stylix.cursor.name}" "XCURSOR_THEME,${gtk.cursorTheme.name}"
"XCURSOR_SIZE,${toString stylix.cursor.size}" "XCURSOR_SIZE,${toString gtk.cursorTheme.size}"
"QT_AUTO_SCREEN_SCALE_FACTOR,1" "QT_AUTO_SCREEN_SCALE_FACTOR,1"
"QT_QPA_PLATFORM,wayland" "QT_QPA_PLATFORM,wayland"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1" "QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
@ -91,7 +100,7 @@
]; ];
exec-once = with config; [ exec-once = with config; [
"systemctl --user import-environment WAYLAND_DISPLAY QT_QPA_PLATFORMTHEME" "systemctl --user import-environment WAYLAND_DISPLAY QT_QPA_PLATFORMTHEME"
"${wayland.windowManager.hyprland.finalPackage}/bin/hyprctl setcursor ${stylix.cursor.name} ${toString stylix.cursor.name}" "${wayland.windowManager.hyprland.finalPackage}/bin/hyprctl setcursor ${gtk.cursorTheme.name} ${toString gtk.cursorTheme.size}"
"${pkgs.swaynotificationcenter}/bin/swaync" "${pkgs.swaynotificationcenter}/bin/swaync"
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
"${pkgs.protonmail-bridge}/bin/protonmail-bridge -n" "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n"
@ -127,9 +136,8 @@
smart_resizing = false; smart_resizing = false;
drop_at_cursor = true; drop_at_cursor = true;
}; };
general = with config.lib.stylix; general = with scheme; {
with colors; { "col.active_border" = "rgb(${scheme.${accentColour}})";
"col.active_border" = "rgb(${colors.${accentColour}})";
"col.inactive_border" = "rgb(${base03})"; "col.inactive_border" = "rgb(${base03})";
gaps_in = 5; gaps_in = 5;
gaps_out = 10; gaps_out = 10;
@ -137,7 +145,7 @@
cursor_inactive_timeout = 0; cursor_inactive_timeout = 0;
layout = "dwindle"; layout = "dwindle";
}; };
decoration = with config.lib.stylix.colors; { decoration = with scheme; {
rounding = 10; rounding = 10;
"col.shadow" = "rgba(0d${base00})"; "col.shadow" = "rgba(0d${base00})";
drop_shadow = "yes"; drop_shadow = "yes";
@ -219,7 +227,8 @@
"pin, title:Picture-in-Picture,class:firefox" "pin, title:Picture-in-Picture,class:firefox"
# LibreOffice # LibreOffice
"suppressevent fullscreen maximize, class:(libreoffice|soffice)(.*)" "nofullscreenrequest, class:(libreoffice|soffice)(.*)"
"nomaximizerequest, class:(libreoffice|soffice)(.*)"
"float, title:Open,class:(libreoffice|soffice)(.*)" "float, title:Open,class:(libreoffice|soffice)(.*)"
# Steam # Steam
@ -231,7 +240,8 @@
"size 800 600, title:Steam Settings,class:steam" "size 800 600, title:Steam Settings,class:steam"
# X2Go / NoMachine # X2Go / NoMachine
"suppressevent fullscreen maximize, class:x2goclient|Nxplayer.bin" "nofullscreenrequest, class:x2goclient|Nxplayer.bin"
"nomaximizerequest, class:x2goclient|Nxplayer.bin"
"float, title:(X2Go Client|Freia|Heimdall), class:x2goclient" "float, title:(X2Go Client|Freia|Heimdall), class:x2goclient"
"float, title:NoMachine, class:Nxplayer.bin" "float, title:NoMachine, class:Nxplayer.bin"
"center, title:(X2Go Client|Freia|Heimdall), class:x2goclient" "center, title:(X2Go Client|Freia|Heimdall), class:x2goclient"
@ -263,7 +273,8 @@
# Open Hyprland wiki at correct version number # Open Hyprland wiki at correct version number
"CTRL_SHIFT, H, exec, xdg-open \"https://wiki.hyprland.org/$(hyprctl version -j | ${pkgs.jq}/bin/jq $args.commit | ${pkgs.gnused}/bin/sed s/v// | ${pkgs.gnused}/bin/sed s/\\\"//g)\"" "CTRL_SHIFT, H, exec, xdg-open \"https://wiki.hyprland.org/$(hyprctl version -j | ${pkgs.jq}/bin/jq $args.commit | ${pkgs.gnused}/bin/sed s/v// | ${pkgs.gnused}/bin/sed s/\\\"//g)\""
"SUPER, F1, exec, ${pkgs.hyprlock}/bin/hyprlock" # "SUPER, F1, exec, ${pkgs.hyprlock}/bin/hyprlock" # Until added to nixpkgs
"SUPER, F1, exec, ${swaylock.package}/bin/hyprlock"
"SUPER, Q, killactive," "SUPER, Q, killactive,"
"SUPER SHIFT, Q, exec, pkill rofi || ${rofi.finalPackage}/bin/rofi -show powermenu -modi powermenu:${pkgs.rofi-power-menu}/bin/rofi-power-menu" "SUPER SHIFT, Q, exec, pkill rofi || ${rofi.finalPackage}/bin/rofi -show powermenu -modi powermenu:${pkgs.rofi-power-menu}/bin/rofi-power-menu"
"SUPER, V, togglefloating" "SUPER, V, togglefloating"
@ -361,17 +372,20 @@
}; };
}; };
xdg.configFile = { xdg.configFile = {
"hypr/hyprpaper.conf".text = '' "hypr/hyprpaper.conf".text = let
preload = ${config.stylix.image} image = ../../wallpapers/waves/cat-waves.png;
wallpaper = ,${config.stylix.image} in ''
preload = ${image}
wallpaper = ,${image}
''; '';
"hypr/hyprlock.conf".text = with config.lib.stylix.colors; let "hypr/hyprlock.conf".text = with scheme; let
font = config.stylix.fonts.sansSerif.name; font = fonts.sansSerif.name;
accent = config.lib.stylix.colors.${accentColour}; accent = scheme.${accentColour};
in '' in ''
# GENERAL # GENERAL
general { general {
disable_loading_bar = true disable_loading_bar = true
hide_cursor = true
} }
# BACKGROUND # BACKGROUND
@ -407,13 +421,12 @@
} }
# USER # USER
label { image {
monitor = monitor =
text = Logging in as <span foreground="##${accent}">$USER</span> path = ${../../picrew.png}
color = 0xff${base05} size = 100
font_size = 25 border_color = 0xff${accent}
font_family = ${font} position = 0, 75
position = 0, 50
halign = center halign = center
valign = center valign = center
} }
@ -430,7 +443,7 @@
inner_color = 0xff${base00} inner_color = 0xff${base00}
font_color = 0xff${base05} font_color = 0xff${base05}
fade_on_empty = false fade_on_empty = false
placeholder_text = <i><span foreground="##${base04}">Input Password...</span></i> placeholder_text = <span foreground="##${base04}"><i>󰌾 Logged in as </i><span foreground="##${accent}">$USER</span></span>
hide_input = false hide_input = false
position = 0, -50 position = 0, -50
halign = center halign = center

View file

@ -1,15 +1,15 @@
{ {
config,
pkgs, pkgs,
fonts,
scheme,
accentColour ? "base07", accentColour ? "base07",
... ...
}: { }: {
home.packages = [pkgs.nyxt]; home.packages = [pkgs.nyxt];
xdg = { xdg = {
configFile = { configFile = {
"nyxt/config.lisp".text = with config.stylix; "nyxt/config.lisp".text = with scheme.withHashtag; let
with config.lib.stylix.colors.withHashtag; let accent = scheme.withHashtag.${accentColour};
accent = config.lib.stylix.colors.withHashtag.${accentColour};
in '' in ''
;; Import custom configuration ;; Import custom configuration
(nyxt::load-lisp "${./config.lisp}") (nyxt::load-lisp "${./config.lisp}")

View file

@ -28,7 +28,7 @@
maxCacheTtl = 86400; maxCacheTtl = 86400;
defaultCacheTtl = maxCacheTtl; defaultCacheTtl = maxCacheTtl;
defaultCacheTtlSsh = maxCacheTtl; defaultCacheTtlSsh = maxCacheTtl;
pinentryPackage = lib.mkDefault pkgs.pinentry-curses; pinentryFlavor = lib.mkDefault "curses";
extraConfig = '' extraConfig = ''
no-allow-external-cache no-allow-external-cache
''; '';

View file

@ -1,11 +1,13 @@
{ {
config, config,
fonts,
scheme,
accentColour ? "base07", accentColour ? "base07",
... ...
}: { }: {
programs.rofi = { programs.rofi = {
enable = true; enable = true;
font = config.stylix.fonts.monospace.name; font = fonts.monospace.name;
location = "center"; location = "center";
pass = { pass = {
enable = true; enable = true;
@ -33,10 +35,9 @@
display-combi = " 󰛡 Combi "; display-combi = " 󰛡 Combi ";
}; };
theme = with builtins; theme = with builtins;
with config.stylix; with scheme; let
with config.lib.stylix.colors; let
inherit (config.lib.formats.rasi) mkLiteral; inherit (config.lib.formats.rasi) mkLiteral;
bg = mkLiteral "rgba (${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, ${toString (floor (mul opacity.popups 100))}%)"; bg = mkLiteral "rgba (${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 80%)";
bg2 = mkLiteral "rgba (${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, 100%)"; bg2 = mkLiteral "rgba (${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, 100%)";
fg = mkLiteral withHashtag.base05; fg = mkLiteral withHashtag.base05;
fg2 = mkLiteral withHashtag.base04; fg2 = mkLiteral withHashtag.base04;
@ -46,7 +47,7 @@
"*" = { "*" = {
background-color = mkLiteral "transparent"; background-color = mkLiteral "transparent";
text-color = fg; text-color = fg;
font = with config.stylix.fonts; "${monospace.name} ${toString sizes.popups}"; font = with fonts; "${monospace.name} ${toString sizes.popups}";
}; };
window = { window = {

View file

@ -2,13 +2,13 @@
programs.ssh = { programs.ssh = {
enable = true; enable = true;
forwardAgent = true; forwardAgent = true;
addKeysToAgent = "yes";
compression = true; compression = true;
serverAliveInterval = 15; serverAliveInterval = 15;
serverAliveCountMax = 3; serverAliveCountMax = 3;
controlMaster = "auto"; controlMaster = "auto";
controlPersist = "10s"; controlPersist = "10s";
extraConfig = '' extraConfig = ''
AddKeysToAgent=yes
SetEnv TERM=xterm-256color SetEnv TERM=xterm-256color
''; '';
matchBlocks = { matchBlocks = {

View file

@ -3,7 +3,6 @@
pkgs, pkgs,
... ...
}: { }: {
stylix.targets.swaylock.enable = true;
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;
package = pkgs.swaylock-effects; package = pkgs.swaylock-effects;

View file

@ -1,16 +1,16 @@
{ {
config,
pkgs, pkgs,
fonts,
scheme,
accentColour ? "base07", accentColour ? "base07",
... ...
}: { }: {
home.packages = [pkgs.swaynotificationcenter]; home.packages = [pkgs.swaynotificationcenter];
xdg.configFile."swaync/style.css".text = with config.stylix; xdg.configFile."swaync/style.css".text = with scheme; ''
with config.lib.stylix.colors; ''
* { * {
all: unset; all: unset;
font-size: ${toString config.stylix.fonts.sizes.desktop}px; font-size: ${toString fonts.sizes.desktop}px;
font-family: "${config.stylix.fonts.monospace.name}"; font-family: "${fonts.monospace.name}";
transition: 200ms; transition: 200ms;
} }
@ -18,7 +18,7 @@
border-radius: 10px; border-radius: 10px;
border: 1px solid ${withHashtag.${accentColour}}; border: 1px solid ${withHashtag.${accentColour}};
margin: 18px; margin: 18px;
background-color: rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, ${toString opacity.popups}); background-color: rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.8);
color: ${withHashtag.base05}; color: ${withHashtag.base05};
padding: 0; padding: 0;
} }
@ -141,7 +141,7 @@
border-radius: 10px; border-radius: 10px;
border: 1px solid ${withHashtag.${accentColour}}; border: 1px solid ${withHashtag.${accentColour}};
margin: 18px; margin: 18px;
background-color: rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, ${toString opacity.popups}); background-color: rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.8);
color: ${withHashtag.base05}; color: ${withHashtag.base05};
padding: 14px; padding: 14px;
} }

View file

@ -1,6 +1,8 @@
{ {
config, config,
pkgs, pkgs,
fonts,
scheme,
accentColour ? "base07", accentColour ? "base07",
... ...
}: { }: {
@ -236,14 +238,13 @@
"return-type" = "json"; "return-type" = "json";
}; };
tray = { tray = {
icon-size = config.stylix.fonts.sizes.desktop; icon-size = fonts.sizes.desktop;
show-passive-items = true; show-passive-items = true;
spacing = 5; spacing = 5;
}; };
}; };
style = with config.stylix; style = with scheme.withHashtag; let
with config.lib.stylix.colors.withHashtag; let accent = scheme.withHashtag.${accentColour};
accent = config.lib.stylix.colors.withHashtag.${accentColour};
in '' in ''
* { * {
all: unset; all: unset;
@ -257,7 +258,7 @@
window > box { window > box {
color: ${base05}; color: ${base05};
background: alpha(${base00}, ${toString opacity.desktop}); background: alpha(${base00}, 0.8);
margin: 5px 10px 0px; margin: 5px 10px 0px;
padding: 0px; padding: 0px;
border: 1px solid ${accent}; border: 1px solid ${accent};
@ -266,7 +267,7 @@
tooltip { tooltip {
/* TODO make transparent when I can fix the blurls issue */ /* TODO make transparent when I can fix the blurls issue */
/* background: alpha(${base00}, ${toString opacity.popups}); */ /* background: alpha(${base00}, 0.8); */
background: ${base00}; background: ${base00};
border: 1px solid ${accent}; border: 1px solid ${accent};
border-radius: 10px; border-radius: 10px;

View file

@ -2,7 +2,7 @@
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
autosuggestion.enable = true; enableAutosuggestions = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
enableVteIntegration = true; enableVteIntegration = true;
autocd = true; autocd = true;

View file

@ -1,5 +1,9 @@
{pkgs, ...}: { {
imports = [./registry.nix ./stylix.nix]; pkgs,
fonts,
...
}: {
imports = [./registry.nix];
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
@ -84,11 +88,23 @@
}; };
fonts = { fonts = {
packages = with pkgs; [ packages = with pkgs; [
fonts.serif.package
fonts.sansSerif.package
fonts.monospace.package
fonts.emoji.package
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) # Status bar (nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) # Status bar
emacs-all-the-icons-fonts # Emacs emacs-all-the-icons-fonts # Emacs
weather-icons # Emacs weather-icons # Emacs
lmodern # LaTeX lmodern # LaTeX
]; ];
fontconfig.enable = true; fontconfig = {
enable = true;
defaultFonts = {
serif = [fonts.serif.name];
sansSerif = [fonts.sansSerif.name];
monospace = [fonts.monospace.name];
emoji = [fonts.emoji.name];
};
};
}; };
} }

View file

@ -14,7 +14,7 @@
GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim"; GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim";
}; };
systemPackages = with pkgs; [ systemPackages = with pkgs; [
hyprlock swaylock-effects
hyprpaper hyprpaper
xdg-utils xdg-utils
wtype wtype
@ -28,7 +28,10 @@
streamlink streamlink
]; ];
}; };
security.pam.services.hyprlock = {}; security.pam.services = {
swaylock = {};
hyprlock = {};
};
services = { services = {
xserver.enable = false; xserver.enable = false;
blueman.enable = true; blueman.enable = true;

View file

@ -1,44 +0,0 @@
{
lib,
pkgs,
catppuccinVariant ? "Mocha",
...
}: {
stylix = {
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-${lib.strings.toLower catppuccinVariant}.yaml";
autoEnable = false;
targets = {
chromium.enable = true;
console.enable = true;
};
image = ../wallpapers/waves/cat-waves.png;
polarity = "dark";
opacity = let
default = 0.80;
in {
applications = default;
desktop = default;
popups = default;
terminal = default;
};
cursor = let
variant = "${lib.strings.toLower catppuccinVariant}Dark";
in {
package = pkgs.catppuccin-cursors.${variant};
name = "Catppuccin-${catppuccinVariant}-Dark-Cursors";
};
fonts = {
sizes = {
applications = 16;
desktop = 20;
popups = 20;
terminal = 16;
};
emoji = {
name = "EmojiOne Color";
package = pkgs.emojione;
};
};
homeManagerIntegration.followSystem = true;
};
}