shell, treefmt: refactor
This commit is contained in:
parent
89f7987884
commit
c0bc25fab3
3 changed files with 24 additions and 35 deletions
13
flake.nix
13
flake.nix
|
@ -48,20 +48,11 @@
|
||||||
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
inputs.treefmt-nix.flakeModule
|
||||||
|
./shell.nix
|
||||||
./treefmt.nix
|
./treefmt.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
perSystem =
|
|
||||||
{ config
|
|
||||||
, inputs'
|
|
||||||
, pkgs
|
|
||||||
, self'
|
|
||||||
, ...
|
|
||||||
}: {
|
|
||||||
devShells.default = pkgs.callPackage ./shell.nix {
|
|
||||||
inherit config;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
flake.nixosConfigurations =
|
flake.nixosConfigurations =
|
||||||
let
|
let
|
||||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||||
|
|
41
shell.nix
41
shell.nix
|
@ -1,21 +1,22 @@
|
||||||
{ config
|
{
|
||||||
, pkgs
|
perSystem = { config, pkgs, ... }: {
|
||||||
}:
|
devShells = {
|
||||||
|
default = with pkgs; mkShellNoCC {
|
||||||
with pkgs;
|
buildInputs = [
|
||||||
mkShellNoCC {
|
jq
|
||||||
buildInputs = [
|
sops
|
||||||
jq
|
ssh-to-age
|
||||||
sops
|
(python3.withPackages (
|
||||||
ssh-to-age
|
p: [
|
||||||
(python3.withPackages (
|
p.deploykit
|
||||||
p: [
|
p.invoke
|
||||||
p.deploykit
|
p.requests
|
||||||
p.invoke
|
]
|
||||||
p.requests
|
))
|
||||||
]
|
rsync
|
||||||
))
|
config.treefmt.build.wrapper
|
||||||
rsync
|
];
|
||||||
config.treefmt.build.wrapper
|
};
|
||||||
];
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
{ inputs, ... }: {
|
{
|
||||||
imports = [
|
|
||||||
inputs.treefmt-nix.flakeModule
|
|
||||||
];
|
|
||||||
perSystem = { pkgs, ... }: {
|
perSystem = { pkgs, ... }: {
|
||||||
treefmt = {
|
treefmt = {
|
||||||
# Used to find the project root
|
# Used to find the project root
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue