feat: Add new base service config for Darwin system
This commit introduces a new base configuration for the Darwin service. It includes options for system packages, shell programs and security features. This base configuration is customizable with an enable option.
This commit is contained in:
parent
9131236f36
commit
5d9518fd1c
57
modules/darwin/services/base/default.nix
Normal file
57
modules/darwin/services/base/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{ options
|
||||
, config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
with lib;
|
||||
with lib.metacfg;
|
||||
let
|
||||
cfg = config.metacfg.base;
|
||||
in
|
||||
{
|
||||
options.metacfg.base = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable the base config.";
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
age
|
||||
delta
|
||||
git
|
||||
git-crypt
|
||||
git-delete-merged-branches
|
||||
home-manager
|
||||
htop
|
||||
mosh
|
||||
nixpkgs-fmt
|
||||
openssl
|
||||
restic
|
||||
rrsync
|
||||
sops
|
||||
tmux
|
||||
vim
|
||||
wget
|
||||
starship
|
||||
];
|
||||
shells = [ pkgs.fish pkgs.bash ];
|
||||
};
|
||||
|
||||
programs = {
|
||||
bash = {
|
||||
## shellInit = ''
|
||||
interactiveShellInit = ''
|
||||
bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
||||
'';
|
||||
};
|
||||
fish.enable = true;
|
||||
};
|
||||
|
||||
security = {
|
||||
pam.enableSudoTouchIdAuth = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue