DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

14cef2b1ee1884a9e332b57d0a6924f1ec2f2357 — Jonni Liljamo 4 months ago 214bf51
feat(roles/nvidia, roles/plasma, hosts/alice): nvidia, plasma, alice setup
4 files changed, 73 insertions(+), 1 deletions(-)

M hosts/alice/default.nix
M roles/default.nix
A roles/nvidia.nix
A roles/plasma.nix
M hosts/alice/default.nix => hosts/alice/default.nix +13 -1
@@ 13,7 13,7 @@
    };
  };

  #roles.audio.enable = true;
  roles.audio.enable = true;

  roles.git = {
    enable = true;


@@ 28,4 28,16 @@
          smtpserverport = 465
    '';
  };

  roles.shell.enable = true;
  roles.zellij.enable = true;
  roles.kitty.enable = true;

  roles.nvidia.enable = true;
  roles.plasma = {
    enable = true;
    enableHDR = true;
  };

  roles.steam.enable = true;
}

M roles/default.nix => roles/default.nix +2 -0
@@ 7,6 7,8 @@
    ./hyprland.nix
    ./kitty.nix
    ./nix.nix
    ./nvidia.nix
    ./plasma.nix
    ./qutebrowser.nix
    ./shell.nix
    ./steam.nix

A roles/nvidia.nix => roles/nvidia.nix +31 -0
@@ 0,0 1,31 @@
{
  config,
  lib,
  ...
}: let
  cfg = config.roles.nvidia;
in {
  options.roles.nvidia = {
    enable = lib.mkEnableOption "NVIDIA drivers";
  };

  config = lib.mkIf cfg.enable {
    arta.unfree.allow = ["nvidia-x11"];

    services.xserver.videoDrivers = ["nvidia"];

    hardware.opengl = {
      enable = true;
      driSupport = true;
      driSupport32Bit = true;
    };

    hardware.nvidia = {
      modesetting.enable = true;
      powerManagement.enable = true;
      open = true;
      nvidiaSettings = false;
    };
    boot.kernelParams = ["nvidia-drm.fbdev=1"];
  };
}

A roles/plasma.nix => roles/plasma.nix +27 -0
@@ 0,0 1,27 @@
{
  config,
  lib,
  pkgs,
  ...
}: let
  cfg = config.roles.plasma;
in {
  options.roles.plasma = {
    enable = lib.mkEnableOption "KDE Plasma";
  };

  config = lib.mkIf cfg.enable {
    services.displayManager = {
      defaultSession = "plasma";
      sddm = {
        enable = true;
        wayland.enable = true;
      };
    };
    services.desktopManager.plasma6.enable = true;

    environment.plasma6.excludePackages = with pkgs.kdePackages; [
      konsole
    ];
  };
}