dotfiles/modules/desktop.nix

101 lines
2.2 KiB
Nix

{ pkgs, lib, config, ... }:
with lib;
{
nix = {
extraOptions = "experimental-features = nix-command flakes";
package = pkgs.nixVersions.unstable;
};
# This adds hyprland cache to cachix
nix.settings = {
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
boot.supportedFilesystems = [ "ntfs" ];
services.xserver = {
enable = true;
autorun = false;
# windowManager.awesome = {
# enable = true;
# package = pkgs.awesome;
# };
displayManager = {
startx.enable = true;
sddm = {
enable = false;
};
session = [
{
manage = "desktop";
name = "Hyprland";
start = ''
/home/chris/bin/hyprland &
waitPID=$!
'';
}
];
};
desktopManager.plasma5 = {
enable = true;
runUsingSystemd = true;
};
# desktopManager.gnome.enable = true;
};
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "dbus-run-session startplasma-wayland";
user = "chris";
};
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time -r --window-padding 2 --cmd 'dbus-run-session startplasma-wayland'";
user = "greeter";
};
plasma_session = {
command = "dbus-run-session startplasma-wayland";
user = "chris";
};
hyprland_session = {
command = "/home/chris/bin/hyprland";
user = "chris";
};
};
};
environment.etc."greetd/environments".text = ''
/home/chris/bin/hyprland
fish
bash
dbus-run-session startplasma-wayland
'';
programs.hyprland = {
enable = true;
};
services.avahi = {
enable = true;
nssmdns = true;
};
xdg.portals.extraPortals = [ "xdg-desktop-portal-kde" ];
# Enable sound.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
};
# Needed for some pipewire progs and other gtk apps
programs.dconf.enable = true;
}