mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 23:11:34 +01:00
Switch to nixfmt
This commit is contained in:
parent
1d70117186
commit
b38d2df431
55 changed files with 1559 additions and 1540 deletions
|
|
@ -1,36 +1,36 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.myConfig.nix-helper;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.nix-helper;
|
||||
in {
|
||||
options.myConfig.nix-helper = {
|
||||
enable = lib.mkEnableOption "";
|
||||
auto-gc.enable = lib.mkEnableOption "";
|
||||
options.myConfig.nix-helper = {
|
||||
enable = lib.mkEnableOption "";
|
||||
auto-gc.enable = lib.mkEnableOption "";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.nh.enable = true;
|
||||
|
||||
environment.shellAliases =
|
||||
let
|
||||
rebuild = "sudo -v && nh os";
|
||||
in
|
||||
{
|
||||
nrs = "${rebuild} switch";
|
||||
nrt = "${rebuild} test";
|
||||
nrb = "${rebuild} boot";
|
||||
nrrb = "nrb && reboot";
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
silent = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.nh.enable = true;
|
||||
|
||||
environment.shellAliases = let
|
||||
rebuild = "sudo -v && nh os";
|
||||
in {
|
||||
nrs = "${rebuild} switch";
|
||||
nrt = "${rebuild} test";
|
||||
nrb = "${rebuild} boot";
|
||||
nrrb = "nrb && reboot";
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
silent = true;
|
||||
};
|
||||
|
||||
programs.nh.clean = lib.mkIf cfg.auto-gc.enable {
|
||||
enable = true;
|
||||
dates = "daily";
|
||||
extraArgs = "--keep 10 --keep-since 3d";
|
||||
};
|
||||
programs.nh.clean = lib.mkIf cfg.auto-gc.enable {
|
||||
enable = true;
|
||||
dates = "daily";
|
||||
extraArgs = "--keep 10 --keep-since 3d";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue