This commit is contained in:
Ingolf Wagner 2022-06-23 00:33:59 +02:00
parent d6f8fe252b
commit fff0b232ab
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
4 changed files with 81 additions and 58 deletions

View file

@ -76,6 +76,13 @@
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
writeCommand = krops.packages.${system}.writeCommand; writeCommand = krops.packages.${system}.writeCommand;
pullNetworkPasswords = pkgs.writers.writeBashBin "pull-network-passwords" ''
echo "download network passwords from $1"
'';
pushNetworkPasswords = pkgs.writers.writeBashBin "push-network-passwords" ''
echo "push network passwords to $1"
'';
in in
{ {
# deployment # deployment
@ -95,12 +102,26 @@
}; };
# colmena # colmena
devShell.x86_64-linux = devShell.${system} =
pkgs.mkShell { pkgs.mkShell {
buildInputs = [ colmena.packages.${system}.colmena ]; buildInputs = [
colmena.packages.${system}.colmena
pushNetworkPasswords
pullNetworkPasswords
nixpkgs-fmt.defaultPackage.${system}
];
}; };
colmena = { colmena =
let
sopsModule = name: { lib, ... }: {
sops.defaultSopsFile = lib.mkForce "${secrets}/secrets/${name}.yaml";
imports = [
sops-nix.nixosModules.sops
];
};
in
{
meta = { meta = {
nixpkgs = import nixpkgs { nixpkgs = import nixpkgs {
@ -111,7 +132,6 @@
unstable = nixpkgs-unstable.legacyPackages.${pkgs.system}; unstable = nixpkgs-unstable.legacyPackages.${pkgs.system};
polygon-art = polygon-art.packages.${pkgs.system}; polygon-art = polygon-art.packages.${pkgs.system};
}) })
]; ];
}; };
specialArgs = { specialArgs = {
@ -119,26 +139,8 @@
}; };
}; };
sterni = { name, nodes, pkgs, ... }: { defaults = { name, pkgs, ... }: {
deployment = { deployment.buildOnTarget = true;
buildOnTarget = true;
targetHost = "sterni.private";
keys = {
"onion_id_pepe".text = "yolo";
};
};
imports = [
./nixos/configs/sterni/configuration.nix
sops-nix.nixosModules.sops
cluster-module.nixosModules.tinc
grocy-scanner.nixosModule
home-manager.nixosModules.home-manager
];
# todo
sops.defaultSopsFile = "${secrets}/secrets/sterni.yaml";
nix = { nix = {
# no channesl needed this way # no channesl needed this way
nixPath = [ "nixpkgs=${pkgs.path}" ]; nixPath = [ "nixpkgs=${pkgs.path}" ];
@ -148,19 +150,40 @@
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
}; };
environment.systemPackages = [
nixpkgs-fmt.defaultPackage."x86_64-linux"
];
imports = [
cluster-module.nixosModules.tinc
(sopsModule name)
home-manager.nixosModules.home-manager
];
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
};
sterni = { name, nodes, pkgs, ... }: {
deployment.targetHost = "${name}.private";
imports = [
./nixos/configs/${name}/configuration.nix
grocy-scanner.nixosModule
];
home-manager.users.mainUser = { home-manager.users.mainUser = {
imports = [ imports = [
doom-emacs-nix.hmModule doom-emacs-nix.hmModule
home-manager-utils.hmModule home-manager-utils.hmModule
]; ];
}; };
environment.systemPackages = [
nixpkgs-fmt.defaultPackage."x86_64-linux"
];
}; };
pepe = { name, nodes, pkgs, ... }: {
deployment.targetHost = "${name}.private";
imports = [
./nixos/configs/${name}/configuration.nix
grocy-scanner.nixosModule
];
};
}; };
}; };
} }

View file

@ -13,12 +13,12 @@
./tinc.nix ./tinc.nix
#./wifi-access-point.nix #./wifi-access-point.nix
#./lan.nix #./lan.nix
./dms.nix #./dms.nix
./borg.nix ./borg.nix
./mpd.nix #./mpd.nix
./grocy.nix ./grocy.nix
./taskwarrior-pushover.nix ./taskwarrior-pushover.nix
./neo4j.nix #./neo4j.nix
]; ];

View file

@ -681,7 +681,7 @@ in
''; '';
}; };
systemd.timers.fetchmail = { systemd.timers.fetchmail = {
enable = true; enable = false;
# timerConfig.OnCalendar = " *-*-* *:00:00"; # timerConfig.OnCalendar = " *-*-* *:00:00";
timerConfig.OnCalendar = "*:0/10"; timerConfig.OnCalendar = "*:0/10";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View file

@ -4,7 +4,7 @@
../../system/all ../../system/all
./netdata.nix ./netdata.nix
./initssh.nix ./initssh.nix
./graylog-exporter.nix #./graylog-exporter.nix
./prometheus-exporters.nix ./prometheus-exporters.nix
./packages.nix ./packages.nix
]; ];