From 24c99cf22e012e07509505b4efdc528589008dd4 Mon Sep 17 00:00:00 2001 From: schererleander Date: Sun, 17 Aug 2025 00:03:59 +0200 Subject: feat: rename hosts --- hosts/adam/audio.nix | 11 +++++ hosts/adam/configuration.nix | 79 +++++++++++++++++++++++++++++++++++ hosts/adam/hardware-configuration.nix | 41 ++++++++++++++++++ hosts/adam/home.nix | 67 +++++++++++++++++++++++++++++ hosts/adam/wooting.nix | 27 ++++++++++++ 5 files changed, 225 insertions(+) create mode 100644 hosts/adam/audio.nix create mode 100644 hosts/adam/configuration.nix create mode 100644 hosts/adam/hardware-configuration.nix create mode 100644 hosts/adam/home.nix create mode 100644 hosts/adam/wooting.nix (limited to 'hosts/adam') diff --git a/hosts/adam/audio.nix b/hosts/adam/audio.nix new file mode 100644 index 0000000..e34b073 --- /dev/null +++ b/hosts/adam/audio.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; +} diff --git a/hosts/adam/configuration.nix b/hosts/adam/configuration.nix new file mode 100644 index 0000000..5e29cfc --- /dev/null +++ b/hosts/adam/configuration.nix @@ -0,0 +1,79 @@ +{ pkgs, host, username, ... }: + +{ + + imports = [ + ./hardware-configuration.nix + ./audio.nix + ./wooting.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.systemd-boot.consoleMode = "max"; + + # Use latest kernel + boot.kernelPackages = pkgs.linuxPackages_latest; + + # Graphics + hardware.graphics = { + enable = true; + enable32Bit = true; + extraPackages = with pkgs; [ + amdvlk + ]; + }; + + environment.variables.AMD_VULKAN_ICD = "RADV"; + + # Network + networking = { + hostName = host; + networkmanager.enable = true; + }; + + # Improve startup time + systemd.services.NetworkManager-wait-online.enable = false; + + # Time + time.timeZone = "Europe/Berlin"; + + # Keymap + console.keyMap = "de"; + + # User + users.users.${username} = { + isNormalUser = true; + extraGroups = [ + "networkmanager" + "wheel" + "video" + "input" + ]; + shell = pkgs.zsh; + ignoreShellProgramCheck = true; + }; + + services = { + openssh.enable = true; + gnome.gnome-keyring.enable = true; + }; + + xdg.portal = { + enable = true; + wlr.enable = true; + }; + + security.polkit.enable = true; + + programs.dconf.enable = true; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + nixpkgs.config.allowUnfree = true; + + system.stateVersion = "25.05"; +} diff --git a/hosts/adam/hardware-configuration.nix b/hosts/adam/hardware-configuration.nix new file mode 100644 index 0000000..9338f30 --- /dev/null +++ b/hosts/adam/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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 = [ "nvme" "xhci_pci" "ahci" "usbhid" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/9723eaab-4969-45e2-8364-b20aa6f4e120"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/29E6-B167"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/fb68b9c4-9305-4cf5-8279-3cae83524983"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp11s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/adam/home.nix b/hosts/adam/home.nix new file mode 100644 index 0000000..3e831d8 --- /dev/null +++ b/hosts/adam/home.nix @@ -0,0 +1,67 @@ +{ pkgs, ... }: + +{ + imports = [ + ../../modules/home-manager + ]; + + home.username = "leander"; + home.homeDirectory = "/home/leander"; + + programs.home-manager.enable = true; + + home.packages = with pkgs; [ + obsidian + firefox + imv + mpv + + xdg-utils + pulsemixer + + # fonts + noto-fonts + noto-fonts-cjk-sans + noto-fonts-emoji + ]; + + gtk = { + enable = true; + theme = { + name = "Adwaita-dark"; + package = pkgs.gnome-themes-extra; + }; + gtk3.extraConfig = { + Settings = '' + gtk-application-prefer-dark-theme=1 + ''; + }; + gtk4.extraConfig = { + Settings = '' + gtk-application-prefer-dark-theme=1 + ''; + }; + }; + + home.pointerCursor = { + gtk.enable = true; + name = "Adwaita"; + package = pkgs.adwaita-icon-theme; + size = 24; + }; + + programs.zsh.shellAliases = { + open = "xdg-open"; + }; + + dev.enable = true; + + sway.enable = true; + waybar.enable = true; + foot.enable = true; + spicetify.enable = true; + zathura.enable = true; + nixcord.enable = true; + + home.stateVersion = "25.05"; +} diff --git a/hosts/adam/wooting.nix b/hosts/adam/wooting.nix new file mode 100644 index 0000000..742ef29 --- /dev/null +++ b/hosts/adam/wooting.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: + +{ + services.udev.extraRules = '' + # Wooting One Legacy + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="uaccess" + SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="uaccess" + + # Wooting One update mode + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", TAG+="uaccess" + + # Wooting Two Legacy + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="uaccess" + SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="uaccess" + + # Wooting Two update mode + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", TAG+="uaccess" + + # Generic Wootings + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", TAG+="uaccess" + SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", TAG+="uaccess" + ''; + + environment.systemPackages = with pkgs; [ + wootility + ]; +} -- cgit v1.3.1