commit weird workaround for git lfs
(will probably revert)
This commit is contained in:
parent
1240255e59
commit
c89f6709f4
19
flake.lock
generated
19
flake.lock
generated
@ -1,6 +1,22 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709944340,
|
||||||
|
"narHash": "sha256-xr54XK0SjczlUxRo5YwodibUSlpivS9bqHt8BNyWVQA=",
|
||||||
|
"owner": "9999years",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "baa7aa7bd0a570b3b9edd0b8da859fee3ffaa4d4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "9999years",
|
||||||
|
"ref": "baa7aa7",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_2": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
@ -259,7 +275,7 @@
|
|||||||
},
|
},
|
||||||
"nix-wsl": {
|
"nix-wsl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@ -368,6 +384,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"home-manager-unstable": "home-manager-unstable",
|
"home-manager-unstable": "home-manager-unstable",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
|
31
flake.nix
31
flake.nix
@ -47,6 +47,9 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# edolstra/flake-compat#64
|
||||||
|
flake-compat.url = "github:9999years/flake-compat/baa7aa7";
|
||||||
|
|
||||||
nixfiles-assets = {
|
nixfiles-assets = {
|
||||||
# using self-hosted gitea mirror because of GitHub LFS bandwidth limit (even though i'd probably never hit it)
|
# using self-hosted gitea mirror because of GitHub LFS bandwidth limit (even though i'd probably never hit it)
|
||||||
type = "git";
|
type = "git";
|
||||||
@ -63,6 +66,31 @@
|
|||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
|
||||||
|
# absolutely grotesque workaround for NixOS/nix#4623
|
||||||
|
nixfiles-assets-grotesque-lfs-workaround = eachSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
# we have to define a flake-compat version of this flake because
|
||||||
|
# referencing an input directly seems to evaluate it when we only want
|
||||||
|
# the narHash from flake.lock
|
||||||
|
self-fc = (import inputs.flake-compat {src = ./.; inherit system; }).defaultNix;
|
||||||
|
srcWithLFS = pkgs.fetchgit {
|
||||||
|
inherit (self-fc.inputs.nixfiles-assets) rev;
|
||||||
|
|
||||||
|
# flake inputs don't expose the URL for some reason so we have to define it again here
|
||||||
|
url = "https://gitea.protogen.io/nullbite/nixfiles-assets";
|
||||||
|
|
||||||
|
# you need to run `nix flake update` on a user with Git LFS already
|
||||||
|
# configured (i am assuming?? it seems to work if i lock the flake as
|
||||||
|
# my current user but not root, which doesn't have LFS configured)
|
||||||
|
hash = self-fc.inputs.nixfiles-assets.narHash;
|
||||||
|
fetchLFS = true;
|
||||||
|
};
|
||||||
|
trace = builtins.trace "warning: we're still using this awful LFS workaround";
|
||||||
|
in
|
||||||
|
trace (import inputs.flake-compat { src = srcWithLFS; inherit system; }).defaultNix
|
||||||
|
);
|
||||||
|
|
||||||
overlays = [
|
overlays = [
|
||||||
/* android-tools 33.0.3p2 */ (final: prev: {
|
/* android-tools 33.0.3p2 */ (final: prev: {
|
||||||
inherit (inputs.pkg-android-tools.legacyPackages.${final.system})
|
inherit (inputs.pkg-android-tools.legacyPackages.${final.system})
|
||||||
@ -80,7 +108,8 @@
|
|||||||
|
|
||||||
inputs.hyprwm-contrib.overlays.default
|
inputs.hyprwm-contrib.overlays.default
|
||||||
inputs.rust-overlay.overlays.default
|
inputs.rust-overlay.overlays.default
|
||||||
inputs.nixfiles-assets.overlays.default
|
# inputs.nixfiles-assets.overlays.default
|
||||||
|
(final: prev: { inherit (nixfiles-assets-grotesque-lfs-workaround.${prev.system}.packages.${prev.system}) nixfiles-assets; })
|
||||||
];
|
];
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user