Add default installed programs

This commit is contained in:
Tim Van Baak 2023-08-02 02:37:29 +00:00
parent 2a618ce67f
commit ec88265631
2 changed files with 20 additions and 7 deletions

View File

@ -31,12 +31,6 @@
};
users.groups.tvb = {};
environment.systemPackages = with pkgs; [
vim
git
];
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Open ports in the firewall.

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkDefault mkIf mkMerge mkOption types;
inherit (lib) mkDefault mkIf mkMerge mkOption mkOverride types;
cfg = config.beatific;
in {
options = {
@ -30,6 +30,12 @@ in {
description = "Default locale settings";
default = true;
};
programs = mkOption {
type = types.bool;
description = "Default installed programs";
default = true;
};
};
};
};
@ -63,5 +69,18 @@ in {
LC_TIME = "en_US.UTF-8";
};
})
(mkIf cfg.defaults.programs {
environment.systemPackages = with pkgs; [
curl
git
htop
python3
vim
wget
];
# The nixpkgs default is "nano", so we go one priority higher
environment.variables.EDITOR = mkOverride 999 "vim";
})
];
}