diff options
Diffstat (limited to 'nixos')
| -rw-r--r-- | nixos/boot.nix | 4 | ||||
| -rw-r--r-- | nixos/default.nix | 6 | ||||
| -rw-r--r-- | nixos/environment.nix | 4 | ||||
| -rw-r--r-- | nixos/gui.nix | 8 | ||||
| -rw-r--r-- | nixos/hardware/hardware-configuration.nix | 43 | ||||
| -rw-r--r-- | nixos/networking.nix | 20 | ||||
| -rw-r--r-- | nixos/nix.nix | 4 | ||||
| -rw-r--r-- | nixos/printing.nix | 8 | ||||
| -rw-r--r-- | nixos/users.nix | 4 |
9 files changed, 45 insertions, 56 deletions
diff --git a/nixos/boot.nix b/nixos/boot.nix index 8d3a148..83060bf 100644 --- a/nixos/boot.nix +++ b/nixos/boot.nix @@ -1,6 +1,4 @@ -{ config, pkgs, ... }: - -{ +{pkgs, ...}: { personal.boot = { grub.enable = true; efi.enable = true; diff --git a/nixos/default.nix b/nixos/default.nix index f957047..f3c5cda 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,10 +1,7 @@ # 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’). - -{ lib, config, pkgs, ... }: - -{ +{...}: { imports = [ ./boot.nix ./environment.nix @@ -12,7 +9,6 @@ ./hardware ./nix.nix ./networking.nix - ./printing.nix ./users.nix ]; diff --git a/nixos/environment.nix b/nixos/environment.nix index a266ca0..2d27671 100644 --- a/nixos/environment.nix +++ b/nixos/environment.nix @@ -1,6 +1,4 @@ -{ pkgs, ... }: - -{ +{...}: { personal.environment = { enable = true; locale.enable = true; diff --git a/nixos/gui.nix b/nixos/gui.nix index e0998c4..420372a 100644 --- a/nixos/gui.nix +++ b/nixos/gui.nix @@ -1,6 +1,4 @@ -{ config, pkgs, nixpkgs, ... }: - -{ +{...}: { personal.gui = { enable = true; xserver.enable = true; @@ -8,8 +6,8 @@ stylix.enable = true; }; - services.xserver = { - displayManager.lightdm = { + services = { + xserver.displayManager.lightdm = { greeters.gtk = { extraConfig = '' user-background = false diff --git a/nixos/hardware/hardware-configuration.nix b/nixos/hardware/hardware-configuration.nix index 2bb7dc1..f2960c6 100644 --- a/nixos/hardware/hardware-configuration.nix +++ b/nixos/hardware/hardware-configuration.nix @@ -1,31 +1,34 @@ # 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, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + config, + lib, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "ahci" "nvme" "usb_storage" "uas" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ "dm-snapshot" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "ahci" "nvme" "usb_storage" "uas" "sd_mod" "sdhci_pci"]; + boot.initrd.kernelModules = ["dm-snapshot"]; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; - fileSystems."/" = - { device = "/dev/disk/by-uuid/c08fcfed-a250-4cda-b1d7-9483ea7b3136"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/c08fcfed-a250-4cda-b1d7-9483ea7b3136"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5C58-7F16"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/5C58-7F16"; + fsType = "vfat"; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/2fac760d-6eaf-4a75-ab11-52e91c6c30ab"; } - ]; + swapDevices = [ + {device = "/dev/disk/by-uuid/2fac760d-6eaf-4a75-ab11-52e91c6c30ab";} + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/nixos/networking.nix b/nixos/networking.nix index e4dfb6b..271b216 100644 --- a/nixos/networking.nix +++ b/nixos/networking.nix @@ -1,6 +1,4 @@ -{ config, pkgs, ... }: - -{ +{...}: { personal.networking = { enable = true; bluetooth.enable = true; @@ -13,6 +11,11 @@ networking = { hostName = "precision-3571"; + hosts = { + "10.3.141.1" = ["raspberrypi.local"]; + "192.168.1.10" = ["dionysos.local"]; + "192.168.1.2" = ["kerberos.local"]; + }; interfaces = { enp0s31f6.useDHCP = true; @@ -20,8 +23,13 @@ }; }; - environment.etc."ssl/certs/ens.pem".source = pkgs.fetchurl { - url = "https://www.tuteurs.ens.fr/internet/USERTrust_RSA_Certification_Authority.pem"; - sha256 = "sha256:ij28uSqxxid2R/4quFNrXJgqu/2x8d9XKOAbkGq6lTo="; + # NAT + boot.kernel.sysctl = {"net.ipv4.ip_forward" = 1;}; + networking = { + nat = { + enable = true; + internalInterfaces = ["ve-+"]; + externalInterface = "wlp2s0"; + }; }; } diff --git a/nixos/nix.nix b/nixos/nix.nix index 18ea4ea..df864fd 100644 --- a/nixos/nix.nix +++ b/nixos/nix.nix @@ -1,6 +1,4 @@ -{ pkgs, ... }: - -{ +{pkgs, ...}: { personal.nix = { enable = true; autoUpgrade = true; diff --git a/nixos/printing.nix b/nixos/printing.nix deleted file mode 100644 index 8c577d4..0000000 --- a/nixos/printing.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs, ... }: - -{ - services.printing = { - enable = true; - drivers = with pkgs; [ gutenprint hplip hplipWithPlugin ]; - }; -} diff --git a/nixos/users.nix b/nixos/users.nix index c3185cf..dd5e5f4 100644 --- a/nixos/users.nix +++ b/nixos/users.nix @@ -1,6 +1,4 @@ -{ config, ... }: - -{ +{config, ...}: { personal.user = { enable = true; name = "qaristote"; |
