mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 05:13:10 +01:00
networkd for the nuc
This commit is contained in:
parent
db9760072f
commit
1dfcdd7d7c
|
@ -1,20 +1,15 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./modules/networks
|
||||||
../../shared/vim.nix
|
../../shared/vim.nix
|
||||||
# ../../shared/sops.nix
|
# ../../shared/sops.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
|
||||||
boot = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
loader.efi.canTouchEfiVariables = true;
|
loader.efi.canTouchEfiVariables = true;
|
||||||
|
@ -24,8 +19,6 @@
|
||||||
services.zfs.autoScrub.enable = true;
|
services.zfs.autoScrub.enable = true;
|
||||||
services.zfs.autoSnapshot.enable = true;
|
services.zfs.autoSnapshot.enable = true;
|
||||||
|
|
||||||
networking.hostName = "nuc"; # Define your hostname.
|
|
||||||
networking.hostId = "795a4952";
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
@ -48,7 +41,6 @@
|
||||||
user.email = "rouven@rfive.de";
|
user.email = "rouven@rfive.de";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
21
hosts/nuc/modules/networks/default.nix
Normal file
21
hosts/nuc/modules/networks/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
networking = {
|
||||||
|
hostName = "nuc"; # Define your hostname.
|
||||||
|
hostId = "795a4952";
|
||||||
|
useNetworkd = true;
|
||||||
|
};
|
||||||
|
systemd.network = {
|
||||||
|
enable = true;
|
||||||
|
networks."10-loopback" = {
|
||||||
|
matchConfig.Name = "lo";
|
||||||
|
linkConfig.RequiredForOnline = false;
|
||||||
|
};
|
||||||
|
networks."10-wired" = {
|
||||||
|
matchConfig.Name = "eno1";
|
||||||
|
networkConfig = {
|
||||||
|
DHCP = "yes";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -37,6 +37,7 @@
|
||||||
wait-online.anyInterface = true;
|
wait-online.anyInterface = true;
|
||||||
networks."10-loopback" = {
|
networks."10-loopback" = {
|
||||||
matchConfig.Name = "lo";
|
matchConfig.Name = "lo";
|
||||||
|
linkConfig.RequiredForOnline = false;
|
||||||
};
|
};
|
||||||
networks."10-wired" = {
|
networks."10-wired" = {
|
||||||
matchConfig.Name = "enp0s31f6";
|
matchConfig.Name = "enp0s31f6";
|
||||||
|
|
Loading…
Reference in a new issue