feat: configure desktop

This commit is contained in:
Zoty 2026-03-28 03:28:42 -03:00
parent 2138743d3e
commit 652b1f3dd3
Signed by: Zoty
SSH key fingerprint: SHA256:WsGEGivgl37t3Mth6uugXMOgMCTR7QolIepNbC+j/tA
10 changed files with 201 additions and 15 deletions

13
modules/_home/cursor.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, ...}: {
home.pointerCursor = {
gtk.enable = true;
name = "Bibata-Modern-Ice";
package = pkgs.bibata-cursors;
size = 24;
};
home.sessionVariables = {
XCURSOR_THEME = "Bibata-Modern-Ice";
XCURSOR_SIZE = 24;
};
}

View file

@ -4,6 +4,15 @@
discord discord
]; ];
home.sessionVariables = {
TERMINAL = "wezterm";
XDG_TERMINAL_EMULATOR = "wezterm";
};
systemd.user.targets.niri-session = {
Unit.Wants = [ "xdg-desktop-autostart.target" ];
};
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Zoty"; userName = "Zoty";
@ -36,7 +45,7 @@
"history" "history"
]; ];
}; };
}; };
programs.direnv = { programs.direnv = {
enable = true; enable = true;

20
modules/_home/dolphin.nix Normal file
View file

@ -0,0 +1,20 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
kdePackages.dolphin
kdePackages.qtwayland
kdePackages.kio
kdePackages.kio-fuse
kdePackages.kio-extras
kdePackages.ark
kdePackages.ffmpegthumbs
kdePackages.kded
kdePackages.systemsettings
ffmpegthumbnailer
];
xdg.configFile."xdg-desktop-portal/niri-portals.conf".text = ''
[preferred]
default=gnome;
org.freedesktop.impl.portal.FileChooser=kde;
'';
}

5
modules/_home/mako.nix Normal file
View file

@ -0,0 +1,5 @@
{ ... }: {
services.mako = {
enable = true;
};
}

View file

@ -1,4 +1,53 @@
{ pkgs, ... }: { { pkgs, ... }: {
home.sessionVariables = {
XDG_SESSION_TYPE = "wayland";
XDG_CURRENT_DESKTOP = "niri";
XDG_SESSION_DESKTOP = "niri";
QT_QPA_PLATFORM = "wayland;xcb";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_ENABLE_HIGHDPI_SCALING = "1";
QT_SCALE_FACTOR_ROUNDING_POLICY = "RoundPreferFloor";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
XDG_MENU_PREFIX = "plasma-";
};
systemd.user.services.niri-env-import = {
Unit = {
Description = "Import Niri Wayland environment into systemd and D-Bus";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "oneshot";
ExecStart = pkgs.writeShellScript "niri-env-import" ''
${pkgs.dbus}/bin/dbus-update-activation-environment --systemd \
WAYLAND_DISPLAY \
XDG_CURRENT_DESKTOP \
XDG_SESSION_DESKTOP \
QT_QPA_PLATFORM
'';
RemainAfterExit = true;
};
Install.WantedBy = [ "graphical-session.target" ];
};
systemd.user.services.niri-flake-polkit = {
Unit.After = [ "niri-env-import.service" ];
};
systemd.user.services.xwayland-satellite = {
Unit = {
Description = "Xwayland satellite";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite";
Restart = "on-failure";
};
Install.WantedBy = [ "graphical-session.target" ];
};
xdg.configFile."niri/config.kdl".text = '' xdg.configFile."niri/config.kdl".text = ''
// Modificadores: Mod = Super (tecla Windows) // Modificadores: Mod = Super (tecla Windows)
input { input {
@ -68,6 +117,6 @@
// Screenshot // Screenshot
Print { screenshot; } Print { screenshot; }
Mod+Print { screenshot-screen; } Mod+Print { screenshot-screen; }
} }
''; '';
} }

34
modules/_home/theme.nix Normal file
View file

@ -0,0 +1,34 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
gruvterial-theme
gruvbox-plus-icons
libsForQt5.qt5ct
kdePackages.qt6ct
];
gtk = {
enable = true;
theme = {
name = "Gruvterial-Dark";
package = pkgs.gruvterial-theme;
};
iconTheme = {
name = "Gruvbox-Plus-Dark";
package = pkgs.gruvbox-plus-icons;
};
cursorTheme = {
name = "Bibata-Modern-Ice";
package = pkgs.bibata-cursors;
size = 24;
};
};
qt = {
enable = true;
platformTheme.name = "gtk";
style = {
name = "kvantum";
package = pkgs.kdePackages.qtstyleplugin-kvantum;
};
};
}

View file

@ -15,7 +15,10 @@
}; };
}; };
services.xserver.xkb.layout = "us"; services.xserver = {
enable = false;
layout = "en";
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
curl curl
@ -23,17 +26,22 @@
neovim neovim
btop btop
nixd nixd
]; ];
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
time.timeZone = "America/Sao_Paulo"; time.timeZone = "America/Sao_Paulo";
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
services.dbus.enable = true;
programs.dconf.enable = true;
environment.sessionVariables = {
XDG_SESSION_TYPE = "wayland";
CLUTTER_BACKEND = "wayland";
SDL_VIDEODRIVER = "wayland";
MOZ_ENABLE_WAYLAND = "1";
ELECTRON_OZONE_PLATFORM_HINT = "wayland";
EDITOR = "nvim";
};
}; };
} }

View file

@ -65,8 +65,12 @@
imports = [ imports = [
./_home/default.nix ./_home/default.nix
./_home/niri.nix ./_home/niri.nix
./_home/cursor.nix
./_home/git.nix ./_home/git.nix
./_home/wezterm.nix ./_home/wezterm.nix
./_home/mako.nix
./_home/dolphin.nix
./_home/theme.nix
]; ];
}; };
}; };

View file

@ -15,13 +15,17 @@
grim grim
slurp slurp
wl-clipboard wl-clipboard
mako
xdg-desktop-portal-gnome xdg-desktop-portal-gnome
]; kdePackages.xdg-desktop-portal-kde
xwayland-satellite
];
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gnome ]; extraPortals = [
pkgs.xdg-desktop-portal-gnome
pkgs.kdePackages.xdg-desktop-portal-kde
];
}; };
security.pam.services.swaylock = {}; security.pam.services.swaylock = {};

40
modules/services.nix Normal file
View file

@ -0,0 +1,40 @@
{ den, ... }: {
den.aspects.core.nixos = { pkgs, ... }: {
services = {
libinput.enable = true;
fstrim.enable = true;
gvfs.enable = true;
dbus.implementation = "broker";
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
extraConfig.pipewire."92-low-latency" = {
"content.properties" = {
"default.clock.rate" = 48000;
"default.clock.quantum" = 256;
"default.clock.min-quantum" = 256;
"default.clock.max-quantum" = 256;
};
};
extraConfig.pipewire-pulse."92-low-latency" = {
context.modules = [
{
name = "libpipewire-module-protocol-pulse";
args = {
pulse.min.req = "256/48000";
pulse.default.req = "256/48000";
pulse.max.req = "256/48000";
pulse.min.quantum = "256/48000";
pulse.max.quantum = "256/48000";
};
}
];
};
};
};
};
}