mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 13:05:37 +00:00
fix avahi and dhcp, mark swan as physical
This commit is contained in:
parent
22ab2acf66
commit
8eb7ef0be7
@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
boot.loader = lib.mkIf config.physical {
|
boot.loader = lib.mkIf (config.physical && !config.server) {
|
||||||
grub = {
|
grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -2,12 +2,7 @@
|
|||||||
|
|
||||||
config = lib.mkIf config.physical {
|
config = lib.mkIf config.physical {
|
||||||
|
|
||||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
networking.useDHCP = true;
|
||||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
|
||||||
# replicates the default behaviour.
|
|
||||||
networking.useDHCP = false;
|
|
||||||
networking.interfaces.enp5s0.useDHCP = true;
|
|
||||||
networking.interfaces.wlp4s0.useDHCP = true;
|
|
||||||
|
|
||||||
networking.firewall.allowPing = lib.mkIf config.server true;
|
networking.firewall.allowPing = lib.mkIf config.server true;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf (pkgs.stdenv.isLinux && config.server) {
|
config = lib.mkIf config.server {
|
||||||
|
|
||||||
# Servers need a bootloader or they won't start
|
# Servers need a bootloader or they won't start
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf config.physical {
|
config = lib.mkIf (config.physical && !config.server) {
|
||||||
|
|
||||||
# Prevent wake from keyboard
|
# Prevent wake from keyboard
|
||||||
powerManagement.powerDownCommands = ''
|
powerManagement.powerDownCommands = ''
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
options = { zfs.enable = lib.mkEnableOption "ZFS file system."; };
|
options = { zfs.enable = lib.mkEnableOption "ZFS file system."; };
|
||||||
|
|
||||||
config =
|
config = lib.mkIf (config.server && config.zfs.enable) {
|
||||||
lib.mkIf (pkgs.stdenv.isLinux && config.server && config.zfs.enable) {
|
|
||||||
|
|
||||||
# Only use compatible Linux kernel, since ZFS can be behind
|
# Only use compatible Linux kernel, since ZFS can be behind
|
||||||
boot.kernelPackages =
|
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
config.boot.zfs.package.latestCompatibleLinuxPackages;
|
|
||||||
boot.kernelParams = [ "nohibernate" ];
|
boot.kernelParams = [ "nohibernate" ];
|
||||||
boot.supportedFilesystems = [ "zfs" ];
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
services.prometheus.exporters.zfs.enable =
|
services.prometheus.exporters.zfs.enable =
|
||||||
|
Loading…
Reference in New Issue
Block a user