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 }:
|
{ unstable, stable2009 }:
|
||||||
let
|
let
|
||||||
|
|
||||||
commonModules = [
|
commonModules = name: [
|
||||||
../.
|
(../.)
|
||||||
|
(./. + "/${name}")
|
||||||
({ ... }: {
|
({ ... }: {
|
||||||
config = {
|
config = {
|
||||||
|
networking.hostName = name;
|
||||||
sconfig.flakes.enable = true;
|
sconfig.flakes.enable = true;
|
||||||
sconfig.flakes.rebuildPath = "github:buckley310/nixos-config";
|
sconfig.flakes.rebuildPath = "github:buckley310/nixos-config";
|
||||||
};
|
};
|
||||||
|
@ -13,17 +15,15 @@ let
|
||||||
|
|
||||||
mkStandardSystem = { name, pkgs }: pkgs.lib.nixosSystem {
|
mkStandardSystem = { name, pkgs }: pkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = commonModules ++ [
|
modules = (commonModules name) ++ [
|
||||||
pkgs.nixosModules.notDetected
|
pkgs.nixosModules.notDetected
|
||||||
(./. + "/${name}")
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mkQemuSystem = { name, pkgs }: pkgs.lib.nixosSystem {
|
mkQemuSystem = { name, pkgs }: pkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = commonModules ++ [
|
modules = (commonModules name) ++ [
|
||||||
(x: { imports = [ "${x.modulesPath}/profiles/qemu-guest.nix" ]; })
|
(x: { imports = [ "${x.modulesPath}/profiles/qemu-guest.nix" ]; })
|
||||||
(./. + "/${name}")
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "hp";
|
|
||||||
search = [ "bck.me" ];
|
search = [ "bck.me" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
services.tlp.enable = true;
|
services.tlp.enable = true;
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
networking.hostName = "manta";
|
|
||||||
networking.search = [ "bck.me" ];
|
networking.search = [ "bck.me" ];
|
||||||
|
|
||||||
sconfig = {
|
sconfig = {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "neo";
|
|
||||||
search = [ "bck.me" ];
|
search = [ "bck.me" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
networking.hostName = "vm";
|
|
||||||
sconfig.profile = "server";
|
sconfig.profile = "server";
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; };
|
fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; };
|
||||||
|
|
Loading…
Reference in a new issue