From 5b32f1f211f3bfe9bbd2d2e8f0a59ccf28573ad6 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sun, 30 Mar 2025 11:00:21 -0400 Subject: [PATCH] fix flake issues with organizing by system --- flake.lock | 56 -------------------- flake.nix | 99 +++++++++++++++++++---------------- hosts/x86_64-darwin/readme.md | 1 + 3 files changed, 54 insertions(+), 102 deletions(-) create mode 100644 hosts/x86_64-darwin/readme.md diff --git a/flake.lock b/flake.lock index e9c6a7c..300d1bd 100644 --- a/flake.lock +++ b/flake.lock @@ -193,58 +193,6 @@ "type": "github" } }, - "nextcloud-cookbook": { - "flake": false, - "locked": { - "lastModified": 1726214817, - "narHash": "sha256-Pfa+Xbopg20os+pnGgg+wpEX1MI5fz5JMb0K4a8rBhs=", - "type": "tarball", - "url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.2/cookbook-0.11.2.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.2/cookbook-0.11.2.tar.gz" - } - }, - "nextcloud-external": { - "flake": false, - "locked": { - "lastModified": 1729501365, - "narHash": "sha256-OV6HhFBzmnQBO5btGEnqmKlaUMY7/t2Qm3XebclpBlM=", - "type": "tarball", - "url": "https://github.com/nextcloud-releases/external/releases/download/v5.5.2/external-v5.5.2.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/nextcloud-releases/external/releases/download/v5.5.2/external-v5.5.2.tar.gz" - } - }, - "nextcloud-news": { - "flake": false, - "locked": { - "lastModified": 1729667622, - "narHash": "sha256-pnvyMZQ+NYMgH0Unfh5S19HdZSjnghgoUDAoi2KIXNI=", - "type": "tarball", - "url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha12/news.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha12/news.tar.gz" - } - }, - "nextcloud-snappymail": { - "flake": false, - "locked": { - "lastModified": 1728502660, - "narHash": "sha256-oCw6Brs85rINBHvz3UJXheyLVqvA3RgPXG03b30Fx7E=", - "type": "tarball", - "url": "https://snappymail.eu/repository/nextcloud/snappymail-2.38.2-nextcloud.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://snappymail.eu/repository/nextcloud/snappymail-2.38.2-nextcloud.tar.gz" - } - }, "nix2vim": { "inputs": { "flake-utils": "flake-utils_2", @@ -378,10 +326,6 @@ "disko": "disko", "home-manager": "home-manager", "mac-app-util": "mac-app-util", - "nextcloud-cookbook": "nextcloud-cookbook", - "nextcloud-external": "nextcloud-external", - "nextcloud-news": "nextcloud-news", - "nextcloud-snappymail": "nextcloud-snappymail", "nix2vim": "nix2vim", "nixos-generators": "nixos-generators", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 04175f7..6ca68fe 100644 --- a/flake.nix +++ b/flake.nix @@ -70,29 +70,29 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - # Nextcloud Apps - nextcloud-news = { - # https://github.com/nextcloud/news/releases - url = "https://github.com/nextcloud/news/releases/download/25.0.0-alpha12/news.tar.gz"; - flake = false; - }; - nextcloud-external = { - # https://github.com/nextcloud-releases/external/releases - url = "https://github.com/nextcloud-releases/external/releases/download/v5.5.2/external-v5.5.2.tar.gz"; - flake = false; - }; - nextcloud-cookbook = { - # https://github.com/christianlupus-nextcloud/cookbook-releases/releases/ - url = "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.2/cookbook-0.11.2.tar.gz"; - flake = false; - }; - nextcloud-snappymail = { - # https://github.com/the-djmaze/snappymail/releases - # https://snappymail.eu/repository/nextcloud - url = "https://snappymail.eu/repository/nextcloud/snappymail-2.38.2-nextcloud.tar.gz"; - # url = "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.3/snappymail-2.36.3-nextcloud.tar.gz"; - flake = false; - }; + # # Nextcloud Apps + # nextcloud-news = { + # # https://github.com/nextcloud/news/releases + # url = "https://github.com/nextcloud/news/releases/download/25.0.0-alpha12/news.tar.gz"; + # flake = false; + # }; + # nextcloud-external = { + # # https://github.com/nextcloud-releases/external/releases + # url = "https://github.com/nextcloud-releases/external/releases/download/v5.5.2/external-v5.5.2.tar.gz"; + # flake = false; + # }; + # nextcloud-cookbook = { + # # https://github.com/christianlupus-nextcloud/cookbook-releases/releases/ + # url = "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.2/cookbook-0.11.2.tar.gz"; + # flake = false; + # }; + # nextcloud-snappymail = { + # # https://github.com/the-djmaze/snappymail/releases + # # https://snappymail.eu/repository/nextcloud + # url = "https://snappymail.eu/repository/nextcloud/snappymail-2.38.2-nextcloud.tar.gz"; + # # url = "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.3/snappymail-2.36.3-nextcloud.tar.gz"; + # flake = false; + # }; }; outputs = @@ -133,35 +133,42 @@ rec { lib = import ./lib inputs; + flattenAttrset = attrs: builtins.foldl' lib.mergeAttrs { } (builtins.attrValues attrs); - nixosConfigurations = builtins.mapAttrs ( - system: hosts: + nixosConfigurations = flattenAttrset ( builtins.mapAttrs ( - name: module: - lib.buildNixos { - inherit system module; - specialArgs = { inherit hostnames; }; - } - ) hosts - ) lib.linuxHosts; + system: hosts: + builtins.mapAttrs ( + name: module: + lib.buildNixos { + inherit system module; + specialArgs = { inherit hostnames; }; + } + ) hosts + ) lib.linuxHosts + ); - darwinConfigurations = builtins.mapAttrs ( - system: hosts: + darwinConfigurations = flattenAttrset ( builtins.mapAttrs ( - name: module: - lib.buildDarwin { - inherit system module; - specialArgs = { inherit hostnames; }; - } - ) hosts - ) lib.darwinHosts; + system: hosts: + builtins.mapAttrs ( + name: module: + lib.buildDarwin { + inherit system module; + specialArgs = { inherit hostnames; }; + } + ) hosts + ) lib.darwinHosts + ); - homeModules = builtins.mapAttrs ( - system: hosts: + homeModules = flattenAttrset ( builtins.mapAttrs ( - name: module: (builtins.head (lib.attrsToList module.home-manager.users)).value - ) hosts - ) lib.hosts; + system: hosts: + builtins.mapAttrs ( + name: module: (builtins.head (lib.attrsToList module.home-manager.users)).value + ) hosts + ) lib.hosts + ); homeConfigurations = builtins.mapAttrs ( system: hosts: diff --git a/hosts/x86_64-darwin/readme.md b/hosts/x86_64-darwin/readme.md new file mode 100644 index 0000000..6ea74ba --- /dev/null +++ b/hosts/x86_64-darwin/readme.md @@ -0,0 +1 @@ +# No x86 Darwin Hosts Currently