Refactor modules into nixos and home-manager
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m14s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m14s
This commit is contained in:
290
modules/nixos/system/desktop/gnome.nix
Normal file
290
modules/nixos/system/desktop/gnome.nix
Normal file
@ -0,0 +1,290 @@
|
||||
{ config, lib, pkgs, self, ... }:
|
||||
|
||||
let cfg = config.modules.system.desktop.gnome;
|
||||
in {
|
||||
options.modules.system.desktop.gnome = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
|
||||
services.flatpak.enable = true;
|
||||
services.fwupd.enable = true;
|
||||
|
||||
programs.dconf.enable = true;
|
||||
dconf.settings = {
|
||||
"io/github/celluloid-player/celluloid" = {
|
||||
draggable-video-area-enable = true;
|
||||
};
|
||||
"org/gnome/Console" = {
|
||||
font-scale = 1.4;
|
||||
use-system-font = false;
|
||||
custom-font = "ComicShannsMono Nerd Font 10";
|
||||
};
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
cursor-theme = "Adwaita";
|
||||
enable-hot-corners = false;
|
||||
font-name = "Cantarell 11";
|
||||
gtk-theme = "adw-gtk3-dark";
|
||||
icon-theme = "MoreWaita";
|
||||
monospace-font-name = "UbuntuMono Nerd Font 11";
|
||||
toolbar-style = "both-horiz";
|
||||
};
|
||||
"org/gnome/desktop/peripherals/touchpad" = {
|
||||
tap-to-click = true;
|
||||
};
|
||||
"org/gnome/desktop/sound" = {
|
||||
theme-name = "freedesktop";
|
||||
};
|
||||
"org/gnome/desktop/search-providers" = {
|
||||
disabled = [ "org.gnome.Epiphany.desktop" ];
|
||||
};
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
switch-group = [ "<Super>grave" ];
|
||||
switch-group-backward = [ "<Shift><Super>grave" ];
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
button-layout = "appmenu:close";
|
||||
};
|
||||
"org/gnome/gnome-session" = {
|
||||
auto-save-session = true;
|
||||
};
|
||||
"org/gnome/gnome-system-monitor" = {
|
||||
show-dependencies = true;
|
||||
};
|
||||
"org/gnome/mutter" = {
|
||||
center-new-windows = true;
|
||||
edge-tiling = true;
|
||||
experimental-features = [ "scale-monitor-framebuffer" ];
|
||||
};
|
||||
"org/gnome/Ptyxis" = {
|
||||
use-system-font = false;
|
||||
font-name = "ComicShannsMono Nerd Font 11";
|
||||
audible-bell = false;
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
volume-up = [
|
||||
"<Shift>F12"
|
||||
"XF86AudioRaiseVolume"
|
||||
];
|
||||
volume-down = [
|
||||
"<Shift>F11"
|
||||
"XF86AudioLowerVolume"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
enabled-extensions = [
|
||||
"appindicatorsupport@rgcjonas.gmail.com"
|
||||
# "arcmenu@arcmenu.com"
|
||||
"blur-my-shell@aunetx"
|
||||
"burn-my-windows@schneegans.github.com"
|
||||
"clipboard-indicator@tudmotu.com"
|
||||
"CoverflowAltTab@palatis.blogspot.com"
|
||||
# "dash-to-panel@jderose9.github.com"
|
||||
# "desktop-cube@schneegans.github.com"
|
||||
# "EasyScreenCast@iacopodeenosee.gmail.com"
|
||||
"espresso@coadmunkee.github.com"
|
||||
"flypie@schneegans.github.com"
|
||||
# "forge@jmmaranan.com"
|
||||
"gsconnect@andyholmes.github.io"
|
||||
# "gSnap@micahosborne"
|
||||
"hidetopbar@mathieu.bidon.ca"
|
||||
"just-perfection-desktop@just-perfection"
|
||||
# "mediacontrols@cliffniff.github.com"
|
||||
# "mousefollowsfocus@matthes.biz"
|
||||
# "pano@elhan.io"
|
||||
# "paperwm@hedning:matrix.org"
|
||||
"pip-on-top@rafostar.github.com"
|
||||
# "search-light@icedman.github.com"
|
||||
# "smart-auto-move@khimaros.com"
|
||||
"space-bar@luchrioh"
|
||||
# "tiling-assistant@leleat-on-github"
|
||||
"tilingshell@ferrarodomenico.com"
|
||||
"Vitals@CoreCoding.com"
|
||||
"windowIsReady_Remover@nunofarruca@gmail.com"
|
||||
# "worksets@blipk.xyz"
|
||||
# "wsmatrix@martin.zurowietz.de"
|
||||
];
|
||||
favorite-apps = [
|
||||
"firefox.desktop"
|
||||
"org.gnome.Nautilus.desktop"
|
||||
"org.gnome.Ptyxis.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell/extensions/blur-my-shell/panel" = {
|
||||
static-blur = true;
|
||||
};
|
||||
"org/gnome/shell/extensions/blur-my-shell/applications" = {
|
||||
blur = false;
|
||||
};
|
||||
"org/gnome/shell/extensions/burn-my-windows" = {
|
||||
fire-close-effect = false;
|
||||
glide-open-effect = true;
|
||||
glide-close-effect = true;
|
||||
};
|
||||
"org/gnome/shell/extensions/dash-to-panel" = {
|
||||
intellihide = true;
|
||||
panel-positions = ''
|
||||
{"0":"TOP"}
|
||||
'';
|
||||
trans-panel-opacity = 0.3;
|
||||
trans-use-custom-opacity = true;
|
||||
trans-use-dynamic-opacity = true;
|
||||
};
|
||||
"org/gnome/shell/extensions/espresso" = {
|
||||
enable-fullscreen = true;
|
||||
show-indicator = true;
|
||||
show-notifications = false;
|
||||
inhibit-apps = [
|
||||
"com.obsproject.Studio.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell/extensions/flypie" = {
|
||||
preview-on-right-side = true;
|
||||
};
|
||||
"org/gnome/shell/extensions/forge" = {
|
||||
window-gap-size = 8;
|
||||
window-gap-hidden-on-single = false;
|
||||
};
|
||||
"org/gnome/shell/extensions/hidetopbar" = {
|
||||
mouse-sensitive = true;
|
||||
mouse-sensitive-fullscreen-window = true;
|
||||
enable-active-window = false;
|
||||
};
|
||||
"org/gnome/shell/extensions/just-perfection" = {
|
||||
activities-button = false;
|
||||
window-demands-attention-focus = true;
|
||||
workspace-wrap-around = true;
|
||||
};
|
||||
"org/gnome/shell/extensions/paperwm" = {
|
||||
use-default-background = true;
|
||||
};
|
||||
"org/gnome/shell/extensions/pip-on-top" = {
|
||||
stick = true;
|
||||
};
|
||||
"org/gnome/shell/extensions/search-light" = {
|
||||
popup-at-cursor-monitor = true;
|
||||
};
|
||||
"org/gnome/shell/extensions/space-bar/behavior" = {
|
||||
enable-activate-workspace-shortcuts = true;
|
||||
show-empty-workspaces = true;
|
||||
smart-workspace-names = false;
|
||||
};
|
||||
"org/gnome/shell/extensions/tiling-assistant" = {
|
||||
screen-top-gap = 8;
|
||||
screen-right-gap = 8;
|
||||
screen-bottom-gap = 8;
|
||||
screen-left-gap = 8;
|
||||
window-gap = 8;
|
||||
};
|
||||
"org/gnome/shell/extensions/tilingshell" = {
|
||||
inner-gaps = 16;
|
||||
outer-gaps = 8;
|
||||
enable-blur-snap-assistant = true;
|
||||
};
|
||||
"org/gtk/settings/file-chooser" = {
|
||||
show-hidden = true;
|
||||
sort-directories-first = true;
|
||||
};
|
||||
"org/gtk/gtk4/settings/file-chooser" = {
|
||||
show-hidden = true;
|
||||
sort-directories-first = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
QT_STYLE_OVERRIDE = lib.mkForce "kvantum";
|
||||
QT_WAYLAND_DECORATION = lib.mkForce "adwaita";
|
||||
};
|
||||
|
||||
home.configFile = {
|
||||
"Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} {
|
||||
General.theme = "KvLibadwaitaDark";
|
||||
};
|
||||
"Kvantum/KvLibadwaita".source = "${self.inputs.kvlibadwaita}/src/KvLibadwaita";
|
||||
};
|
||||
|
||||
user.packages = with pkgs; [
|
||||
authenticator
|
||||
# bottles
|
||||
# bustle
|
||||
celluloid
|
||||
# d-spy
|
||||
# drawing
|
||||
# fragments
|
||||
dconf-editor
|
||||
ghex
|
||||
# gnome-builder
|
||||
gnome-decoder
|
||||
gnome-firmware
|
||||
gnome-frog
|
||||
# gnome-obfuscate
|
||||
gnome-podcasts
|
||||
identity
|
||||
# mission-center
|
||||
mousam
|
||||
newsflash
|
||||
ptyxis
|
||||
# schemes
|
||||
shortwave
|
||||
sysprof
|
||||
] ++ (if config.virtualisation.podman.enable then [
|
||||
pods
|
||||
] else []);
|
||||
|
||||
environment.systemPackages = with pkgs.unstable; [
|
||||
adw-gtk3
|
||||
kdePackages.qtstyleplugin-kvantum
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
morewaita-icon-theme
|
||||
nautilus-python
|
||||
qadwaitadecorations
|
||||
qadwaitadecorations-qt6
|
||||
|
||||
## Shell extensions
|
||||
gnomeExtensions.appindicator
|
||||
gnomeExtensions.arcmenu
|
||||
gnomeExtensions.blur-my-shell
|
||||
gnomeExtensions.burn-my-windows
|
||||
gnomeExtensions.clipboard-indicator
|
||||
gnomeExtensions.coverflow-alt-tab
|
||||
gnomeExtensions.dash-to-panel
|
||||
gnomeExtensions.desktop-cube
|
||||
gnomeExtensions.easyScreenCast
|
||||
gnomeExtensions.espresso
|
||||
gnomeExtensions.fly-pie
|
||||
gnomeExtensions.forge
|
||||
gnomeExtensions.gsconnect
|
||||
gnomeExtensions.gsnap
|
||||
gnomeExtensions.hide-top-bar
|
||||
gnomeExtensions.just-perfection
|
||||
gnomeExtensions.media-controls
|
||||
gnomeExtensions.mouse-follows-focus
|
||||
# gnomeExtensions.pano (disabled due to: https://github.com/NixOS/nixpkgs/issues/369438)
|
||||
gnomeExtensions.paperwm
|
||||
gnomeExtensions.pip-on-top
|
||||
gnomeExtensions.search-light
|
||||
gnomeExtensions.smart-auto-move
|
||||
gnomeExtensions.space-bar
|
||||
gnomeExtensions.tiling-assistant
|
||||
gnomeExtensions.tiling-shell
|
||||
gnomeExtensions.todotxt
|
||||
gnomeExtensions.vitals
|
||||
gnomeExtensions.window-is-ready-remover
|
||||
gnomeExtensions.worksets
|
||||
gnomeExtensions.workspace-matrix
|
||||
];
|
||||
|
||||
home.services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
|
||||
};
|
||||
}
|
27
modules/nixos/system/desktop/hyprland.nix
Normal file
27
modules/nixos/system/desktop/hyprland.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.system.desktop.hyprland;
|
||||
in {
|
||||
options.modules.system.desktop.hyprland = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
user.packages = with pkgs; [
|
||||
mpv
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
adw-gtk3
|
||||
];
|
||||
|
||||
home.services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
|
||||
};
|
||||
}
|
37
modules/nixos/system/desktop/kde.nix
Normal file
37
modules/nixos/system/desktop/kde.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.system.desktop.kde;
|
||||
in {
|
||||
options.modules.system.desktop.kde = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
};
|
||||
desktopManager.plasma6.enable = true;
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
user.packages = with pkgs; [
|
||||
kmail
|
||||
mpv
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
adw-gtk3
|
||||
];
|
||||
|
||||
home.services.gpg-agent.pinentryPackage = pkgs.pinentry-qt;
|
||||
};
|
||||
}
|
146
modules/nixos/system/desktop/mimeapps.nix
Normal file
146
modules/nixos/system/desktop/mimeapps.nix
Normal file
@ -0,0 +1,146 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.modules.system.desktop.mimeapps;
|
||||
avApp = "io.github.celluloid_player.Celluloid.desktop";
|
||||
imageApp = "org.gnome.eog.desktop";
|
||||
in {
|
||||
options.modules.system.desktop.mimeapps = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
xdg.mime.defaultApplications = {
|
||||
# Audio/video
|
||||
"audio/x-vorbis+ogg" = avApp;
|
||||
"audio/3gpp" = avApp;
|
||||
"audio/3gpp2" = avApp;
|
||||
"audio/aac" = avApp;
|
||||
"audio/ac3" = avApp;
|
||||
"audio/amr" = avApp;
|
||||
"audio/amr-wb" = avApp;
|
||||
"audio/basic" = avApp;
|
||||
"audio/dv" = avApp;
|
||||
"audio/eac3" = avApp;
|
||||
"audio/flac" = avApp;
|
||||
"audio/m4a" = avApp;
|
||||
"audio/midi" = avApp;
|
||||
"audio/mp1" = avApp;
|
||||
"audio/mp2" = avApp;
|
||||
"audio/mp3" = avApp;
|
||||
"audio/mp4" = avApp;
|
||||
"audio/mpeg" = avApp;
|
||||
"audio/mpegurl" = avApp;
|
||||
"audio/mpg" = avApp;
|
||||
"audio/ogg" = avApp;
|
||||
"audio/opus" = avApp;
|
||||
"audio/scpls" = avApp;
|
||||
"audio/vnd.dolby.heaac.1" = avApp;
|
||||
"audio/vnd.dolby.heaac.2" = avApp;
|
||||
"audio/vnd.dolby.mlp" = avApp;
|
||||
"audio/vnd.dts" = avApp;
|
||||
"audio/vnd.dts.hd" = avApp;
|
||||
"audio/vnd.rn-realaudio" = avApp;
|
||||
"audio/wav" = avApp;
|
||||
"audio/webm" = avApp;
|
||||
"audio/x-aac" = avApp;
|
||||
"audio/x-aiff" = avApp;
|
||||
"audio/x-ape" = avApp;
|
||||
"audio/x-flac" = avApp;
|
||||
"audio/x-gsm" = avApp;
|
||||
"audio/x-it" = avApp;
|
||||
"audio/x-m4a" = avApp;
|
||||
"audio/x-matroska" = avApp;
|
||||
"audio/x-mod" = avApp;
|
||||
"audio/x-mp1" = avApp;
|
||||
"audio/x-mp2" = avApp;
|
||||
"audio/x-mp3" = avApp;
|
||||
"audio/x-mpeg" = avApp;
|
||||
"audio/x-mpegurl" = avApp;
|
||||
"audio/x-mpg" = avApp;
|
||||
"audio/x-ms-asf" = avApp;
|
||||
"audio/x-ms-wma" = avApp;
|
||||
"audio/x-musepack" = avApp;
|
||||
"audio/x-pn-aiff" = avApp;
|
||||
"audio/x-pn-au" = avApp;
|
||||
"audio/x-pn-realaudio" = avApp;
|
||||
"audio/x-pn-wav" = avApp;
|
||||
"audio/x-real-audio" = avApp;
|
||||
"audio/x-realaudio" = avApp;
|
||||
"audio/x-s3m" = avApp;
|
||||
"audio/x-scpls" = avApp;
|
||||
"audio/x-shorten" = avApp;
|
||||
"audio/x-speex" = avApp;
|
||||
"audio/x-tta" = avApp;
|
||||
"audio/x-vorbis" = avApp;
|
||||
"audio/x-wav" = avApp;
|
||||
"audio/x-wavpack" = avApp;
|
||||
"audio/x-xm" = avApp;
|
||||
"video/x-ogm+ogg" = avApp;
|
||||
"video/3gp" = avApp;
|
||||
"video/3gpp" = avApp;
|
||||
"video/3gpp2" = avApp;
|
||||
"video/divx" = avApp;
|
||||
"video/dv" = avApp;
|
||||
"video/fli" = avApp;
|
||||
"video/flv" = avApp;
|
||||
"video/mp2t" = avApp;
|
||||
"video/mp4" = avApp;
|
||||
"video/mp4v-es" = avApp;
|
||||
"video/mpeg" = avApp;
|
||||
"video/mpeg-system" = avApp;
|
||||
"video/msvideo" = avApp;
|
||||
"video/ogg" = avApp;
|
||||
"video/quicktime" = avApp;
|
||||
"video/vnd.mpegurl" = avApp;
|
||||
"video/vnd.rn-realvideo" = avApp;
|
||||
"video/webm" = avApp;
|
||||
"video/x-avi" = avApp;
|
||||
"video/x-flc" = avApp;
|
||||
"video/x-fli" = avApp;
|
||||
"video/x-flv" = avApp;
|
||||
"video/x-m4v" = avApp;
|
||||
"video/x-matroska" = avApp;
|
||||
"video/x-mpeg" = avApp;
|
||||
"video/x-mpeg-system" = avApp;
|
||||
"video/x-mpeg2" = avApp;
|
||||
"video/x-ms-asf" = avApp;
|
||||
"video/x-ms-wm" = avApp;
|
||||
"video/x-ms-wmv" = avApp;
|
||||
"video/x-ms-wmx" = avApp;
|
||||
"video/x-msvideo" = avApp;
|
||||
"video/x-nsv" = avApp;
|
||||
"video/x-theora" = avApp;
|
||||
"video/x-theora+ogg" = avApp;
|
||||
|
||||
# Images
|
||||
"image/jpeg" = imageApp;
|
||||
"image/bmp" = imageApp;
|
||||
"image/gif" = imageApp;
|
||||
"image/jpg" = imageApp;
|
||||
"image/pjpeg" = imageApp;
|
||||
"image/png" = imageApp;
|
||||
"image/tiff" = imageApp;
|
||||
"image/webp" = imageApp;
|
||||
"image/x-bmp" = imageApp;
|
||||
"image/x-gray" = imageApp;
|
||||
"image/x-icb" = imageApp;
|
||||
"image/x-ico" = imageApp;
|
||||
"image/x-png" = imageApp;
|
||||
"image/x-portable-anymap" = imageApp;
|
||||
"image/x-portable-bitmap" = imageApp;
|
||||
"image/x-portable-graymap" = imageApp;
|
||||
"image/x-portable-pixmap" = imageApp;
|
||||
"image/x-xbitmap" = imageApp;
|
||||
"image/x-xpixmap" = imageApp;
|
||||
"image/x-pcx" = imageApp;
|
||||
"image/svg+xml" = imageApp;
|
||||
"image/svg+xml-compressed" = imageApp;
|
||||
"image/vnd.wap.wbmp" = imageApp;
|
||||
"image/x-icns" = imageApp;
|
||||
};
|
||||
};
|
||||
}
|
60
modules/nixos/system/wireless.nix
Normal file
60
modules/nixos/system/wireless.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{ config, lib, pkgs, self, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.modules.system.wireless;
|
||||
in {
|
||||
options.modules.system.wireless = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = mdDoc "Automatically connect to known networks";
|
||||
};
|
||||
interfaces = mkOption {
|
||||
default = [ ]; # All interfaces
|
||||
example = [ "wlan0" ];
|
||||
description = mdDoc "Interfaces for `wpa_supplicant` to bind to";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
age.secrets."passwords/networks" = {
|
||||
file = "${self.inputs.secrets}/passwords/networks.age";
|
||||
};
|
||||
|
||||
networking = {
|
||||
wireless = {
|
||||
enable = true;
|
||||
interfaces = cfg.interfaces;
|
||||
secretsFile = config.age.secrets."passwords/networks".path;
|
||||
networks = {
|
||||
"Apollo 600 Mbps".pskRaw = "ext:PSK_APOLLO";
|
||||
};
|
||||
};
|
||||
networkmanager.ensureProfiles.profiles = {
|
||||
"Apollo" = {
|
||||
connection = {
|
||||
id = "Apollo 600 Mbps";
|
||||
type = "wifi";
|
||||
};
|
||||
wifi = {
|
||||
mode = "infrastructure";
|
||||
ssid = "Apollo 600 Mbps";
|
||||
};
|
||||
wifi-security = {
|
||||
auth-alg = "open";
|
||||
key-mgmt = "wpa-psk";
|
||||
psk = "";
|
||||
};
|
||||
ipv4 = {
|
||||
method = "auto";
|
||||
};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "stable-privacy";
|
||||
method = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user