nixfmt
This commit is contained in:
parent
053f90f64a
commit
796c11b823
27 changed files with 1130 additions and 796 deletions
|
@ -1,20 +1,24 @@
|
|||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
./router.nix
|
||||
];
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./router.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.supportedFilesystems = [ "bcachefs" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
|
@ -51,9 +55,8 @@
|
|||
programs.zsh.enable = true;
|
||||
users.users.guest = {
|
||||
isNormalUser = true;
|
||||
# extraGroups = [ "wheel" ];
|
||||
packages = with pkgs; [
|
||||
];
|
||||
# extraGroups = [ "wheel" ];
|
||||
packages = with pkgs; [ ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAA16foz+XzwKwyIR4wFgNIAE3Y7AfXyEsUZFVVz8Rie catvayor@katvayor"
|
||||
|
||||
|
@ -97,7 +100,10 @@
|
|||
services.openssh.enable = true;
|
||||
services.netbird.enable = true;
|
||||
|
||||
boot.kernelModules = [ "kvm-intel" "kvm-amd" ];
|
||||
boot.kernelModules = [
|
||||
"kvm-intel"
|
||||
"kvm-amd"
|
||||
];
|
||||
programs.virt-manager.enable = true;
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
|
@ -118,7 +124,13 @@
|
|||
};
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 22 53 80 443 22000 ];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
22
|
||||
53
|
||||
80
|
||||
443
|
||||
22000
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [ 67 ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
@ -145,6 +157,4 @@
|
|||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,27 +1,37 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "UUID=2d6f7d3a-936d-457c-86c7-f49d816ff5b7";
|
||||
fsType = "bcachefs";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "UUID=2d6f7d3a-936d-457c-86c7-f49d816ff5b7";
|
||||
fsType = "bcachefs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/DD9A-3823";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/DD9A-3823";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
|
|
|
@ -1,21 +1,32 @@
|
|||
{config, lib, pkgs, ...}: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
|
||||
|
||||
# networking.nat = {
|
||||
# enable = true;
|
||||
# internalInterfaces = [ "enp2s0" ];
|
||||
# externalInterface = "enp1s0";
|
||||
# };
|
||||
# networking.nat = {
|
||||
# enable = true;
|
||||
# internalInterfaces = [ "enp2s0" ];
|
||||
# externalInterface = "enp1s0";
|
||||
# };
|
||||
networking.interfaces.enp2s0 = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [{ address = "192.168.42.1"; prefixLength = 24; }];
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.42.1";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# networking.interfaces.enp3s0 = {
|
||||
# useDHCP = false;
|
||||
# ipv4.addresses = [{ address = "192.168.222.1"; prefixLength = 24; }];
|
||||
# ipv6.addresses = [{ address = "fd26:baf9:d250:8000::ffff"; prefixLength = 64; }];
|
||||
# };
|
||||
# networking.interfaces.enp3s0 = {
|
||||
# useDHCP = false;
|
||||
# ipv4.addresses = [{ address = "192.168.222.1"; prefixLength = 24; }];
|
||||
# ipv6.addresses = [{ address = "fd26:baf9:d250:8000::ffff"; prefixLength = 64; }];
|
||||
# };
|
||||
|
||||
services.dnsmasq = {
|
||||
enable = true;
|
||||
|
@ -33,7 +44,10 @@
|
|||
"10-enp3s0" = {
|
||||
name = "enp3s0";
|
||||
networkConfig = {
|
||||
VLAN = [ "vlan-admin" "vlan-user-test" ];
|
||||
VLAN = [
|
||||
"vlan-admin"
|
||||
"vlan-user-test"
|
||||
];
|
||||
|
||||
LinkLocalAddressing = false;
|
||||
LLDP = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue