initial commit
This commit is contained in:
commit
ebc1be5217
143 changed files with 7721 additions and 0 deletions
45
modules/features/desktop/audio.nix
Normal file
45
modules/features/desktop/audio.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ ... }:
|
||||
{
|
||||
config.dendritic.features.audio = {
|
||||
nixosModules = [
|
||||
(
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable sound with pipewire.
|
||||
services.pulseaudio.enable = false;
|
||||
# hardware.alsa.enablePersistence = true;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
extraConfig.pipewire.adjust-sample-rate = {
|
||||
"context.properties" = {
|
||||
"default.clock.rate" = 192000;
|
||||
#"defautlt.allowed-rates" = [ 192000 48000 44100 ];
|
||||
"defautlt.allowed-rates" = [ 192000 ];
|
||||
#"default.clock.quantum" = 32;
|
||||
#"default.clock.min-quantum" = 32;
|
||||
#"default.clock.max-quantum" = 32;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pipewire
|
||||
wireplumber
|
||||
easyeffects
|
||||
pavucontrol
|
||||
];
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
22
modules/features/desktop/bluetooth.nix
Normal file
22
modules/features/desktop/bluetooth.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ ... }:
|
||||
{
|
||||
config.dendritic.features.bluetooth = {
|
||||
nixosModules = [
|
||||
(
|
||||
{ lib, ... }:
|
||||
{
|
||||
|
||||
services.blueman.enable = true;
|
||||
hardware.bluetooth = {
|
||||
enable = lib.mkForce true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
services.upower = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
148
modules/features/desktop/dolphin.nix
Normal file
148
modules/features/desktop/dolphin.nix
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
{ ... }:
|
||||
{
|
||||
config.dendritic.features.dolphin.homeModules = [
|
||||
(
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
user = config.dendritic.current.primaryUser;
|
||||
|
||||
placesXbel = ''
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE xbel>
|
||||
<xbel version="1.0"
|
||||
xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks">
|
||||
|
||||
<bookmark href="file:///home/${user}/Documents">
|
||||
<title>Documents</title>
|
||||
<info>
|
||||
<metadata owner="http://freedesktop.org">
|
||||
<bookmark:icon name="folder-documents"/>
|
||||
<bookmark:isSystemItem>false</bookmark:isSystemItem>
|
||||
</metadata>
|
||||
</info>
|
||||
</bookmark>
|
||||
|
||||
<bookmark href="file:///home/${user}/Downloads">
|
||||
<title>Downloads</title>
|
||||
<info>
|
||||
<metadata owner="http://freedesktop.org">
|
||||
<bookmark:icon name="folder-download"/>
|
||||
<bookmark:isSystemItem>false</bookmark:isSystemItem>
|
||||
</metadata>
|
||||
</info>
|
||||
</bookmark>
|
||||
|
||||
<bookmark href="file:///home/${user}/repos">
|
||||
<title>Repositories</title>
|
||||
<info>
|
||||
<metadata owner="http://freedesktop.org">
|
||||
<bookmark:icon name="folder-git"/>
|
||||
<bookmark:isSystemItem>false</bookmark:isSystemItem>
|
||||
</metadata>
|
||||
</info>
|
||||
</bookmark>
|
||||
</xbel>
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
kdePackages.dolphin
|
||||
kdePackages.kio
|
||||
kdePackages.kio-extras
|
||||
kdePackages.kio-fuse
|
||||
kdePackages.ark
|
||||
kdePackages.ffmpegthumbs
|
||||
kdePackages.kdegraphics-thumbnailers
|
||||
# whitesur-icon-theme
|
||||
];
|
||||
|
||||
# Helps some non-KDE apps pick Dolphin for directory browsing.
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"inode/directory" = [ "org.kde.dolphin.desktop" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Dolphin / KDE bookmarks ("Places" in the sidebar).
|
||||
home.file.".local/share/user-places.xbel".text = placesXbel;
|
||||
|
||||
# Optional: keep GTK bookmarks too, for apps that still use them.
|
||||
gtk.gtk3.bookmarks = [
|
||||
"file:///home/${user}/Documents Documents"
|
||||
"file:///home/${user}/Downloads Downloads"
|
||||
"file:///home/${user}/repos Repositories"
|
||||
];
|
||||
|
||||
# Basic KDE config so Dolphin behaves sanely outside Plasma.
|
||||
xdg.configFile."kdeglobals".text = ''
|
||||
[Icons]
|
||||
Theme=WhiteSur
|
||||
|
||||
[KDE]
|
||||
SingleClick=false
|
||||
'';
|
||||
|
||||
# Dolphin settings.
|
||||
xdg.configFile."dolphinrc".text = ''
|
||||
[General]
|
||||
BrowseThroughArchives=true
|
||||
ShowFullPath=false
|
||||
ShowSpaceInfo=true
|
||||
ShowZoomSlider=true
|
||||
|
||||
[KFileDialog Settings]
|
||||
Places Icons Auto-resize=false
|
||||
Places Icons Static Size=22
|
||||
|
||||
[MainWindow]
|
||||
MenuBar=Disabled
|
||||
ToolBarsMovable=Disabled
|
||||
|
||||
[PreviewSettings]
|
||||
Plugins=appimagethumbnail,audiothumbnail,blenderthumbnail,comicbookthumbnail,directorythumbnail,ebookthumbnail,exrthumbnail,fontthumbnail,gvsthumbnail,htmlthumbnail,imagethumbnail,jpegthumbnail,opendocumentthumbnail,postscriptthumbnail,rawthumbnail,svgthumbnail,windowsexethumbnail
|
||||
|
||||
[UiSettings]
|
||||
ShowStatusBar=false
|
||||
ShowZoomSlider=true
|
||||
'';
|
||||
|
||||
# File dialog / view settings.
|
||||
xdg.configFile."kiorc".text = ''
|
||||
[Confirmations]
|
||||
ConfirmDelete=true
|
||||
ConfirmEmptyTrash=true
|
||||
|
||||
[Executable scripts]
|
||||
behaviourOnLaunch=alwaysAsk
|
||||
'';
|
||||
|
||||
# Optional: make Ark the preferred archive app in many cases.
|
||||
xdg.desktopEntries.ark = {
|
||||
name = "Ark";
|
||||
exec = "ark %U";
|
||||
terminal = false;
|
||||
categories = [
|
||||
"Qt"
|
||||
"KDE"
|
||||
"Utility"
|
||||
"Archiving"
|
||||
];
|
||||
mimeType = [
|
||||
"application/zip"
|
||||
"application/x-tar"
|
||||
"application/x-compressed-tar"
|
||||
"application/x-bzip-compressed-tar"
|
||||
"application/x-xz-compressed-tar"
|
||||
"application/x-7z-compressed"
|
||||
"application/x-rar"
|
||||
];
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_ICON_DIR = "${pkgs.whitesur-icon-theme}/share/icons/WhiteSur";
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
29
modules/features/desktop/earlyoom.nix
Normal file
29
modules/features/desktop/earlyoom.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ ... }:
|
||||
{
|
||||
config.dendritic.features.earlyoom = {
|
||||
nixosModules = [
|
||||
(
|
||||
{ ... }:
|
||||
{
|
||||
services.earlyoom = {
|
||||
enable = true;
|
||||
|
||||
freeMemThreshold = 15;
|
||||
freeSwapThreshold = 10;
|
||||
|
||||
extraArgs = [
|
||||
"-g"
|
||||
"--sort-by-rss"
|
||||
|
||||
"--avoid"
|
||||
"^(niri|ghostty|systemd|qemu-system.*)"
|
||||
|
||||
"--prefer"
|
||||
"^(brave|electron|chromium|firefox|libreoffice|gimp|podman|conmon)"
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
21
modules/features/desktop/gnupg-agent.nix
Normal file
21
modules/features/desktop/gnupg-agent.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ ... }:
|
||||
{
|
||||
config.dendritic.features.gnupg-agent = {
|
||||
nixosModules = [
|
||||
(
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
SSH_AUTH_SOCK = "/run/user/1000/gnupg/S.gpg-agent.ssh";
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
90
modules/features/desktop/niri.nix
Normal file
90
modules/features/desktop/niri.nix
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
{ ... }:
|
||||
{
|
||||
config.dendritic.features.wm-niri = {
|
||||
homeModules = [
|
||||
(
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.niri.homeModules.niri
|
||||
../../home/programs/niri/settings.nix
|
||||
../../home/programs/niri/keybinds.nix
|
||||
../../home/programs/niri/rules.nix
|
||||
../../home/programs/niri/autostart.nix
|
||||
../../home/programs/niri/noctaliashell.nix
|
||||
];
|
||||
|
||||
services.gnome-keyring.enable = true;
|
||||
}
|
||||
)
|
||||
|
||||
];
|
||||
nixosModules = [
|
||||
(
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../nixos/gui/xdg.nix
|
||||
];
|
||||
services.greetd =
|
||||
let
|
||||
niri-config = pkgs.writeText "niri-config" ''
|
||||
hotkey-overlay {
|
||||
skip-at-startup
|
||||
}
|
||||
environment {
|
||||
GTK_USE_PORTAL "0"
|
||||
GDK_DEBUG "no-portals"
|
||||
}
|
||||
|
||||
// other settings
|
||||
|
||||
spawn-at-startup "sh" "-c" "${pkgs.greetd.regreet}/bin/regreet; pkill -f niri"
|
||||
'';
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "niri -c ${niri-config}";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.regreet.enable = true;
|
||||
# services.displayManager.enable = false;
|
||||
# services.displayManager = {
|
||||
# sddm = {
|
||||
# package = pkgs.kdePackages.sddm;
|
||||
# enable = true;
|
||||
# wayland.enable = true;
|
||||
# };
|
||||
# };
|
||||
# services.displayManager.gdm = {
|
||||
# enable = false;
|
||||
# wayland = true;
|
||||
# };
|
||||
services.displayManager.enable = lib.mkForce false;
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
xkb = {
|
||||
variant = "";
|
||||
layout = "us";
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
variables = {
|
||||
TERMINAL = "ghostty";
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
PAGER = "moar";
|
||||
PASSWORD_STORE_DIR = "$HOME/.local/share/password-store";
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
36
modules/features/desktop/theme-stylix.nix
Normal file
36
modules/features/desktop/theme-stylix.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ ... }:
|
||||
{
|
||||
config.dendritic.features = {
|
||||
theme-home-stylix = {
|
||||
includeInEmbeddedHomeManager = false;
|
||||
homeModules = [
|
||||
({ inputs, pkgs, ... }: {
|
||||
imports = [
|
||||
inputs.stylix.homeModules.stylix
|
||||
];
|
||||
|
||||
stylix.enable = true;
|
||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool-light.yaml";
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
theme-system-stylix.nixosModules = [
|
||||
({ inputs, pkgs, ... }: {
|
||||
imports = [
|
||||
inputs.stylix.nixosModules.stylix
|
||||
];
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool-light.yaml";
|
||||
fonts = {
|
||||
monospace = {
|
||||
name = "JetBrainsMono Nerd Font";
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
36
modules/features/desktop/wayland.nix
Normal file
36
modules/features/desktop/wayland.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ ... }:
|
||||
{
|
||||
config.dendritic.features.wayland = {
|
||||
nixosModules = [
|
||||
(
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
wlr-randr
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
POLKIT_AUTH_AGENT = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
GSETTINGS_SCHEMA_DIR = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
# WLR_RENDERER = "vulkan";
|
||||
GTK_USE_PORTAL = "1";
|
||||
#NIXOS_XDG_OPEN_USE_PORTAL = "1"; # Sets the desktop portal to use flatpak
|
||||
WLR_NO_HARDWARE_CURSOR = "1";
|
||||
GDK_BACKEND = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue