nixos-config/hosts/nishimiya.nix

156 lines
3.8 KiB
Nix
Raw Normal View History

2022-01-12 16:35:17 +00:00
{ config, lib, pkgs, inputs, ... }:
2021-11-06 14:18:27 +00:00
{
2022-01-06 13:34:44 +00:00
imports = with inputs.nixos-hardware.nixosModules; [
common-cpu-intel common-pc-ssd
];
2021-11-06 14:18:27 +00:00
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/d06b511d-1970-421d-b006-231a7af91942";
fsType = "btrfs";
};
"/boot" = {
device = "/dev/disk/by-uuid/DFCE-FE5C";
fsType = "vfat";
};
};
swapDevices = [ ]; # TODO
boot = {
initrd = {
2022-01-06 13:34:44 +00:00
availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci"
2023-04-30 13:23:04 +00:00
"aesni-intel"
2022-01-06 13:34:44 +00:00
# NOTE: See https://github.com/NixOS/nixos-hardware/blob/master/common/pc/laptop/acpi_call.nix
2022-01-12 16:35:17 +00:00
#"acpi_call" ];
];
2023-04-30 13:23:04 +00:00
kernelModules = [ "dm-snapshot" "aesni-intel" ];
2021-11-06 14:18:27 +00:00
luks.devices = {
cryptroot = {
device = "/dev/disk/by-uuid/e1011c40-e1a9-4ce6-b89f-f14b046639c1";
preLVM = false; # NOTE: Since this LUKS device is within an LVM group
};
};
};
2021-12-12 14:32:53 +00:00
kernelPackages = pkgs.linuxPackages_xanmod;
2021-11-06 14:18:27 +00:00
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
2022-01-06 13:34:44 +00:00
# NOTE: See https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/e495/default.nix#L12
kernelParams = [ "acpi_backlight=native" ];
2023-09-18 11:09:58 +00:00
binfmt.emulatedSystems = ["aarch64-linux"];
2021-11-06 14:18:27 +00:00
};
2022-04-27 11:10:16 +00:00
2021-11-06 14:18:27 +00:00
ptw = {
programs = {
alacritty.enable = true;
2022-11-14 16:22:53 +00:00
sway.enable = false;
2021-11-06 14:18:27 +00:00
emacs.enable = true;
firefox.enable = true;
tmux.enable = true;
waybar = {
enable = true;
output = "eDP-1";
};
zsh.enable = true;
git.enable = true;
2022-01-06 15:47:30 +00:00
office.enable = true;
2022-04-27 11:10:16 +00:00
plasma.enable = true;
2022-05-05 09:27:22 +00:00
direnv.enable = true;
2021-11-06 14:18:27 +00:00
};
services = {
2023-07-19 14:23:10 +00:00
yubikey.enable = true;
2022-04-27 11:10:16 +00:00
cups.enable = true;
2022-11-14 16:22:53 +00:00
gnome.enable = false;
2021-11-06 14:18:27 +00:00
kanshi = let
2021-11-06 20:33:05 +00:00
horizontal = "Samsung Electric Company C27F398 H4ZR101145";
2021-11-06 14:18:27 +00:00
helpers = import ../lib/helpers/kanshi.nix;
mkProfile = helpers.mkProfile;
wallpaperScript = helpers.mkWallpaperScript {
inherit pkgs config;
};
in {
enable = true;
profiles = {
2021-11-06 20:33:05 +00:00
laptop = mkProfile {
outputs = [
{
criteria = "eDP-1";
status = "enable";
mode = "1920x1080";
position = "0,0";
}
];
2021-11-07 12:58:22 +00:00
2021-11-06 20:33:05 +00:00
name = "laptop";
script = wallpaperScript;
};
2021-11-07 12:58:22 +00:00
laptopMultihead = mkProfile {
2021-11-06 14:18:27 +00:00
outputs = [
2021-11-06 20:33:05 +00:00
{
2021-11-07 12:58:22 +00:00
criteria = "HDMI-A-1";
2021-11-06 20:33:05 +00:00
status = "enable";
mode = "1920x1080";
position = "-1920,0";
2021-11-06 20:33:05 +00:00
}
2021-11-06 14:18:27 +00:00
{
criteria = "eDP-1";
status = "enable";
mode = "1920x1080";
position = "0,0";
}
];
2021-11-06 20:33:05 +00:00
2021-11-07 12:58:22 +00:00
name = "laptopMultihead";
2021-11-06 14:18:27 +00:00
script = wallpaperScript;
};
};
};
swaync.enable = true;
};
system = {
i18n.enable = true;
singleUser = "alexander";
hostName = "nishimiya";
wireless = true;
primaryInterface = "wlp5s0";
};
virtualisation.enable = true;
};
services = {
xserver = {
enable = true;
layout = "de";
libinput.enable = true;
2023-07-19 14:23:10 +00:00
};
2021-11-06 14:18:27 +00:00
};
2023-07-19 14:23:10 +00:00
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
};
};
2022-09-20 13:08:34 +00:00
2021-11-07 12:58:22 +00:00
environment.systemPackages = with pkgs; [
ansible
2021-11-22 19:55:16 +00:00
gnumake
2023-09-18 11:09:58 +00:00
wireguard-tools
2022-10-18 18:04:39 +00:00
(pkgs.callPackage ./wrapper.nix {
inherit (pkgs) retroarch;
cores = with pkgs.libretro; [
mgba mupen64plus melonds desmume dolphin
];
})
2021-11-07 12:58:22 +00:00
];
2021-11-06 14:18:27 +00:00
programs = {
2023-07-19 14:23:10 +00:00
gnupg.agent = {
pinentryFlavor = "qt";
};
2021-11-06 14:18:27 +00:00
};
}