feat: simplified checks

This commit is contained in:
Patrick 2023-09-20 14:19:13 +02:00
parent 7fbe2980ea
commit a6e8a94d8a
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
5 changed files with 40 additions and 26 deletions

View file

@ -81,6 +81,7 @@
agenix-rekey,
devshell,
nixos-generators,
pre-commit-hooks,
...
} @ inputs: let
inherit (nixpkgs) lib;
@ -141,7 +142,17 @@
};
apps = agenix-rekey.defineApps self pkgs self.nodes;
checks = import ./nix/checks.nix inputs system;
checks.pre-commit-check =
pre-commit-hooks.lib.${system}.run
{
src = lib.cleanSource ./.;
hooks = {
alejandra.enable = true;
statix.enable = true;
luacheck.enable = true;
stylua.enable = true;
};
};
devShell = import ./nix/devshell.nix inputs system;
formatter = pkgs.alejandra;
});

View file

@ -65,4 +65,25 @@ in {
'';
};
};
config.home-manager.sharedModules = [
({
config,
nixosConfig,
...
}: {
options = {
userSecretsFile = mkOption {
default = ../users/${config._module.args.name}/secrets.nix.age;
type = types.path;
description = "The global secrets attribute that should be exposed to the user";
};
userSecrets = mkOption {
readOnly = true;
default = importEncrypted config.userSecretsFile inputs;
type = types.unspecified;
description = "User secrets";
};
};
})
];
}

View file

@ -1,18 +0,0 @@
{
self,
pre-commit-hooks,
...
}: system:
with self.pkgs.${system}; {
pre-commit-check =
pre-commit-hooks.lib.${system}.run
{
src = lib.cleanSource ../.;
hooks = {
alejandra.enable = true;
statix.enable = true;
luacheck.enable = true;
stylua.enable = true;
};
};
}

View file

@ -1,13 +1,13 @@
{pkgs, ...}: let
initLua = pkgs.writeText "init.lua" ''
vim.opt.buftype = "nowrite"
vim.opt.backup=false
vim.opt.modeline=false
vim.opt.shelltemp=false
vim.opt.swapfile=false
vim.opt.undofile=false
vim.opt.backup = false
vim.opt.modeline = false
vim.opt.shelltemp = false
vim.opt.swapfile = false
vim.opt.undofile = false
vim.opt.writebackup = false
vim.opt.shada-file = vim.fn.stdpath "state" .. "/shada/man.shada"
vim.opt.shadafile = vim.fn.stdpath "state" .. "/shada/man.shada"
vim.opt.virtualedit = "all"
vim.opt.splitkeep = "screen"

View file

@ -3,7 +3,7 @@
config,
...
}: {
# enable nixos wide wayland config
# enable nixos wide graphical config
imports = [
../../modules/graphical/xserver.nix
../../modules/graphical/steam.nix