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 = [
|
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
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,24 @@
|
||||||
{ pkgs, config, ... }: {
|
{ pkgs, lib, config, ... }:
|
||||||
services.printing.enable = true;
|
let
|
||||||
services.avahi.enable = true;
|
settings = import ./../settings.nix;
|
||||||
# for a WiFi printer
|
in
|
||||||
services.avahi.openFirewall = true;
|
{
|
||||||
services.avahi.nssmdns = false; # Use the settings from below
|
config = lib.mkMerge [
|
||||||
# settings from avahi-daemon.nix where mdns is replaced with mdns4
|
{
|
||||||
system.nssModules = pkgs.lib.optional (!config.services.avahi.nssmdns) pkgs.nssmdns;
|
services.printing.enable = true;
|
||||||
system.nssDatabases.hosts = with pkgs.lib; optionals (!config.services.avahi.nssmdns) (mkMerge [
|
}
|
||||||
(mkBefore [ "mdns4_minimal [NOTFOUND=return]" ]) # before resolve
|
# Avahi daemon
|
||||||
(mkAfter [ "mdns4" ]) # after dns
|
(lib.mkIf settings.printing.avahi {
|
||||||
]);
|
services.avahi.enable = true;
|
||||||
|
# for a WiFi printer
|
||||||
|
services.avahi.openFirewall = true;
|
||||||
|
services.avahi.nssmdns = false; # Use the settings from below
|
||||||
|
# settings from avahi-daemon.nix where mdns is replaced with mdns4
|
||||||
|
system.nssModules = pkgs.lib.optional (!config.services.avahi.nssmdns) pkgs.nssmdns;
|
||||||
|
system.nssDatabases.hosts = with pkgs.lib; optionals (!config.services.avahi.nssmdns) (mkMerge [
|
||||||
|
(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 = {
|
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
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
15
settings.nix
15
settings.nix
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue