mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 22:11:54 -05:00
nixosModules: simplify options
This commit is contained in:
parent
e8f5b4bb19
commit
efcc254856
|
@ -14,48 +14,54 @@
|
||||||
./waylandComp.nix
|
./waylandComp.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = lib.mkIf config.ar.home.desktop.enable {
|
config =
|
||||||
dconf = {
|
lib.mkIf (
|
||||||
enable = true;
|
config.ar.home.desktop.cinnamon.enable
|
||||||
settings = {
|
|| config.ar.home.desktop.gnome.enable
|
||||||
"org/gtk/gtk4/settings/file-chooser".sort-directories-first = true;
|
|| config.ar.home.desktop.hyprland.enable
|
||||||
"org/gtk/settings/file-chooser".sort-directories-first = true;
|
|| config.ar.home.desktop.sway.enable
|
||||||
"org/virt-manager/virt-manager/connections" = {
|
) {
|
||||||
autoconnect = ["qemu:///system"];
|
dconf = {
|
||||||
uris = ["qemu:///system"];
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
"org/gtk/gtk4/settings/file-chooser".sort-directories-first = true;
|
||||||
|
"org/gtk/settings/file-chooser".sort-directories-first = true;
|
||||||
|
"org/virt-manager/virt-manager/connections" = {
|
||||||
|
autoconnect = ["qemu:///system"];
|
||||||
|
uris = ["qemu:///system"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk.gtk3.bookmarks =
|
||||||
|
[
|
||||||
|
"file://${config.xdg.userDirs.documents}"
|
||||||
|
"file://${config.xdg.userDirs.download}"
|
||||||
|
"file://${config.xdg.userDirs.music}"
|
||||||
|
"file://${config.xdg.userDirs.videos}"
|
||||||
|
"file://${config.xdg.userDirs.pictures}"
|
||||||
|
"file://${config.home.homeDirectory}/src"
|
||||||
|
]
|
||||||
|
++ lib.optional (
|
||||||
|
osConfig.ar.services.syncthing.enable
|
||||||
|
&& (osConfig.ar.services.syncthing.user == config.home.username)
|
||||||
|
) "file://${config.home.homeDirectory}/sync";
|
||||||
|
|
||||||
|
xdg = {
|
||||||
|
dataFile."backgrounds/".source = ../../files/wallpapers;
|
||||||
|
userDirs = {
|
||||||
|
enable = true;
|
||||||
|
createDirectories = true;
|
||||||
|
desktop = lib.mkDefault "${config.home.homeDirectory}/dsktp";
|
||||||
|
documents = lib.mkDefault "${config.home.homeDirectory}/docs";
|
||||||
|
download = lib.mkDefault "${config.home.homeDirectory}/dwnlds";
|
||||||
|
extraConfig = {XDG_SRC_DIR = "${config.home.homeDirectory}/src";};
|
||||||
|
music = lib.mkDefault "${config.home.homeDirectory}/music";
|
||||||
|
pictures = lib.mkDefault "${config.home.homeDirectory}/pics";
|
||||||
|
publicShare = lib.mkDefault "${config.home.homeDirectory}/pub";
|
||||||
|
templates = lib.mkDefault "${config.home.homeDirectory}/tmplts";
|
||||||
|
videos = lib.mkDefault "${config.home.homeDirectory}/vids";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk.gtk3.bookmarks =
|
|
||||||
[
|
|
||||||
"file://${config.xdg.userDirs.documents}"
|
|
||||||
"file://${config.xdg.userDirs.download}"
|
|
||||||
"file://${config.xdg.userDirs.music}"
|
|
||||||
"file://${config.xdg.userDirs.videos}"
|
|
||||||
"file://${config.xdg.userDirs.pictures}"
|
|
||||||
"file://${config.home.homeDirectory}/src"
|
|
||||||
]
|
|
||||||
++ lib.optional (
|
|
||||||
osConfig.ar.services.syncthing.enable
|
|
||||||
&& (osConfig.ar.services.syncthing.user == config.home.username)
|
|
||||||
) "file://${config.home.homeDirectory}/sync";
|
|
||||||
|
|
||||||
xdg = {
|
|
||||||
dataFile."backgrounds/".source = ../../files/wallpapers;
|
|
||||||
userDirs = {
|
|
||||||
enable = true;
|
|
||||||
createDirectories = true;
|
|
||||||
desktop = lib.mkDefault "${config.home.homeDirectory}/dsktp";
|
|
||||||
documents = lib.mkDefault "${config.home.homeDirectory}/docs";
|
|
||||||
download = lib.mkDefault "${config.home.homeDirectory}/dwnlds";
|
|
||||||
extraConfig = {XDG_SRC_DIR = "${config.home.homeDirectory}/src";};
|
|
||||||
music = lib.mkDefault "${config.home.homeDirectory}/music";
|
|
||||||
pictures = lib.mkDefault "${config.home.homeDirectory}/pics";
|
|
||||||
publicShare = lib.mkDefault "${config.home.homeDirectory}/pub";
|
|
||||||
templates = lib.mkDefault "${config.home.homeDirectory}/tmplts";
|
|
||||||
videos = lib.mkDefault "${config.home.homeDirectory}/vids";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,11 +49,8 @@
|
||||||
wlogout.enable = lib.mkEnableOption "Wlogout session prompt.";
|
wlogout.enable = lib.mkEnableOption "Wlogout session prompt.";
|
||||||
};
|
};
|
||||||
defaultApps = {
|
defaultApps = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkEnableOption "Declaratively set default apps and file associations.";
|
||||||
description = "Declaratively set default apps and file associations.";
|
|
||||||
default = config.ar.home.desktop.enable;
|
|
||||||
type = lib.types.bool;
|
|
||||||
};
|
|
||||||
audioPlayer = {
|
audioPlayer = {
|
||||||
exe = lib.mkOption {
|
exe = lib.mkOption {
|
||||||
description = "Default audio player executable.";
|
description = "Default audio player executable.";
|
||||||
|
@ -209,11 +206,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
desktop = {
|
desktop = {
|
||||||
enable = lib.mkOption {
|
|
||||||
description = "Graphical desktop.";
|
|
||||||
default = osConfig.ar.desktop.enable;
|
|
||||||
type = lib.types.bool;
|
|
||||||
};
|
|
||||||
cinnamon.enable = lib.mkOption {
|
cinnamon.enable = lib.mkOption {
|
||||||
description = "Cinnamon with sane defaults";
|
description = "Cinnamon with sane defaults";
|
||||||
default = osConfig.ar.desktop.cinnamon.enable;
|
default = osConfig.ar.desktop.cinnamon.enable;
|
||||||
|
@ -315,12 +307,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkEnableOption "Gtk, Qt, and application colors.";
|
||||||
description = "Gtk, Qt, and application colors.";
|
|
||||||
default = config.ar.home.desktop.enable;
|
|
||||||
type = lib.types.bool;
|
|
||||||
};
|
|
||||||
gtk = {
|
gtk = {
|
||||||
name = lib.mkOption {
|
name = lib.mkOption {
|
||||||
description = "GTK theme name.";
|
description = "GTK theme name.";
|
||||||
|
|
|
@ -115,6 +115,8 @@
|
||||||
vsCodium.enable = true;
|
vsCodium.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defaultApps.enable = true;
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
startupApps = [(lib.getExe' pkgs.keepassxc "keepassxc")];
|
startupApps = [(lib.getExe' pkgs.keepassxc "keepassxc")];
|
||||||
};
|
};
|
||||||
|
@ -124,6 +126,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
|
enable = true;
|
||||||
wallpaper = "${config.xdg.dataHome}/backgrounds/wallhaven-3led2d.jpg";
|
wallpaper = "${config.xdg.dataHome}/backgrounds/wallhaven-3led2d.jpg";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,14 +38,21 @@
|
||||||
firefox.enable = true;
|
firefox.enable = true;
|
||||||
vsCodium.enable = true;
|
vsCodium.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defaultApps.enable = true;
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
hyprland = {
|
hyprland = {
|
||||||
randomWallpaper = true;
|
randomWallpaper = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
name = "catppuccin-frappe-mauve-compact+normal";
|
name = "catppuccin-frappe-mauve-compact+normal";
|
||||||
|
|
||||||
package = pkgs.catppuccin-gtk.override {
|
package = pkgs.catppuccin-gtk.override {
|
||||||
accents = ["mauve"];
|
accents = ["mauve"];
|
||||||
size = "compact";
|
size = "compact";
|
||||||
|
@ -53,35 +60,43 @@
|
||||||
tweaks = ["normal"];
|
tweaks = ["normal"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
qt = {
|
qt = {
|
||||||
name = "Catppuccin-Frappe-Mauve";
|
name = "Catppuccin-Frappe-Mauve";
|
||||||
|
|
||||||
package = pkgs.catppuccin-kvantum.override {
|
package = pkgs.catppuccin-kvantum.override {
|
||||||
accent = "Mauve";
|
accent = "Mauve";
|
||||||
variant = "Frappe";
|
variant = "Frappe";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Papirus-Dark";
|
name = "Papirus-Dark";
|
||||||
|
|
||||||
package = pkgs.catppuccin-papirus-folders.override {
|
package = pkgs.catppuccin-papirus-folders.override {
|
||||||
flavor = "frappe";
|
flavor = "frappe";
|
||||||
accent = "mauve";
|
accent = "mauve";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cursorTheme = {
|
cursorTheme = {
|
||||||
name = "Catppuccin-Frappe-Dark-Cursors";
|
name = "Catppuccin-Frappe-Dark-Cursors";
|
||||||
size = 24;
|
size = 24;
|
||||||
package = pkgs.catppuccin-cursors.frappeDark;
|
package = pkgs.catppuccin-cursors.frappeDark;
|
||||||
};
|
};
|
||||||
|
|
||||||
font = {
|
font = {
|
||||||
name = "NotoSans Nerd Font";
|
name = "NotoSans Nerd Font";
|
||||||
size = 11;
|
size = 11;
|
||||||
package = pkgs.nerdfonts.override {fonts = ["Noto"];};
|
package = pkgs.nerdfonts.override {fonts = ["Noto"];};
|
||||||
};
|
};
|
||||||
|
|
||||||
terminalFont = {
|
terminalFont = {
|
||||||
name = "NotoSansM Nerd Font";
|
name = "NotoSansM Nerd Font";
|
||||||
size = 11;
|
size = 11;
|
||||||
package = pkgs.nerdfonts.override {fonts = ["Noto"];};
|
package = pkgs.nerdfonts.override {fonts = ["Noto"];};
|
||||||
};
|
};
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
text = "#FAFAFA";
|
text = "#FAFAFA";
|
||||||
background = "#232634";
|
background = "#232634";
|
||||||
|
@ -90,6 +105,7 @@
|
||||||
inactive = "#626880";
|
inactive = "#626880";
|
||||||
shadow = "#1A1A1A";
|
shadow = "#1A1A1A";
|
||||||
};
|
};
|
||||||
|
|
||||||
wallpaper = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg";
|
wallpaper = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,9 +36,15 @@
|
||||||
firefox.enable = true;
|
firefox.enable = true;
|
||||||
vsCodium.enable = true;
|
vsCodium.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defaultApps.enable = true;
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
name = "catppuccin-frappe-mauve-compact+normal";
|
name = "catppuccin-frappe-mauve-compact+normal";
|
||||||
|
|
||||||
package = pkgs.catppuccin-gtk.override {
|
package = pkgs.catppuccin-gtk.override {
|
||||||
accents = ["mauve"];
|
accents = ["mauve"];
|
||||||
size = "compact";
|
size = "compact";
|
||||||
|
@ -46,35 +52,43 @@
|
||||||
tweaks = ["normal"];
|
tweaks = ["normal"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
qt = {
|
qt = {
|
||||||
name = "Catppuccin-Frappe-Mauve";
|
name = "Catppuccin-Frappe-Mauve";
|
||||||
|
|
||||||
package = pkgs.catppuccin-kvantum.override {
|
package = pkgs.catppuccin-kvantum.override {
|
||||||
accent = "Mauve";
|
accent = "Mauve";
|
||||||
variant = "Frappe";
|
variant = "Frappe";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Papirus-Dark";
|
name = "Papirus-Dark";
|
||||||
|
|
||||||
package = pkgs.catppuccin-papirus-folders.override {
|
package = pkgs.catppuccin-papirus-folders.override {
|
||||||
flavor = "frappe";
|
flavor = "frappe";
|
||||||
accent = "mauve";
|
accent = "mauve";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cursorTheme = {
|
cursorTheme = {
|
||||||
name = "Catppuccin-Frappe-Dark-Cursors";
|
name = "Catppuccin-Frappe-Dark-Cursors";
|
||||||
size = 24;
|
size = 24;
|
||||||
package = pkgs.catppuccin-cursors.frappeDark;
|
package = pkgs.catppuccin-cursors.frappeDark;
|
||||||
};
|
};
|
||||||
|
|
||||||
font = {
|
font = {
|
||||||
name = "NotoSans Nerd Font";
|
name = "NotoSans Nerd Font";
|
||||||
size = 11;
|
size = 11;
|
||||||
package = pkgs.nerdfonts.override {fonts = ["Noto"];};
|
package = pkgs.nerdfonts.override {fonts = ["Noto"];};
|
||||||
};
|
};
|
||||||
|
|
||||||
terminalFont = {
|
terminalFont = {
|
||||||
name = "NotoSansM Nerd Font";
|
name = "NotoSansM Nerd Font";
|
||||||
size = 11;
|
size = 11;
|
||||||
package = pkgs.nerdfonts.override {fonts = ["Noto"];};
|
package = pkgs.nerdfonts.override {fonts = ["Noto"];};
|
||||||
};
|
};
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
text = "#FAFAFA";
|
text = "#FAFAFA";
|
||||||
background = "#232634";
|
background = "#232634";
|
||||||
|
@ -83,6 +97,7 @@
|
||||||
inactive = "#626880";
|
inactive = "#626880";
|
||||||
shadow = "#1A1A1A";
|
shadow = "#1A1A1A";
|
||||||
};
|
};
|
||||||
|
|
||||||
wallpaper = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg";
|
wallpaper = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,18 +19,20 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "fallarbor";
|
networking.hostName = "fallarbor";
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
ar = {
|
ar = {
|
||||||
apps.steam.enable = true;
|
apps = {
|
||||||
|
firefox.enable = true;
|
||||||
|
steam.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
base = {
|
base = {
|
||||||
enable = true;
|
enable = true;
|
||||||
sambaAutoMount = false;
|
sambaAutoMount = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
enable = true;
|
|
||||||
greetd.enable = true;
|
greetd.enable = true;
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,16 +24,15 @@
|
||||||
|
|
||||||
ar = {
|
ar = {
|
||||||
apps = {
|
apps = {
|
||||||
steam.enable = true;
|
firefox.enable = true;
|
||||||
podman.enable = true;
|
podman.enable = true;
|
||||||
|
steam.enable = true;
|
||||||
virt-manager.enable = true;
|
virt-manager.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
base.enable = true;
|
base.enable = true;
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
enable = true;
|
|
||||||
|
|
||||||
greetd = {
|
greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
ar = {
|
ar = {
|
||||||
apps = {
|
apps = {
|
||||||
|
firefox.enable = true;
|
||||||
podman.enable = true;
|
podman.enable = true;
|
||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
virt-manager.enable = true;
|
virt-manager.enable = true;
|
||||||
|
@ -32,8 +33,6 @@
|
||||||
base.enable = true;
|
base.enable = true;
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
enable = true;
|
|
||||||
|
|
||||||
greetd = {
|
greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -161,6 +161,12 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nix-serve = {
|
||||||
|
enable = true;
|
||||||
|
secretKeyFile = "/var/cache-priv-key.pem";
|
||||||
|
};
|
||||||
|
|
||||||
samba = {
|
samba = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
@ -197,6 +203,7 @@ in {
|
||||||
|
|
||||||
ar = {
|
ar = {
|
||||||
apps = {
|
apps = {
|
||||||
|
firefox.enable = true;
|
||||||
nicotine-plus.enable = true;
|
nicotine-plus.enable = true;
|
||||||
podman.enable = true;
|
podman.enable = true;
|
||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
|
@ -220,8 +227,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
enable = true;
|
|
||||||
|
|
||||||
greetd = {
|
greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -248,8 +253,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
binaryCache.enable = true;
|
|
||||||
|
|
||||||
ollama = {
|
ollama = {
|
||||||
enable = true;
|
enable = true;
|
||||||
gpu = "amd";
|
gpu = "amd";
|
||||||
|
|
|
@ -23,13 +23,15 @@
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
ar = {
|
ar = {
|
||||||
apps.steam.enable = true;
|
apps = {
|
||||||
|
firefox.enable = true;
|
||||||
|
podman.enable = true;
|
||||||
|
steam.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
base.enable = true;
|
base.enable = true;
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
enable = true;
|
|
||||||
|
|
||||||
greetd = {
|
greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -23,13 +23,14 @@
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
ar = {
|
ar = {
|
||||||
|
apps.firefox.enable = true;
|
||||||
|
|
||||||
base = {
|
base = {
|
||||||
enable = true;
|
enable = true;
|
||||||
zramSwap.size = 100;
|
zramSwap.size = 100;
|
||||||
};
|
};
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
enable = true;
|
|
||||||
cinnamon.enable = true;
|
cinnamon.enable = true;
|
||||||
lightdm.enable = true;
|
lightdm.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,21 +1,25 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = lib.mkIf config.ar.apps.steam.enable {
|
config =
|
||||||
programs = {
|
lib.mkIf (
|
||||||
gamescope.enable = config.ar.desktop.steam.enable;
|
config.ar.apps.steam.enable
|
||||||
|
|| config.ar.desktop.steam.enable
|
||||||
|
) {
|
||||||
|
programs = {
|
||||||
|
gamescope.enable = config.ar.desktop.steam.enable;
|
||||||
|
|
||||||
steam = {
|
steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dedicatedServer.openFirewall = true;
|
dedicatedServer.openFirewall = true;
|
||||||
extraCompatPackages = with pkgs; [proton-ge-bin];
|
extraCompatPackages = with pkgs; [proton-ge-bin];
|
||||||
gamescopeSession.enable = config.ar.desktop.steam.enable;
|
gamescopeSession.enable = config.ar.desktop.steam.enable;
|
||||||
localNetworkGameTransfers.openFirewall = true;
|
localNetworkGameTransfers.openFirewall = true;
|
||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,25 +15,33 @@
|
||||||
./waylandComp.nix
|
./waylandComp.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = lib.mkIf config.ar.desktop.enable {
|
config =
|
||||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
lib.mkIf (
|
||||||
|
config.ar.desktop.cinnamon.enable
|
||||||
|
|| config.ar.desktop.gnome.enable
|
||||||
|
|| config.ar.desktop.hyprland.enable
|
||||||
|
|| config.ar.desktop.plasma.enable
|
||||||
|
|| config.ar.desktop.steam.enable
|
||||||
|
|| config.ar.desktop.sway.enable
|
||||||
|
) {
|
||||||
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
liberation_ttf
|
liberation_ttf
|
||||||
nerdfonts
|
nerdfonts
|
||||||
];
|
];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
gnome.gnome-keyring.enable = true;
|
gnome.gnome-keyring.enable = true;
|
||||||
gvfs.enable = true; # Mount, trash, etc.
|
gvfs.enable = true; # Mount, trash, etc.
|
||||||
xserver = {
|
xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xkb = {
|
xkb = {
|
||||||
layout = "us";
|
layout = "us";
|
||||||
variant = "altgr-intl";
|
variant = "altgr-intl";
|
||||||
|
};
|
||||||
|
excludePackages = with pkgs; [xterm];
|
||||||
};
|
};
|
||||||
excludePackages = with pkgs; [xterm];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = lib.mkIf config.ar.desktop.gnome.fprintdFix.enable {
|
config = lib.mkIf config.ar.desktop.gnome.fprintdFix {
|
||||||
# Need to change the order pam loads its modules
|
# Need to change the order pam loads its modules
|
||||||
# to get proper fingerprint behavior on GDM and the lockscreen.
|
# to get proper fingerprint behavior on GDM and the lockscreen.
|
||||||
security.pam.services = {
|
security.pam.services = {
|
||||||
|
|
|
@ -8,48 +8,40 @@
|
||||||
}: {
|
}: {
|
||||||
options.ar = {
|
options.ar = {
|
||||||
apps = {
|
apps = {
|
||||||
firefox.enable = lib.mkOption {
|
firefox.enable = lib.mkEnableOption "Firefox Web Browser.";
|
||||||
description = "Firefox Web Browser.";
|
nicotine-plus.enable = lib.mkEnableOption "Nicotine+ Soulseek client.";
|
||||||
default = config.ar.desktop.enable;
|
podman.enable = lib.mkEnableOption "Podman for OCI container support.";
|
||||||
type = lib.types.bool;
|
steam.enable = lib.mkEnableOption "Valve's Steam for video games.";
|
||||||
};
|
virt-manager.enable = lib.mkEnableOption "Virtual machine client.";
|
||||||
nicotine-plus.enable =
|
|
||||||
lib.mkEnableOption "Nicotine+ Soulseek client.";
|
|
||||||
podman.enable =
|
|
||||||
lib.mkEnableOption "Podman for OCI container support.";
|
|
||||||
steam.enable = lib.mkOption {
|
|
||||||
description = "Valve's Steam for video games.";
|
|
||||||
default = config.ar.desktop.steam.enable;
|
|
||||||
type = lib.types.bool;
|
|
||||||
};
|
|
||||||
virt-manager.enable =
|
|
||||||
lib.mkEnableOption "Virt-manager for virtual machines with TPM and EFI support.";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
containers = {
|
containers = {
|
||||||
nixos = {
|
nixos = {
|
||||||
audiobookshelf = {
|
audiobookshelf = {
|
||||||
enable =
|
enable = lib.mkEnableOption "audiobookshelf server in NixOS container.";
|
||||||
lib.mkEnableOption "audiobookshelf audiobook and podcast server in NixOS container.";
|
|
||||||
mediaDirectory = lib.mkOption {
|
mediaDirectory = lib.mkOption {
|
||||||
description = "Media directory for audiobookshelf.";
|
description = "Media directory for audiobookshelf.";
|
||||||
default = "/mnt/Media";
|
default = "/mnt/Media";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
description = "Port for audiobookshelf.";
|
description = "Port for audiobookshelf.";
|
||||||
default = 13378;
|
default = 13378;
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
navidrome = {
|
navidrome = {
|
||||||
enable =
|
enable = lib.mkEnableOption "Navidrome music server in NixOS container.";
|
||||||
lib.mkEnableOption "Navidrome music server in NixOS container.";
|
|
||||||
musicDirectory = lib.mkOption {
|
musicDirectory = lib.mkOption {
|
||||||
description = "Music directory for Navidrome.";
|
description = "Music directory for Navidrome.";
|
||||||
default = "/mnt/Media/Music";
|
default = "/mnt/Media/Music";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
description = "Port for Navidrome.";
|
description = "Port for Navidrome.";
|
||||||
default = 4533;
|
default = 4533;
|
||||||
|
@ -57,86 +49,99 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
oci = {
|
oci = {
|
||||||
audiobookshelf = {
|
audiobookshelf = {
|
||||||
enable =
|
enable = lib.mkEnableOption "audiobookshelf server in OCI container.";
|
||||||
lib.mkEnableOption "audiobookshelf podcast and audiobook server in OCI container.";
|
|
||||||
mediaDirectory = lib.mkOption {
|
mediaDirectory = lib.mkOption {
|
||||||
description = "Media directory for audiobookshelf.";
|
description = "Media directory for audiobookshelf.";
|
||||||
default = "/mnt/Media";
|
default = "/mnt/Media";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
description = "Port for audiobookshelf.";
|
description = "Port for audiobookshelf.";
|
||||||
default = 13378;
|
default = 13378;
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
freshRSS = {
|
freshRSS = {
|
||||||
enable =
|
enable = lib.mkEnableOption "FreshRSS news client in OCI container.";
|
||||||
lib.mkEnableOption "FreshRSS news client in OCI container.";
|
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
description = "Port for FreshRSS.";
|
description = "Port for FreshRSS.";
|
||||||
default = 8080;
|
default = 8080;
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
enable =
|
enable = lib.mkEnableOption "Jellyfin media server in OCI container.";
|
||||||
lib.mkEnableOption "Jellyfin media server in OCI container.";
|
|
||||||
archiveDirectory = lib.mkOption {
|
archiveDirectory = lib.mkOption {
|
||||||
description = "Archive directory for Jellyfin.";
|
description = "Archive directory for Jellyfin.";
|
||||||
default = "/mnt/Archive";
|
default = "/mnt/Archive";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
mediaDirectory = lib.mkOption {
|
mediaDirectory = lib.mkOption {
|
||||||
description = "Media directory for Jellyfin.";
|
description = "Media directory for Jellyfin.";
|
||||||
default = "/mnt/Media";
|
default = "/mnt/Media";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
description = "Port for Jellyfin.";
|
description = "Port for Jellyfin.";
|
||||||
default = 8096;
|
default = 8096;
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
plexMediaServer = {
|
plexMediaServer = {
|
||||||
enable =
|
enable = lib.mkEnableOption "Plex Media Server in OCI container.";
|
||||||
lib.mkEnableOption "Plex Media Server in OCI container.";
|
|
||||||
archiveDirectory = lib.mkOption {
|
archiveDirectory = lib.mkOption {
|
||||||
description = "Archive directory for Plex Media Server.";
|
description = "Archive directory for Plex Media Server.";
|
||||||
default = "/mnt/Archive";
|
default = "/mnt/Archive";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
mediaDirectory = lib.mkOption {
|
mediaDirectory = lib.mkOption {
|
||||||
description = "Media directory for Plex Media Server.";
|
description = "Media directory for Plex Media Server.";
|
||||||
default = "/mnt/Media";
|
default = "/mnt/Media";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
description = "Port for Plex Media Server.";
|
description = "Port for Plex Media Server.";
|
||||||
default = 32400;
|
default = 32400;
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
transmission = {
|
transmission = {
|
||||||
enable =
|
enable = lib.mkEnableOption "Transmission client in OCI container.";
|
||||||
lib.mkEnableOption "Transmission Bittorrent client in OCI container.";
|
|
||||||
archiveDirectory = lib.mkOption {
|
archiveDirectory = lib.mkOption {
|
||||||
description = "Archive directory for Transmission.";
|
description = "Archive directory for Transmission.";
|
||||||
default = "/mnt/Archive";
|
default = "/mnt/Archive";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
bitTorrentPort = lib.mkOption {
|
bitTorrentPort = lib.mkOption {
|
||||||
description = "Port for BitTorrent p2p services..";
|
description = "Port for BitTorrent p2p services.";
|
||||||
default = 5143;
|
default = 5143;
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
};
|
};
|
||||||
|
|
||||||
mediaDirectory = lib.mkOption {
|
mediaDirectory = lib.mkOption {
|
||||||
description = "Media directory for Transmission.";
|
description = "Media directory for Transmission.";
|
||||||
default = "/mnt/Media";
|
default = "/mnt/Media";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
description = "Port for Transmission.";
|
description = "Port for Transmission.";
|
||||||
default = 9091;
|
default = 9091;
|
||||||
|
@ -145,110 +150,111 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
enable =
|
cinnamon.enable = lib.mkEnableOption "Cinnamon desktop session.";
|
||||||
lib.mkEnableOption "Enable basic GUI X11 and Wayland environment.";
|
|
||||||
cinnamon.enable =
|
|
||||||
lib.mkEnableOption "Cinnamon desktop session.";
|
|
||||||
gnome = {
|
gnome = {
|
||||||
enable =
|
enable = lib.mkEnableOption "GNOME desktop session.";
|
||||||
lib.mkEnableOption "GNOME desktop session.";
|
fprintdFix = lib.mkEnableOption "Fingerprint login fix for GDM";
|
||||||
fprintdFix.enable =
|
|
||||||
lib.mkEnableOption
|
|
||||||
"Fix fprintd & pam issues with GNOME Display Manager.";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
greetd = {
|
greetd = {
|
||||||
enable =
|
enable = lib.mkEnableOption "Greetd display manager.";
|
||||||
lib.mkEnableOption "Greetd display manager.";
|
|
||||||
|
|
||||||
autologin = {
|
autologin = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkEnableOption "Whether to enable autologin.";
|
||||||
description = "Whether to enable autologin.";
|
|
||||||
default = false;
|
|
||||||
type = lib.types.bool;
|
|
||||||
};
|
|
||||||
user = lib.mkOption {
|
user = lib.mkOption {
|
||||||
description = "User to autologin.";
|
description = "User to autologin.";
|
||||||
default = "aly";
|
default = "aly";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
session = lib.mkOption {
|
session = lib.mkOption {
|
||||||
description = "Default command to execute on login.";
|
description = "Default command to execute on login.";
|
||||||
default = lib.getExe config.programs.hyprland.package;
|
default = lib.getExe config.programs.hyprland.package;
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hyprland.enable =
|
|
||||||
lib.mkEnableOption "Hyprland wayland session.";
|
hyprland.enable = lib.mkEnableOption "Hyprland wayland session.";
|
||||||
lightdm.enable =
|
lightdm.enable = lib.mkEnableOption "Lightdm with Catppuccin theme.";
|
||||||
lib.mkEnableOption
|
plasma.enable = lib.mkEnableOption "Plasma desktop session.";
|
||||||
"Lightdm and slick greeter with Catppuccin theme.";
|
steam.enable = lib.mkEnableOption "Steam + Gamescope session.";
|
||||||
plasma.enable =
|
sway.enable = lib.mkEnableOption "Sway wayland session.";
|
||||||
lib.mkEnableOption "Plasma desktop session.";
|
|
||||||
steam.enable =
|
|
||||||
lib.mkEnableOption "Steam + Gamescope session.";
|
|
||||||
sway.enable =
|
|
||||||
lib.mkEnableOption "Sway wayland session.";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
binaryCache.enable = lib.mkEnableOption "nixpkgs cache server.";
|
flatpak.enable = lib.mkEnableOption "Flatpak support with GUI.";
|
||||||
flatpak.enable =
|
|
||||||
lib.mkEnableOption "Flatpak support with GUI.";
|
|
||||||
ollama = {
|
ollama = {
|
||||||
enable = lib.mkEnableOption "Ollama interface for LLMs.";
|
enable = lib.mkEnableOption "Ollama interface for LLMs.";
|
||||||
|
|
||||||
listenAddress = lib.mkOption {
|
listenAddress = lib.mkOption {
|
||||||
description = "Listen Address for Ollama.";
|
description = "Listen Address for Ollama.";
|
||||||
default = "127.0.0.1:11434";
|
default = "127.0.0.1:11434";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
gpu = lib.mkOption {
|
gpu = lib.mkOption {
|
||||||
description = "Type of GPU for enabling GPU acceleration.";
|
description = "Type of GPU for enabling GPU acceleration.";
|
||||||
default = null;
|
default = null;
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
syncthing = {
|
syncthing = {
|
||||||
enable = lib.mkEnableOption "Syncthing sync service.";
|
enable = lib.mkEnableOption "Syncthing sync service.";
|
||||||
|
|
||||||
user = lib.mkOption {
|
user = lib.mkOption {
|
||||||
description = "Specify user Syncthing runs as.";
|
description = "Specify user Syncthing runs as.";
|
||||||
default = "aly";
|
default = "aly";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
syncMusic = lib.mkOption {
|
syncMusic = lib.mkOption {
|
||||||
description = "Whether to sync music folder.";
|
description = "Whether to sync music folder.";
|
||||||
default = config.ar.services.syncthing.enable;
|
default = config.ar.services.syncthing.enable;
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
musicPath = lib.mkOption {
|
musicPath = lib.mkOption {
|
||||||
description = "Whether to sync music folder.";
|
description = "Whether to sync music folder.";
|
||||||
default = "/home/${config.ar.services.syncthing.user}/music";
|
default = "/home/${config.ar.services.syncthing.user}/music";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
tailscale.enable = lib.mkEnableOption "Tailscale WireGuard VPN.";
|
tailscale.enable = lib.mkEnableOption "Tailscale WireGuard VPN.";
|
||||||
};
|
};
|
||||||
|
|
||||||
base = {
|
base = {
|
||||||
enable =
|
enable =
|
||||||
lib.mkEnableOption "Basic system configuration and sane defaults.";
|
lib.mkEnableOption "Basic system configuration and sane defaults.";
|
||||||
|
|
||||||
sambaAutoMount = lib.mkOption {
|
sambaAutoMount = lib.mkOption {
|
||||||
description = "Automounting of mauville Samba Shares.";
|
description = "Automounting of mauville Samba Shares.";
|
||||||
default =
|
default =
|
||||||
config.ar.services.tailscale.enable && !(config.networking.hostName == "mauville");
|
config.ar.services.tailscale.enable
|
||||||
|
&& !(config.networking.hostName == "mauville");
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
plymouth.enable = lib.mkOption {
|
plymouth.enable = lib.mkOption {
|
||||||
description = "Plymouth boot screen with catppuccin theme.";
|
description = "Plymouth boot screen with catppuccin theme.";
|
||||||
default = config.ar.base.enable;
|
default = config.ar.base.enable;
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
description = "zram swap.";
|
description = "zram swap.";
|
||||||
default = config.ar.base.enable;
|
default = config.ar.base.enable;
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
size = lib.mkOption {
|
size = lib.mkOption {
|
||||||
description = "zram swap size relative to RAM.";
|
description = "zram swap size relative to RAM.";
|
||||||
default = 50;
|
default = 50;
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.ar.services.binaryCache.enable {
|
|
||||||
services.nix-serve = {
|
|
||||||
enable = true;
|
|
||||||
secretKeyFile = "/var/cache-priv-key.pem";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -5,7 +5,6 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./binaryCache
|
|
||||||
./flatpak
|
./flatpak
|
||||||
./ollama
|
./ollama
|
||||||
./syncthing
|
./syncthing
|
||||||
|
|
Loading…
Reference in a new issue