current state of things

This commit is contained in:
atagen 2025-06-18 01:06:36 +10:00
parent 63fbd6d499
commit b8d157ab6f
85 changed files with 895 additions and 6014 deletions

View file

@ -1,47 +0,0 @@
{
system,
inputs,
sharedModules,
...
}:
with inputs;
let
nix-rice = import "${inputs.nix-rice}/lib.nix" {
inherit (nixpkgs) lib;
kitty-themes-src = { };
};
rice = import ./rice.nix { inherit system nixpkgs nix-rice; };
in
{
systems =
definitions:
nixpkgs.lib.mapAttrs (
name: info:
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs rice nix-rice;
mainUser = info.user;
};
modules =
[
../system/${name}.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs rice nix-rice;
mainUser = info.user;
};
users.${info.user}.imports = [
../home/${info.user}.nix
] ++ info.hmImports or [ ];
};
}
]
++ info.imports or [ ]
++ sharedModules;
}
) definitions;
}

7
util/get-modules.nix Normal file
View file

@ -0,0 +1,7 @@
{ inputs }:
let
inherit (inputs.nixpkgs) lib;
in
l:
lib.filterAttrs (_: v: builtins.elem v l) inputs
|> lib.mapAttrsToList (n: v: v.nixosModules.${n} or v.nixosModules.default)

View file

@ -1,70 +0,0 @@
{ pkgs }:
{ palette }:
let
rendersvg = pkgs.runCommand "rendersvg" { } ''
mkdir -p $out/bin
ln -s ${pkgs.resvg}/bin/resvg $out/bin/rendersvg
'';
in
pkgs.stdenv.mkDerivation rec {
name = "generated-gtk-theme-nix-rice";
src = pkgs.fetchFromGitHub {
owner = "nana-4";
repo = "materia-theme";
rev = "d7f59a37ef51f893c28b55dc344146e04b2cd52c";
sha256 = "sha256-PnpFAmKEpfg3wBwShLYviZybWQQltcw7fpsQkTUZtww=";
};
buildInputs = with pkgs; [
sassc
bc
which
rendersvg
meson
ninja
nodePackages.sass
gtk4.dev
optipng
];
phases = [
"unpackPhase"
"installPhase"
];
installPhase = ''
HOME=/build
chmod 777 -R .
patchShebangs .
mkdir -p $out/share/themes
mkdir bin
sed -e 's/handle-horz-.*//' -e 's/handle-vert-.*//' -i ./src/gtk-2.0/assets.txt
cat > /build/gtk-colors << EOF
BTN_BG=${palette.util.bg}
BTN_FG=${palette.bright.yellow}
FG=${palette.util.fg}
BG=${palette.util.bg}
HDR_BTN_BG=${palette.util.bg}
HDR_BTN_FG=${palette.util.fg}
ACCENT_BG=${palette.normal.cyan}
ACCENT_FG=${palette.normal.yellow}
HDR_FG=${palette.bright.yellow}
HDR_BG=${palette.util.bg}
MATERIA_SURFACE=${palette.normal.black}
MATERIA_VIEW=${palette.bright.black}
MENU_BG=${palette.util.bg}
MENU_FG=${palette.util.fg}
SEL_BG=${palette.normal.yellow}
SEL_FG=${palette.normal.cyan}
TXT_BG=${palette.util.bg}
TXT_FG=${palette.util.fg}
WM_BORDER_FOCUS=${palette.normal.yellow}
WM_BORDER_UNFOCUS=${palette.normal.black}
UNITY_DEFAULT_LAUNCHER_STYLE=False
NAME="nix-rice"
MATERIA_STYLE_COMPACT=False
EOF
echo "Changing colours:"
./change_color.sh -o nix-rice /build/gtk-colors -i False -t "$out/share/themes"
chmod 555 -R .
'';
}

View file

@ -1,9 +0,0 @@
{
inputs,
...
}:
{
rice = import ./rice.nix;
inherit (inputs.comfyui.overlays) comfyui;
inherit (inputs.comfyui-plugins.overlays) comfyui-plugins;
}

