refac: pass paths as extra args instead
This commit is contained in:
parent
bac5f2747a
commit
374d00c941
9 changed files with 28 additions and 24 deletions
|
@ -115,6 +115,9 @@
|
|||
specialArgs = {
|
||||
inherit inputs;
|
||||
globalData = import ./data.nix;
|
||||
usersPath = ./users;
|
||||
hostsPath = ./hosts;
|
||||
packagesPath = ./packages;
|
||||
} // specialArgs;
|
||||
|
||||
modules =
|
||||
|
@ -138,6 +141,9 @@
|
|||
({ ... }: {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
packagesPath = ./packages;
|
||||
};
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
imports = [
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, ... }:
|
||||
{ config, hostsPath, ... }:
|
||||
|
||||
let
|
||||
serverData = import ../../../tatos/data.secret.nix;
|
||||
serverData = import (hostsPath + "/tatos/data.secret.nix");
|
||||
in
|
||||
{
|
||||
age.secrets.wireguard-asus-gl553vd-private = {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ ... }:
|
||||
{ hostsPath, usersPath, ... }:
|
||||
|
||||
let
|
||||
asusData = import ../data.secret.nix;
|
||||
homeData = import ../../home/data.secret.nix;
|
||||
asusData = import (hostsPath + "/asus-gl553vd/data.secret.nix");
|
||||
homeData = import (hostsPath + "/home/data.secret.nix");
|
||||
in
|
||||
{
|
||||
imports = [ ../../../users/jan ];
|
||||
imports = [ (usersPath + "/jan") ];
|
||||
|
||||
home-manager.users.jan = {
|
||||
local.window-manager = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, ... }:
|
||||
{ config, hostsPath, ... }:
|
||||
|
||||
let
|
||||
serverData = import ../../../tatos/data.secret.nix;
|
||||
serverData = import (hostsPath + "/tatos/data.secret.nix");
|
||||
in
|
||||
{
|
||||
age.secrets.wireguard-home-private = {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ ... }:
|
||||
{ usersPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./jan.nix
|
||||
../../../users/nas
|
||||
(usersPath + "/nas")
|
||||
];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, hostsPath, usersPath, ... }:
|
||||
|
||||
let
|
||||
homeData = import ../data.secret.nix;
|
||||
asusData = import ../../asus-gl553vd/data.secret.nix;
|
||||
homeData = import (hostsPath + "/home/data.secret.nix");
|
||||
asusData = import (hostsPath + "/asus-gl553vd/data.secret.nix");
|
||||
in
|
||||
{
|
||||
imports = [ ../../../users/jan ];
|
||||
imports = [ (usersPath + "/jan") ];
|
||||
|
||||
home-manager.users.jan = {
|
||||
local.window-manager = {
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, hostsPath, ... }:
|
||||
|
||||
let
|
||||
tatosData = import ../../../tatos/data.secret.nix;
|
||||
|
||||
istalData = import ../../data.secret.nix;
|
||||
tatosData = import (hostsPath + "/tatos/data.secret.nix");
|
||||
istalData = import (hostsPath + "/istal/data.secret.nix");
|
||||
inherit (istalData.wireguard) port;
|
||||
in
|
||||
{
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, hostsPath, ... }:
|
||||
|
||||
# Source: https://habr.com/ru/companies/xakep/articles/699000/
|
||||
|
||||
let
|
||||
istalData = import ../../../istal/data.secret.nix;
|
||||
|
||||
tatosData = import ../../data.secret.nix;
|
||||
istalData = import (hostsPath + "/istal/data.secret.nix");
|
||||
tatosData = import (hostsPath + "/tatos/data.secret.nix");
|
||||
port = tatosData.wireguard.port;
|
||||
in
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, packagesPath, ... }:
|
||||
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.git-crypt
|
||||
(pkgs.callPackage ../../../packages/git-crypt-rm-gpg-user { })
|
||||
(pkgs.callPackage (packagesPath + /git-crypt-rm-gpg-user) { })
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
|
|
Loading…
Reference in a new issue