base.nix (1396B)
1 { config, lib, pkgs, ... }: 2 3 with lib; 4 let 5 cfg = config.profiles.base; 6 in 7 { 8 options = { 9 profiles.base = { 10 enable = mkOption { 11 default = true; 12 description = "Enable base profile"; 13 type = types.bool; 14 }; 15 systemd-boot = mkOption { 16 default = true; 17 description = "Enable systemd-boot for boot loading"; 18 type = types.bool; 19 }; 20 }; 21 }; 22 config = mkIf cfg.enable { 23 boot.loader.systemd-boot.enable = cfg.systemd-boot; 24 environment.pathsToLink = [ 25 "/share/nix-direnv" 26 ]; 27 environment = { 28 variables = { 29 EDITOR = pkgs.lib.mkOverride 0 "vim"; 30 }; 31 systemPackages = with pkgs; [ 32 cachix 33 direnv 34 exa 35 file 36 htop 37 iotop 38 lsof 39 netcat 40 psmisc 41 pv 42 tmux 43 tree 44 vim 45 vrsync 46 wget 47 gnumake 48 ]; 49 }; 50 security.sudo = { 51 extraConfig = '' 52 Defaults env_keep += SSH_AUTH_SOCK 53 ''; 54 }; 55 systemd.services."status-email-root@" = { 56 description = "status email for %i to vincent"; 57 serviceConfig = { 58 Type = "oneshot"; 59 ExecStart = '' 60 ${pkgs.my.systemd-email}/bin/systemd-email vincent@demeester.fr %i 61 ''; 62 User = "root"; 63 Environment = "PATH=/run/current-system/sw/bin"; 64 }; 65 }; 66 }; 67 }