networking

This commit is contained in:
MichaelFisher1997 2024-08-29 12:09:20 +01:00
parent ffde7e1ae4
commit 8b064ceae9
5 changed files with 57 additions and 22 deletions

View File

@ -12,6 +12,7 @@
./mnt.nix
./docker.nix
./hyprland.nix
./networking.nix
];
# Bootloader.
@ -23,7 +24,6 @@
# boot.supportedFilesystems = [ "zfs" ];
# boot.zfs.forceImportRoot = false;
# networking.hostId = "a44f5fde";
networking.hostName = "hypr-nix"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Enable networking
@ -52,14 +52,17 @@
# services.xserver.enable = true;
services.xserver = {
enable = true;
layout = "gb";
xkbVariant = "";
xkb.layout = "gb";
xkb.variant = "";
};
services.xserver.videoDrivers = ["amdgpu"];
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
# Enable kde6
#services.displayManager.sddm.enable = false;
#services.displayManager.sddm.wayland.enable = false;
#services.desktopManager.plasma6.enable = true;
# Configure console keymap
console.keyMap = "uk";
@ -128,7 +131,6 @@
];
};
services.xserver.videoDrivers = ["amdgpu"];
programs.steam.enable = true;
programs.steam.gamescopeSession.enable = true;
@ -160,6 +162,6 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
system.autoUpgrade.enable = true;
system.autoUpgrade.allowReboot = true;
system.autoUpgrade.allowReboot = false;
}

View File

@ -8,7 +8,7 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -25,8 +25,10 @@
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

26
mnt.nix
View File

@ -1,9 +1,27 @@
{ pkgs, ... }:
{
services.rpcbind.enable = true; # needed for NFS
systemd.mounts = [{
type = "nfs";
mountConfig = {
Options = "noatime";
};
what = "100.105.0.115:/BigNAS";
where = "/mnt/BigNAS";
}];
systemd.automounts = [{
wantedBy = [ "multi-user.target" ];
automountConfig = {
TimeoutIdleSec = "600";
};
where = "/mnt/BigNAS";
}];
#fileSystems."/mnt/BigNAS" = {
# device = "10.27.27.239:/BigNAS";
# fsType = "nfs";
# options = [ "x-systemd.automount" "noauto" ];
#};
#fileSystems."/mnt/MainPool" = {
@ -11,8 +29,8 @@
# fsType = "nfs";
#};
#fileSystems."/mnt/NV1" = {
# device = "/dev/nvme1n1p2";
# fsType = "btrfs";
#};
fileSystems."/mnt/NV1" = {
device = "/dev/nvme1n1p1";
fsType = "btrfs";
};
}

9
networking.nix Normal file
View File

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
networking.hostName = "hypr-nix";
networking = {
interfaces = {
enp0s31f6.useDHCP = true;
};
};
}

View File

@ -73,9 +73,9 @@ in
gzip
mangohud
protonup
lutris
bottles
wine
wine64
#peazip
_7zz
unrar
@ -102,6 +102,10 @@ in
unstable.zed-editor
unstable.hyprshot
guacamole-client
mono
pika-backup
lutris
audacity
];
}