summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/default.nix2
-rw-r--r--home/ebisu/fortune/system/sops.nix4
-rw-r--r--hosts/default.nix16
-rw-r--r--hosts/himeji/default.nix9
-rw-r--r--hosts/kansai/default.nix7
-rw-r--r--modules/core/sops.nix4
-rw-r--r--modules/desktop/default.nix4
-rw-r--r--modules/server/sops.nix4
8 files changed, 31 insertions, 19 deletions
diff --git a/home/default.nix b/home/default.nix
index 6b2900c..e202d9f 100644
--- a/home/default.nix
+++ b/home/default.nix
@@ -6,7 +6,7 @@
...
}:
let
- secrets = import ../lib/secrets.nix { inherit self; };
+ secrets = import "${self}/lib/secrets.nix" { inherit self; };
in
{
flake.homeConfigurations.ebisu =
diff --git a/home/ebisu/fortune/system/sops.nix b/home/ebisu/fortune/system/sops.nix
index e0fb581..e229626 100644
--- a/home/ebisu/fortune/system/sops.nix
+++ b/home/ebisu/fortune/system/sops.nix
@@ -1,8 +1,8 @@
-{ config, ... }:
+{ config, self, ... }:
{
sops = {
gnupg.sshKeyPaths = [ ];
- defaultSopsFile = ../../../../secrets/${config.home.username}.yaml;
+ defaultSopsFile = "${self}/secrets/${config.home.username}.yaml";
age = {
sshKeyPaths = [ ];
diff --git a/hosts/default.nix b/hosts/default.nix
index 15a94fa..bb94007 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -7,7 +7,7 @@
...
}:
let
- secrets = import ../lib/secrets.nix { inherit self; };
+ secrets = import "${self}/lib/secrets.nix" { inherit self; };
in
{
flake.nixosConfigurations = with lib; {
@@ -19,7 +19,12 @@ in
})."x86_64-linux";
specialArgs = {
- inherit inputs outputs secrets;
+ inherit
+ inputs
+ outputs
+ secrets
+ self
+ ;
};
modules = with inputs; [
@@ -35,7 +40,12 @@ in
himeji = nixosSystem {
specialArgs = {
- inherit inputs outputs secrets;
+ inherit
+ inputs
+ outputs
+ secrets
+ self
+ ;
};
modules = with inputs; [
diff --git a/hosts/himeji/default.nix b/hosts/himeji/default.nix
index 3c3727b..0d5fc9e 100644
--- a/hosts/himeji/default.nix
+++ b/hosts/himeji/default.nix
@@ -1,10 +1,11 @@
+{ self, ... }:
{
imports = [
./hardware-configuration.nix
- ../../disks/himeji.nix
- ../../modules/core
- ../../modules/options
- ../../modules/server
+ "${self}/disks/himeji.nix"
+ "${self}/modules/core"
+ "${self}/modules/options"
+ "${self}/modules/server"
];
config = {
diff --git a/hosts/kansai/default.nix b/hosts/kansai/default.nix
index 164f0d5..b1863e6 100644
--- a/hosts/kansai/default.nix
+++ b/hosts/kansai/default.nix
@@ -1,9 +1,10 @@
+{ self, ... }:
{
imports = [
./hardware-configuration.nix
- ../../modules/core
- ../../modules/desktop
- ../../modules/options
+ "${self}/modules/core"
+ "${self}/modules/desktop"
+ "${self}/modules/options"
];
networking.hostName = "kansai";
diff --git a/modules/core/sops.nix b/modules/core/sops.nix
index c1c9d13..fbf1b6f 100644
--- a/modules/core/sops.nix
+++ b/modules/core/sops.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+{ pkgs, self, ... }:
{
environment.systemPackages = [
pkgs.sops
@@ -6,7 +6,7 @@
sops = {
gnupg.sshKeyPaths = [ ];
- secrets.tailscale_authentication_key.sopsFile = ../../secrets/hosts.yaml;
+ secrets.tailscale_authentication_key.sopsFile = "${self}/secrets/hosts.yaml";
age = {
sshKeyPaths = [ ];
diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix
index 7491d8a..1e5a9ac 100644
--- a/modules/desktop/default.nix
+++ b/modules/desktop/default.nix
@@ -1,4 +1,4 @@
-{ config, ... }:
+{ config, self, ... }:
{
imports = [
./hardware
@@ -9,5 +9,5 @@
./virtualisation
];
- sops.defaultSopsFile = ../../secrets/${config.networking.hostName}.yaml;
+ sops.defaultSopsFile = "${self}/secrets/${config.networking.hostName}.yaml";
}
diff --git a/modules/server/sops.nix b/modules/server/sops.nix
index 37dc96e..25bd355 100644
--- a/modules/server/sops.nix
+++ b/modules/server/sops.nix
@@ -1,7 +1,7 @@
-{ config, ... }:
+{ config, self, ... }:
{
sops = {
- defaultSopsFile = ../../secrets/${config.networking.hostName}.yaml;
+ defaultSopsFile = "${self}/secrets/${config.networking.hostName}.yaml";
secrets = {
"ghcr/user" = { };