Update systemmodules/homemodules paths to allow nixd to differentiate between the two
This commit is contained in:
@ -11,17 +11,7 @@
|
||||
...
|
||||
}:
|
||||
with mylib.networking; {
|
||||
imports = [
|
||||
# Import my system modules
|
||||
./modules
|
||||
|
||||
# Import the host-specific system config
|
||||
./${hostname}
|
||||
|
||||
./cachix.nix
|
||||
];
|
||||
|
||||
modules = {
|
||||
systemmodules = {
|
||||
bootloader = {
|
||||
enable = true;
|
||||
|
||||
@ -234,7 +224,7 @@ with mylib.networking; {
|
||||
# 6 Cyan 14 Cyan
|
||||
# 7 White 15 White
|
||||
colors = let
|
||||
color = config.home-manager.users.${username}.modules.color;
|
||||
color = config.home-manager.users.${username}.homemodules.color;
|
||||
in [
|
||||
# 0 - 7
|
||||
"000000" # Dark black
|
||||
|
||||
@ -11,13 +11,11 @@
|
||||
./hardware-configuration.nix
|
||||
./disks.nix
|
||||
|
||||
../modules
|
||||
|
||||
# General services
|
||||
../services/fileflows-node.nix
|
||||
];
|
||||
|
||||
modules = {
|
||||
systemmodules = {
|
||||
bootloader = {
|
||||
# Secure boot
|
||||
loader = "lanzaboote";
|
||||
|
||||
@ -2,10 +2,9 @@
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../modules
|
||||
];
|
||||
|
||||
modules = {
|
||||
systemmodules = {
|
||||
network = {
|
||||
useNetworkManager = true;
|
||||
|
||||
|
||||
@ -14,8 +14,6 @@
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
||||
../modules
|
||||
|
||||
# My own services
|
||||
../services/heidi.nix
|
||||
../services/formula10.nix
|
||||
@ -47,7 +45,7 @@
|
||||
../services/whats-up-docker.nix
|
||||
];
|
||||
|
||||
modules = {
|
||||
systemmodules = {
|
||||
docker.networks = [
|
||||
{
|
||||
name = "behind-nginx";
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
mylib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) TEMPLATE;
|
||||
inherit (config.systemmodules) TEMPLATE;
|
||||
in {
|
||||
options.modules.TEMPLATE = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.TEMPLATE = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config =
|
||||
lib.mkIf TEMPLATE.enable {
|
||||
|
||||
@ -7,9 +7,9 @@
|
||||
publicKeys,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) agenix;
|
||||
inherit (config.systemmodules) agenix;
|
||||
in {
|
||||
options.modules.agenix = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.agenix = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = {
|
||||
# NOTE: Add below snippet to home/christoph/default.nix to generate the secrets.nix file
|
||||
@ -23,13 +23,13 @@ in {
|
||||
# {
|
||||
# ${lib.optionalString
|
||||
# # If this user defined any secrets...
|
||||
# (builtins.hasAttr "${username}" nixosConfig.modules.agenix.secrets)
|
||||
# (builtins.hasAttr "${username}" nixosconfig.systemmodules.agenix.secrets)
|
||||
# # ...we will add them to the current secrets.nix,
|
||||
# # s.t. agenix can be used to encrypt/access them.
|
||||
# (builtins.concatStringsSep "\n"
|
||||
# (builtins.map
|
||||
# (mkSecret publicKeys.${username}.ssh)
|
||||
# nixosConfig.modules.agenix.secrets.${username}))}
|
||||
# nixosconfig.systemmodules.agenix.secrets.${username}))}
|
||||
# }
|
||||
# '';
|
||||
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
with lib;
|
||||
with mylib.virtualisation;
|
||||
with mylib.modules; let
|
||||
cfg = config.modules.containers;
|
||||
cfg = config.systemmodules.containers;
|
||||
in {
|
||||
options.modules.containers = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.containers = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
# TODO: These need config options exposed through the module,
|
||||
# e.g. to set paths/volumes/binds differently per system...
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
mylib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) bootloader;
|
||||
inherit (config.systemmodules) bootloader;
|
||||
in {
|
||||
options.modules.bootloader = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.bootloader = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf bootloader.enable (lib.mkMerge [
|
||||
{
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) desktopportal;
|
||||
inherit (config.systemmodules) desktopportal;
|
||||
in {
|
||||
options.modules.desktopportal = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.desktopportal = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf desktopportal.enable {
|
||||
xdg = {
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) docker;
|
||||
inherit (config.systemmodules) docker;
|
||||
in {
|
||||
options.modules.docker = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.docker = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf docker.enable {
|
||||
environment.variables = lib.mkMerge [
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) fonts;
|
||||
inherit (config.systemmodules) fonts;
|
||||
in {
|
||||
options.modules.fonts = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.fonts = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf fonts.enable {
|
||||
fonts = {
|
||||
|
||||
@ -6,9 +6,9 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) impermanence;
|
||||
inherit (config.systemmodules) impermanence;
|
||||
in {
|
||||
options.modules.impermanence = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.impermanence = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = let
|
||||
# NOTE: Setting user/group/mode only has an effect if the
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
mylib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) mime;
|
||||
inherit (config.systemmodules) mime;
|
||||
in {
|
||||
options.modules.mime = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.mime = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf mime.enable {
|
||||
xdg = {
|
||||
|
||||
@ -8,9 +8,9 @@
|
||||
with lib;
|
||||
with mylib.networking;
|
||||
with mylib.modules; let
|
||||
cfg = config.modules.network;
|
||||
cfg = config.systemmodules.network;
|
||||
in {
|
||||
options.modules.network = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.network = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.resolved = {
|
||||
@ -59,7 +59,7 @@ in {
|
||||
inherit (cfg) networks;
|
||||
};
|
||||
|
||||
modules.polkit.allowedActions = mkIf cfg.useNetworkManager [
|
||||
systemmodules.polkit.allowedActions = mkIf cfg.useNetworkManager [
|
||||
# List NM permissions by running "nmcli general permissions"
|
||||
"org.freedesktop.NetworkManager.settings.modify.system"
|
||||
];
|
||||
|
||||
@ -7,9 +7,9 @@
|
||||
}:
|
||||
with lib;
|
||||
with mylib.modules; let
|
||||
cfg = config.modules.polkit;
|
||||
cfg = config.systemmodules.polkit;
|
||||
in {
|
||||
options.modules.polkit = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.polkit = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
security.polkit.enable = true;
|
||||
|
||||
@ -6,9 +6,9 @@
|
||||
username,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) sops-nix;
|
||||
inherit (config.systemmodules) sops-nix;
|
||||
in {
|
||||
options.modules.sops-nix = import ./options.nix {inherit lib mylib;};
|
||||
options.systemmodules.sops-nix = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = {
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
@ -14,8 +14,6 @@
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
||||
../modules
|
||||
|
||||
# General services
|
||||
../services/adguard.nix
|
||||
../services/nginx-proxy-manager.nix
|
||||
@ -25,7 +23,7 @@
|
||||
../services/whats-up-docker.nix
|
||||
];
|
||||
|
||||
modules = {
|
||||
systemmodules = {
|
||||
docker.networks = [
|
||||
{
|
||||
name = "behind-nginx";
|
||||
|
||||
Reference in New Issue
Block a user