edison: various desktop changes

This commit is contained in:
Felix Albrigtsen 2024-05-28 23:04:44 +02:00
parent 67755aa4a0
commit 585dc252cc
8 changed files with 142 additions and 62 deletions

View File

@ -6,10 +6,11 @@
../../base.nix
../../common/metrics-exporters.nix
./hardware-configuration.nix
./desktop.nix
./desktop
];
virtualisation.docker.enable = true;
systemd.coredump.enable = true;
networking = {
hostName = "edison";
@ -29,14 +30,19 @@
environment.variables = { EDITOR = "vim"; };
environment.systemPackages = with pkgs; [
pavucontrol
discord
gimp
gparted
openvpn
pavucontrol
unstable.element-desktop
unstable.hydrus
];
programs.steam.enable = true;
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"discord"
"nvidia-x11"
"nvidia-settings"
"steam"

View File

@ -1,58 +0,0 @@
{ config, pkgs, lib, ... }:
{
services.xserver = {
enable = true;
desktopManager.xfce.enable = true;
videoDrivers = [ "nvidia" ];
layout = "us,no";
xkbVariant = "intl";
};
services.openssh.settings.X11Forwarding = true;
environment.systemPackages = with pkgs; [
xfce.xfce4-pulseaudio-plugin
];
services.picom.enable = true;
hardware.opengl.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
fonts = {
fontDir.enable = true;
packages = with pkgs; [
noto-fonts
noto-fonts-emoji
noto-fonts-cjk-sans
font-awesome
fira-code
hack-font
(nerdfonts.override {
fonts = [
"Hack"
];
})
];
};
# Remote:
services.xrdp = {
enable = true;
defaultWindowManager = "xfce4-session";
openFirewall = true;
};
security.polkit.enable = true;
services.flatpak.enable = true;
users.users."felixalb".packages = [ pkgs.flatpak ];
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
}

View File

@ -0,0 +1,91 @@
{ config, pkgs, lib, ... }:
{
imports = [
./remote.nix
./gnome.nix
./xfce.nix
];
services.xserver = {
enable = true;
displayManager.gdm = {
enable = true;
wayland = true;
};
videoDrivers = [ "nvidia" ];
xkbOptions = "ctrl:nocaps";
layout = "no,us";
xkbVariant = "intl";
};
#hardware.nvidia.modesetting.enable = true; # TODO: Fix this. Steam crashes, and textures/fonts unload when suspended.
hardware.keyboard.zsa.enable = true;
environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.systemPackages = with pkgs; [
xclip
];
hardware.opengl.enable = true;
# Audio
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
hardware.pulseaudio.enable = false;
# Fonts
fonts = {
fontDir.enable = true;
packages = with pkgs; [
noto-fonts
noto-fonts-emoji
noto-fonts-cjk-sans
font-awesome
fira-code
hack-font
(nerdfonts.override {
fonts = [
"Hack"
];
})
];
};
# Dark mode
home-manager.users.felixalb = {
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome.gnome-themes-extra;
};
};
};
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
};
# Misc:
xdg.portal = {
enable = true;
wlr.enable = true;
};
location.provider = "geoclue2";
security.polkit.enable = true;
services.flatpak.enable = true;
services.redshift.enable = true;
users.users."felixalb".packages = [ pkgs.flatpak ];
}

View File

@ -0,0 +1,10 @@
{ config, pkgs, lib, ... }:
{
services.xserver.desktopManager.gnome.enable = true;
environment.systemPackages = with pkgs; [
gnomeExtensions.appindicator
gnome.adwaita-icon-theme
];
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
programs.dconf.enable = true;
}

View File

@ -0,0 +1,12 @@
{ config, pkgs, lib, ... }:
{
# Microsoft-style Remote Desktop:
services.xrdp = {
enable = true;
defaultWindowManager = "xfce4-session"; # Avoid fancy animations, no hyprland/GNOME!
openFirewall = true;
};
# X window forwarding with `ssh -Y`
services.openssh.settings.X11Forwarding = true;
}

View File

@ -0,0 +1,10 @@
{ config, pkgs, lib, ... }:
{
services.xserver = {
desktopManager.xfce.enable = true;
};
environment.systemPackages = with pkgs; [
xfce.xfce4-pulseaudio-plugin
];
}

View File

@ -2,7 +2,17 @@
{
home.packages = with pkgs; [
nix-index
];
unstable.snicat
python3
] ++ (with python3Packages; [
beautifulsoup4
numpy
pillow
pwntools
pycryptodome
requests
]);
imports = [
./../../home/base.nix

View File

@ -53,7 +53,6 @@ in { pkgs ? import <nixpkgs> {} }:
gdb
pwndbg
ropgadget
ropper
wireshark
tcpdump
];