View file

@ -1,140 +0,0 @@
{
nixpkgs,
nix-rice,
system,
...
}:
let
pkgs = nixpkgs.legacyPackages.${system};
inherit (nix-rice) kitty-themes;
inherit (nix-rice.palette) toRGBShortHex;
theme = kitty-themes.parseTheme ./pal.conf;
in
rec {
palette = {
normal = {
black = theme.color0;
red = theme.color1;
green = theme.color2;
yellow = theme.color3;
blue = theme.color4;
magenta = theme.color5;
cyan = theme.color6;
white = theme.color7;
};
bright = {
black = theme.color8;
red = theme.color9;
green = theme.color10;
yellow = theme.color11;
blue = theme.color12;
magenta = theme.color13;
cyan = theme.color14;
white = theme.color15;
};
util = {
fg = theme.foreground;
bg = theme.background;
fg_sel = theme.selection_foreground;
bg_sel = theme.selection_background;
inherit (theme) cursor;
# url = theme.url_color;
};
} // theme;
fonts =
let
sans = {
name = "Inria Sans";
size = 12;
package = pkgs.inriafonts;
};
serif = {
name = "Inria Serif";
size = 12;
package = pkgs.inriafonts;
};
monospace = {
name = "Fira Code";
size = 10;
package = pkgs.fira-code;
};
emoji = {
name = "Twitter Color Emoji";
size = 12;
package = pkgs.twemoji-color-font;
};
in
{
inherit
sans
serif
monospace
emoji
;
pkgs = [
sans.package
serif.package
monospace.package
emoji.package
pkgs.meslo-lgs-nf
];
};
icons =
let
package = pkgs.papirus-icon-theme;
in
{
inherit package;
name = "Papirus-Dark";
pkgs = [
package
# material-icons
# material-design-icons
];
};
gtk-theme = {
name = "nix-rice";
package = pkgs.callPackage ./gtk-theme.nix { } { palette = toRGBShortHex palette; };
};
borders = {
thickness = 6;
rounding = 0;
gaps_in = 16;
gaps_out = 72;
};
bg = {
image = pkgs.callPackage ./wallpaper.nix { } {
palette = toRGBShortHex palette;
wallpaper = builtins.path rec {
name = "wallpaper.jpg";
path = ../${name};
sha256 = "2db3f9d0397fbd4746ada297bd14c0c7d3e22c7d4e894968fcfece90bbfb902a";
};
};
};
cursor = {
package = pkgs.afterglow-cursors-recolored.override {
themeVariants = [ "Dracula" ];
draculaColorVariants = [ "Orange" ];
};
name = "Afterglow-Recolored-Dracula-Orange";
};
plymouth =
let
theme = "spinner_alt";
in
{
inherit theme;
font = "${fonts.sans.package}/share/fonts/truetype/InriaSans-Regular.ttf";
themePackages = [
(pkgs.adi1090x-plymouth-themes.override { selected_themes = [ theme ]; })
];
};
}

View file

@ -1,29 +0,0 @@
{ pkgs, lib }:
{
palette,
wallpaper,
}:
let
str_pal =
let
inherit (lib) concatStringsSep;
inherit (builtins) foldl' attrValues;
in
concatStringsSep " " (
foldl' (acc: el: acc ++ (attrValues el)) [ ] [ palette.normal palette.bright palette.util ]
);
in
pkgs.stdenv.mkDerivation {
name = "generated-wallpaper.png";
src = wallpaper;
buildInputs = [
pkgs.lutgen
];
phases = [ "installPhase" ];
installPhase = ''
echo -e "Generating wallpaper from ${wallpaper} using palette:\n${str_pal}.."
${pkgs.lib.getExe pkgs.lutgen} apply --lum 0.8 -l 10 -s 128 -n 8 -o $out ${wallpaper} -- ${str_pal}
'';
}