feat: marleyos config -> marleycfg

fucking infinite recursion
This commit is contained in:
punkfairie 2025-05-25 20:06:03 -07:00
parent f9d633f4c2
commit 8f64cd0822
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
17 changed files with 27 additions and 32 deletions

View file

@ -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];

View file

@ -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 = [

View file

@ -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;
};

View file

@ -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;
};

View file

@ -6,7 +6,7 @@ let
email = "marley@punkfairie.net";
};
in {
marleyos.my = my;
marleycfg.my = my;
home-manager = {
useUserPackages = true;

View file

@ -3,7 +3,7 @@
inputs,
...
}: let
inherit (config.marleyos.my) name;
inherit (config.marleycfg.my) name;
in {
imports = [inputs.home-manager.darwinModules.home-manager];

View file

@ -1,7 +1,7 @@
{osConfig, ...}: let
cfg = osConfig.marleyos;
cfg = osConfig.marleycfg;
in {
marleyos = {
marleycfg = {
profiles = {
inherit (cfg.profiles) desktop server;
};

View file

@ -6,7 +6,7 @@
}: {
boot = {
kernelPackages =
lib.mkIf (!config.marleyos.profiles.server)
lib.mkIf (!config.marleycfg.profiles.server)
pkgs.linuxPackages_xanmod;
loader = {

View file

@ -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 = {

View file

@ -1,6 +1,6 @@
{config, ...}: {
time.timeZone =
if config.marleyos.profiles.server
if config.marleycfg.profiles.server
then "UTC"
else "America/Los_Angeles";

View file

@ -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;
};
}

View file

@ -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;
};

View file

@ -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;

View file

@ -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

View file

@ -4,7 +4,7 @@
lib,
...
}: let
cfg = config.marleyos.profiles;
cfg = config.marleycfg.profiles;
inherit (marleylib.module) enabled;
in {

View file

@ -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.";
}
];
};

View file

@ -1,5 +1,5 @@
{lib, ...}: {
options.marleyos.profiles = {
options.marleycfg.profiles = {
desktop = lib.mkEnableOption "graphical desktop profile";
server = lib.mkEnableOption "server profile";
};