Apps : Separate to gaming, creative etc.

This commit is contained in:
Dmitry Voronin 2024-06-26 12:01:23 +03:00
parent 3037873271
commit a624dc8f5c
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
9 changed files with 225 additions and 151 deletions

View file

@ -8,10 +8,19 @@
module = { module = {
amd.gpu.enable = true; amd.gpu.enable = true;
builder.client.enable = true; builder.client.enable = true;
desktop.sway.enable = true;
intel.cpu.enable = true; intel.cpu.enable = true;
print.enable = true; print.enable = true;
strongswan.enable = true; strongswan.enable = true;
tablet.enable = true; tablet.enable = true;
desktop = {
sway.enable = true;
app = {
common.enable = true;
gaming.enable = true;
creative.enable = true;
dev.enable = true;
extra.enable = true;
};
};
}; };
} }

View file

@ -7,7 +7,6 @@
module = { module = {
builder.client.enable = true; builder.client.enable = true;
desktop.sway.enable = true;
print.enable = true; print.enable = true;
virtmanager.enable = true; virtmanager.enable = true;
amd = { amd = {
@ -15,6 +14,16 @@
cpu.enable = true; cpu.enable = true;
gpu.enable = true; gpu.enable = true;
}; };
desktop = {
sway.enable = true;
app = {
common.enable = true;
creative.enable = true;
dev.enable = true;
extra.enable = true;
gaming.enable = true;
};
};
docker = { docker = {
enable = true; enable = true;
autostart = false; autostart = false;

View file

@ -4,5 +4,9 @@
./Root.nix ./Root.nix
]; ];
module.docker.enable = true; module.docker = {
enable = true;
autostart = true;
rootless = false;
};
} }

View file

@ -11,7 +11,12 @@
module = { module = {
builder.server.enable = true; builder.server.enable = true;
desktop.sway.enable = true; desktop = {
sway.enable = true;
app = {
common.enable = true;
};
};
ftpd = { ftpd = {
enable = true; enable = true;
storage = "/storage/hot/ftp"; storage = "/storage/hot/ftp";

View file

@ -1,4 +1,4 @@
{ lib, ... }: { { ... }: {
imports = [ imports = [
./Filesystem.nix ./Filesystem.nix
]; ];
@ -18,5 +18,14 @@
cpu.enable = true; cpu.enable = true;
gpu.enable = true; gpu.enable = true;
}; };
desktop = {
sway.enable = true;
app = {
common.enable = true;
gaming.enable = true;
creative.enable = true;
dev.enable = true;
};
};
}; };
} }

View file

@ -10,9 +10,17 @@
module = { module = {
builder.client.enable = true; builder.client.enable = true;
desktop.sway.enable = true;
intel.cpu.enable = true; intel.cpu.enable = true;
powerlimit.thinkpad.enable = true; powerlimit.thinkpad.enable = true;
print.enable = true; print.enable = true;
desktop = {
sway.enable = true;
app = {
common.enable = true;
gaming.enable = true;
dev.enable = true;
extra.enable = true;
};
};
}; };
} }

View file

