forked from pub-solar/pub.solar
chore: update to flake-parts
This commit is contained in:
parent
066eca37b9
commit
1fe7f3e9ef
120
flake.lock
120
flake.lock
|
@ -1,41 +1,20 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"devshell": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687944744,
|
"lastModified": 1696343447,
|
||||||
"narHash": "sha256-4ZtRVG/5yWHPZpkit1Ak5Mo1DDnkx1AG1HpNu/P+n5U=",
|
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
|
||||||
"owner": "numtide",
|
"owner": "hercules-ci",
|
||||||
"repo": "devshell",
|
"repo": "flake-parts",
|
||||||
"rev": "3864857b2754ab0e16c7c7c626f0e5a1d4e42f38",
|
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "hercules-ci",
|
||||||
"repo": "devshell",
|
"repo": "flake-parts",
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1687709756,
|
|
||||||
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -55,69 +34,28 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"dir": "lib",
|
||||||
|
"lastModified": 1696019113,
|
||||||
|
"narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"dir": "lib",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"devshell": "devshell",
|
"flake-parts": "flake-parts",
|
||||||
"flake-utils": "flake-utils",
|
"nixpkgs": "nixpkgs"
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"tritonshell-module": "tritonshell-module"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tritonshell-module": {
|
|
||||||
"inputs": {
|
|
||||||
"devshell": [
|
|
||||||
"devshell"
|
|
||||||
],
|
|
||||||
"flake-utils": [
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1686817625,
|
|
||||||
"narHash": "sha256-UUt00+BuPiqBv5it8eG99KLWVa7F392PPt52TPO20Zs=",
|
|
||||||
"ref": "main",
|
|
||||||
"rev": "c2280bb09683372f2f482bea3a8bd1112cf990e7",
|
|
||||||
"revCount": 62,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.greenbaum.cloud/dev/tritonshell"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"ref": "main",
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.greenbaum.cloud/dev/tritonshell"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
67
flake.nix
67
flake.nix
|
@ -3,56 +3,39 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
|
|
||||||
devshell.url = "github:numtide/devshell";
|
|
||||||
devshell.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
tritonshell-module.url = "git+https://git.greenbaum.cloud/dev/tritonshell?ref=main";
|
|
||||||
tritonshell-module.inputs.devshell.follows = "devshell";
|
|
||||||
tritonshell-module.inputs.flake-utils.follows = "flake-utils";
|
|
||||||
tritonshell-module.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, flake-utils, devshell, tritonshell-module, nixpkgs }:
|
outputs = inputs@{ self, ... }:
|
||||||
flake-utils.lib.simpleFlake {
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
inherit self nixpkgs;
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
name = "infra-project";
|
|
||||||
preOverlays = [ devshell.overlays.default ];
|
|
||||||
shell = { pkgs }:
|
|
||||||
let
|
|
||||||
google-font-downloader = pkgs.writeShellScriptBin "google-font-downloader" ''
|
|
||||||
echo "Attempting to fetch $1"
|
|
||||||
${pkgs.nodejs}/bin/npx google-font-downloader -- $1
|
|
||||||
rm ./_includes/styles/typography.scss || true
|
|
||||||
echo "/* To regenerate this file, run $ google-font-downloader '$1' */" >> ./_includes/styles/typography.scss
|
|
||||||
echo "" >> ./_includes/styles/stypography.scss
|
|
||||||
cat ./google-fonts-*.css >> ./_includes/styles/typography.scss
|
|
||||||
rm ./google-fonts-*.css || true
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
pkgs.devshell.mkShell {
|
|
||||||
imports = [ tritonshell-module.devshellModules.x86_64-linux.tritonshell ];
|
|
||||||
# Now the tritonshell environment nix module options are available
|
|
||||||
environment = {
|
|
||||||
enable = true;
|
|
||||||
# CUSTOMIZE if desired, default options are:
|
|
||||||
#cnsBaseDomain = "greenbaum.zone";
|
|
||||||
#dataCenters = [ "cgn-1" "lev-1" ];
|
|
||||||
#mantaDomain = "eu-central.manta.greenbaum.cloud";
|
|
||||||
#tritonApiDomain = "api.greenbaum.cloud";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Add additional packages you'd like to be available in your devshell
|
perSystem = { system, pkgs, config, ... }: {
|
||||||
# PATH here
|
_module.args = {
|
||||||
devshell.packages = with pkgs; [
|
inherit inputs;
|
||||||
|
pkgs = import inputs.nixpkgs { inherit system; };
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.default = let
|
||||||
|
google-font-downloader = pkgs.writeShellScriptBin "google-font-downloader" ''
|
||||||
|
echo "Attempting to fetch $1"
|
||||||
|
${pkgs.nodejs}/bin/npx google-font-downloader -- $1
|
||||||
|
rm ./_includes/styles/typography.scss || true
|
||||||
|
echo "/* To regenerate this file, run $ google-font-downloader '$1' */" >> ./_includes/styles/typography.scss
|
||||||
|
echo "" >> ./_includes/styles/stypography.scss
|
||||||
|
cat ./google-fonts-*.css >> ./_includes/styles/typography.scss
|
||||||
|
rm ./google-fonts-*.css || true
|
||||||
|
'';
|
||||||
|
in pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
deno
|
deno
|
||||||
google-font-downloader
|
google-font-downloader
|
||||||
];
|
];
|
||||||
bash.extra = ''
|
|
||||||
|
shellHook = ''
|
||||||
export NVIM_USE_DENOLS=1
|
export NVIM_USE_DENOLS=1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue