From bf1acd55b7df4860a80ada7865fa19f9042fb13d Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Sun, 29 Jun 2025 16:24:28 +0100 Subject: [PATCH] wip --- hosts/arrakis/default.nix | 6 +- hosts/common/features/intel-graphics.nix | 12 ---- hosts/common/features/nvidia.nix | 17 ------ hosts/common/features/wayland.nix | 24 -------- hosts/common/features/x11.nix | 75 ------------------------ hosts/desktop/default.nix | 6 +- hosts/live/default.nix | 18 ------ hosts/trantor/default.nix | 55 ----------------- hosts/trantor/hardware-configuration.nix | 41 ------------- 9 files changed, 4 insertions(+), 250 deletions(-) delete mode 100644 hosts/common/features/intel-graphics.nix delete mode 100644 hosts/common/features/nvidia.nix delete mode 100644 hosts/common/features/wayland.nix delete mode 100644 hosts/common/features/x11.nix delete mode 100644 hosts/live/default.nix delete mode 100644 hosts/trantor/default.nix delete mode 100644 hosts/trantor/hardware-configuration.nix diff --git a/hosts/arrakis/default.nix b/hosts/arrakis/default.nix index a869d65..20c9fd6 100644 --- a/hosts/arrakis/default.nix +++ b/hosts/arrakis/default.nix @@ -10,10 +10,8 @@ ../common/global ../common/features/laptop.nix ../common/features/networking.nix - ../common/features/intel-graphics.nix - ../common/features/wayland.nix - ../common/features/x11.nix - # ../common/features/greetd.nix + ../common/features/gpu/intel-graphics.nix + ../common/features/display ../common/features/pipewire.nix ../common/features/docker.nix ../common/features/fonts.nix diff --git a/hosts/common/features/intel-graphics.nix b/hosts/common/features/intel-graphics.nix deleted file mode 100644 index 130364d..0000000 --- a/hosts/common/features/intel-graphics.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, ... }: -{ - services.xserver.videoDrivers = [ "intel" ]; - hardware.graphics = { - enable = true; - extraPackages = with pkgs; [ - vpl-gpu-rt # or intel-media-sdk for QSV - ]; - }; - - programs.xwayland.enable = true; -} diff --git a/hosts/common/features/nvidia.nix b/hosts/common/features/nvidia.nix deleted file mode 100644 index e6c7f44..0000000 --- a/hosts/common/features/nvidia.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, pkgs, ... }: -{ - hardware.graphics.enable = true; - services.xserver.videoDrivers = [ "nvidia" ]; - hardware.nvidia = { - modesetting.enable = true; - open = false; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; - - programs.xwayland.enable = true; - - environment.variables = { - "WEBKIT_DISABLE_DMABUF_RENDERER" = "1"; - }; -} diff --git a/hosts/common/features/wayland.nix b/hosts/common/features/wayland.nix deleted file mode 100644 index 0e2b496..0000000 --- a/hosts/common/features/wayland.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ inputs, pkgs, ... }: -{ - environment.systemPackages = with pkgs; [ - wl-clipboard - hyprland - ]; - - # thumbnail support for images - services.tumbler.enable = true; - - environment.etc."xdg/wayland-sessions/hyprland.desktop".text = '' - [Desktop Entry] - Name=Hyprland - Comment=Hyprland Wayland Compositor - Exec=Hyprland - Type=Application - DesktopNames=Hyprland - ''; - - nix.settings = { - substituters = [ "https://hyprland.cachix.org" ]; - trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; - }; -} diff --git a/hosts/common/features/x11.nix b/hosts/common/features/x11.nix deleted file mode 100644 index fe3e379..0000000 --- a/hosts/common/features/x11.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ inputs, pkgs, ... }: -let - hyprland-session = pkgs.makeDesktopItem { - name = "Hyprland"; - comment = "Hyprland (custom desktop file)"; - desktopNames = "Hyprland"; - exec = "Hyprland"; - type = "Application"; - }; -in -{ - - services.xserver = { - enable = true; - displayManager = { - startx.enable = true; - gdm.enable = true; - }; - autoRepeatDelay = 250; - autoRepeatInterval = 30; - }; - services.displayManager.sessionPackages = with pkgs; [ - hyprland - ]; - - services.desktopManager = { - gnome.enable = true; - }; - services.xserver.windowManager = { - i3 = { - enable = true; - extraPackages = with pkgs; [ - dmenu - i3status - ]; - }; - }; - programs.i3lock.enable = true; - - programs.dconf.enable = true; - services = { - sysprof.enable = true; - gnome = { - evolution-data-server.enable = true; - glib-networking.enable = true; - gnome-keyring.enable = true; - gnome-online-accounts.enable = true; - }; - }; - environment.gnome.excludePackages = - (with pkgs; [ - gnome-photos - gnome-tour - gnome-console - gnome-text-editor - gedit - ]) - ++ (with pkgs; [ - cheese # webcam tool - gnome-music - gnome-terminal - epiphany # web browser - geary # email reader - evince # document viewer - totem # video player - tali # poker game - iagno # go game - hitori # sudoku game - atomix # puzzle game - gnome-contacts - gnome-initial-setup - gnome-shell-extensions - ]); - -} diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index aef15e5..b349057 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -9,10 +9,8 @@ ./hardware-configuration.nix ../common/global ../common/features/networking.nix - ../common/features/nvidia.nix - ../common/features/wayland.nix - ../common/features/x11.nix - # ../common/features/greetd.nix + ../common/features/gpu/nvidia.nix + ../common/features/display ../common/features/pipewire.nix ../common/features/docker.nix ../common/features/fonts.nix diff --git a/hosts/live/default.nix b/hosts/live/default.nix deleted file mode 100644 index 8621c23..0000000 --- a/hosts/live/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - inputs, - pkgs, - modulesPath, - nixpkgs, - lib, - ... -}: -{ - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - imports = [ - (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") - ../common/global - ../common/features/hyprland.nix - ../common/features/docker.nix - ../common/features/fonts.nix - ]; -} diff --git a/hosts/trantor/default.nix b/hosts/trantor/default.nix deleted file mode 100644 index b474200..0000000 --- a/hosts/trantor/default.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - inputs, - pkgs, - config, - ... -}: -{ - imports = [ - ./hardware-configuration.nix - ../common/global - ../common/features/laptop.nix - ../common/features/networking.nix - ../common/features/nvidia.nix - ../common/features/wayland.nix - ../common/features/pipewire.nix - ../common/features/docker.nix - ../common/features/fonts.nix - ../common/features/nix-ld.nix - ../common/features/bluetooth.nix - ]; - - networking.hostName = "arrakis"; - - boot = { - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - }; - - system.stateVersion = "24.05"; - - programs.zsh.enable = true; - - users.users.naps62 = { - isNormalUser = true; - description = "Miguel Palhas"; - extraGroups = [ - "networkmanager" - "input" - "wheel" - "docker" - ]; - shell = pkgs.zsh; - initialHashedPassword = "$y$j9T$uRTzF/sBdrqVGZTRhPuR00$wgLgEGlq.lEmlCPiy69jkbtfC9HKpyaVPDHDdBGtE5D"; - openssh.authorizedKeys.keys = - let - authorizedKeys = pkgs.fetchurl { - url = "https://github.com/naps62.keys"; - sha256 = "sha256-dP8LjaburPwfIr2jhly9rMwOLJyUkQP7Em5IKH/qXbY="; - }; - in - pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys); - }; -} diff --git a/hosts/trantor/hardware-configuration.nix b/hosts/trantor/hardware-configuration.nix deleted file mode 100644 index 94dbaac..0000000 --- a/hosts/trantor/hardware-configuration.nix +++ /dev/null @@ -1,41 +0,0 @@ -# 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" "nvme" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/d0c50eb6-ac06-4912-a28c-a9f21223b5c0"; - fsType = "ext4"; - }; - - boot.initrd.luks.devices."luks-ea55a0cd-a045-44b8-8ea8-7d6f5820db58".device = "/dev/disk/by-uuid/ea55a0cd-a045-44b8-8ea8-7d6f5820db58"; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/84C0-4E34"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = [ ]; - - # 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.docker0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -}