now using flake-parts; refactored nixosConfigurations; using hm standalone
This commit is contained in:
parent
7f64d49052
commit
816496fbab
104 changed files with 1414 additions and 1910 deletions
31
hosts/rotterdam/boot.nix
Normal file
31
hosts/rotterdam/boot.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
qubesnsh = pkgs.writeTextFile {
|
||||
name = "qubes.nsh";
|
||||
text = "HD1f65535a1:EFI\\qubes\\grubx64.efi";
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
boot = {
|
||||
kernelParams = [
|
||||
"processor.max_cstate=1" # Fixes bug where ryzen cpus freeze when in highest C state
|
||||
"clearcpuid=514"
|
||||
"amdgpu.ppfeaturemask=0xfffd3fff" # Fixes amdgpu freezing
|
||||
];
|
||||
# QubesOS boot entry
|
||||
loader.systemd-boot = {
|
||||
extraFiles = {
|
||||
"efi/edk2-shell/shell.efi" = "${pkgs.edk2-uefi-shell}/shell.efi";
|
||||
"qubes.nsh" = qubesnsh;
|
||||
};
|
||||
extraEntries."qubes.conf" = ''
|
||||
title Qubes OS
|
||||
efi /efi/edk2-shell/shell.efi
|
||||
options -nointerrupt qubes.nsh
|
||||
sort-key ab
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
82
hosts/rotterdam/hardware-configuration.nix
Normal file
82
hosts/rotterdam/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"amdgpu"
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
luks.devices."cryptroot" = {
|
||||
device = "/dev/disk/by-uuid/f7dd4142-7109-4493-834d-4a831777f08d";
|
||||
keyFile = "/dev/disk/by-partuuid/add5fc14-e20f-48be-8b2a-0799ef04d3cb";
|
||||
};
|
||||
};
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/3287dbc3-c0fa-4096-a0b3-59b017cfecc8";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@root"
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
];
|
||||
};
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/3287dbc3-c0fa-4096-a0b3-59b017cfecc8";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@home"
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
];
|
||||
};
|
||||
"/boot/efi" = {
|
||||
device = "/dev/disk/by-uuid/F2A2-CF5A";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"noatime"
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
"/nix" = {
|
||||
device = "/dev/disk/by-uuid/3287dbc3-c0fa-4096-a0b3-59b017cfecc8";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@nix"
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
];
|
||||
};
|
||||
"/persistent" = {
|
||||
device = "/dev/disk/by-uuid/3287dbc3-c0fa-4096-a0b3-59b017cfecc8";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@persistent"
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
8
hosts/rotterdam/hardware.nix
Normal file
8
hosts/rotterdam/hardware.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware = {
|
||||
amdgpu.opencl.enable = true;
|
||||
graphics.extraPackages = with pkgs; [ rocmPackages.clr.icd ];
|
||||
};
|
||||
}
|
||||
31
hosts/rotterdam/programs.nix
Normal file
31
hosts/rotterdam/programs.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
reboot-into-qubes = pkgs.makeDesktopItem {
|
||||
name = "reboot-into-qubes";
|
||||
icon = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/vinceliuice/Qogir-icon-theme/31f267e1f5fd4e9596bfd78dfb41a03d3a9f33ee/src/scalable/apps/distributor-logo-qubes.svg";
|
||||
sha256 = "sha256-QbHr7s5Wcs7uFtfqZctMyS0iDbMfiiZOKy2nHhDOfn0=";
|
||||
};
|
||||
desktopName = "Qubes OS";
|
||||
genericName = "Reboot into Qubes OS";
|
||||
categories = [ "System" ];
|
||||
startupNotify = true;
|
||||
exec = pkgs.writeShellScript "reboot-into-qubes" ''
|
||||
${pkgs.yad}/bin/yad --form \
|
||||
--title="Qubes OS" \
|
||||
--image distributor-logo-qubes \
|
||||
--text "Are you sure you want to reboot into Qubes OS?" \
|
||||
--button="Yes:0" --button="Cancel:1"
|
||||
if [ $? -eq 0 ]; then
|
||||
systemctl reboot --boot-loader-entry=qubes.conf
|
||||
fi
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
environment.systemPackages = [ reboot-into-qubes ];
|
||||
|
||||
programs.steam.dedicatedServer.openFirewall = true;
|
||||
}
|
||||
11
hosts/rotterdam/services.nix
Normal file
11
hosts/rotterdam/services.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards.main = {
|
||||
ids = [ "5653:0001" ];
|
||||
settings.main = {
|
||||
esc = "overload(meta, esc)";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue