refactor common modules

This commit is contained in:
Sean Buckley 2021-04-09 18:23:21 -04:00
parent 4c1a6c264e
commit 0fb53034fe
5 changed files with 6 additions and 10 deletions

View file

@ -1,10 +1,12 @@
{ unstable, stable2009 }:
let
commonModules = [
../.
commonModules = name: [
(../.)
(./. + "/${name}")
({ ... }: {
config = {
networking.hostName = name;
sconfig.flakes.enable = true;
sconfig.flakes.rebuildPath = "github:buckley310/nixos-config";
};
@ -13,17 +15,15 @@ let
mkStandardSystem = { name, pkgs }: pkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = commonModules ++ [
modules = (commonModules name) ++ [
pkgs.nixosModules.notDetected
(./. + "/${name}")
];
};
mkQemuSystem = { name, pkgs }: pkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = commonModules ++ [
modules = (commonModules name) ++ [
(x: { imports = [ "${x.modulesPath}/profiles/qemu-guest.nix" ]; })
(./. + "/${name}")
];
};

View file

@ -12,7 +12,6 @@
};
networking = {
hostName = "hp";
search = [ "bck.me" ];
};

View file

@ -5,7 +5,6 @@
services.tlp.enable = true;
services.openssh.enable = true;
networking.hostName = "manta";
networking.search = [ "bck.me" ];
sconfig = {

View file

@ -7,7 +7,6 @@
};
networking = {
hostName = "neo";
search = [ "bck.me" ];
};

View file

@ -1,6 +1,5 @@
{ ... }:
{
networking.hostName = "vm";
sconfig.profile = "server";
boot.loader.grub.device = "/dev/vda";
fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; };