os/hosts/dumpyourvms/dumpyourvms.nix

76 lines
2.6 KiB
Nix
Raw Normal View History

2021-06-14 19:44:38 +00:00
{ config, pkgs, lib, ... }:
with lib;
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in
{
imports = [
./hardware-configuration.nix
];
config = {
pub-solar.x-os.keyfile = "/etc/nixos/secrets/keyfile.bin";
# fix backlight for keyboard and brightness, adjust function key binding
boot.kernelParams = [ "acpi_backlight=video" "hid_apple.fnmode=2" ];
boot.loader.efi.canTouchEfiVariables = true;
hardware = {
cpu.intel.updateMicrocode = true;
facetimehd.enable = true;
};
networking = import ./networking.nix;
security.pki.certificateFiles = [ ./consul-agent-ca.pem ];
services.unbound = import ./unbound.nix;
# Radeon driver seems to work better than amdgpu with Radeon R9 M370X
services.xserver.videoDrivers = [ "radeon" ];
# Thunderbolt tools
services.hardware.bolt.enable = true;
services.udev.extraRules =
# Disable XHC1 wakeup signal to avoid resume getting triggered some time
# after suspend. Reboot required for this to take effect.
''SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"'';
services.printing.enable = true;
services.printing.drivers = [ pkgs.brlaser ];
home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
# Custom device sway configs
xdg.configFile = mkIf psCfg.sway.enable {
"sway/config.d/10-applications.conf".source = ./.config/sway/config.d/applications.conf;
"sway/config.d/autostart.conf".source = ./.config/sway/config.d/autostart.conf;
"sway/config.d/10-custom-keybindings.conf".source = ./.config/sway/config.d/custom-keybindings.conf;
"sway/config.d/input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf;
"sway/config.d/screens.conf".source = ./.config/sway/config.d/screens.conf;
};
};
users.users.teutat3s = {
extraGroups = [ "unbound" ];
};
# WLAN frequency compliance (e.g. check for radar with DFS)
hardware.firmware = with pkgs; [ wireless-regdb ];
boot.extraModprobeConfig = ''
options cfg80211 ieee80211_regdom="DE"
'';
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.05"; # Did you read the comment?
};
}