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

129
flake.nix
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,73 +102,89 @@
}; };
# 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
meta = { sopsModule = name: { lib, ... }: {
nixpkgs = import nixpkgs { sops.defaultSopsFile = lib.mkForce "${secrets}/secrets/${name}.yaml";
system = "x86_64-linux"; imports = [
overlays = [ sops-nix.nixosModules.sops
(_self: _super: {
# we assign the overlay created before to the overlays of nixpkgs.
unstable = nixpkgs-unstable.legacyPackages.${pkgs.system};
polygon-art = polygon-art.packages.${pkgs.system};
})
]; ];
}; };
specialArgs = { in
inherit private_assets; {
};
};
sterni = { name, nodes, pkgs, ... }: { meta = {
deployment = { nixpkgs = import nixpkgs {
buildOnTarget = true; system = "x86_64-linux";
targetHost = "sterni.private"; overlays = [
keys = { (_self: _super: {
"onion_id_pepe".text = "yolo"; # we assign the overlay created before to the overlays of nixpkgs.
unstable = nixpkgs-unstable.legacyPackages.${pkgs.system};
polygon-art = polygon-art.packages.${pkgs.system};
})
];
};
specialArgs = {
inherit private_assets;
}; };
}; };
imports = [ defaults = { name, pkgs, ... }: {
./nixos/configs/sterni/configuration.nix deployment.buildOnTarget = true;
sops-nix.nixosModules.sops nix = {
cluster-module.nixosModules.tinc # no channesl needed this way
grocy-scanner.nixosModule nixPath = [ "nixpkgs=${pkgs.path}" ];
home-manager.nixosModules.home-manager # make flakes available
]; package = pkgs.nixUnstable;
extraOptions = ''
# todo experimental-features = nix-command flakes
sops.defaultSopsFile = "${secrets}/secrets/sterni.yaml"; '';
};
nix = { environment.systemPackages = [
# no channesl needed this way nixpkgs-fmt.defaultPackage."x86_64-linux"
nixPath = [ "nixpkgs=${pkgs.path}" ]; ];
# make flakes available
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mainUser = {
imports = [ imports = [
doom-emacs-nix.hmModule cluster-module.nixosModules.tinc
home-manager-utils.hmModule (sopsModule name)
home-manager.nixosModules.home-manager
];
home-manager.useGlobalPkgs = 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 = {
imports = [
doom-emacs-nix.hmModule
home-manager-utils.hmModule
];
};
};
pepe = { name, nodes, pkgs, ... }: {
deployment.targetHost = "${name}.private";
imports = [
./nixos/configs/${name}/configuration.nix
grocy-scanner.nixosModule
]; ];
}; };
environment.systemPackages = [
nixpkgs-fmt.defaultPackage."x86_64-linux"
];
}; };
};
}; };
} }

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
]; ];