Skip to content

Commit

Permalink
global: replace fetchers with flake inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
brckd committed Mar 29, 2024
1 parent 7b87253 commit a0bb0d4
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 93 deletions.
138 changes: 61 additions & 77 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 24 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,19 @@
};

inputs = {
# Systems
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

# Systems
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};

nix-darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};

nix-on-droid = {
url = "github:nix-community/nix-on-droid/prerelease-23.11";
inputs.nixpkgs.follows = "nixpkgs";
Expand All @@ -101,16 +106,28 @@

flake-compat.url = "github:edolstra/flake-compat";

flake-utils.url = "github:numtide/flake-utils";

# Formatter
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};

pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
inputs.flake-utils.follows = "flake-utils";
};

# Scheming
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
inputs.home-manager.follows = "home-manager";
};

# Programs
Expand All @@ -119,7 +136,9 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
inputs.flake-parts.follows = "flake-parts";
inputs.pre-commit-hooks.follows = "pre-commit-hooks";
inputs.home-manager.follows = "home-manager";
inputs.nix-darwin.follows = "nix-darwin";
};

ags = {
Expand All @@ -137,6 +156,10 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
};

# Assets
wallpaper.url = "file+https://raw.githubusercontent.com/zhichaoh/catppuccin-wallpapers/main/misc/rainbow-cat.png";
nixos-symbolic.url = "file+https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/white.svg";
};

nixConfig = {
Expand Down
7 changes: 2 additions & 5 deletions modules/home/ags/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
config,
lib,
pkgs,
nixos-symbolic,
...
}:
with lib; let
Expand All @@ -20,9 +20,6 @@ in {
(color: "@define-color ${color} ${colors.withHashtag.${color}};")
colorNames;

xdg.configFile."ags/src/assets/nixos-symbolic.svg".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/35ebbbf01c3119005ed180726c388a01d4d1100c/logo/white.svg";
hash = "sha256-Ed2l6i2wi/YTcWCq23bspH/t3RYp6AodykpXF1Zgccw=";
};
xdg.configFile."ags/src/assets/nixos-symbolic.svg".source = nixos-symbolic;
};
}
11 changes: 6 additions & 5 deletions modules/home/stylix/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{pkgs, ...}: {
{
pkgs,
wallpaper,
...
}: {
config = {
stylix = {
# placeholder
image = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/zhichaoh/catppuccin-wallpapers/1023077979591cdeca76aae94e0359da1707a60e/misc/rainbow-cat.png";
hash = "sha256-WP+kQ7mgjpeekatDEPSP/XeDc5ZihCm+BxgqgwYDIEU=";
};
image = wallpaper;

base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
fonts = rec {
Expand Down
11 changes: 6 additions & 5 deletions modules/nixos/stylix/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{pkgs, ...}: {
{
pkgs,
wallpaper,
...
}: {
config = {
stylix = {
image = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/zhichaoh/catppuccin-wallpapers/1023077979591cdeca76aae94e0359da1707a60e/misc/rainbow-cat.png";
hash = "sha256-WP+kQ7mgjpeekatDEPSP/XeDc5ZihCm+BxgqgwYDIEU=";
};
image = wallpaper;
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
fonts = rec {
sansSerif = {
Expand Down

0 comments on commit a0bb0d4

Please sign in to comment.