🔧 add devenv
This commit is contained in:
parent
07fe82964b
commit
6abad2d5a6
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/.direnv
|
/.direnv
|
||||||
/result
|
/result
|
||||||
|
/.pre-commit-config.yaml
|
||||||
|
24
flake.nix
24
flake.nix
@ -87,16 +87,26 @@
|
|||||||
(system:
|
(system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
darwin-local = pkgs.writeScriptBin "darwin-local" ''
|
in
|
||||||
#!${pkgs.stdenv.shell}
|
{
|
||||||
|
devShells.default = devenv.lib.mkShell {
|
||||||
|
inherit inputs pkgs;
|
||||||
|
modules = [
|
||||||
|
{
|
||||||
|
packages = [ deploy-rs.packages.${system}.deploy-rs pkgs.sops ];
|
||||||
|
|
||||||
|
scripts.darwin-local.exec = ''
|
||||||
nix build .#darwinConfigurations.$(hostname -s).system
|
nix build .#darwinConfigurations.$(hostname -s).system
|
||||||
./result/sw/bin/darwin-rebuild switch --flake .
|
./result/sw/bin/darwin-rebuild switch --flake .
|
||||||
'';
|
'';
|
||||||
in
|
|
||||||
{
|
languages.nix.enable = true;
|
||||||
devShells.default = pkgs.mkShell {
|
|
||||||
name = "athens";
|
pre-commit.hooks = {
|
||||||
buildInputs = [ darwin-local deploy-rs.packages.${system}.deploy-rs pkgs.nixpkgs-fmt pkgs.rnix-lsp pkgs.sops ];
|
nixpkgs-fmt.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
formatter = pkgs.nixpkgs-fmt;
|
formatter = pkgs.nixpkgs-fmt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user