treewide: remove runtime fetch operations (#224)

Fixes #222
This commit is contained in:
NAHO 2024-02-07 12:03:02 +01:00 committed by GitHub
parent ccca01b5b0
commit a2d8d6b460
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 79 additions and 48 deletions

View file

@ -179,6 +179,23 @@
"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": {
"inputs": {
"nixpkgs": [
@ -227,6 +244,7 @@
"base16-tmux": "base16-tmux",
"base16-vim": "base16-vim",
"flake-compat": "flake-compat",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}

View file

@ -1,52 +1,68 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
base16-alacritty = {
flake = false;
url = "github:aarowill/base16-alacritty";
};
base16-alacritty-yaml = {
flake = false;
url = "github:aarowill/base16-alacritty/63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7";
};
base16-fish = {
flake = false;
url = "github:tomyun/base16-fish";
};
base16-foot = {
flake = false;
url = "github:tinted-theming/base16-foot";
};
base16-helix = {
flake = false;
url = "github:tinted-theming/base16-helix";
};
base16-tmux = {
flake = false;
url = "github:tinted-theming/base16-tmux";
};
base16-kitty = {
flake = false;
url = "github:kdrag0n/base16-kitty";
};
base16-vim = {
flake = false;
url = "github:chriskempson/base16-vim";
};
base16.url = "github:SenchoPens/base16.nix";
# Used for documentation
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
url = "github:edolstra/flake-compat";
};
# Templates
base16-alacritty = {
url = "github:aarowill/base16-alacritty";
gnome-shell = {
flake = false;
# TODO: Unlocking the input and pointing to official repository requires
# updating the patch:
# https://github.com/danth/stylix/pull/224#discussion_r1460339607.
url = "github:GNOME/gnome-shell/45.1";
};
base16-alacritty-yaml = {
url = "github:aarowill/base16-alacritty/63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7";
flake = false;
};
base16-fish = {
url = "github:tomyun/base16-fish";
flake = false;
};
base16-foot = {
url = "github:tinted-theming/base16-foot";
flake = false;
};
base16-helix = {
url = "github:tinted-theming/base16-helix";
flake = false;
};
base16-kitty = {
url = "github:kdrag0n/base16-kitty";
flake = false;
};
base16-tmux = {
url = "github:tinted-theming/base16-tmux";
flake = false;
};
base16-vim = {
url = "github:chriskempson/base16-vim";
flake = false;
# The 'home-manager' input is used to generate the documentation.
home-manager = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs =

View file

@ -1,4 +1,4 @@
{ pkgs, config, ... }:
{ config, pkgs, ... }:
let
colors = config.lib.stylix.colors {
@ -8,15 +8,7 @@ let
in pkgs.stdenv.mkDerivation {
name = "${config.lib.stylix.colors.slug}-gnome-shell-theme";
src = pkgs.fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = "gnome-shell";
rev = "45.1";
sha256 = "/TIkZ8y5Wv3QHLFp79Poao9fINurKs5pa4z0CRe+F8s=";
};
src = config.lib.stylix.templates.gnome-shell;
patches = [ ./shell_colors.patch ];
postPatch = ''
rm data/theme/gnome-shell-sass/{_colors.scss,_palette.scss}

View file

@ -59,6 +59,10 @@ in {
description = mdDoc "Logo to be used on the boot screen.";
type = with types; either path package;
defaultText = literalMD "NixOS logo";
# Considering that Flake inputs are currently unable to fetch individual
# files, the SVG file is fetched with `pkgs.fetchurl` to avoid downloading
# the entire repository for a single SVG file.
default = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nix-snowflake.svg";
# Reduce size

View file

@ -10,6 +10,7 @@ inputs:
base16-kitty
base16-tmux
base16-vim
gnome-shell
;
};
}