Add a config for the disc recovery machine.
This commit is contained in:
@@ -54,23 +54,17 @@ in
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
my_git = (
|
||||
pkgs.buildEnv {
|
||||
name = prev.git.name;
|
||||
version = prev.git.version;
|
||||
pkgs.symlinkJoin {
|
||||
name = final.git.name;
|
||||
version = final.git.version;
|
||||
paths =
|
||||
(builtins.map (git_wrapped prev.git) [
|
||||
(builtins.map (git_wrapped final.git) [
|
||||
"git"
|
||||
])
|
||||
++ [
|
||||
prev.git
|
||||
final.git
|
||||
];
|
||||
extraOutputsToInstall = [
|
||||
"man"
|
||||
"doc"
|
||||
"info"
|
||||
];
|
||||
nativeBuildInputs = [ final.makeWrapper ];
|
||||
ignoreCollisions = true;
|
||||
}
|
||||
);
|
||||
})
|
||||
@@ -79,7 +73,7 @@ in
|
||||
(lib.mkIf (!config.me.graphical) {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
my_git = prev.git;
|
||||
my_git = final.git;
|
||||
})
|
||||
];
|
||||
})
|
||||
|
||||
34
nix/configuration/roles/recovery/default.nix
Normal file
34
nix/configuration/roles/recovery/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
recovery.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install recovery.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.recovery.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
ddrescue
|
||||
];
|
||||
}
|
||||
(lib.mkIf config.me.graphical {
|
||||
environment.systemPackages = with pkgs; [
|
||||
ddrescueview
|
||||
];
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user