mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
factor out hostnames
This commit is contained in:
parent
004d2b1263
commit
6f3ab9c4bf
6 changed files with 14 additions and 23 deletions
|
@ -1,9 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "cube";
|
||||
|
||||
# imports = [ ./monitors.nix ];
|
||||
|
||||
virtualisation.libvirtd.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
nixpkgs: hardware: nixosModule:
|
||||
with hardware;
|
||||
|
||||
let
|
||||
sys = system: mods: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [ nixosModule ] ++ mods;
|
||||
};
|
||||
builtins.mapAttrs
|
||||
|
||||
(name: { system, mods }: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = mods ++ [
|
||||
nixosModule
|
||||
{ networking.hostName = name; }
|
||||
];
|
||||
})
|
||||
|
||||
in
|
||||
{
|
||||
cube = sys "x86_64-linux" [ physical ./cube ];
|
||||
hp = sys "x86_64-linux" [ physical ./hp ];
|
||||
lenny = sys "x86_64-linux" [ physical ./lenny ];
|
||||
nixdev = sys "x86_64-linux" [ qemu ./nixdev ];
|
||||
slate = sys "x86_64-linux" [ physical ./slate ];
|
||||
cube = { system = "x86_64-linux"; mods = [ physical ./cube ]; };
|
||||
hp = { system = "x86_64-linux"; mods = [ physical ./hp ]; };
|
||||
lenny = { system = "x86_64-linux"; mods = [ physical ./lenny ]; };
|
||||
nixdev = { system = "x86_64-linux"; mods = [ qemu ./nixdev ]; };
|
||||
slate = { system = "x86_64-linux"; mods = [ physical ./slate ]; };
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "hp";
|
||||
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
};
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "lenny";
|
||||
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
};
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "nixdev";
|
||||
|
||||
sconfig = {
|
||||
gnome = true;
|
||||
profile = "desktop";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "slate";
|
||||
|
||||
sconfig = {
|
||||
profile = "desktop";
|
||||
gnome = true;
|
||||
|
|
Loading…
Reference in a new issue