nixos-configuration/modules/default.nix

56 lines
912 B
Nix
Raw Normal View History

2023-04-04 21:13:03 +02:00
{
config,
pkgs,
...
}: let
2023-09-09 13:36:21 +02:00
cfg = config.my;
2023-09-10 14:12:01 +02:00
helpers = import ../helpers;
2023-09-09 13:36:21 +02:00
in {
2023-04-04 21:13:03 +02:00
imports = [
./home
2023-09-09 15:44:15 +02:00
./desktop
./i18n.nix
./nixpkgs.nix
2023-04-04 21:13:03 +02:00
];
2023-09-09 15:44:15 +02:00
config = {
networking = {
networkmanager.enable = true;
firewall.enable = true;
2023-04-04 21:13:03 +02:00
};
# Enable the OpenSSH daemon.
2023-09-09 15:44:15 +02:00
services.openssh = {
2023-04-04 21:13:03 +02:00
enable = true;
2023-08-27 20:24:57 +02:00
settings = {
2023-09-10 14:12:01 +02:00
PermitRootLogin = helpers.mkIfElse config.my.server.enable "yes" "no";
2023-08-27 20:24:57 +02:00
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
2023-04-04 21:13:03 +02:00
};
2023-09-09 15:44:15 +02:00
systemd.extraConfig = ''
DefaultTimeoutStopSec=12s
'';
2023-09-01 17:36:49 +02:00
2023-09-09 15:44:15 +02:00
programs = {
zsh.enable = true;
2023-04-04 21:13:03 +02:00
2023-09-09 15:44:15 +02:00
git = {
enable = true;
package = pkgs.gitFull;
};
2023-08-26 22:37:34 +02:00
};
2023-09-09 15:44:15 +02:00
environment = {
pathsToLink = ["/share/zsh"];
2023-09-09 15:44:15 +02:00
systemPackages = with pkgs; [
lm_sensors
tldr
ncdu
];
};
2023-08-26 17:29:01 +02:00
};
2023-04-04 21:13:03 +02:00
}