imp: use bud nixos-/devhsllModules and hide rebiding
both modules depend on `self`/`inputs` available as special args for both, devshell & nixos modules, so bump to an improved `digga`, as well.
This commit is contained in:
parent
0410acf3d7
commit
a3ec0d2814
12
flake.lock
12
flake.lock
|
@ -46,11 +46,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1626456025,
|
||||
"narHash": "sha256-TrKfxVir+TilnqSNYokxJKx2ugEem7Khv4YmSwqj9JQ=",
|
||||
"lastModified": 1626840404,
|
||||
"narHash": "sha256-6HKRxPlVO4iKyPNAjkjku3JzGX1lgJ+93ieWAx7MY60=",
|
||||
"owner": "divnix",
|
||||
"repo": "bud",
|
||||
"rev": "59c10c3879b11371944ab664462fe2e9366cfb44",
|
||||
"rev": "452ec18574b6e4d8b8a6aae9e190255d4c89768c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -172,11 +172,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1626836850,
|
||||
"narHash": "sha256-qMZ4T0ig9bBHsiu1nEnYzI6JjXjpJv2fnBexpJ8cw+0=",
|
||||
"lastModified": 1626841951,
|
||||
"narHash": "sha256-tppFdKz4fvt7gYsMotT/kWSIzKWcdDsMCkQzn6mGRCA=",
|
||||
"owner": "divnix",
|
||||
"repo": "digga",
|
||||
"rev": "af700c53c6c955a46ae834c1e6e7c6bb5cb1adeb",
|
||||
"rev": "f676b7899541836129c188f8a23c21f439a02960",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -70,9 +70,6 @@
|
|||
, deploy
|
||||
, ...
|
||||
} @ inputs:
|
||||
let
|
||||
bud' = bud self; # rebind to access self.budModules
|
||||
in
|
||||
digga.lib.mkFlake
|
||||
{
|
||||
inherit self inputs;
|
||||
|
@ -117,7 +114,7 @@
|
|||
ci-agent.nixosModules.agent-profile
|
||||
home.nixosModules.home-manager
|
||||
agenix.nixosModules.age
|
||||
(bud.nixosModules.bud bud')
|
||||
bud.nixosModules.bud
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -150,7 +147,7 @@
|
|||
}; # digga.lib.importers.rakeLeaves ./users/hm;
|
||||
};
|
||||
|
||||
devshell.modules = [ (import ./shell bud') ];
|
||||
devshell = ./shell;
|
||||
|
||||
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
||||
|
||||
|
|
|
@ -1,63 +1,10 @@
|
|||
bud:
|
||||
{ pkgs, extraModulesPath, ... }:
|
||||
let
|
||||
|
||||
hooks = import ./hooks;
|
||||
|
||||
pkgWithCategory = category: package: { inherit package category; };
|
||||
linter = pkgWithCategory "linter";
|
||||
docs = pkgWithCategory "docs";
|
||||
devos = pkgWithCategory "devos";
|
||||
|
||||
in
|
||||
{ self, inputs, ... }:
|
||||
{
|
||||
_file = toString ./.;
|
||||
|
||||
imports = [ "${extraModulesPath}/git/hooks.nix" ];
|
||||
git = { inherit hooks; };
|
||||
|
||||
# tempfix: remove when merged https://github.com/numtide/devshell/pull/123
|
||||
devshell.startup.load_profiles = pkgs.lib.mkForce (pkgs.lib.noDepEntry ''
|
||||
# PATH is devshell's exorbitant privilige:
|
||||
# fence against its pollution
|
||||
_PATH=''${PATH}
|
||||
# Load installed profiles
|
||||
for file in "$DEVSHELL_DIR/etc/profile.d/"*.sh; do
|
||||
# If that folder doesn't exist, bash loves to return the whole glob
|
||||
[[ -f "$file" ]] && source "$file"
|
||||
done
|
||||
# Exert exorbitant privilige and leave no trace
|
||||
export PATH=''${_PATH}
|
||||
unset _PATH
|
||||
'');
|
||||
|
||||
packages = with pkgs; [
|
||||
git-crypt
|
||||
externalModules = with inputs; [
|
||||
bud.devshellModules.bud
|
||||
];
|
||||
modules = [
|
||||
./devos.nix
|
||||
];
|
||||
|
||||
commands = with pkgs; [
|
||||
(devos (bud { inherit pkgs; }))
|
||||
(devos nixUnstable)
|
||||
(devos agenix)
|
||||
{
|
||||
category = "devos";
|
||||
name = pkgs.nvfetcher-bin.pname;
|
||||
help = pkgs.nvfetcher-bin.meta.description;
|
||||
command = "cd $DEVSHELL_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml --no-output $@; nixpkgs-fmt _sources/";
|
||||
}
|
||||
(linter nixpkgs-fmt)
|
||||
(linter editorconfig-checker)
|
||||
# (docs python3Packages.grip) too many deps
|
||||
(docs mdbook)
|
||||
]
|
||||
|
||||
++ lib.optional
|
||||
(pkgs ? deploy-rs)
|
||||
(devos deploy-rs.deploy-rs)
|
||||
|
||||
++ lib.optional
|
||||
(system != "i686-linux")
|
||||
(devos cachix)
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
|
|
61
shell/devos.nix
Normal file
61
shell/devos.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ pkgs, extraModulesPath, ... }:
|
||||
let
|
||||
|
||||
hooks = import ./hooks;
|
||||
|
||||
pkgWithCategory = category: package: { inherit package category; };
|
||||
linter = pkgWithCategory "linter";
|
||||
docs = pkgWithCategory "docs";
|
||||
devos = pkgWithCategory "devos";
|
||||
|
||||
in
|
||||
{
|
||||
_file = toString ./.;
|
||||
|
||||
imports = [ "${extraModulesPath}/git/hooks.nix" ];
|
||||
git = { inherit hooks; };
|
||||
|
||||
# tempfix: remove when merged https://github.com/numtide/devshell/pull/123
|
||||
devshell.startup.load_profiles = pkgs.lib.mkForce (pkgs.lib.noDepEntry ''
|
||||
# PATH is devshell's exorbitant privilige:
|
||||
# fence against its pollution
|
||||
_PATH=''${PATH}
|
||||
# Load installed profiles
|
||||
for file in "$DEVSHELL_DIR/etc/profile.d/"*.sh; do
|
||||
# If that folder doesn't exist, bash loves to return the whole glob
|
||||
[[ -f "$file" ]] && source "$file"
|
||||
done
|
||||
# Exert exorbitant privilige and leave no trace
|
||||
export PATH=''${_PATH}
|
||||
unset _PATH
|
||||
'');
|
||||
|
||||
packages = with pkgs; [
|
||||
git-crypt
|
||||
];
|
||||
|
||||
commands = with pkgs; [
|
||||
(devos nixUnstable)
|
||||
(devos agenix)
|
||||
{
|
||||
category = "devos";
|
||||
name = pkgs.nvfetcher-bin.pname;
|
||||
help = pkgs.nvfetcher-bin.meta.description;
|
||||
command = "cd $DEVSHELL_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml --no-output $@; nixpkgs-fmt _sources/";
|
||||
}
|
||||
(linter nixpkgs-fmt)
|
||||
(linter editorconfig-checker)
|
||||
# (docs python3Packages.grip) too many deps
|
||||
(docs mdbook)
|
||||
]
|
||||
|
||||
++ lib.optional
|
||||
(pkgs ? deploy-rs)
|
||||
(devos deploy-rs.deploy-rs)
|
||||
|
||||
++ lib.optional
|
||||
(system != "i686-linux")
|
||||
(devos cachix)
|
||||
|
||||
;
|
||||
}
|
Loading…
Reference in a new issue