Add convertible config
This commit is contained in:
parent
968f0105bd
commit
4675a1de03
3 changed files with 145 additions and 0 deletions
73
hosts/convertible/default.nix
Normal file
73
hosts/convertible/default.nix
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
# NOTE: Dual booted with windows 11. Disable fast-boot in power plan and bios and turn off hibernate to get wifi and bluetooth working. This only works once but on reboot is borked again. So using the old school BLT dongle.
|
||||||
|
#
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
vars,
|
||||||
|
unstable,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../modules/virtualization/docker.nix
|
||||||
|
../../modules/virtualization/qemu.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
# Boot Options
|
||||||
|
loader = {
|
||||||
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
configurationLimit = 3;
|
||||||
|
};
|
||||||
|
efi = {
|
||||||
|
canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
timeout = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.secrets = {
|
||||||
|
"/crypto_keyfile.bin" = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable swap on luks
|
||||||
|
boot.initrd.luks.devices."luks-4397a73c-b1b9-4fd0-8f7d-21d5159269b8".device = "/dev/disk/by-uuid/4397a73c-b1b9-4fd0-8f7d-21d5159269b8";
|
||||||
|
boot.initrd.luks.devices."luks-4397a73c-b1b9-4fd0-8f7d-21d5159269b8".keyFile = "/crypto_keyfile.bin";
|
||||||
|
|
||||||
|
boot.kernelParams = ["i915.force_probe=9a49"];
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||||
|
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||||
|
vaapiVdpau
|
||||||
|
libvdpau-va-gl
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# i18n.inputmethod = {
|
||||||
|
# enabled = "fcitx5";
|
||||||
|
# # fcitx5.addons = with pkgs; [
|
||||||
|
# # fcitx5-mozc
|
||||||
|
# # fcitx5-gtk
|
||||||
|
# # ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
gnome.enable = true;
|
||||||
|
awesome.enable = true;
|
||||||
|
|
||||||
|
services.tailscale.enable = true;
|
||||||
|
services.tailscale.useRoutingFeatures = "client";
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs;
|
||||||
|
[
|
||||||
|
tailscale
|
||||||
|
nextcloud-client
|
||||||
|
calibre
|
||||||
|
libreoffice
|
||||||
|
vscode
|
||||||
|
]
|
||||||
|
++ (with unstable; [xournalpp]);
|
||||||
|
};
|
||||||
|
}
|
46
hosts/convertible/hardware-configuration.nix
Normal file
46
hosts/convertible/hardware-configuration.nix
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod"];
|
||||||
|
boot.initrd.kernelModules = [];
|
||||||
|
boot.kernelModules = ["kvm-intel"];
|
||||||
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/e36453a3-629d-4704-a42e-180bf3640722";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."luks-5f04c1e9-c3fe-42fb-97d1-0833bf66435a".device = "/dev/disk/by-uuid/5f04c1e9-c3fe-42fb-97d1-0833bf66435a";
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/A2B4-1BBE";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{device = "/dev/disk/by-uuid/b16f0d66-5aec-4e0e-8162-c8e87e19888c";}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
|
@ -50,4 +50,30 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
convertible = lib.nixosSystem {
|
||||||
|
# Desktop Profile
|
||||||
|
inherit system;
|
||||||
|
specialArgs = {
|
||||||
|
# Pass Flake Variable
|
||||||
|
inherit inputs system unstable hyprland vars split-monitor-workspaces;
|
||||||
|
host = {
|
||||||
|
hostName = "convertible";
|
||||||
|
mainMonitor = "DP-3";
|
||||||
|
secondMonitor = "DP-1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
# Modules Used
|
||||||
|
nur.nixosModules.nur
|
||||||
|
hyprland.nixosModules.default
|
||||||
|
./convertible
|
||||||
|
./configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
# Home-Manager Module
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue