Compare commits
2 commits
0e5ebb37f1
...
d613dee364
| Author | SHA1 | Date | |
|---|---|---|---|
| d613dee364 | |||
| 761246a4a4 |
3 changed files with 9 additions and 29 deletions
10
flake.nix
10
flake.nix
|
|
@ -91,15 +91,9 @@
|
||||||
util = import ./util {inherit inputs;};
|
util = import ./util {inherit inputs;};
|
||||||
forEachPkgs = util.forEachPkgs;
|
forEachPkgs = util.forEachPkgs;
|
||||||
|
|
||||||
mkNixosInstaller = util.mkNixosInstaller;
|
|
||||||
mkNixosSystem = util.mkNixosSystem;
|
mkNixosSystem = util.mkNixosSystem;
|
||||||
mkDarwinSystem = util.mkDarwinSystem;
|
mkDarwinSystem = util.mkDarwinSystem;
|
||||||
mkHome = util.mkHome;
|
mkHome = util.mkHome;
|
||||||
syncthingConfiguration = util.syncthingConfiguration;
|
|
||||||
|
|
||||||
installerSystems = {
|
|
||||||
basic = mkNixosInstaller "basic" [];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixosSystems = {
|
nixosSystems = {
|
||||||
horizon = mkNixosSystem "horizon";
|
horizon = mkNixosSystem "horizon";
|
||||||
|
|
@ -170,14 +164,10 @@
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
installerConfigurations = installerSystems;
|
|
||||||
|
|
||||||
nixosConfigurations = nixosSystems;
|
nixosConfigurations = nixosSystems;
|
||||||
|
|
||||||
darwinConfigurations = darwinSystems;
|
darwinConfigurations = darwinSystems;
|
||||||
|
|
||||||
homeConfigurations = homeConfigurations;
|
homeConfigurations = homeConfigurations;
|
||||||
|
|
||||||
syncthingConfiguration = syncthingConfiguration;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
outputs,
|
syncthingConfiguration,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
mountDir = "/mnt/sync";
|
mountDir = "/mnt/sync";
|
||||||
|
|
@ -27,7 +27,7 @@ in {
|
||||||
configDir = configDir;
|
configDir = configDir;
|
||||||
overrideDevices = true;
|
overrideDevices = true;
|
||||||
overrideFolders = true;
|
overrideFolders = true;
|
||||||
configuration = outputs.syncthingConfiguration;
|
configuration = syncthingConfiguration;
|
||||||
deviceName = config.networking.hostName;
|
deviceName = config.networking.hostName;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,12 @@
|
||||||
home-manager-config
|
home-manager-config
|
||||||
../modules/system-modules
|
../modules/system-modules
|
||||||
];
|
];
|
||||||
|
|
||||||
|
syncthingConfiguration = nix-syncthing.lib.syncthingConfiguration {
|
||||||
|
modules = [
|
||||||
|
(import ../configurations/syncthing)
|
||||||
|
];
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
forEachPkgs = lambda: forEachSystem (system: lambda system (pkgsFor system));
|
forEachPkgs = lambda: forEachSystem (system: lambda system (pkgsFor system));
|
||||||
|
|
||||||
|
|
@ -62,19 +68,9 @@ in {
|
||||||
(lib.mkUnless condition no)
|
(lib.mkUnless condition no)
|
||||||
];
|
];
|
||||||
|
|
||||||
mkNixosInstaller = host: userKeys:
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
{
|
|
||||||
# TODO: authorized keys for all users and hosts
|
|
||||||
}
|
|
||||||
../configurations/nixos/${host}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
mkNixosSystem = host:
|
mkNixosSystem = host:
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs outputs util;};
|
specialArgs = {inherit inputs outputs util syncthingConfiguration;};
|
||||||
modules =
|
modules =
|
||||||
system-modules
|
system-modules
|
||||||
++ [
|
++ [
|
||||||
|
|
@ -119,10 +115,4 @@ in {
|
||||||
../configurations/home-manager/${user}
|
../configurations/home-manager/${user}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
syncthingConfiguration = nix-syncthing.lib.syncthingConfiguration {
|
|
||||||
modules = [
|
|
||||||
(import ../configurations/syncthing)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue