nixos/system/desktop.nix
Evie Litherland-Smith 68b4a7b063 Flatten directory/file structure a bit
Move system/home/default.nix into system/default.nix,
system/home/desktop/default.nix into system/desktop.nix to reduce
unnecessary duplication. Moved everything in home/desktop up to home/
and adjusted paths accordingly. Moved wallpapers up to system/ since
it makes sense with where it's used.

Merge allowUnfreePredicate into single place again since it seems to
override rather than combine if used multiple times.

Install NoMachine on all machines again by default.
2024-11-14 08:43:27 +00:00

191 lines
5 KiB
Nix

{ pkgs, username, ... }:
{
nixpkgs.config.chromium.commandLineArgs = "--password-store='gnome-libsecret' --enable-features=UseOzonePlatform --ozone-platform=wayland";
hardware.bluetooth.enable = true;
environment = {
sessionVariables = {
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
WEBKIT_DISABLE_COMPOSITING_MODE = "1";
XDG_SESSION_TYPE = "wayland";
QT_QPA_PLATFORM = "wayland";
};
systemPackages = with pkgs; [
libsecret
libnotify
xdg-utils
wl-clipboard
hunspell
hunspellDicts.en_GB-large
gnome.nautilus
libreoffice-fresh
evince
image-roll
clapper
g4music
ffmpeg
remmina
fractal
webcord
signal-desktop
whatsapp-for-linux
teams-for-linux
twinkle
nomachine-client
];
};
security = {
polkit.enable = true;
pam.loginLimits = [
{
domain = "@users";
item = "rtprio";
type = "-";
value = 1;
}
];
};
programs = {
dconf.enable = true;
noisetorch.enable = true;
seahorse.enable = true;
file-roller.enable = true;
kdeconnect.enable = true;
hyprland.enable = true;
xwayland.enable = true;
};
gtk.iconCache.enable = true;
qt = {
enable = true;
style = "adwaita";
platformTheme = "gnome";
};
services = {
gnome.gnome-keyring.enable = true;
flatpak.enable = true;
printing.enable = true;
tumbler.enable = true;
udisks2.enable = true;
gnome.sushi.enable = true;
gvfs = {
enable = true;
package = pkgs.gnome3.gvfs;
};
kanata = {
enable = true;
keyboards.main = {
config = builtins.readFile ./kanata.kbd;
extraDefCfg = "process-unmapped-keys yes";
};
};
pipewire = {
enable = true;
pulse.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
};
greetd = {
enable = true;
settings =
let
default_session.command = "Hyprland";
in
{
inherit default_session;
initial_session = {
inherit (default_session) command;
user = username;
};
};
};
xserver = {
enable = true;
xkb.layout = "gb";
};
};
xdg.portal = {
enable = true;
config.common.default = "*"; # TODO change for xdg-desktop-portal > 1.17 changes
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
home-manager.users.${username} =
{
config,
pkgs,
osConfig,
...
}:
{
imports = [
./home/hyprland.nix
./home/email/default.nix
./home/calendar/default.nix
./home/terminal/default.nix
./home/emacs/default.nix
./home/browser/default.nix
];
home.file.${config.gtk.gtk2.configLocation}.force = true;
services = {
syncthing.enable = true;
gammastep = {
inherit (osConfig.location) latitude longitude provider;
enable = true;
tray = true;
};
};
gtk = {
enable = true;
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
iconTheme = {
package = (pkgs.papirus-icon-theme.override { color = "magenta"; });
name = "Papirus-Light";
};
};
stylix.targets.gtk.extraCss = with config.lib.stylix.scheme.withHashtag; ''
@define-color accent_color ${base0E-hex};
@define-color accent_bg_color ${base0E-hex};
'';
xdg = {
mime.enable = true;
mimeApps =
let
defaultApplications = import ./mimeapps.nix;
in
{
enable = true;
inherit defaultApplications;
associations.added = defaultApplications;
};
userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects";
};
};
configFile = {
# Stop programs from overriding mimeapps
"mimeapps.list".force = true;
# Ensure GTK config is set
"gtk-3.0/gtk.css".force = true;
"gtk-3.0/settings.ini".force = true;
"gtk-4.0/gtk.css".force = true;
"gtk-4.0/settings.ini".force = true;
# Autostart some programs
"autostart/signal-desktop.desktop".source = "${pkgs.signal-desktop}/share/applications/signal-desktop.desktop";
"autostart/com.github.eneshecan.WhatsAppForLinux.desktop".source = "${pkgs.whatsapp-for-linux}/share/applications/com.github.eneshecan.WhatsAppForLinux.desktop";
"teams-for-linux/config.json".text = builtins.toJSON {
awayOnSystemIdle = true;
closeAppOnCross = false;
followSystemTheme = true;
notificationMethod = "electron";
optInTeamsV2 = true;
spellCheckerLanguages = [ "en_GB" ];
};
};
};
};
}