mirror of
https://github.com/blahai/nyx.git
synced 2025-06-10 06:53:03 -04:00
too much shit idek anymore
This commit is contained in:
parent
14843ef945
commit
bc82345beb
63 changed files with 1759 additions and 346 deletions
7
modules/flake/programs/default.nix
Normal file
7
modules/flake/programs/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./shell.nix
|
||||
./formatter.nix
|
||||
# ./deploy.nix
|
||||
];
|
||||
}
|
41
modules/flake/programs/formatter.nix
Normal file
41
modules/flake/programs/formatter.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{inputs, ...}: {
|
||||
imports = [inputs.treefmt-nix.flakeModule];
|
||||
|
||||
perSystem = {
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
formatter = config.treefmt.build.wrapper;
|
||||
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
|
||||
programs = {
|
||||
shellcheck.enable = true;
|
||||
taplo.enable = true;
|
||||
# TODO: configure this to not be ugly
|
||||
# yamlfmt.enable = true;
|
||||
|
||||
nixfmt = {
|
||||
enable = true;
|
||||
package = pkgs.alejandra;
|
||||
};
|
||||
|
||||
prettier = {
|
||||
enable = true;
|
||||
package = pkgs.prettierd;
|
||||
excludes = ["*.age"];
|
||||
settings = {
|
||||
editorconfig = true;
|
||||
};
|
||||
};
|
||||
|
||||
shfmt = {
|
||||
enable = true;
|
||||
indent_size = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
60
modules/flake/programs/shell.nix
Normal file
60
modules/flake/programs/shell.nix
Normal file
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
perSystem = {
|
||||
lib,
|
||||
pkgs,
|
||||
self',
|
||||
config,
|
||||
inputs',
|
||||
...
|
||||
}: {
|
||||
devShells = {
|
||||
default = pkgs.mkShellNoCC {
|
||||
name = "dotfiles";
|
||||
meta.description = "Development shell for this configuration";
|
||||
|
||||
# shellHook = config.pre-commit.installationScript;
|
||||
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
|
||||
FLAKE = ".";
|
||||
NH_FLAKE = ".";
|
||||
|
||||
packages =
|
||||
[
|
||||
pkgs.git # flakes require git
|
||||
pkgs.just # quick and easy task runner
|
||||
pkgs.cocogitto # git helpers
|
||||
self'.formatter # nix formatter
|
||||
pkgs.nix-output-monitor # get clean diff between generations
|
||||
inputs'.agenix.packages.agenix # secrets
|
||||
]
|
||||
++ lib.lists.optionals pkgs.stdenv.hostPlatform.isLinux [
|
||||
inputs'.deploy-rs.packages.deploy-rs # remote deployment
|
||||
];
|
||||
|
||||
inputsFrom = [config.treefmt.build.devShell];
|
||||
};
|
||||
|
||||
nixpkgs = pkgs.mkShellNoCC {
|
||||
packages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
# package creation helpers
|
||||
nurl
|
||||
nix-init
|
||||
# nixpkgs dev stuff
|
||||
hydra-check
|
||||
nixpkgs-lint
|
||||
nixpkgs-review
|
||||
nixpkgs-hammering
|
||||
# nix helpers
|
||||
nix-melt
|
||||
nix-tree
|
||||
nix-inspect
|
||||
nix-search-cli
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue