use inputs.self
for file paths
This commit is contained in:
parent
8655606c83
commit
eb6370be98
4 changed files with 10 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, lib, inputs, config, ... }:
|
{ pkgs, lib, inputs, config, ... }:
|
||||||
let
|
let
|
||||||
userLib = import ../users/lib.nix { inherit lib; };
|
userLib = import "${toString inputs.self}/users/lib.nix" { inherit lib; };
|
||||||
|
|
||||||
nixpkgs-update-bin = "/var/lib/nixpkgs-update/bin/nixpkgs-update";
|
nixpkgs-update-bin = "/var/lib/nixpkgs-update/bin/nixpkgs-update";
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ in
|
||||||
|
|
||||||
sops.secrets.nix-community-cachix = {
|
sops.secrets.nix-community-cachix = {
|
||||||
path = "/home/r-ryantm/.config/cachix/cachix.dhall";
|
path = "/home/r-ryantm/.config/cachix/cachix.dhall";
|
||||||
sopsFile = ../roles/nix-community-cache/secrets.yaml;
|
sopsFile = "${toString inputs.self}/roles/nix-community-cache/secrets.yaml";
|
||||||
owner = "r-ryantm";
|
owner = "r-ryantm";
|
||||||
group = "r-ryantm";
|
group = "r-ryantm";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ config, lib, ... }:
|
{ config, inputs, lib, ... }:
|
||||||
let
|
let
|
||||||
defaultSopsPath = ../. + "/${config.networking.hostName}/secrets.yaml";
|
defaultSopsPath = "${toString inputs.self}/${config.networking.hostName}/secrets.yaml";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
sops.defaultSopsFile = lib.mkIf (builtins.pathExists defaultSopsPath) defaultSopsPath;
|
sops.defaultSopsFile = lib.mkIf (builtins.pathExists defaultSopsPath) defaultSopsPath;
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
{ lib, ... }:
|
{ inputs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
usersDir = "${toString inputs.self}/users";
|
||||||
userImports =
|
userImports =
|
||||||
let
|
let
|
||||||
toUserPath = f: ../users/. + "/${f}";
|
toUserPath = f: usersDir + "/${f}";
|
||||||
onlyUserFiles = x:
|
onlyUserFiles = x:
|
||||||
lib.hasSuffix ".nix" x &&
|
lib.hasSuffix ".nix" x &&
|
||||||
x != "lib.nix"
|
x != "lib.nix"
|
||||||
;
|
;
|
||||||
userDirEntries = builtins.readDir ../users;
|
userDirEntries = builtins.readDir usersDir;
|
||||||
userFiles = builtins.filter onlyUserFiles (lib.attrNames userDirEntries);
|
userFiles = builtins.filter onlyUserFiles (lib.attrNames userDirEntries);
|
||||||
in
|
in
|
||||||
builtins.map toUserPath userFiles;
|
builtins.map toUserPath userFiles;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, config, ... }:
|
{ lib, inputs, pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
upload-to-cachix = pkgs.writeScriptBin "upload-to-cachix" ''
|
upload-to-cachix = pkgs.writeScriptBin "upload-to-cachix" ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
@ -45,7 +45,7 @@ in
|
||||||
];
|
];
|
||||||
nix.settings.post-build-hook = "${upload-to-cachix}/bin/upload-to-cachix";
|
nix.settings.post-build-hook = "${upload-to-cachix}/bin/upload-to-cachix";
|
||||||
|
|
||||||
sops.secrets.nix-community-cachix.sopsFile = ../../roles/nix-community-cache/secrets.yaml;
|
sops.secrets.nix-community-cachix.sopsFile = "${toString inputs.self}/roles/nix-community-cache/secrets.yaml";
|
||||||
sops.secrets.id_buildfarm = { };
|
sops.secrets.id_buildfarm = { };
|
||||||
|
|
||||||
# delete build logs older than 30 days
|
# delete build logs older than 30 days
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue