From 8d151534b1b7a453e58eee481c6d8b988a8b2f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Thu, 18 Apr 2024 20:24:29 +0200 Subject: [PATCH] Make changes for magicman --- flake.nix | 11 +++++- home/hyprland/hyprland_magicman.nix | 10 +----- home/hyprland/magicman.nix | 1 + home/packages/default.nix | 8 ++--- hosts/magicman/configuration.nix | 16 +++++---- hosts/magicman/hardware-configuration.nix | 42 +++++++++++++++++++++++ 6 files changed, 68 insertions(+), 20 deletions(-) create mode 100644 home/hyprland/magicman.nix create mode 100644 hosts/magicman/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index cba565a..316c7fc 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,16 @@ magicman = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit inputs self user; }; - modules = [ ./hosts/magicman ]; + modules = [ + ({ config, pkgs, ... }: { + nixpkgs.overlays = [ + overlay-unstable + ghettoptt.overlays.default + ]; + }) + ./hosts/magicman + sops-nix.nixosModules.sops + ]; }; gunter = nixpkgs.lib.nixosSystem { inherit system; diff --git a/home/hyprland/hyprland_magicman.nix b/home/hyprland/hyprland_magicman.nix index cdc7dc0..51c3ae1 100644 --- a/home/hyprland/hyprland_magicman.nix +++ b/home/hyprland/hyprland_magicman.nix @@ -27,6 +27,7 @@ "$term" = "kitty"; monitor = [ + "eDP-1,1920x1080@60,0x0,1" ]; input = { kb_layout = "no"; @@ -34,11 +35,7 @@ }; env = [ - "LIBVA_DRIVER_NAME,nvidia" "XDG_SESSION_TYPE,wayland" - "GBM_BACKEND,nvidia-drm" - # "__GLX_VENDOR_LIBRARY_NAME,nvidia" - "WLR_NO_HARDWARE_CURSORS,1" ]; decoration = { @@ -86,11 +83,6 @@ ]; workspace = [ - "name:mumble, monitor:$mon_top, persistent:true, default:true" - "name:left, monitor:$mon_left, persistent:true, default:true" - "name:right, monitor:$mon_right, persistent:true, default:true" - "name:main 1, monitor:$mon_center, persistent:true, default:true" - "name:main 2, monitor:$mon_center, persistent:true, default:true" ]; bindm = [ diff --git a/home/hyprland/magicman.nix b/home/hyprland/magicman.nix new file mode 100644 index 0000000..3a1d95c --- /dev/null +++ b/home/hyprland/magicman.nix @@ -0,0 +1 @@ +{ imports = [ ./hyprland_magicman.nix ./waybar ./xdg.nix ./cursor.nix ]; } diff --git a/home/packages/default.nix b/home/packages/default.nix index 4647de9..a55d7ea 100644 --- a/home/packages/default.nix +++ b/home/packages/default.nix @@ -10,9 +10,10 @@ in # Generic tools age alacritty - (unstable.btop.override { - cudaSupport = true; - }) + unstable.btop + # (unstable.btop.override { + # cudaSupport = true; + # }) bzip2 croc easyeffects @@ -93,7 +94,6 @@ in unstable.blender # Homemade shit - notlistener ghettoptt ]; } diff --git a/hosts/magicman/configuration.nix b/hosts/magicman/configuration.nix index 2247651..fc63072 100644 --- a/hosts/magicman/configuration.nix +++ b/hosts/magicman/configuration.nix @@ -35,11 +35,15 @@ # Setup hyprland services.xserver.enable = true; - # programs.hyprland = { - # enable = true; - # xwayland.enable = true; - # portalPackage = pkgs.xdg-desktop-portal-hyprland; - # }; + services.xserver.displayManager = { + gdm.wayland = true; + lightdm.enable = false; + }; + programs.hyprland = { + enable = true; + xwayland.enable = true; + portalPackage = pkgs.xdg-desktop-portal-hyprland; + }; # Setup common XDG env vars environment.sessionVariables = rec { @@ -56,7 +60,7 @@ enable = true; xdgOpenUsePortal = true; extraPortals = (with pkgs; [ - xdg-desktop-portal-hyprland + # xdg-desktop-portal-hyprland xdg-desktop-portal-gtk ]); }; diff --git a/hosts/magicman/hardware-configuration.nix b/hosts/magicman/hardware-configuration.nix new file mode 100644 index 0000000..364d2f3 --- /dev/null +++ b/hosts/magicman/hardware-configuration.nix @@ -0,0 +1,42 @@ +# 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" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/31b20f4c-24bb-4fd1-9a3e-8ccc19fe3d64"; + fsType = "xfs"; + }; + + boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/4bbadd2c-94dd-4d80-94bf-9332d24b57bd"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/7FF3-B061"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/6f2c4906-ad88-4d7e-88ec-61cdda41ce28"; } + ]; + + # 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.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}