added core modules to settings
This commit is contained in:
parent
aced2f565a
commit
ea5ee00760
|
@ -1,8 +1,10 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
settings = import ./../settings.nix;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./java.nix
|
||||
./dotnet.nix
|
||||
./printing.nix
|
||||
./xdg.nix
|
||||
];
|
||||
imports = lib.optionals settings.printing.enable [ ./printing.nix ]
|
||||
++ lib.optionals settings.xdg.enable [ ./xdg.nix ]
|
||||
++ lib.optionals settings.java [ ./java.nix ]
|
||||
++ lib.optionals settings.dotnet [ ./dotnet.nix ];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
{ pkgs, config, ... }: {
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
settings = import ./../settings.nix;
|
||||
in
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
services.printing.enable = true;
|
||||
}
|
||||
# Avahi daemon
|
||||
(lib.mkIf settings.printing.avahi {
|
||||
services.avahi.enable = true;
|
||||
# for a WiFi printer
|
||||
services.avahi.openFirewall = true;
|
||||
|
@ -10,4 +19,6 @@
|
|||
(mkBefore [ "mdns4_minimal [NOTFOUND=return]" ]) # before resolve
|
||||
(mkAfter [ "mdns4" ]) # after dns
|
||||
]);
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
17
core/xdg.nix
17
core/xdg.nix
|
@ -1,15 +1,12 @@
|
|||
{ pkgs, config, ... }: {
|
||||
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
settings = import ./../settings.nix;
|
||||
in
|
||||
{
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-kde
|
||||
];
|
||||
extraPortals = settings.xdg.extraPortals;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-kde
|
||||
];
|
||||
environment.systemPackages = settings.xdg.extraPortals;
|
||||
}
|
||||
|
|
15
settings.nix
15
settings.nix
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
with import <nixpkgs> {}; {
|
||||
hardware = {
|
||||
# support for GPUs
|
||||
amdgpu = true;
|
||||
|
@ -16,6 +16,19 @@
|
|||
|
||||
dvd = true; # enable DVD decryption + ripping via Handbrake
|
||||
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 = {
|
||||
wireguard = true; # enable wireguard protocol
|
||||
|
|
Loading…
Reference in New Issue