mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 23:11:34 +01:00
Remove nix-helper
This commit is contained in:
parent
978733f40c
commit
9541e99a78
9 changed files with 6 additions and 70 deletions
21
flake.lock
generated
21
flake.lock
generated
|
|
@ -40,26 +40,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nh": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1710573382,
|
|
||||||
"narHash": "sha256-oGPasBk516A6pNE7iBEOmtrNsbqd+frR7O+z9lr1cLw=",
|
|
||||||
"owner": "viperML",
|
|
||||||
"repo": "nh",
|
|
||||||
"rev": "60c019a930e1718f1c5b6638f16dc221bf667d61",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "viperML",
|
|
||||||
"repo": "nh",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-index-database": {
|
"nix-index-database": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
@ -116,7 +96,6 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nh": "nh",
|
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"sops-nix": "sops-nix"
|
"sops-nix": "sops-nix"
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,6 @@
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:Mic92/sops-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
nh = {
|
|
||||||
url = "github:viperML/nh";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {nixpkgs, ...} @ inputs: let
|
outputs = {nixpkgs, ...} @ inputs: let
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@
|
||||||
sops.enable = true;
|
sops.enable = true;
|
||||||
optimization.mode = "powersave";
|
optimization.mode = "powersave";
|
||||||
doas.enable = false;
|
doas.enable = false;
|
||||||
nix-helper.enable = true;
|
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@
|
||||||
vpn.lgs.enable = true;
|
vpn.lgs.enable = true;
|
||||||
comma.enable = true;
|
comma.enable = true;
|
||||||
sops.enable = true;
|
sops.enable = true;
|
||||||
nix-helper.enable = true;
|
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,25 +10,12 @@ in {
|
||||||
bash.enable = lib.mkEnableOption "";
|
bash.enable = lib.mkEnableOption "";
|
||||||
zsh.enable = lib.mkEnableOption "";
|
zsh.enable = lib.mkEnableOption "";
|
||||||
starship.enable = lib.mkEnableOption "";
|
starship.enable = lib.mkEnableOption "";
|
||||||
nixAliases = {
|
nixAliases.enable = lib.mkEnableOption "";
|
||||||
enable = lib.mkEnableOption "";
|
|
||||||
nix-helper.enable = lib.mkEnableOption "";
|
|
||||||
};
|
|
||||||
improvedCommands.enable = lib.mkEnableOption "";
|
improvedCommands.enable = lib.mkEnableOption "";
|
||||||
direnv.enable = lib.mkEnableOption "";
|
direnv.enable = lib.mkEnableOption "";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion =
|
|
||||||
if cfg.nixAliases.nix-helper.enable
|
|
||||||
then osConfig.myConfig.nix-helper.enable
|
|
||||||
else true;
|
|
||||||
message = "The nix-helper has to be enabled on the OS level.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.bash.enable = cfg.bash.enable;
|
programs.bash.enable = cfg.bash.enable;
|
||||||
|
|
||||||
programs.zsh.enable = cfg.zsh.enable;
|
programs.zsh.enable = cfg.zsh.enable;
|
||||||
|
|
@ -49,10 +36,7 @@ in {
|
||||||
|
|
||||||
home.shellAliases = let
|
home.shellAliases = let
|
||||||
nixAliases = lib.mkIf cfg.nixAliases.enable {
|
nixAliases = lib.mkIf cfg.nixAliases.enable {
|
||||||
nr =
|
nr = "sudo nixos-rebuild --flake $FLAKE";
|
||||||
if cfg.nixAliases.nix-helper.enable
|
|
||||||
then "nh os"
|
|
||||||
else "sudo nixos-rebuild --flake $FLAKE";
|
|
||||||
nrs = "nr switch";
|
nrs = "nr switch";
|
||||||
nrt = "nr test";
|
nrt = "nr test";
|
||||||
nrb = "nr boot";
|
nrb = "nr boot";
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,10 @@
|
||||||
options.myConfig.auto-gc.enable = lib.mkEnableOption "";
|
options.myConfig.auto-gc.enable = lib.mkEnableOption "";
|
||||||
|
|
||||||
config = lib.mkIf config.myConfig.auto-gc.enable {
|
config = lib.mkIf config.myConfig.auto-gc.enable {
|
||||||
myConfig.nix-helper.enable = true;
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
nh.clean = {
|
|
||||||
enable = true;
|
|
||||||
dates = "weekly";
|
dates = "weekly";
|
||||||
extraArgs = "--keep-since 7d --keep 10";
|
options = "--delete-older-than 7d";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
./dm.nix
|
./dm.nix
|
||||||
./sound.nix
|
./sound.nix
|
||||||
./boot-loader.nix
|
./boot-loader.nix
|
||||||
./nix-helper.nix
|
|
||||||
./printing.nix
|
./printing.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [inputs.nh.nixosModules.default];
|
|
||||||
|
|
||||||
options.myConfig.nix-helper.enable = lib.mkEnableOption "";
|
|
||||||
|
|
||||||
config = lib.mkIf config.myConfig.nix-helper.enable {
|
|
||||||
nh.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -5,10 +5,7 @@
|
||||||
shell = {
|
shell = {
|
||||||
bash.enable = true;
|
bash.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
nixAliases = {
|
nixAliases.enable = true;
|
||||||
enable = true;
|
|
||||||
nix-helper.enable = true;
|
|
||||||
};
|
|
||||||
improvedCommands.enable = true;
|
improvedCommands.enable = true;
|
||||||
direnv.enable = true;
|
direnv.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue