hermes: minor refactor, + remove env vars for WSL

This commit is contained in:
Payas Relekar 2023-08-20 14:25:03 +05:30
parent 13bdffe9fd
commit 17e53b962d

View file

@ -1,7 +1,6 @@
{ pkgs, modulesPath, ... }: { pkgs, modulesPath, ... }:
{ {
imports = [ ./hardware-configuration.nix ]; imports = [ ./hardware-configuration.nix ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -10,7 +9,7 @@
networking = { networking = {
hostName = "hermes"; hostName = "hermes";
networkmanager.enable = true;
hosts = { hosts = {
"192.168.0.7" = [ "bebop" ]; "192.168.0.7" = [ "bebop" ];
"192.168.0.164" = [ "titan" ]; "192.168.0.164" = [ "titan" ];
@ -26,30 +25,31 @@
man.enable = true; man.enable = true;
}; };
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot = {
binfmt.emulatedSystems = [ "aarch64-linux" ];
# ---- loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
loader.efi.efiSysMountPoint = "/boot/efi";
supportedFilesystems = [ "ntfs" ];
# Bootloader. # Setup keyfile
boot.loader.systemd-boot.enable = true; initrd.secrets = {
boot.loader.efi.canTouchEfiVariables = true; "/crypto_keyfile.bin" = null;
boot.loader.efi.efiSysMountPoint = "/boot/efi"; };
boot.supportedFilesystems = [ "ntfs" ];
# Setup keyfile # Enable swap on luks
boot.initrd.secrets = { initrd.luks.devices."luks-8271922a-e889-4f04-8e87-07f0bcde890d".device = "/dev/disk/by-uuid/8271922a-e889-4f04-8e87-07f0bcde890d";
"/crypto_keyfile.bin" = null; initrd.luks.devices."luks-8271922a-e889-4f04-8e87-07f0bcde890d".keyFile = "/crypto_keyfile.bin";
kernelPackages = pkgs.linuxPackages_latest;
}; };
# Enable swap on luks # Enable touchpad support (enabled default in most desktopManager).
boot.initrd.luks.devices."luks-8271922a-e889-4f04-8e87-07f0bcde890d".device = "/dev/disk/by-uuid/8271922a-e889-4f04-8e87-07f0bcde890d"; services.xserver.libinput.enable = true;
boot.initrd.luks.devices."luks-8271922a-e889-4f04-8e87-07f0bcde890d".keyFile = "/crypto_keyfile.bin"; services.xserver.libinput.touchpad.naturalScrolling = true;
services.xserver.libinput.touchpad.middleEmulation = true;
boot.kernelPackages = pkgs.linuxPackages_latest; services.xserver.libinput.touchpad.tapping = true;
# Enable networking
networking.networkmanager.enable = true;
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
@ -62,34 +62,14 @@
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
# If you want to use JACK applications, uncomment this jack.enable = true;
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
}; };
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
services.xserver.libinput.touchpad.naturalScrolling = true;
services.xserver.libinput.touchpad.middleEmulation = true;
services.xserver.libinput.touchpad.tapping = true;
# ----
environment = { environment = {
etc = with pkgs; { etc = with pkgs; {
"jdk".source = jdk; "jdk".source = jdk;
"graal".source = graalvm19-ce; "graal".source = graalvm19-ce;
}; };
variables = {
GTK_THEME = [ "Adwaita:dark" ];
GDK_DPI_SCALE = [ "1.5" ];
GDK_BACKEND = [ "wayland" ];
QT_QPA_PLATFORM = [ "wayland" ];
SDL_VIDEODRIVER = [ "wayland" ];
};
}; };
programs = { programs = {