mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
70 lines
2.4 KiB
Nix
70 lines
2.4 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
{
|
|
nixpkgs.overlays = import ./backports.nix;
|
|
|
|
time.timeZone = "US/Eastern";
|
|
|
|
boot = {
|
|
zfs.forceImportAll = false;
|
|
zfs.forceImportRoot = false;
|
|
kernelParams = [ "amdgpu.gpu_recovery=1" "panic=30" ];
|
|
};
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
|
|
|
|
systemd.tmpfiles.rules = [ "e /nix/var/log - - - 30d" ];
|
|
|
|
zramSwap.enable = true;
|
|
|
|
hardware = {
|
|
cpu.amd.updateMicrocode = true;
|
|
cpu.intel.updateMicrocode = true;
|
|
};
|
|
|
|
services = {
|
|
earlyoom.enable = true;
|
|
avahi = {
|
|
enable = true;
|
|
nssmdns = true;
|
|
publish.enable = true;
|
|
publish.addresses = true;
|
|
};
|
|
};
|
|
|
|
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}'"
|
|
"-H 'sconfig: ${builtins.toJSON config.sconfig}'"
|
|
];
|
|
};
|
|
|
|
security.sudo.extraRules = [{
|
|
groups = [ "wheel" ];
|
|
commands = [
|
|
{ options = [ "NOPASSWD" ]; command = "/run/current-system/sw/bin/nix-collect-garbage -d"; }
|
|
{ options = [ "NOPASSWD" ]; command = "/run/current-system/sw/bin/nix-channel --update"; }
|
|
{ options = [ "NOPASSWD" ]; command = "/run/current-system/sw/bin/nixos-rebuild switch"; }
|
|
{ options = [ "NOPASSWD" ]; command = "/run/current-system/sw/bin/nixos-rebuild switch --upgrade"; }
|
|
{ options = [ "NOPASSWD" ]; command = "/run/current-system/sw/bin/nixos-rebuild boot"; }
|
|
{ options = [ "NOPASSWD" ]; command = "/run/current-system/sw/bin/nixos-rebuild boot --upgrade"; }
|
|
];
|
|
}];
|
|
|
|
users.users.sean = {
|
|
isNormalUser = true;
|
|
extraGroups = [ "wheel" "audio" "video" "networkmanager" "dialout" "input" "wireshark" ];
|
|
openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIqWHzIXaF88Y8+64gBlLbZ5ZZcLl08kTHG1clHd7gaq"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILh1MVRPld8lg8U7j4QwurxkTGLd4EYEn+JaplqXMqNW"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtTBrVXCDelPYUeUzFSLhWtBDI8IO6HVpX4ewUxD+Nc"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLZgFlJTT8wFz2DGeB1YETKPvm63/u1kT7pzranCoqP"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFbQPpgGWF2qsgiL2YlBMd3JyJ2fbksfykuDNJYrHWfO dell_laptop"
|
|
];
|
|
};
|
|
}
|