mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
refactor common modules
This commit is contained in:
parent
4c1a6c264e
commit
0fb53034fe
5 changed files with 6 additions and 10 deletions
|
@ -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}")
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
};
|
||||
|
||||
networking = {
|
||||
hostName = "hp";
|
||||
search = [ "bck.me" ];
|
||||
};
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
services.tlp.enable = true;
|
||||
services.openssh.enable = true;
|
||||
|
||||
networking.hostName = "manta";
|
||||
networking.search = [ "bck.me" ];
|
||||
|
||||
sconfig = {
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
};
|
||||
|
||||
networking = {
|
||||
hostName = "neo";
|
||||
search = [ "bck.me" ];
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{ ... }:
|
||||
{
|
||||
networking.hostName = "vm";
|
||||
sconfig.profile = "server";
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; };
|
||||
|
|
Loading…
Reference in a new issue