fix desktop environment

This commit is contained in:
langedev 2023-12-04 17:40:50 -08:00
parent 7db3134d4b
commit 8428e4fe84
7 changed files with 37 additions and 24 deletions

View file

@ -5,8 +5,8 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
systemType = "laptop"; #systemType = "laptop";
#systemType = "desktop"; systemType = "desktop";
in { in {
nix.package = pkgs.nixUnstable; nix.package = pkgs.nixUnstable;
imports = imports =
@ -23,7 +23,7 @@ in {
./modules/audio/pipewire ./modules/audio/pipewire
./modules/shell/fish # This enables fish as the default shell ./modules/shell/fish
./modules/network/browsers/librewolf ./modules/network/browsers/librewolf
./modules/network/syncthing ./modules/network/syncthing

View file

@ -5,6 +5,6 @@
imports = [ imports = [
./hardware/desktop.nix ./hardware/desktop.nix
# ./modules/graphics/nvidia ./modules/graphics/nvidia
]; ];
} }

26
flake.lock generated
View file

@ -9,11 +9,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1699808562, "lastModified": 1701737536,
"narHash": "sha256-wTU1ivhWAAGWO6Fzx4RYFruW8HrIh5X7fjy5NJPaqOc=", "narHash": "sha256-xSmfHhhCL9mAta5jKfcbJxYjCoD2MdLPBMjBUWvYAJI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "0ba2e6870478bcf1af1b6508677b46a3484fb21f", "rev": "3bb9c7c5cf4f2ee30bf821501499f2308d616f94",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -49,11 +49,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1698134075, "lastModified": 1700612854,
"narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=", "narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4", "rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -104,18 +104,18 @@
"flake": false, "flake": false,
"locked": { "locked": {
"host": "gitlab.freedesktop.org", "host": "gitlab.freedesktop.org",
"lastModified": 1699292815, "lastModified": 1701368958,
"narHash": "sha256-HXu98PyBMKEWLqiTb8viuLDznud/SdkdJsx5A5CWx7I=", "narHash": "sha256-7kvyoA91etzVEl9mkA/EJfB6z/PltxX7Xc4gcr7/xlo=",
"owner": "wlroots", "owner": "wlroots",
"repo": "wlroots", "repo": "wlroots",
"rev": "5de9e1a99d6642c2d09d589aa37ff0a8945dcee1", "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
"host": "gitlab.freedesktop.org", "host": "gitlab.freedesktop.org",
"owner": "wlroots", "owner": "wlroots",
"repo": "wlroots", "repo": "wlroots",
"rev": "5de9e1a99d6642c2d09d589aa37ff0a8945dcee1", "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350",
"type": "gitlab" "type": "gitlab"
} }
}, },
@ -135,11 +135,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1697981233, "lastModified": 1700508250,
"narHash": "sha256-y8q4XUwx+gVK7i2eLjfR32lVo7TYvEslyzrmzYEaPZU=", "narHash": "sha256-X4o/mifI7Nhu0UKYlxx53wIC+gYDo3pVM9L2u3PE2bE=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "22e7a65ff9633e1dedfa5317fdffc49f68de2ff2", "rev": "eb120ff25265ecacd0fc13d7dab12131b60d0f47",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -5,7 +5,7 @@
}; };
outputs = { nixpkgs, hyprland, ... }: { outputs = { nixpkgs, hyprland, ... }: {
nixosConfigurations.jibril = nixpkgs.lib.nixosSystem { nixosConfigurations.onizuka = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./configuration.nix ./configuration.nix

View file

@ -8,7 +8,7 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@ -36,6 +36,4 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
} }

View file

@ -5,6 +5,7 @@
services.pipewire = { services.pipewire = {
enable = true; enable = true;
wireplumber.enable = true;
alsa.enable = false; alsa.enable = false;
alsa.support32Bit = false; alsa.support32Bit = false;
pulse.enable = true; pulse.enable = true;

View file

@ -1,7 +1,21 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
services.xserver.videoDrivers = [ "nvidia" ]; # Enable OpenGL
hardware.opengl.enable = true; hardware.opengl = {
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; enable = true;
driSupport = true;
driSupport32Bit = true;
};
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
environment.systemPackages = with pkgs; [
nvidia-vaapi-driver
];
} }