mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 06:04:42 +00:00
optimize flake shape and add devshell
This commit is contained in:
parent
f3d61787f0
commit
6dfef30594
8 changed files with 202 additions and 121 deletions
|
|
@ -10,6 +10,7 @@ in {
|
|||
nix.enable = true;
|
||||
|
||||
nix.settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
|
|
@ -18,17 +19,28 @@ in {
|
|||
"@admin"
|
||||
username
|
||||
];
|
||||
use-xdg-base-directories = true;
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
interval = {
|
||||
Weekday = 7;
|
||||
Hour = 3;
|
||||
Minute = 0;
|
||||
};
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
nix.gc =
|
||||
{
|
||||
automatic = true;
|
||||
options = "--delete-older-than 14d";
|
||||
}
|
||||
// (
|
||||
if pkgs.stdenv.isDarwin then
|
||||
{
|
||||
interval = {
|
||||
Weekday = 7;
|
||||
Hour = 3;
|
||||
Minute = 0;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
dates = "weekly";
|
||||
}
|
||||
);
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
|
|
|||
23
modules/devshells.nix
Normal file
23
modules/devshells.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ ... }:
|
||||
{
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
formatter = pkgs.nixfmt-tree;
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
deadnix
|
||||
git
|
||||
just
|
||||
nixfmt-tree
|
||||
nodePackages.prettier
|
||||
pre-commit
|
||||
selene
|
||||
shfmt
|
||||
statix
|
||||
stylua
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue