new beginning
This commit is contained in:
106
nixos/configurations.nix
Normal file
106
nixos/configurations.nix
Normal file
@ -0,0 +1,106 @@
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-stable,
|
||||
sops-nix,
|
||||
home-manager,
|
||||
lanzaboote,
|
||||
simple-nixos-mailserver,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
customModules = import ../modules/modules-list.nix;
|
||||
customPkgs = self.packages;
|
||||
baseModules = [
|
||||
{_module.args.inputs = inputs;}
|
||||
{
|
||||
imports = [
|
||||
({pkgs, ...}: {
|
||||
nix = {
|
||||
nixPath = ["nixpkgs=${pkgs.path}"];
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than +4";
|
||||
};
|
||||
|
||||
package = pkgs.nixVersions.stable;
|
||||
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
defaultModules = baseModules ++ customModules;
|
||||
myNixosSystem = {
|
||||
np,
|
||||
ip,
|
||||
system,
|
||||
file,
|
||||
remoteBuild ? true,
|
||||
sshPort ? 22,
|
||||
sshUser ? "root",
|
||||
allowLocalDeployment ? false,
|
||||
additionalModules ? [],
|
||||
}:
|
||||
np.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {mypkgs = customPkgs."${system}";};
|
||||
modules =
|
||||
defaultModules
|
||||
++ [
|
||||
{
|
||||
remote = {
|
||||
inherit ip sshUser sshPort allowLocalDeployment remoteBuild;
|
||||
};
|
||||
}
|
||||
{nixpkgs.system = "${system}";}
|
||||
]
|
||||
++ additionalModules
|
||||
++ [file];
|
||||
};
|
||||
in {
|
||||
nixos = myNixosSystem {
|
||||
np = nixpkgs;
|
||||
system = "x86_64-linux";
|
||||
ip = "127.0.0.1";
|
||||
allowLocalDeployment = true;
|
||||
file = ./laptop/configuration.nix;
|
||||
};
|
||||
|
||||
framework = myNixosSystem {
|
||||
np = nixpkgs;
|
||||
system = "x86_64-linux";
|
||||
ip = "127.0.0.1";
|
||||
allowLocalDeployment = true;
|
||||
file = ./framework/configuration.nix;
|
||||
additionalModules = [
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
];
|
||||
};
|
||||
|
||||
celestia = myNixosSystem {
|
||||
np = nixpkgs;
|
||||
system = "x86_64-linux";
|
||||
ip = "192.168.1.11";
|
||||
# remoteBuild = false;
|
||||
file = ./celestia/configuration.nix;
|
||||
};
|
||||
|
||||
primordial = myNixosSystem {
|
||||
np = nixpkgs;
|
||||
system = "aarch64-linux";
|
||||
ip = "159.69.53.14";
|
||||
file = ./primordial/configuration.nix;
|
||||
additionalModules = [
|
||||
simple-nixos-mailserver.nixosModules.mailserver
|
||||
];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user