nixos-config/hosts/thinkpad/default.nix

114 lines
2.4 KiB
Nix
Raw Normal View History

2022-12-18 17:01:34 +01:00
{ config, pkgs, lib, ... }:
{
2022-12-29 20:48:40 +01:00
nix.settings.experimental-features = [ "nix-command" "flakes" ];
2022-12-18 17:07:40 +01:00
imports =
[
./hardware-configuration.nix
./modules/networks
2022-12-19 19:30:32 +01:00
../../shared/vim.nix
../../shared/sops.nix
2022-12-29 20:48:40 +01:00
../../shared/gpg.nix
2022-12-18 17:07:40 +01:00
];
# Use the systemd-boot EFI boot loader.
2023-01-28 14:53:23 +01:00
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
supportedFilesystems = [ "zfs" ];
};
2022-12-18 17:07:40 +01:00
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_US.UTF-8";
console = {
2023-01-20 12:23:05 +01:00
keyMap = "dvorak";
2022-12-18 17:07:40 +01:00
font = "Lat2-Terminus16";
2023-01-28 15:26:54 +01:00
colors = [
# hardcoded dracula since nix-colors only provides a home manager module
"282936"
"3a3c4e"
"4d4f68"
"626483"
"62d6e8"
"e9e9f4"
"f1f2f8"
"f7f7fb"
"ea51b2"
"b45bcf"
"00f769"
"ebff87"
"a1efe4"
"62d6e8"
"b45bcf"
"00f769"
];
2022-12-18 17:07:40 +01:00
};
2023-01-20 22:12:45 +01:00
fonts.fonts = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
dejavu_fonts
];
2022-12-18 17:07:40 +01:00
# Enable sound.
sound.enable = true;
2023-01-21 14:44:23 +01:00
#hardware.pulseaudio.enable = true;
2022-12-18 17:07:40 +01:00
hardware.bluetooth.enable = true;
2023-01-21 14:44:23 +01:00
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
xdg.portal.wlr.enable = true;
2022-12-31 12:28:53 +01:00
programs.dconf.enable = true;
2022-12-27 18:21:33 +01:00
# control display backlight
2022-12-19 19:30:32 +01:00
programs.light.enable = true;
services = {
2022-12-27 18:21:33 +01:00
blueman.enable = true; # bluetooth
devmon.enable = true; # automount stuff
2022-12-19 19:30:32 +01:00
printing.enable = true;
fprintd.enable = true; # log in using fingerprint
2022-12-27 18:21:33 +01:00
openssh.enable = true; # enabled ssh to have the host keys
2022-12-19 19:30:32 +01:00
};
2022-12-18 17:07:40 +01:00
2022-12-27 18:21:33 +01:00
programs.steam.enable = true; # putting steam in here cause in home manager it doesn't work
2022-12-18 17:07:40 +01:00
virtualisation.libvirtd.enable = true;
2022-12-27 13:23:06 +01:00
virtualisation.spiceUSBRedirection.enable = true;
2023-01-21 19:03:24 +01:00
2023-01-03 18:18:09 +01:00
# fix to enable secure boot in vms
environment.etc = {
"ovmf/edk2-x86_64-secure-code.fd" = {
source = config.virtualisation.libvirtd.qemu.package + "/share/qemu/edk2-x86_64-secure-code.fd";
};
"ovmf/edk2-i386-vars.fd" = {
source = config.virtualisation.libvirtd.qemu.package + "/share/qemu/edk2-i386-vars.fd";
mode = "0644";
user = "libvirtd";
2023-01-10 11:31:33 +01:00
};
2023-01-03 18:18:09 +01:00
};
2023-01-10 11:31:33 +01:00
2022-12-29 20:48:40 +01:00
environment.systemPackages = with pkgs; [
wget
gcc
git
htop
dig
traceroute
killall
2023-01-19 22:50:54 +01:00
python3
2023-01-27 00:24:24 +01:00
zip
unzip
2022-12-29 20:48:40 +01:00
];
2022-12-27 18:21:33 +01:00
system.stateVersion = "22.11";
2022-12-18 17:01:34 +01:00
}