mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat: overlays + pkgs
This commit is contained in:
parent
bed84b16b0
commit
5da80d3c52
17 changed files with 210 additions and 91 deletions
|
|
@ -3,6 +3,7 @@
|
|||
tree,
|
||||
inputs,
|
||||
std,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (std) set;
|
||||
|
|
@ -10,9 +11,9 @@ in
|
|||
inputs.utils.lib.eachDefaultSystem (system: {
|
||||
devShells = let
|
||||
shells = set.map (_: path:
|
||||
import path rec {
|
||||
import path {
|
||||
inherit tree inputs system lib std;
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
pkgs = pkgs.${system};
|
||||
})
|
||||
tree.shells;
|
||||
in
|
||||
|
|
|
|||
|
|
@ -5,20 +5,33 @@
|
|||
...
|
||||
}:
|
||||
with pkgs; let
|
||||
repo = import ../outputs.nix { inherit inputs; };
|
||||
inherit (std) set list;
|
||||
repo = import ../outputs.nix {inherit inputs;};
|
||||
inherit (std) set;
|
||||
repoShell = mkShell {
|
||||
nativeBuildInputs =
|
||||
[
|
||||
fd # fd, better fine!
|
||||
ripgrep # rg, better grep!
|
||||
go # Required for pulumi
|
||||
pulumi-bin # Infrastructure as code
|
||||
deadnix # dead-code scanner
|
||||
alejandra # code formatter
|
||||
statix # anti-pattern finder
|
||||
deploy-rs.deploy-rs # deployment system
|
||||
]
|
||||
++ set.values (set.map (name: _: (pkgs.writeShellScriptBin "${name}-rebuild" ''
|
||||
darwin-rebuild switch --flake $REPO_ROOT#${name}
|
||||
''))
|
||||
repo.darwinConfigurations);
|
||||
darwin-rebuild switch --flake $REPO_ROOT#${name}
|
||||
''))
|
||||
repo.darwinConfigurations);
|
||||
shellHook = ''
|
||||
echo -e "\e[39m\e[1m$USER@$REPO_HOSTNAME - \e[35m''$(realpath --relative-to=../ ./nixos/)\e[0m"
|
||||
echo -e "\e[35mRunning alejandra\e[0m"
|
||||
alejandra -cq $(fd -e nix)
|
||||
echo -e "\e[35mRunning statix\e[0m"
|
||||
statix check
|
||||
echo -e "\e[35mRunning deadnix\e[0m"
|
||||
deadnix
|
||||
'';
|
||||
};
|
||||
in repoShell
|
||||
in
|
||||
repoShell
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue