diff --git a/README.md b/README.md
index de09368..ceff714 100644
--- a/README.md
+++ b/README.md
@@ -3,16 +3,17 @@
雪定
+Collection of my personal Nix configurations and opinionated NixOS, nix-darwin, home-manager, and flake-parts modules.
## Project structure
- hosts - per-machine configurations
- - common - common options between my machines which aren't reusable by others
- kazuki - my linux arm server
- legion - my linux x86 server[^1]
- hijiri - my macbook[^1]
- hijiri-vm - linux vm running on my macbook
- miyagi - my work machine[^1]
- modules - options which in principle should be reusable by others
+ - */common - common options between my machines which aren't meant to be reusable by others
- nixos
- settei - my opinionated nixos options
- flake - flake-parts modules
diff --git a/effects.nix b/effects.nix
index 368f6ec..9cc2079 100644
--- a/effects.nix
+++ b/effects.nix
@@ -1,9 +1,16 @@
{
defaultEffectSystem = "aarch64-linux";
+
hercules-ci = {
flake-update = {
enable = true;
- when.dayOfWeek = null;
+ when.dayOfWeek = "Mon";
+ };
+ };
+
+ herculesCI = {
+ onPush = {
+ default.enable = true;
};
};
}
diff --git a/hosts/default.nix b/hosts/default.nix
index 3f6095b..3874c61 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -45,7 +45,7 @@
inputs.home-manager.nixosModules.home-manager
inputs.hercules-ci-agent.nixosModules.agent-service
self.nixosModules.settei
- ./common
+ self.nixosModules.common
defaultOptions
module
];
diff --git a/hosts/common/default.nix b/modules/nixos/common/default.nix
similarity index 100%
rename from hosts/common/default.nix
rename to modules/nixos/common/default.nix
diff --git a/hosts/common/hercules.nix b/modules/nixos/common/hercules.nix
similarity index 95%
rename from hosts/common/hercules.nix
rename to modules/nixos/common/hercules.nix
index 7d96f71..2f2dea7 100644
--- a/hosts/common/hercules.nix
+++ b/modules/nixos/common/hercules.nix
@@ -4,6 +4,8 @@
lib,
...
}: {
+ _file = ./hercules.nix;
+
options.common.hercules.enable = lib.mkEnableOption "Enables hercules-ci-agent with my configuration";
config = lib.mkIf config.common.hercules.enable {
diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix
index 6629fa4..2b36755 100644
--- a/modules/nixos/default.nix
+++ b/modules/nixos/default.nix
@@ -1,3 +1,6 @@
{config, ...}: {
- flake.nixosModules.settei = import ./settei {inherit (config) perInput;};
+ flake.nixosModules = {
+ settei = import ./settei {inherit (config) perInput;};
+ common = ./common;
+ };
}