This commit is contained in:
Chris Kruining 2024-07-23 22:34:30 +02:00
parent e01ffa4cec
commit becdaee408
8 changed files with 276 additions and 18 deletions

200
flake.lock generated
View file

@ -114,7 +114,60 @@
"type": "github"
}
},
"cachix": {
"locked": {
"lastModified": 1635350005,
"narHash": "sha256-tAMJnUwfaDEB2aa31jGcu7R7bzGELM9noc91L2PbVjg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1c1f5649bb9c1b0d98637c8c365228f57126f361",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-20.09",
"repo": "nixpkgs",
"type": "github"
}
},
"firefox": {
"inputs": {
"cachix": "cachix",
"flake-compat": "flake-compat",
"lib-aggregate": "lib-aggregate",
"mozilla": "mozilla",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1721747953,
"narHash": "sha256-Hi52gEZtG3JI32a5sog5V3UU8JTaZvFrgvPsfRFqj7c=",
"owner": "nix-community",
"repo": "flake-firefox-nightly",
"rev": "bf9389c41d3d7ed58260ffd044fd6c0c1f85ca23",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-firefox-nightly",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
@ -130,6 +183,24 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "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": {
@ -204,13 +275,48 @@
"type": "github"
}
},
"lib-aggregate": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1721563874,
"narHash": "sha256-xsiynNj2qUbssiD5m+8ftWrGQflyOo5C4lPbqragiMc=",
"owner": "nix-community",
"repo": "lib-aggregate",
"rev": "e0ea775feda9f162a153ee1ca8d93367dd0ee028",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "lib-aggregate",
"type": "github"
}
},
"mozilla": {
"flake": false,
"locked": {
"lastModified": 1704373101,
"narHash": "sha256-+gi59LRWRQmwROrmE1E2b3mtocwueCQqZ60CwLG+gbg=",
"owner": "mozilla",
"repo": "nixpkgs-mozilla",
"rev": "9b11a87c0cc54e308fa83aac5b4ee1816d5418a2",
"type": "github"
},
"original": {
"owner": "mozilla",
"repo": "nixpkgs-mozilla",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1721379653,
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
"lastModified": 1721562059,
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe",
"type": "github"
},
"original": {
@ -220,6 +326,21 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1721523216,
"narHash": "sha256-/NjnIKkBoqKdvOS8unooDg0HqMaRUwYLbyn0ntjEckQ=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "31a99025ce3784c20dd11dafa5260e80e314f59e",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1721379653,
@ -237,6 +358,38 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1721379653,
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1718428119,
"narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1714912032,
"narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=",
@ -254,12 +407,32 @@
},
"root": {
"inputs": {
"firefox": "firefox",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable",
"rust": "rust",
"stylix": "stylix"
}
},
"rust": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1721701191,
"narHash": "sha256-nM4szL90VeZHZEC5rFfaiiPNTVOmsihdtk2QSP1l37I=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "4674ff2c2e5423a0cebe16e61aa874c359306af4",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
@ -269,10 +442,10 @@
"base16-kitty": "base16-kitty",
"base16-tmux": "base16-tmux",
"base16-vim": "base16-vim",
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1721478802,
@ -287,6 +460,21 @@
"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"
}
}
},
"root": "root",

View file

@ -10,7 +10,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
firefox.url = "github:nix-community/flake-firefox-nightly";
stylix.url = "github:danth/stylix";
rust.url = "github:oxalica/rust-overlay";
};
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, ... }:

View file

@ -1,11 +1,5 @@
{
inputs,
options,
config,
lib,
pkgs,
...
}: let
{ inputs, options, config, lib, pkgs, ... }:
let
inherit (builtins) toJSON;
inherit (lib.attrsets) attrValues mapAttrsToList;
inherit (lib.modules) mkIf mkMerge;

View file

@ -13,9 +13,11 @@ in
config = mkMerge [
(mkIf config.modules.develop.rust.enable {
nixpkgs.overlays = [inputs.rust.overlays.default];
user.packages = attrValues {
rust-package = pkgs.rust-bin.nightly.latest.default;
inherit (pkgs) rust-analyser rust-script;
rust-package = pkgs.rust-bin.stable.latest.default;
inherit (pkgs) rust-analyzer rust-script;
};
environment.shellAliases = {

View file

@ -15,7 +15,7 @@ in
gtk = {
name = "everforrest-Dark-BL";
package = pkgs.my.everforrest-gtk;
# package = pkgs.my.everforrest-gtk;
};
iconTheme = {

View file

@ -12,7 +12,7 @@ in
enable = mkEnableOption "enable podman";
};
config = mkIf options.modules.virtualisation.podman.enable {
config = mkIf config.modules.virtualisation.podman.enable {
virtualisation = {
containers.enable = true;

View file

View file

@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchFromGitHub,
gtk-engine-murrine,
jdupes,
sassc,
accent ? ["default"],
shade ? "dark",
size ? "standard",
}: let
validAccents = ["default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey"];
validShades = ["light" "dark"];
validSizes = ["standard" "compact"];
single = x: lib.optional (x != null) x;
pname = "Everforrest";
in
lib.checkListOfEnum "${pname} Valid theme accent(s)" validAccents accent
lib.checkListOfEnum "${pname} Valid shades" validShades (single shade)
lib.checkListOfEnum "${pname} Valid sizes" validSizes (single size)
stdenv.mkDerivation {
pname = "${pname}";
version = "0-unstable-2024-06-27";
src = fetchFromGitHub {
owner = "Fausto-Korpsvart";
repo = "Everforrest-GTK-Theme";
rev = "bb3fc27a2468f0965a738d9d3b30c52a799572d2";
# hash = "sha256-oKqLb66N4swHfhjUZJIGryE0D9MkuLdKFQa6j3TFmOg=";
};
nativeBuildInputs = [jdupes sassc];
propagatedUserEnvPkgs = [gtk-engine-murrine];
postPatch = ''
find -name "*.sh" -print0 | while IFS= read -r -d ''' file; do
patchShebangs "$file"
done
'';
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/themes
./themes/install.sh \
--name ${pname} \
${toString (map (x: "--theme " + x) accent)} \
${lib.optionalString (shade != null) ("--color " + shade)} \
${lib.optionalString (size != null) ("--size " + size)} \
--dest $out/share/themes
jdupes --quiet --link-soft --recurse $out/share
runHook postInstall
'';
meta = with lib; {
description = "A GTK theme based on the Everforrest colour palette";
homepage = "https://github.com/Fausto-Korpsvart/Everforrest-GTK-Theme";
license = licenses.gpl3Only;
# maintainers = with maintainers; [ icy-thought ];
platforms = platforms.all;
};
}