@ -5,10 +5,18 @@
firefox = import ./firefox args; firefox = import ./firefox args;
in { in {
options = { options = {
module.desktop.app.enable = mkEnableOption "Desktop Apps."; module.desktop.app = {
common.enable = mkEnableOption "Common Apps.";
gaming.enable = mkEnableOption "Gaming Apps.";
creative.enable = mkEnableOption "Creative Apps.";
dev.enable = mkEnableOption "Dev Apps.";
extra.enable = mkEnableOption "Extra Apps.";
};
}; };
config = mkIf cfg.enable { xdg.mime.defaultApplications = { config = mkMerge [
# Common apps.
(mkIf cfg.common.enable { xdg.mime.defaultApplications = {
# Use `file -i file.txt` to find file mime type. # Use `file -i file.txt` to find file mime type.
# Use `xdg-mime query default "text/plain"` to find default app. # Use `xdg-mime query default "text/plain"` to find default app.
"application/pdf" = "org.gnome.Evince.desktop"; "application/pdf" = "org.gnome.Evince.desktop";
@ -19,54 +27,24 @@ in {
"video/*" = "mpv.desktop"; "video/*" = "mpv.desktop";
}; };
hardware.graphics = let
packages = with pkgs; [
dxvk
gamescope
pkgs.mangohud
vkd3d
];
in {
extraPackages = packages;
extraPackages32 = packages;
};
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [
anilibria-winmaclinux # Anime!
appimage-run # Tool to run .AppImage files in NixOS. appimage-run # Tool to run .AppImage files in NixOS.
aseprite # Pixel Art draw app. WARNING: Always builds from source.
blanket # Sounds generator.
blender-hip # Blender with HiP support.
calibre # Book library manager.
evince # Document viewer. evince # Document viewer.
foot # Terminal emulator. foot # Terminal emulator.
gimp # Image manipulation program. gimp # Image manipulation program.
gnome.adwaita-icon-theme # GTK icons. gnome.adwaita-icon-theme # GTK icons.
gnome.gnome-calculator # Calculator. gnome.gnome-calculator # Calculator.
gnome.gnome-font-viewer # Font viewer.
gnome.nautilus # File manager. gnome.nautilus # File manager.
jellyfin-media-player # Jellyfin client (self-hosted Netflix). jellyfin-media-player # Jellyfin client (self-hosted Netflix).
loupe # Image viewer. loupe # Image viewer.
obs-studio # Streaming/recording app. obs-studio # Streaming/recording app.
onlyoffice-bin # Office documents app suite. onlyoffice-bin # Office documents app suite.
steam-run # Run native apps in Steam environment, like Minecraft. For Windows games use Bottles.
tor-browser # Privacy browser.
android-studio jetbrains.idea-community # JetBrans IDEs.
bottles dxvk gamescope pkgs.mangohud vkd3d wine64 # Gaming!
(mpv.override {scripts = [mpvScripts.mpris];}) # Media player. (mpv.override {scripts = [mpvScripts.mpris];}) # Media player.
]; ];
variables = { variables = {
# MangoHud.
MANGOHUD = "1";
MANGOHUD_CONFIGFILE = pkgs.writeText "MangoHudConfig" mangohud.config;
MANGOHUD_PRESETSFILE = pkgs.writeText "MangoHudPreset" mangohud.presets;
# Proton.
WINEFSYNC = "1";
# GTK apps compat. # GTK apps compat.
GTK_CSD = 0; GTK_CSD = 0;
@ -79,15 +57,6 @@ in {
}; };
}; };
# File manager file previews.
services.gnome.sushi.enable = true;
# File manager network features.
services.gvfs.enable = true;
# Special packages.
programs.steam.enable = true;
programs.firefox = let programs.firefox = let
mkExtension = install_url: { mkExtension = install_url: {
inherit install_url; inherit install_url;
@ -150,5 +119,66 @@ in {
}; };
}; };
}; };
})
# Gaming.
(mkIf cfg.gaming.enable {
hardware.graphics = let
packages = with pkgs; [
dxvk
gamescope
pkgs.mangohud
vkd3d
];
in {
extraPackages = packages;
extraPackages32 = packages;
}; };
programs.steam.enable = true;
environment = {
systemPackages = with pkgs; [
steam-run
bottles dxvk gamescope pkgs.mangohud vkd3d wine64 # Gaming!
];
variables = {
MANGOHUD = "1";
MANGOHUD_CONFIGFILE = pkgs.writeText "MangoHudConfig" mangohud.config;
MANGOHUD_PRESETSFILE = pkgs.writeText "MangoHudPreset" mangohud.presets;
WINEFSYNC = "1";
};
};
})
# Creative.
(mkIf cfg.creative.enable {
environment.systemPackages = with pkgs; [
aseprite # Pixel Art draw app. WARNING: Always builds from source.
blender-hip # Blender with HiP support.
krita # Draw!
];
})
# Development.
(mkIf cfg.dev.enable {
environment.systemPackages = with pkgs; [
android-studio
jetbrains.idea-community
];
})
# Extras.
(mkIf cfg.extra.enable {
environment.systemPackages = with pkgs; [
anilibria-winmaclinux # Anime!
blanket # Sounds generator.
calibre # Book library manager.
gnome.gnome-font-viewer # Font viewer.
tor-browser # Privacy browser.
];
})
];
} }

View file

@ -7,7 +7,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
module.desktop = { module.desktop = {
app.enable = true; app.common.enable = true;
dconf.enable = true; dconf.enable = true;
dm.enable = true; dm.enable = true;
sound.enable = true; sound.enable = true;

View file

@ -13,7 +13,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
module.desktop = { module.desktop = {
app.enable = true; app.common.enable = true;
bluetooth.enable = true; bluetooth.enable = true;
brightness.enable = true; brightness.enable = true;
dconf.enable = true; dconf.enable = true;