nixos/spec/koumakyou/default.nix
2025-01-13 11:52:09 +08:00

90 lines
2.3 KiB
Nix

{
pkgs,
lib,
config,
jovian,
...
}:
{
global = {
id = "0a920a834b5f480bab258040096d4c6e";
fs.esp.uuid = "ACB3-4AFF";
fs.type = "xfs";
fs.store = "6b885fa6-5c13-4a46-94da-a287232606b9";
fs.cryptsetup.enable = true;
fs.cryptsetup.uuids.persist = "b4a5a66d-b491-4ac7-bc71-1ea8b1a503be";
boot.lanzaboote = true;
gpu.enable = true;
gpu.type = "amdgpu";
};
home = {
jetbrains.enable = true;
vscode.enable = true;
minecraft.enable = true;
minecraft.user = "app";
};
users.homeModules = [
{
wayland.windowManager.sway.config = {
input."1046:911:Goodix_Capacitive_TouchScreen".map_to_output = "eDP-1";
output = {
eDP-1.scale = "1.75";
};
};
}
];
powerManagement.enable = true;
powerManagement.cpuFreqGovernor = "performance";
powerManagement.resumeCommands = ''
# trackpad driver resume workaround
${pkgs.kmod}/bin/modprobe -r bmi260_i2c
${pkgs.kmod}/bin/modprobe -r bmi260_core
${pkgs.kmod}/bin/modprobe bmi260_i2c
${pkgs.kmod}/bin/modprobe bmi260_core
'';
console.packages = [ pkgs.terminus_font ];
console.font = "ter-v32n";
console.earlySetup = true;
specialisation.desktop.configuration = {
global.jovian = false;
jovian.steamos.useSteamOSConfig = false;
services.greetd.settings.default_session.command =
let
cfg = config.programs.regreet;
in
"${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${pkgs.writeShellScript "cageResolution" ''
${lib.getExe pkgs.wlr-randr} --output eDP-1 --scale 2
${lib.getExe cfg.package}
''}";
environment.systemPackages = with pkgs; [
(writeShellScriptBin "sway-logout" ''
${systemd}/bin/systemctl --user unset-environment WAYLAND_DISPLAY SWAYSOCK
${sway}/bin/swaymsg exit
'')
];
};
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
hardware.cpu.intel.updateMicrocode = true;
imports = [
jovian.nixosModules.jovian
./jovian.nix
];
}