diff --git a/hosts/mairley/default.nix b/hosts/mairley/default.nix index 74b258a..ef70c1b 100644 --- a/hosts/mairley/default.nix +++ b/hosts/mairley/default.nix @@ -1,5 +1,5 @@ {config, ...}: let - inherit (config.marleyos.my) name; + inherit (config.marleycfg.my) name; in { networking = { computerName = "mairley"; @@ -7,9 +7,7 @@ in { localHostName = "mairley"; }; - marleyos = { - profiles.desktop = true; - }; + marleycfg.profiles.desktop = true; users = { knownUsers = [name]; diff --git a/hosts/marleycentre/default.nix b/hosts/marleycentre/default.nix index 90c60fc..6f7912c 100644 --- a/hosts/marleycentre/default.nix +++ b/hosts/marleycentre/default.nix @@ -1,13 +1,11 @@ {config, ...}: let - inherit (config.marleyos.my) name; + inherit (config.marleycfg.my) name; in { imports = [./hardware-configuration.nix]; networking.hostName = "marleycentre"; - marleyos = { - profiles.server = true; - }; + marleycfg.profiles.server = true; users.users = { marley.openssh.authorizedKeys.keys = [ diff --git a/hosts/marleynet/default.nix b/hosts/marleynet/default.nix index a7cde68..c92d530 100644 --- a/hosts/marleynet/default.nix +++ b/hosts/marleynet/default.nix @@ -3,15 +3,16 @@ marleylib, ... }: let - inherit (config.marleyos.my) name; + inherit (config.marleycfg.my) name; inherit (marleylib.module) enabled; in { imports = [./hardware-configuration.nix]; networking.hostName = "marleynet"; + marleycfg.profiles.server = true; + marleyos = { - profiles.server = true; services.ddclient = enabled; }; diff --git a/hosts/nyx/default.nix b/hosts/nyx/default.nix index c295402..09cd4b8 100644 --- a/hosts/nyx/default.nix +++ b/hosts/nyx/default.nix @@ -4,7 +4,7 @@ ... }: let inherit (marleylib.module) enabled; - inherit (config.marleyos.my) name; + inherit (config.marleycfg.my) name; in { imports = [./hardware-configuration.nix ./mounts.nix ./autorandr.nix]; @@ -13,11 +13,9 @@ in { # For local dev. networking.firewall.allowedTCPPorts = [8080]; - marleyos = { - profiles = { - desktop = true; - }; + marleycfg.profiles.desktop = true; + marleyos = { hardware = { nvidia = enabled; }; diff --git a/modules/base/home.nix b/modules/base/home.nix index 6de99ee..e41b6b4 100644 --- a/modules/base/home.nix +++ b/modules/base/home.nix @@ -6,7 +6,7 @@ let email = "marley@punkfairie.net"; }; in { - marleyos.my = my; + marleycfg.my = my; home-manager = { useUserPackages = true; diff --git a/modules/darwin/base/home.nix b/modules/darwin/base/home.nix index 55695f6..1ee12c4 100644 --- a/modules/darwin/base/home.nix +++ b/modules/darwin/base/home.nix @@ -3,7 +3,7 @@ inputs, ... }: let - inherit (config.marleyos.my) name; + inherit (config.marleycfg.my) name; in { imports = [inputs.home-manager.darwinModules.home-manager]; diff --git a/modules/home/option-inheritance.nix b/modules/home/option-inheritance.nix index b202b9c..6b9e160 100644 --- a/modules/home/option-inheritance.nix +++ b/modules/home/option-inheritance.nix @@ -1,7 +1,7 @@ {osConfig, ...}: let - cfg = osConfig.marleyos; + cfg = osConfig.marleycfg; in { - marleyos = { + marleycfg = { profiles = { inherit (cfg.profiles) desktop server; }; diff --git a/modules/nixos/base/boot.nix b/modules/nixos/base/boot.nix index fe907c9..a602e0d 100644 --- a/modules/nixos/base/boot.nix +++ b/modules/nixos/base/boot.nix @@ -6,7 +6,7 @@ }: { boot = { kernelPackages = - lib.mkIf (!config.marleyos.profiles.server) + lib.mkIf (!config.marleycfg.profiles.server) pkgs.linuxPackages_xanmod; loader = { diff --git a/modules/nixos/base/home.nix b/modules/nixos/base/home.nix index 5883ce7..56a0007 100644 --- a/modules/nixos/base/home.nix +++ b/modules/nixos/base/home.nix @@ -3,7 +3,7 @@ inputs, ... }: let - inherit (config.marleyos.my) name; + inherit (config.marleycfg.my) name; in { imports = [inputs.home-manager.nixosModules.home-manager]; config = { diff --git a/modules/nixos/base/i18n.nix b/modules/nixos/base/i18n.nix index 083a494..27d5e54 100644 --- a/modules/nixos/base/i18n.nix +++ b/modules/nixos/base/i18n.nix @@ -1,6 +1,6 @@ {config, ...}: { time.timeZone = - if config.marleyos.profiles.server + if config.marleycfg.profiles.server then "UTC" else "America/Los_Angeles"; diff --git a/modules/nixos/base/networking.nix b/modules/nixos/base/networking.nix index 11190ca..0da2ef4 100644 --- a/modules/nixos/base/networking.nix +++ b/modules/nixos/base/networking.nix @@ -11,6 +11,6 @@ allowedTCPPorts = [80 443]; }; - wireless.enable = lib.mkIf config.marleyos.profiles.server false; + wireless.enable = lib.mkIf config.marleycfg.profiles.server false; }; } diff --git a/modules/nixos/base/users.nix b/modules/nixos/base/users.nix index a7b2f27..2849d22 100644 --- a/modules/nixos/base/users.nix +++ b/modules/nixos/base/users.nix @@ -13,7 +13,7 @@ desktopPass = "$y$j9T$ztWf9WeUCENC2T12qS4mi1$51ihV/5cQ8mdJJrNe7MMguk4hPB61S5xHawsfi.1hL3"; serverPass = "$y$j9T$8hA7OWZsdQMHqYIy8LkYQ1$hFeP2ak3QA4FtoIYIwqPg10//ZOSZrAw1PzJj0PuGSA"; in { - marleyos.my = { + marleycfg.my = { inherit (my) name username fullName email; }; @@ -34,7 +34,7 @@ in { ++ (lib.optional config.networking.networkmanager.enable "networkmanager") ++ (lib.optional config.virtualisation.docker.enable "docker"); hashedPassword = - if config.marleyos.profiles.server + if config.marleycfg.profiles.server then serverPass else desktopPass; }; diff --git a/modules/nixos/hardware/audio.nix b/modules/nixos/hardware/audio.nix index ba4ff3a..027c9a7 100644 --- a/modules/nixos/hardware/audio.nix +++ b/modules/nixos/hardware/audio.nix @@ -4,7 +4,7 @@ pkgs, ... }: { - config = lib.mkIf (!config.marleyos.profiles.server) { + config = lib.mkIf (!config.marleycfg.profiles.server) { security.rtkit.enable = true; # for pulseaudio hardware.pulseaudio.enable = false; diff --git a/modules/nixos/hardware/mounts/babeshare.nix b/modules/nixos/hardware/mounts/babeshare.nix index 66edfc0..0a556e6 100644 --- a/modules/nixos/hardware/mounts/babeshare.nix +++ b/modules/nixos/hardware/mounts/babeshare.nix @@ -5,7 +5,7 @@ }: let cfg = config.marleyos.mounts.babeshare; - user = config.users.users."${config.marleyos.my.name}"; + user = config.users.users."${config.marleycfg.my.name}"; uid = if user.uid != null then user.uid diff --git a/modules/nixos/profiles.nix b/modules/nixos/profiles.nix index ec83c62..2ae865e 100644 --- a/modules/nixos/profiles.nix +++ b/modules/nixos/profiles.nix @@ -4,7 +4,7 @@ lib, ... }: let - cfg = config.marleyos.profiles; + cfg = config.marleycfg.profiles; inherit (marleylib.module) enabled; in { diff --git a/modules/options/my.nix b/modules/options/my.nix index d5060a9..b35e583 100644 --- a/modules/options/my.nix +++ b/modules/options/my.nix @@ -3,7 +3,7 @@ config, ... }: { - options.marleyos.my = rec { + options.marleycfg.my = rec { name = lib.mkOption { type = with lib.types; str; default = "marley"; @@ -30,12 +30,12 @@ }; config = let - cfg = config.marleyos.my; + cfg = config.marleycfg.my; in { assertions = [ { assertion = cfg.name != null; - message = "marleyos.my.name must be set."; + message = "marleycfg.my.name must be set."; } ]; }; diff --git a/modules/options/profiles.nix b/modules/options/profiles.nix index c471fe7..02772d0 100644 --- a/modules/options/profiles.nix +++ b/modules/options/profiles.nix @@ -1,5 +1,5 @@ {lib, ...}: { - options.marleyos.profiles = { + options.marleycfg.profiles = { desktop = lib.mkEnableOption "graphical desktop profile"; server = lib.mkEnableOption "server profile"; };