mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +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, ... }: {
|
||||
|
||||
boot.loader = lib.mkIf config.physical {
|
||||
boot.loader = lib.mkIf (config.physical && !config.server) {
|
||||
grub = {
|
||||
enable = true;
|
||||
|
||||
|
@ -2,12 +2,7 @@
|
||||
|
||||
config = lib.mkIf config.physical {
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# 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.useDHCP = 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
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
config = lib.mkIf config.physical {
|
||||
config = lib.mkIf (config.physical && !config.server) {
|
||||
|
||||
# Prevent wake from keyboard
|
||||
powerManagement.powerDownCommands = ''
|
||||
|
@ -1,13 +1,11 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options = { zfs.enable = lib.mkEnableOption "ZFS file system."; };
|
||||
|
||||
config =
|
||||
lib.mkIf (pkgs.stdenv.isLinux && config.server && config.zfs.enable) {
|
||||
config = lib.mkIf (config.server && config.zfs.enable) {
|
||||
|
||||
# Only use compatible Linux kernel, since ZFS can be behind
|
||||
boot.kernelPackages =
|
||||
config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
boot.kernelParams = [ "nohibernate" ];
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
services.prometheus.exporters.zfs.enable =
|
||||
|
Loading…
Reference in New Issue
Block a user