Set cursor theme using stylix

Misc cleanup of flake.nix
This commit is contained in:
Evie Litherland-Smith 2024-02-24 08:44:26 +00:00
parent fe546cd582
commit 7a49be2b82
3 changed files with 25 additions and 52 deletions

View file

@ -19,35 +19,19 @@
stylix, stylix,
... ...
}: let }: let
default = {
hostName = "Atlas";
user = "xenia";
system = "x86_64-linux";
group = "users";
shell = "zsh";
wallpaper = ./wallpapers/default.jpg;
base16Scheme = ./schemes/modus-vivendi-tinted.yaml;
accentColour = "base0E"; # magenta
systemModules = [./system/hyprland.nix];
serviceModules = [];
homeModules = [./home/hyprland/default.nix];
stateVersion = "23.05";
};
systemConfig = { systemConfig = {
hostName ? default.hostName, hostName ? "Atlas",
user ? default.user, user ? "xenia",
system ? default.system, system ? "x86_64-linux",
group ? default.group, stateVersion ? "23.05",
shell ? default.shell, systemModules ? [./system/hyprland.nix],
wallpaper ? default.wallpaper, homeModules ? [./home/hyprland/default.nix],
base16Scheme ? default.base16Scheme,
accentColour ? default.accentColour,
systemModules ? default.systemModules,
serviceModules ? default.serviceModules,
homeModules ? default.homeModules,
stateVersion ? default.stateVersion,
}: let }: let
specialArgs = {inherit hostName user group shell accentColour;}; shell = "zsh";
specialArgs = {
inherit hostName user;
accentColour = "base0E"; # magenta
};
in in
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
inherit system specialArgs; inherit system specialArgs;
@ -57,12 +41,7 @@
./hosts/${hostName}/hardware-configuration.nix ./hosts/${hostName}/hardware-configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
stylix.nixosModules.stylix stylix.nixosModules.stylix
({ ({pkgs, ...}: let
config,
lib,
pkgs,
...
}: let
flakeURL = "https://git.xenia.me.uk/xenia/nixos.git?ref=main"; flakeURL = "https://git.xenia.me.uk/xenia/nixos.git?ref=main";
in { in {
boot.loader = { boot.loader = {
@ -145,8 +124,6 @@
flags = [ flags = [
"--update-input" "--update-input"
"nixpkgs" "nixpkgs"
"--update-input"
"home-manager"
"--no-write-lock-file" "--no-write-lock-file"
"-L" # print build logs "-L" # print build logs
]; ];
@ -158,14 +135,14 @@
firewall.enable = true; firewall.enable = true;
}; };
stylix = { stylix = {
inherit base16Scheme; base16Scheme = ./schemes/modus-vivendi-tinted.yaml;
autoEnable = false; autoEnable = false;
targets = { targets = {
chromium.enable = true; chromium.enable = true;
console.enable = true; console.enable = true;
fish.enable = true; fish.enable = true;
}; };
image = wallpaper; image = ./wallpapers/default.jpg;
polarity = "dark"; polarity = "dark";
opacity = { opacity = {
applications = 0.85; applications = 0.85;
@ -173,6 +150,11 @@
popups = 0.5; popups = 0.5;
terminal = 0.85; terminal = 0.85;
}; };
cursor = {
package = pkgs.volantes-cursors;
name = "volantes_cursors";
size = 24;
};
fonts = rec { fonts = rec {
sizes = { sizes = {
applications = 16; applications = 16;
@ -217,7 +199,7 @@
in { in {
root.openssh = {inherit authorizedKeys;}; root.openssh = {inherit authorizedKeys;};
${user} = { ${user} = {
inherit group; group = "users";
isNormalUser = true; isNormalUser = true;
description = "Evie Litherland-Smith"; description = "Evie Litherland-Smith";
extraGroups = ["networkmanager" "wheel" "video" "input" "uinput"]; extraGroups = ["networkmanager" "wheel" "video" "input" "uinput"];
@ -261,8 +243,7 @@
}; };
}) })
] ]
++ systemModules ++ systemModules;
++ serviceModules;
}; };
in { in {
nixosConfigurations = { nixosConfigurations = {
@ -275,14 +256,13 @@
in in
systemConfig { systemConfig {
inherit hostName user system; inherit hostName user system;
systemModules = [./system/default.nix]; systemModules = [
serviceModules = [ ./system/default.nix
./services/adguardhome.nix ./services/adguardhome.nix
./services/caddy.nix ./services/caddy.nix
./services/gitea.nix ./services/gitea.nix
./services/grafana.nix ./services/grafana.nix
./services/minecraft.nix ./services/minecraft.nix
# ./services/ntfy-sh.nix
./services/sshd.nix ./services/sshd.nix
./services/syncthing.nix ./services/syncthing.nix
]; ];
@ -298,7 +278,7 @@
in in
systemConfig { systemConfig {
inherit hostName user system; inherit hostName user system;
systemModules = default.systemModules ++ [./system/games.nix]; systemModules = [./system/hyprland.nix ./system/games.nix];
}; };
Vanguard = let Vanguard = let
@ -308,7 +288,7 @@
in in
systemConfig { systemConfig {
inherit hostName user system; inherit hostName user system;
systemModules = default.systemModules ++ [./system/games.nix]; systemModules = [./system/hyprland.nix ./system/games.nix];
}; };
## Work ## Work

View file

@ -1,7 +1,6 @@
{ {
config, config,
pkgs, pkgs,
shell,
... ...
}: { }: {
imports = [../git/default.nix ../prog/default.nix]; imports = [../git/default.nix ../prog/default.nix];
@ -15,7 +14,6 @@
font = "${stylix.fonts.monospace.name}-${toString stylix.fonts.sizes.applications}"; font = "${stylix.fonts.monospace.name}-${toString stylix.fonts.sizes.applications}";
alpha = "${toString (floor (mul stylix.opacity.applications 100))}"; alpha = "${toString (floor (mul stylix.opacity.applications 100))}";
in '' in ''
(customize-set-variable 'shell-file-name "${pkgs.${shell}}/bin/${shell}")
(add-to-list 'initial-frame-alist '(font . "${font}")) (add-to-list 'initial-frame-alist '(font . "${font}"))
(add-to-list 'default-frame-alist '(font . "${font}")) (add-to-list 'default-frame-alist '(font . "${font}"))
(add-to-list 'initial-frame-alist '(alpha-background . ${alpha})) (add-to-list 'initial-frame-alist '(alpha-background . ${alpha}))

View file

@ -50,11 +50,6 @@
}; };
gtk = { gtk = {
enable = true; enable = true;
cursorTheme = {
package = pkgs.volantes-cursors;
name = "volantes_cursors";
size = 24;
};
iconTheme = { iconTheme = {
package = pkgs.sweet-folders; package = pkgs.sweet-folders;
name = "Sweet-Rainbow"; name = "Sweet-Rainbow";