dedicated-settings-file #3

Merged
servostar merged 7 commits from dedicated-settings-file into main 2023-12-15 19:56:43 +00:00
4 changed files with 52 additions and 29 deletions
Showing only changes of commit ea5ee00760 - Show all commits

View File

@ -1,8 +1,10 @@
{ lib, ... }:
let
settings = import ./../settings.nix;
in
{ {
imports = [ imports = lib.optionals settings.printing.enable [ ./printing.nix ]
./java.nix ++ lib.optionals settings.xdg.enable [ ./xdg.nix ]
./dotnet.nix ++ lib.optionals settings.java [ ./java.nix ]
./printing.nix ++ lib.optionals settings.dotnet [ ./dotnet.nix ];
./xdg.nix
];
} }

View File

@ -1,5 +1,14 @@
{ pkgs, config, ... }: { { pkgs, lib, config, ... }:
let
settings = import ./../settings.nix;
in
{
config = lib.mkMerge [
{
services.printing.enable = true; services.printing.enable = true;
}
# Avahi daemon
(lib.mkIf settings.printing.avahi {
services.avahi.enable = true; services.avahi.enable = true;
# for a WiFi printer # for a WiFi printer
services.avahi.openFirewall = true; services.avahi.openFirewall = true;
@ -10,4 +19,6 @@
(mkBefore [ "mdns4_minimal [NOTFOUND=return]" ]) # before resolve (mkBefore [ "mdns4_minimal [NOTFOUND=return]" ]) # before resolve
(mkAfter [ "mdns4" ]) # after dns (mkAfter [ "mdns4" ]) # after dns
]); ]);
})
];
} }

View File

@ -1,15 +1,12 @@
{ pkgs, config, ... }: { { pkgs, ... }:
let
settings = import ./../settings.nix;
in
{
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = [ extraPortals = settings.xdg.extraPortals;
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-kde
];
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = settings.xdg.extraPortals;
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-kde
];
} }

View File

@ -1,4 +1,4 @@
{ with import <nixpkgs> {}; {
hardware = { hardware = {
# support for GPUs # support for GPUs
amdgpu = true; amdgpu = true;
@ -16,6 +16,19 @@
dvd = true; # enable DVD decryption + ripping via Handbrake dvd = true; # enable DVD decryption + ripping via Handbrake
bluray = true; # enable Bluray decryption (requires additional setup) bluray = true; # enable Bluray decryption (requires additional setup)
printing = {
enable = true;
avahi = true;
};
xdg = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
];
};
java = true;
dotnet = true;
networking = { networking = {
wireguard = true; # enable wireguard protocol wireguard = true; # enable wireguard protocol