1
1
Fork 0

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 = {}; users.groups.tvb = {};
environment.systemPackages = with pkgs; [
vim
git
];
# Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
# Open ports in the firewall. # Open ports in the firewall.

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
inherit (lib) mkDefault mkIf mkMerge mkOption types; inherit (lib) mkDefault mkIf mkMerge mkOption mkOverride types;
cfg = config.beatific; cfg = config.beatific;
in { in {
options = { options = {
@ -30,6 +30,12 @@ in {
description = "Default locale settings"; description = "Default locale settings";
default = true; default = true;
}; };
programs = mkOption {
type = types.bool;
description = "Default installed programs";
default = true;
};
}; };
}; };
}; };
@ -63,5 +69,18 @@ in {
LC_TIME = "en_US.UTF-8"; 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";
})
]; ];
} }