system: create server profile, move networkmanager
This commit is contained in:
parent
91cf59ff47
commit
7b2286b728
@ -10,16 +10,13 @@
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# this should be the default unless i am specifically on a pc
|
||||
networking.networkmanager.enable = false;
|
||||
|
||||
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
||||
boot.loader.grub.enable = false;
|
||||
# Enables the generation of /boot/extlinux/extlinux.conf
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
|
||||
nixfiles = {
|
||||
profile.base.enable = true;
|
||||
profile.server.enable = true;
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
|
@ -42,12 +42,6 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
# FIXME find somewhere else to put this
|
||||
networking.networkmanager.enable = lib.mkDefault true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; let
|
||||
|
@ -3,5 +3,6 @@
|
||||
imports = [
|
||||
./base.nix
|
||||
./pc.nix
|
||||
./server.nix
|
||||
];
|
||||
}
|
||||
|
@ -7,5 +7,11 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
nixfiles.profile.base.enable = lib.mkDefault true;
|
||||
nixfiles.binfmt.enable = lib.mkDefault true;
|
||||
|
||||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
# FIXME find somewhere else to put this
|
||||
networking.networkmanager.enable = lib.mkDefault true; # Easiest to use and most distros use this by default.
|
||||
};
|
||||
}
|
||||
|
13
system/profile/server.nix
Normal file
13
system/profile/server.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.nixfiles.profile.server;
|
||||
inherit (lib) mkEnableOption mkDefault;
|
||||
inherit (lib.types) bool int str;
|
||||
in
|
||||
{
|
||||
options.nixfiles.profile.server.enable = mkEnableOption "server profile";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
nixfiles.profile.base.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user