diff --git a/modules/_darwin/dock.nix b/modules/_darwin/dock.nix index 6d450c0..6265b5a 100644 --- a/modules/_darwin/dock.nix +++ b/modules/_darwin/dock.nix @@ -39,7 +39,7 @@ in { }; }); default = [ - {path = "/Applications/Helium.app/";} + {path = "/Applications/Safari.app/";} {path = "/Applications/Ghostty.app/";} {path = "/System/Applications/Calendar.app/";} {path = "/System/Applications/Mail.app/";} diff --git a/modules/_lib/hosts.nix b/modules/_lib/hosts.nix index d55257e..c024a60 100644 --- a/modules/_lib/hosts.nix +++ b/modules/_lib/hosts.nix @@ -1,7 +1,9 @@ { den, lib, -}: { +}: let + merge = lib.recursiveUpdate; +in { mkUserHost = { system, host, @@ -10,8 +12,9 @@ includes ? [], homeManager ? null, }: + merge (lib.setAttrByPath ["den" "hosts" system host "users" user "aspect"] userAspect) - // (lib.setAttrByPath ["den" "aspects" userAspect] ({inherit includes;} + (lib.setAttrByPath ["den" "aspects" userAspect] ({inherit includes;} // lib.optionalAttrs (homeManager != null) { inherit homeManager; })); diff --git a/modules/_overlays/pi-harness.nix b/modules/_overlays/pi-harness.nix index 9a1ebb0..3abf978 100644 --- a/modules/_overlays/pi-harness.nix +++ b/modules/_overlays/pi-harness.nix @@ -12,7 +12,7 @@ src = inputs.pi-harness; pnpm = prev.pnpm_10; fetcherVersion = 1; - hash = "sha256-NxdWrSNhk+rcvACQoBRPa+bHgLi9vMwCxjH2UySVXEc="; + hash = "sha256-l85j3MH/uott+6Cbo9r3w8jojdlikjGf26l4Q1qa43g="; }; nativeBuildInputs = [ diff --git a/modules/darwin.nix b/modules/darwin.nix index 4bc5de8..3f41ee7 100644 --- a/modules/darwin.nix +++ b/modules/darwin.nix @@ -151,10 +151,12 @@ in { "alcove" "aqua-voice" "ghostty@tip" - "helium-browser" "raycast" "spotify" ]; + masApps = { + "Wipr 2" = 1662217862; + }; }; }; } diff --git a/modules/desktop.nix b/modules/desktop.nix index 9da34ec..da3a16c 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -56,7 +56,7 @@ } { "if" = { - "app-id" = "net.imput.helium"; + "app-id" = "com.apple.Safari"; }; run = "move-node-to-workspace 2"; } diff --git a/modules/hosts/chidi.nix b/modules/hosts/chidi.nix index d956909..e89f86e 100644 --- a/modules/hosts/chidi.nix +++ b/modules/hosts/chidi.nix @@ -8,27 +8,28 @@ host = "chidi"; hostMeta = local.hosts.chidi; in - hostLib.mkUserHost { - system = hostMeta.system; - inherit host; - user = local.user.name; - includes = [den.aspects.user-darwin-laptop]; - homeManager = {...}: { - programs.git.settings.user.email = local.user.emails.work; - }; - } - // hostLib.mkPerHostAspect { - inherit host; - includes = [ - den.aspects.host-darwin-base - den.aspects.opencode-api-key - ]; - darwin = {...}: { - networking.hostName = host; - networking.computerName = host; - - homebrew.casks = [ - "slack" + lib.recursiveUpdate + (hostLib.mkUserHost { + system = hostMeta.system; + inherit host; + user = local.user.name; + includes = [den.aspects.user-darwin-laptop]; + homeManager = {...}: { + programs.git.settings.user.email = local.user.emails.work; + }; + }) + (hostLib.mkPerHostAspect { + inherit host; + includes = [ + den.aspects.host-darwin-base + den.aspects.opencode-api-key ]; - }; - } + darwin = {...}: { + networking.hostName = host; + networking.computerName = host; + + homebrew.casks = [ + "slack" + ]; + }; + }) diff --git a/modules/hosts/janet.nix b/modules/hosts/janet.nix index 1695b84..868091a 100644 --- a/modules/hosts/janet.nix +++ b/modules/hosts/janet.nix @@ -8,23 +8,24 @@ host = "janet"; hostMeta = local.hosts.janet; in - hostLib.mkUserHost { - system = hostMeta.system; - inherit host; - user = local.user.name; - includes = [ - den.aspects.user-darwin-laptop - den.aspects.user-personal - ]; - } - // hostLib.mkPerHostAspect { - inherit host; - includes = [ - den.aspects.host-darwin-base - den.aspects.opencode-api-key - ]; - darwin = {...}: { - networking.hostName = host; - networking.computerName = host; - }; - } + lib.recursiveUpdate + (hostLib.mkUserHost { + system = hostMeta.system; + inherit host; + user = local.user.name; + includes = [ + den.aspects.user-darwin-laptop + den.aspects.user-personal + ]; + }) + (hostLib.mkPerHostAspect { + inherit host; + includes = [ + den.aspects.host-darwin-base + den.aspects.opencode-api-key + ]; + darwin = {...}: { + networking.hostName = host; + networking.computerName = host; + }; + }) diff --git a/modules/hosts/michael.nix b/modules/hosts/michael.nix index d752bf9..d2def2c 100644 --- a/modules/hosts/michael.nix +++ b/modules/hosts/michael.nix @@ -9,26 +9,27 @@ host = "michael"; hostMeta = local.hosts.michael; in - hostLib.mkUserHost { - system = hostMeta.system; - inherit host; - user = local.user.name; - includes = [den.aspects.user-minimal]; - } - // hostLib.mkPerHostAspect { - inherit host; - includes = [ - den.aspects.host-public-server - den.aspects.gitea - ]; - nixos = {modulesPath, ...}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ./_parts/michael/disk-config.nix - ./_parts/michael/hardware-configuration.nix - inputs.disko.nixosModules.default + lib.recursiveUpdate + (hostLib.mkUserHost { + system = hostMeta.system; + inherit host; + user = local.user.name; + includes = [den.aspects.user-minimal]; + }) + (hostLib.mkPerHostAspect { + inherit host; + includes = [ + den.aspects.host-public-server + den.aspects.gitea ]; + nixos = {modulesPath, ...}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ./_parts/michael/disk-config.nix + ./_parts/michael/hardware-configuration.nix + inputs.disko.nixosModules.default + ]; - networking.hostName = host; - }; - } + networking.hostName = host; + }; + }) diff --git a/modules/hosts/tahani.nix b/modules/hosts/tahani.nix index 3b094a2..c2f0bdb 100644 --- a/modules/hosts/tahani.nix +++ b/modules/hosts/tahani.nix @@ -9,66 +9,67 @@ host = "tahani"; hostMeta = local.hosts.tahani; in - hostLib.mkUserHost { - system = hostMeta.system; - inherit host; - user = local.user.name; - includes = [ - den.aspects.user-workstation - den.aspects.user-personal - den.aspects.email - ]; - homeManager = { - programs.nushell.extraConfig = '' - if $nu.is-interactive and ('SSH_CONNECTION' in ($env | columns)) and ('ZELLIJ' not-in ($env | columns)) { - try { - zellij attach -c main - exit - } catch { - print "zellij auto-start failed; staying in shell" + lib.recursiveUpdate + (hostLib.mkUserHost { + system = hostMeta.system; + inherit host; + user = local.user.name; + includes = [ + den.aspects.user-workstation + den.aspects.user-personal + den.aspects.email + ]; + homeManager = { + programs.nushell.extraConfig = '' + if $nu.is-interactive and ('SSH_CONNECTION' in ($env | columns)) and ('ZELLIJ' not-in ($env | columns)) { + try { + zellij attach -c main + exit + } catch { + print "zellij auto-start failed; staying in shell" + } } - } - ''; - }; - } - // hostLib.mkPerHostAspect { - inherit host; - includes = [ - den.aspects.host-nixos-base - den.aspects.opencode-api-key - den.aspects.adguardhome - den.aspects.cache - den.aspects.notability - den.aspects.paperless - ]; - nixos = {...}: { - imports = [ - ./_parts/tahani/networking.nix + ''; + }; + }) + (hostLib.mkPerHostAspect { + inherit host; + includes = [ + den.aspects.host-nixos-base + den.aspects.opencode-api-key + den.aspects.adguardhome + den.aspects.cache + den.aspects.notability + den.aspects.paperless ]; + nixos = {...}: { + imports = [ + ./_parts/tahani/networking.nix + ]; - networking.hostName = host; + networking.hostName = host; - sops.secrets.tahani-email-password = - secretLib.mkUserBinarySecret { - name = "tahani-email-password"; - sopsFile = ../../secrets/tahani-email-password; - }; + sops.secrets.tahani-email-password = + secretLib.mkUserBinarySecret { + name = "tahani-email-password"; + sopsFile = ../../secrets/tahani-email-password; + }; - virtualisation.docker.enable = true; - users.users.${local.user.name}.extraGroups = [ - "docker" - "paperless" - ]; + virtualisation.docker.enable = true; + users.users.${local.user.name}.extraGroups = [ + "docker" + "paperless" + ]; - systemd.tmpfiles.rules = [ - "d /var/lib/paperless/consume 2775 paperless paperless -" - "d /var/lib/paperless/consume/inbox-triage 2775 paperless paperless -" - ]; - swapDevices = [ - { - device = "/swapfile"; - size = 16 * 1024; - } - ]; - }; - } + systemd.tmpfiles.rules = [ + "d /var/lib/paperless/consume 2775 paperless paperless -" + "d /var/lib/paperless/consume/inbox-triage 2775 paperless paperless -" + ]; + swapDevices = [ + { + device = "/swapfile"; + size = 16 * 1024; + } + ]; + }; + })