mirror of
https://github.com/callumio/nixfiles.git
synced 2026-08-06 20:49:17 +01:00
partial host migrations to flake parts
This commit is contained in:
parent
1f779fff49
commit
091cfbdf96
13 changed files with 209 additions and 165 deletions
9
modules/hosts/artemis.nix
Normal file
9
modules/hosts/artemis.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
flake.nixosConfigurations.artemis = config.flake.lib.mkHost {
|
||||
modules = [
|
||||
config.flake.nixosModules.profile-laptop
|
||||
../../hosts/artemis
|
||||
];
|
||||
};
|
||||
}
|
||||
12
modules/hosts/hermes.nix
Normal file
12
modules/hosts/hermes.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ config, inputs, ... }:
|
||||
{
|
||||
flake.nixosConfigurations.hermes = config.flake.lib.mkHost {
|
||||
modules = [
|
||||
config.flake.nixosModules.profile-server
|
||||
inputs.nocodb.nixosModules.nocodb
|
||||
inputs.copyparty.nixosModules.default
|
||||
../../hosts/hermes
|
||||
];
|
||||
overlays = [ inputs.copyparty.overlays.default ];
|
||||
};
|
||||
}
|
||||
26
modules/lib/mk-host.nix
Normal file
26
modules/lib/mk-host.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
withSystem,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake.lib.mkHost =
|
||||
{
|
||||
system ? "x86_64-linux",
|
||||
modules,
|
||||
overlays ? [ ],
|
||||
}:
|
||||
withSystem system (
|
||||
{ ... }:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; }; # TODO: REMOVE
|
||||
modules = modules ++ [
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.overlays = [ config.flake.overlays.default ] ++ overlays;
|
||||
}
|
||||
];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
{ config, ... }:
|
||||
{ inputs, config, ... }:
|
||||
{
|
||||
flake.nixosModules.profile-base = {
|
||||
import = with config.flake.nixosModules; [
|
||||
nix-config
|
||||
boot
|
||||
keys
|
||||
hm # maybe drop and make desktop only?
|
||||
secrets
|
||||
tailscale
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.agenix.nixosModules.default
|
||||
config.flake.nixosModules.nix-config
|
||||
config.flake.nixosModules.boot
|
||||
config.flake.nixosModules.keys
|
||||
config.flake.nixosModules.hm
|
||||
config.flake.nixosModules.secrets
|
||||
config.flake.nixosModules.tailscale
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{ config, ... }:
|
||||
{ config, inputs, ... }:
|
||||
{
|
||||
flake.nixosModules.profile-graphical = {
|
||||
imports = [
|
||||
config.flake.nixosmodules.profile-base
|
||||
config.flake.nixosModules.pinentry-fix-wayland
|
||||
config.flake.nixosModules.profile-base
|
||||
config.flake.nixosModules.gpg-pinentry-wayland
|
||||
inputs.stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue