Merge pull request 'use autogenerated theme' (#39) from use-autogenerated-theme into main

Reviewed-on: #39
This commit is contained in:
Charlotte 🦝 Delenk 2023-04-26 05:48:04 +00:00
commit 0e638a2cc5
Signed by: gitea-bot
GPG key ID: C9974EDF9932B558
9 changed files with 933 additions and 865 deletions

File diff suppressed because it is too large Load diff

View file

@ -98,4 +98,6 @@ desktop: {pkgs, ...}: {
}; };
home.stateVersion = "22.05"; home.stateVersion = "22.05";
manual.manpages.enable = false; # broken manual.manpages.enable = false; # broken
_module.args.bg = "${pkgs.lotte-art}/2022-06-21-sammythetanuki-lotteplushpride.jxl";
} }

View file

@ -121,4 +121,5 @@
"https://cache.nixos.org/" "https://cache.nixos.org/"
]; ];
services.tailscale.useRoutingFeatures = "client"; services.tailscale.useRoutingFeatures = "client";
home-manager.users.darkkirb._module.args.bg = lib.mkForce "${pkgs.lotte-art}/2022-08-12-deathtoaster-funpit-scat.jxl";
} }

View file

@ -28,27 +28,6 @@
${pkgs.sway-contrib.grimshot}/bin/grimshot "$@" ${pkgs.sway-contrib.grimshot}/bin/grimshot "$@"
${pkgs.sway}/bin/swaymsg mode default ${pkgs.sway}/bin/swaymsg mode default
''; '';
bg-full-res = "${pkgs.lotte-art}/2022-06-21-sammythetanuki-lotteplushpride.jxl";
bg-1440p = pkgs.stdenvNoCC.mkDerivation {
name = "wayland-background-1440p.png";
nativeBuildInputs = [pkgs.imagemagick pkgs.libjxl];
src = pkgs.emptyDirectory;
buildPhase = ''
djxl ${bg-full-res} bg-full-res.png
convert bg-full-res.png -resize 2560x1440 $out
'';
installPhase = "true";
};
bg-1080p = pkgs.stdenvNoCC.mkDerivation {
name = "wayland-background-1080p.png";
nativeBuildInputs = [pkgs.imagemagick pkgs.libjxl];
src = pkgs.emptyDirectory;
buildPhase = ''
djxl ${bg-full-res} bg-full-res.png
convert bg-full-res.png -resize 1920x1080 $out
'';
installPhase = "true";
};
in { in {
imports = [ imports = [
./wl-clipboard.nix ./wl-clipboard.nix
@ -68,21 +47,16 @@ in {
}; };
}; };
output = { output = {
"eDP-1" = {
bg = "${bg-1080p} fill";
};
"DP-1" = { "DP-1" = {
mode = "2560x1440@74.971Hz"; mode = "2560x1440@74.971Hz";
position = "0 0"; position = "0 0";
subpixel = "rgb"; subpixel = "rgb";
adaptive_sync = "on"; adaptive_sync = "on";
bg = "${bg-1440p} fill";
}; };
"HDMI-A-1" = { "HDMI-A-1" = {
mode = "1920x1080@60Hz"; mode = "1920x1080@60Hz";
position = "2560 0"; position = "2560 0";
subpixel = "rgb"; subpixel = "rgb";
bg = "${bg-1080p} fill";
}; };
}; };
keybindings = let keybindings = let

View file

@ -1,12 +1,33 @@
{ {
pkgs, pkgs,
config, config,
colorpickle,
bg,
... ...
}: let }: let
theme = import ../../extra/theme.nix; theme = import ../../extra/theme.nix;
inherit (config.lib.formats.rasi) mkLiteral; inherit (config.lib.formats.rasi) mkLiteral;
rasiColor = c: mkLiteral (theme.cssColor c); color = n:
config.environment.graphical.colors.main."${builtins.toString n}";
color' = n: mkLiteral (color n);
bgPng = pkgs.stdenv.mkDerivation {
name = "bg.png";
src = pkgs.emptyDirectory;
nativeBuildInputs = [pkgs.imagemagick];
buildPhase = ''
convert ${bg} $out
'';
installPhase = "true";
};
in { in {
imports = [
colorpickle.nixosModules.default
];
environment.graphical.colorschemes.main = {
image = bgPng;
#params = ["--lighten" "0.1"];
};
wayland.windowManager.sway.config.output."*".bg = "${bgPng} fill";
dconf.settings."org/gnome/desktop/interface" = { dconf.settings."org/gnome/desktop/interface" = {
gtk-theme = "Breeze-Dark"; gtk-theme = "Breeze-Dark";
icon-theme = "breeze-dark"; icon-theme = "breeze-dark";
@ -52,27 +73,27 @@ in {
''; '';
}; };
programs.kitty.settings = with theme; { programs.kitty.settings = with theme; {
background_opacity = "0.9"; background_opacity = "0.85";
background = cssColor base; background = color 0;
foreground = cssColor text; foreground = color 15;
cursor = cssColor text; cursor = color 15;
selection_background = "#4f414c"; selection_background = "#4f414c";
color0 = cssColor surface1; color0 = color 0;
color1 = cssColor red; color1 = color 9;
color2 = cssColor green; color2 = color 10;
color3 = cssColor yellow; color3 = color 11;
color4 = cssColor blue; color4 = color 12;
color5 = cssColor pink; color5 = color 13;
color6 = cssColor teal; color6 = color 14;
color7 = cssColor subtext1; color7 = color 7;
color8 = cssColor surface2; color8 = color 8;
color9 = cssColor red; color9 = color 9;
color10 = cssColor green; color10 = color 10;
color11 = cssColor yellow; color11 = color 11;
color12 = cssColor blue; color12 = color 12;
color13 = cssColor pink; color13 = color 13;
color14 = cssColor teal; color14 = color 14;
color15 = cssColor subtext0; color15 = color 15;
}; };
# Taken from https://github.com/jakehamilton/dotfiles/blob/master/waybar/style.css # Taken from https://github.com/jakehamilton/dotfiles/blob/master/waybar/style.css
programs.waybar.style = with theme; '' programs.waybar.style = with theme; ''
@ -82,11 +103,12 @@ in {
font-size: 14px; font-size: 14px;
min-height: 24px; min-height: 24px;
font-family: "NotoSansDisplay Nerd Font", "Noto Sans Mono CJK JP"; font-family: "NotoSansDisplay Nerd Font", "Noto Sans Mono CJK JP";
color: ${cssColor base}; color: ${color 0};
} }
window#waybar { window#waybar {
background: transparent; background: transparent;
color: ${color 15};
opacity: 0.9; opacity: 0.9;
} }
@ -107,7 +129,8 @@ in {
margin-left: 12px; margin-left: 12px;
margin-bottom: 0; margin-bottom: 0;
border-radius: 24px; border-radius: 24px;
background: ${cssColor surface0}; background-color: ${color 0};
color: ${color 15};
transition: none; transition: none;
} }
@ -115,17 +138,17 @@ in {
transition: none; transition: none;
background: transparent; background: transparent;
font-size: 16px; font-size: 16px;
color: ${cssColor text}; color: ${color 15};
} }
#workspaces button.focused { #workspaces button.focused {
background: ${cssColor mauve}; background: ${color 13};
color: ${cssColor base}; color: ${color 0};
} }
#workspaces button:hover { #workspaces button:hover {
background: ${cssColor sapphire}; background: ${color 10};
color: ${cssColor base}; color: ${color 0};
} }
#mpd { #mpd {
@ -135,13 +158,13 @@ in {
padding-right: 16px; padding-right: 16px;
margin-bottom: 0; margin-bottom: 0;
border-radius: 24px; border-radius: 24px;
background: ${cssColor green}; background: ${color 2};
transition: none; transition: none;
} }
#mpd.disconnected, #mpd.disconnected,
#mpd.stopped { #mpd.stopped {
background: ${cssColor red}; background: ${color 4};
} }
#network { #network {
@ -152,7 +175,7 @@ in {
margin-bottom: 0; margin-bottom: 0;
border-radius: 24px; border-radius: 24px;
transition: none; transition: none;
background: ${cssColor mauve}; background: ${color 13};
} }
#pulseaudio { #pulseaudio {
@ -163,7 +186,7 @@ in {
margin-bottom: 0; margin-bottom: 0;
border-radius: 24px; border-radius: 24px;
transition: none; transition: none;
background: ${cssColor teal}; background: ${color 11};
} }
#temperature, #battery { #temperature, #battery {
@ -174,7 +197,7 @@ in {
margin-bottom: 0; margin-bottom: 0;
border-radius: 24px; border-radius: 24px;
transition: none; transition: none;
background: ${cssColor green}; background: ${color 2};
} }
#cpu, #backlight, #battery.warning { #cpu, #backlight, #battery.warning {
@ -185,7 +208,7 @@ in {
margin-bottom: 0; margin-bottom: 0;
border-radius: 24px; border-radius: 24px;
transition: none; transition: none;
background: ${cssColor yellow}; background: ${color 14};
} }
#memory, #battery.critical { #memory, #battery.critical {
@ -196,7 +219,7 @@ in {
margin-bottom: 0; margin-bottom: 0;
border-radius: 24px; border-radius: 24px;
transition: none; transition: none;
background: ${cssColor red}; background: ${color 12};
} }
#clock { #clock {
@ -208,19 +231,19 @@ in {
margin-bottom: 0; margin-bottom: 0;
border-radius: 26px; border-radius: 26px;
transition: none; transition: none;
background: ${cssColor surface0}; background: ${color 0};
color: ${cssColor text}; color: ${color 15};
} }
''; '';
wayland.windowManager.sway.extraConfig = with theme; '' wayland.windowManager.sway.extraConfig = with theme; ''
# target title bg text indicator border # target title bg text indicator border
client.focused ${cssColor pink} ${cssColor base} ${cssColor text} ${cssColor rosewater} ${cssColor pink} client.focused ${color 5} ${color 0} ${color 15} ${color 12} ${color 5}
client.focused_inactive ${cssColor mauve} ${cssColor base} ${cssColor text} ${cssColor rosewater} ${cssColor mauve} client.focused_inactive ${color 13} ${color 0} ${color 15} ${color 12} ${color 13}
client.unfocused ${cssColor mauve} ${cssColor base} ${cssColor text} ${cssColor rosewater} ${cssColor mauve} client.unfocused ${color 13} ${color 0} ${color 15} ${color 12} ${color 13}
client.urgent ${cssColor peach} ${cssColor base} ${cssColor peach} ${cssColor overlay0} ${cssColor peach} client.urgent ${color 14} ${color 0} ${color 14} ${color 8} ${color 14}
client.placeholder ${cssColor overlay0} ${cssColor base} ${cssColor text} ${cssColor overlay0} ${cssColor overlay0} client.placeholder ${color 8} ${color 0} ${color 15} ${color 8} ${color 8}
client.background ${cssColor base} client.background ${color 0}
seat seat0 xcursor_theme breeze-dark 24 seat seat0 xcursor_theme breeze-dark 24
''; '';
home.packages = with pkgs; [libsForQt5.breeze-icons libsForQt5.qt5ct vanilla-dmz]; home.packages = with pkgs; [libsForQt5.breeze-icons libsForQt5.qt5ct vanilla-dmz];
@ -232,14 +255,14 @@ in {
}; };
in { in {
"*" = { "*" = {
bg-col = rasiColor base; bg-col = color' 0;
bg-col-light = rasiColor base; bg-col-light = color' 0;
border-col = rasiColor base; border-col = color' 0;
selected-col = rasiColor base; selected-col = color' 0;
blue = rasiColor blue; blue = color' 1;
fg-col = rasiColor text; fg-col = color' 15;
fg-col2 = rasiColor red; fg-col2 = color' 12;
grey = rasiColor overlay0; grey = color' 8;
width = 600; width = 600;
}; };
element-text = element; element-text = element;

View file

@ -1,5 +1,9 @@
{lib, pkgs, config, ...}: { {
lib,
pkgs,
config,
...
}: {
imports = [../../modules/wordpress.nix]; imports = [../../modules/wordpress.nix];
services.mysql = { services.mysql = {
enable = true; enable = true;
@ -21,7 +25,7 @@
useACMEHost = "chir.rs"; useACMEHost = "chir.rs";
logFormat = lib.mkForce ""; logFormat = lib.mkForce "";
extraConfig = '' extraConfig = ''
import baseConfig import baseConfig
''; '';
}; };
} }

View file

@ -257,6 +257,32 @@
"type": "github" "type": "github"
} }
}, },
"colorpickle": {
"inputs": {
"naersk": [
"naersk"
],
"nixpkgs": [
"nixpkgs"
],
"utils": [
"flake-utils"
]
},
"locked": {
"lastModified": 1682020898,
"narHash": "sha256-XYSSFmqIjsvmgusWaOSD/WeaTyH8o83i+qma1BQgARU=",
"owner": "AgathaSorceress",
"repo": "colorpickle",
"rev": "2574b83cb0454a146a0346bf0d6a134d62241e60",
"type": "github"
},
"original": {
"owner": "AgathaSorceress",
"repo": "colorpickle",
"type": "github"
}
},
"crane": { "crane": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
@ -1281,6 +1307,27 @@
"type": "github" "type": "github"
} }
}, },
"naersk": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1679567394,
"narHash": "sha256-ZvLuzPeARDLiQUt6zSZFGOs+HZmE+3g4QURc8mkBsfM=",
"owner": "nix-community",
"repo": "naersk",
"rev": "88cd22380154a2c36799fe8098888f0f59861a15",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "naersk",
"type": "github"
}
},
"nix": { "nix": {
"inputs": { "inputs": {
"lowdown-src": "lowdown-src", "lowdown-src": "lowdown-src",
@ -1903,6 +1950,7 @@
"attic": "attic", "attic": "attic",
"cargo2nix": "cargo2nix", "cargo2nix": "cargo2nix",
"chir-rs": "chir-rs", "chir-rs": "chir-rs",
"colorpickle": "colorpickle",
"crane": "crane", "crane": "crane",
"dns": "dns", "dns": "dns",
"emanote": "emanote", "emanote": "emanote",
@ -1912,6 +1960,7 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"hosts-list": "hosts-list", "hosts-list": "hosts-list",
"hydra": "hydra", "hydra": "hydra",
"naersk": "naersk",
"nix-neovim": "nix-neovim", "nix-neovim": "nix-neovim",
"nix-packages": "nix-packages", "nix-packages": "nix-packages",
"nixos-config-for-netboot": "nixos-config-for-netboot", "nixos-config-for-netboot": "nixos-config-for-netboot",

View file

@ -24,6 +24,12 @@ rec {
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-overlay.follows = "rust-overlay"; inputs.rust-overlay.follows = "rust-overlay";
}; };
colorpickle = {
url = "github:AgathaSorceress/colorpickle";
inputs.naersk.follows = "naersk";
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "flake-utils";
};
crane = { crane = {
url = "github:DarkKirb/crane"; url = "github:DarkKirb/crane";
inputs.flake-utils.follows = "flake-utils"; inputs.flake-utils.follows = "flake-utils";
@ -60,6 +66,10 @@ rec {
#inputs.nix.follows = "nix"; #inputs.nix.follows = "nix";
#inputs.nixpkgs.follows = "nixpkgs"; #inputs.nixpkgs.follows = "nixpkgs";
}; };
naersk = {
url = "github:nix-community/naersk/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-neovim = { nix-neovim = {
url = "github:syberant/nix-neovim"; url = "github:syberant/nix-neovim";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

File diff suppressed because it is too large Load diff