mirror of
https://github.com/0xbbjubjub/miniguest.git
synced 2024-09-11 05:55:35 +03:00
add git hooks
This commit is contained in:
parent
2f80efa8e5
commit
5f7a244991
@ -1,21 +1,23 @@
|
||||
inputs@{ self, nixpkgs, ... }:
|
||||
final: prev:
|
||||
|
||||
let
|
||||
kvm_guest = nixpkgs.lib.nixosSystem {
|
||||
inherit (final) system;
|
||||
modules = [
|
||||
self.nixosModules.miniguest
|
||||
{
|
||||
boot.miniguest.enable = true;
|
||||
boot.loader.grub.enable = false;
|
||||
fileSystems."/" = {
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "mode=755" ];
|
||||
};
|
||||
} ];
|
||||
};
|
||||
in final.lib.optionalAttrs final.stdenv.isLinux {
|
||||
build_kvm_guest = kvm_guest.config.system.build.miniguest;
|
||||
let
|
||||
kvm_guest = nixpkgs.lib.nixosSystem {
|
||||
inherit (final) system;
|
||||
modules = [
|
||||
self.nixosModules.miniguest
|
||||
{
|
||||
boot.miniguest.enable = true;
|
||||
boot.loader.grub.enable = false;
|
||||
fileSystems."/" = {
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "mode=755" ];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
in
|
||||
final.lib.optionalAttrs final.stdenv.isLinux {
|
||||
build_kvm_guest = kvm_guest.config.system.build.miniguest;
|
||||
}
|
||||
|
@ -17,3 +17,7 @@ category = "linters"
|
||||
|
||||
[git.hooks]
|
||||
enable = true
|
||||
pre-commit.text = """
|
||||
find -name '*.nix' | xargs -r nixpkgs-fmt --check || exit
|
||||
find -name '*.bash' | xargs -r shfmt -d -s || exit
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user