summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/nix.org21
-rw-r--r--flake.lock16
-rw-r--r--flake.nix4
m---------nix0
4 files changed, 24 insertions, 17 deletions
diff --git a/config/nix.org b/config/nix.org
index 3451be6..d610184 100644
--- a/config/nix.org
+++ b/config/nix.org
@@ -170,7 +170,10 @@ and now for the main flake:
name = "${hostname}";
value = nixpkgs.lib.nixosSystem {
system = hostSystem;
- specialArgs = attrs // { isIntegrationTest = false; };
+ specialArgs = attrs // {
+ isIntegrationTest = false;
+ monorepoSelf = null;
+ };
modules = mkHostModules hostname;
};
});
@@ -188,6 +191,7 @@ and now for the main flake:
description = "Ensure ${hostname} can build";
stages = [ "post-merge" ];
entry = "${pkgs.writeShellScript "${hostname}-check" ''
+ #!/usr/bin/env bash
set -e
set -o pipefail
trap "echo -e '\nHook interrupted by user. Aborting merge!'; exit 1" INT TERM
@@ -197,9 +201,14 @@ and now for the main flake:
if [ "$BRANCH" != "main" ]; then
exit 0
fi
-
echo "Merge to main detected. Building VM for ${hostname}..."
- nix build .#nixosConfigurations.${hostname}.config.system.build.vm --no-link
+ if nix build .#nixosConfigurations.${hostname}.config.system.build.vm --no-link; then
+ echo "Build succeeded. Proceeding with merge."
+ exit 0
+ else
+ echo "Build failed! Aborting."
+ exit 1
+ fi
''}";
pass_filenames = false;
always_run = true;
@@ -1649,7 +1658,7 @@ These are all my virtual hosts. For many of these servers we have to
have a reverse proxy in order to expose the locally running instances
to the outside world under a domain.
#+begin_src nix :tangle ../nix/modules/nginx.nix
- { config, lib, ... }:
+ { pkgs, config, lib, monorepoSelf ? null, ... }:
{
services.nginx = {
enable = lib.mkDefault config.monorepo.profiles.server.enable;
@@ -1659,10 +1668,10 @@ to the outside world under a domain.
recommendedTlsSettings = true;
recommendedProxySettings = false;
virtualHosts = {
- "${config.monorepo.vars.remoteHost}" = {
+ "${config.monorepo.vars.remoteHost}" = lib.mkIf (monorepoSelf != null) {
serverName = "${config.monorepo.vars.remoteHost}";
serverAliases = [ "${config.monorepo.vars.internetName}.${config.monorepo.vars.orgHost}" ];
- root = "/var/www/${config.monorepo.vars.internetName}-website/";
+ root = "${monorepoSelf.packages.${pkgs.system}.website}";
addSSL = true;
enableACME = true;
};
diff --git a/flake.lock b/flake.lock
index efea318..e9f1802 100644
--- a/flake.lock
+++ b/flake.lock
@@ -378,18 +378,14 @@
"wallpapers": "wallpapers"
},
"locked": {
- "lastModified": 1772587375,
- "narHash": "sha256-Ki3eMeMp53oyunJVXVDqL9BwgQjPYd7Z1VRJmUaW1Pc=",
- "ref": "refs/heads/main",
- "rev": "bd540a2121f3107cb3f9385114688eb99c2316c3",
- "revCount": 106,
- "type": "git",
- "url": "git://nullring.xyz/hyprnixmacs.git"
+ "path": "nix",
+ "type": "path"
},
"original": {
- "type": "git",
- "url": "git://nullring.xyz/hyprnixmacs.git"
- }
+ "path": "nix",
+ "type": "path"
+ },
+ "parent": []
},
"impermanence": {
"inputs": {
diff --git a/flake.nix b/flake.nix
index 9f8dee2..21a91b6 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,12 +2,14 @@
description = "Build my static site with my installer";
inputs = {
+ self.submodules = true;
+
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
- hyprnixmacs.url = "git://nullring.xyz/hyprnixmacs.git";
+ hyprnixmacs.url = ./nix;
publish-org-roam-ui = {
url = "git://nullring.xyz/publish-org-roam-ui.git";
diff --git a/nix b/nix
-Subproject 05cb285c3ba655fc0d5032f9af18b40c917315a
+Subproject 6ac1ffe7480696374d2fad9c4011db4bad49872