diff --git a/home-manager/home.nix b/home-manager/home.nix index 9792a6d..f058d41 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -18,7 +18,8 @@ overlays = [ # Add overlays your own flake exports (from overlays and pkgs dir): outputs.overlays.additions - outputs.overlays.modifications + outputs.overlays.selfsuper + outputs.overlays.finalprev outputs.overlays.unstable-packages inputs.blender-bin.overlays.default ]; diff --git a/home-manager/sway/sway.nix b/home-manager/sway/sway.nix index 73ec5af..16e7cc5 100644 --- a/home-manager/sway/sway.nix +++ b/home-manager/sway/sway.nix @@ -15,7 +15,6 @@ # Enable Sway and write some scripts wayland.windowManager.sway = { enable = true; - #package = pkgs.unstable.swayfx; wrapperFeatures.gtk = true; checkConfig = false; extraConfig = let diff --git a/nixos/modules/base.nix b/nixos/base.nix similarity index 87% rename from nixos/modules/base.nix rename to nixos/base.nix index 31ebc84..626277c 100644 --- a/nixos/modules/base.nix +++ b/nixos/base.nix @@ -10,8 +10,8 @@ }: { # You can import other NixOS modules here imports = [ - ./networking.nix - ./gpg.nix + ./modules/networking.nix + ./modules/gpg.nix inputs.nix-minecraft.nixosModules.minecraft-servers ]; @@ -20,7 +20,8 @@ overlays = [ # Add overlays your own flake exports (from overlays and pkgs dir): outputs.overlays.additions - outputs.overlays.modifications + outputs.overlays.selfsuper + outputs.overlays.finalprev outputs.overlays.unstable-packages inputs.nix-minecraft.overlay ]; @@ -63,18 +64,15 @@ # Set timezone time.timeZone = let - secrets = import ../modules/secrets.nix; + secrets = import ./modules/secrets.nix; in secrets.timeZone; - # Select internationalisation properties. + # Select a terminal font console = { earlySetup = true; - font = "${pkgs.kbd}/share/consolefonts/Lat2-Terminus16.psfu.gz"; - packages = with pkgs; [ - terminus_font - kbd - ]; - useXkbConfig = true; + font = "${pkgs.terminus_font}/share/consolefonts/ter-u22n.psf.gz"; + packages = with pkgs; [ terminus_font ]; + keyMap = "us"; }; # Enable git diff --git a/nixos/desktop.nix b/nixos/desktop.nix index 99a6d4d..f18c17d 100644 --- a/nixos/desktop.nix +++ b/nixos/desktop.nix @@ -1,7 +1,7 @@ { imports = [ # Base configs - ./modules/base.nix + ./base.nix # Import users and groups ./users/jimbo.nix @@ -24,8 +24,9 @@ # Hardware ./hardware/machines/desktop.nix ./hardware/systemdboot.nix - ./hardware/nvidia.nix ./hardware/opengl.nix + ./hardware/nvidia.nix + #./hardware/nouveau.nix # Services ./services/openssh.nix diff --git a/nixos/hardware/machines/desktop.nix b/nixos/hardware/machines/desktop.nix index 547d024..c3441f8 100644 --- a/nixos/hardware/machines/desktop.nix +++ b/nixos/hardware/machines/desktop.nix @@ -4,6 +4,7 @@ commonKernelParams = [ # Nvidia settings "nvidia_drm.fbdev=1" + "nouveau.config=NvGspRm=1" # VM/GPU passthrough "amd_iommu=on" diff --git a/nixos/hardware/nouveau.nix b/nixos/hardware/nouveau.nix new file mode 100644 index 0000000..bfd9504 --- /dev/null +++ b/nixos/hardware/nouveau.nix @@ -0,0 +1,4 @@ +{pkgs, ...}: { + # Enable video drivers + services.xserver.videoDrivers = ["nouveau"]; +} diff --git a/nixos/hardware/nvidia.nix b/nixos/hardware/nvidia.nix index 90b016b..7d06fae 100644 --- a/nixos/hardware/nvidia.nix +++ b/nixos/hardware/nvidia.nix @@ -1,17 +1,10 @@ -{pkgs, config, ... }: { +{pkgs, config, ...}: { # Enable video drivers services.xserver.videoDrivers = ["nvidia"]; - hardware.nvidia = { modesetting.enable = true; nvidiaSettings = false; package = config.boot.kernelPackages.nvidiaPackages.beta; open = false; }; - - environment.sessionVariables = { - CUDA_PATH = "${pkgs.cudatoolkit}"; - EXTRA_LDFLAGS = "-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib"; - EXTRA_CCFLAGS = "-I/usr/include"; - }; } diff --git a/nixos/hardware/opengl.nix b/nixos/hardware/opengl.nix index 58a57c1..8f4d052 100644 --- a/nixos/hardware/opengl.nix +++ b/nixos/hardware/opengl.nix @@ -1,13 +1,11 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { # Enable OpenGL hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; + package = pkgs.unstable.mesa.drivers; + package32 = pkgs.unstable.pkgsi686Linux.mesa.drivers; extraPackages = with pkgs; [ vulkan-loader vulkan-validation-layers diff --git a/nixos/server.nix b/nixos/server.nix index a9f67fc..2cbc79e 100644 --- a/nixos/server.nix +++ b/nixos/server.nix @@ -1,7 +1,7 @@ { imports = [ # Base configs - ./modules/base.nix + ./base.nix # Import users and groups ./users/jimbo.nix diff --git a/overlays/default.nix b/overlays/default.nix index 92a84a7..ea19dab 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -6,11 +6,15 @@ # This one contains whatever you want to overlay # You can change versions, add patches, set compilation flags, anything really. # https://nixos.wiki/wiki/Overlays - modifications = (self: super: { + selfsuper = (self: super: { mpv = super.mpv.override { scripts = with self.mpvScripts; [mpris sponsorblock thumbnail]; }; }); + + finalprev = (final: prev: { + # Patches go here + }); # Unstable nixpkgs and nur through 'pkgs.unstable' and 'pkgs.nur' unstable-packages = final: _prev: {