nixos-config/modules/baseline.nix

60 lines
1.9 KiB
Nix
Raw Normal View History

2020-11-13 19:49:22 +00:00
{ config, pkgs, lib, ... }:
2020-09-18 13:54:09 +00:00
{
2020-09-24 05:45:48 +00:00
time.timeZone = "US/Eastern";
2020-09-18 13:54:09 +00:00
2020-09-24 05:45:48 +00:00
boot = {
zfs.forceImportAll = false;
zfs.forceImportRoot = false;
kernelParams = [ "amdgpu.gpu_recovery=1" "panic=30" ];
2021-04-05 21:19:47 +00:00
initrd.availableKernelModules = [ "nvme" ];
2020-09-24 05:45:48 +00:00
};
2020-09-18 13:54:09 +00:00
2020-09-24 05:45:48 +00:00
nixpkgs.config.allowUnfree = true;
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
2020-09-18 13:54:09 +00:00
2020-09-24 05:45:48 +00:00
systemd.tmpfiles.rules = [ "e /nix/var/log - - - 30d" ];
2020-09-18 13:54:09 +00:00
2020-11-13 20:49:36 +00:00
zramSwap.enable = true;
2020-09-18 13:54:09 +00:00
2021-04-04 22:25:13 +00:00
networking.hostId = builtins.substring 0 8 (builtins.hashString "md5" config.networking.hostName);
2020-09-24 05:45:48 +00:00
hardware = {
cpu.amd.updateMicrocode = true;
cpu.intel.updateMicrocode = true;
};
2020-09-18 13:54:09 +00:00
2020-09-24 05:45:48 +00:00
services = {
earlyoom.enable = true;
avahi = {
enable = true;
nssmdns = true;
publish.enable = true;
publish.addresses = true;
2020-09-18 13:54:09 +00:00
};
2020-09-24 05:45:48 +00:00
};
2020-11-13 19:49:22 +00:00
systemd.timers.nixosReport.timerConfig.RandomizedDelaySec = "55min";
systemd.services.nixosReport = {
startAt = "hourly";
serviceConfig.Type = "simple";
serviceConfig.ExecStart = lib.concatStringsSep " " [
"${pkgs.curl}/bin/curl --silent https://log.bck.me/nixos-report"
"-H 'hostname: ${config.networking.hostName}'"
"-H 'version: ${config.system.nixos.label}'"
2020-12-29 19:42:24 +00:00
"-H 'sconfig: ${builtins.toJSON config.sconfig}'"
2020-11-13 19:49:22 +00:00
];
};
2020-12-27 16:23:42 +00:00
users.users.sean = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" "video" "networkmanager" "dialout" "input" "wireshark" ];
openssh.authorizedKeys.keys = [
2021-02-03 02:40:19 +00:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIqWHzIXaF88Y8+64gBlLbZ5ZZcLl08kTHG1clHd7gaq desktop"
2020-12-27 16:23:42 +00:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILh1MVRPld8lg8U7j4QwurxkTGLd4EYEn+JaplqXMqNW"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtTBrVXCDelPYUeUzFSLhWtBDI8IO6HVpX4ewUxD+Nc"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLZgFlJTT8wFz2DGeB1YETKPvm63/u1kT7pzranCoqP"
2021-02-02 16:38:08 +00:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFbQPpgGWF2qsgiL2YlBMd3JyJ2fbksfykuDNJYrHWfO dell_laptop"
2020-12-27 16:23:42 +00:00
];
};
2020-09-18 13:54:09 +00:00
}