summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2024-11-18 18:01:24 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2024-11-18 18:01:24 +0100
commit4e5ea1832a1ebeaea2b99d93cb3532f01f356610 (patch)
treedcb00e5d4cc6a934ebf65d20128994fea7aa4ccc /config
parentd5daa0f24954ccf218986e1e57f628262fc47a18 (diff)
initial configuration
Diffstat (limited to 'config')
-rw-r--r--config/default.nix9
-rw-r--r--config/environment.nix7
-rw-r--r--config/hardware/default.nix9
-rw-r--r--config/hardware/hardware-configuration.nix39
-rw-r--r--config/networking.nix10
-rw-r--r--config/nix.nix2
6 files changed, 64 insertions, 12 deletions
diff --git a/config/default.nix b/config/default.nix
index 07ec68d..9ddb7db 100644
--- a/config/default.nix
+++ b/config/default.nix
@@ -1,9 +1,10 @@
-{modulesPath, ...}: {
+{lib, modulesPath, ...}: {
imports = [
- (modulesPath + "/profiles/headless.nix")
+ # (modulesPath + "/profiles/headless.nix")
(modulesPath + "/profiles/minimal.nix")
./boot.nix
./environment.nix
+ ./hardware
./networking.nix
./nix.nix
./services
@@ -14,6 +15,10 @@
# originally enabled in modulesPath + profiles/minimal.nix
environment.noXlibs = false;
+ # re-enable console
+ # disabled by headless profile
+ # systemd.services."getty@tty1".enable = lib.mkForce true;
+
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
diff --git a/config/environment.nix b/config/environment.nix
index 31e9815..1b5428e 100644
--- a/config/environment.nix
+++ b/config/environment.nix
@@ -1,4 +1,4 @@
-{...}: {
+{lib, pkgs, ...}: {
personal.environment = {
enable = true;
locale.enable = true;
@@ -6,4 +6,9 @@
programs.bash.promptInit = ''
PS1="\n\[\033[1;32m\][\[\e]0;\u@$(hostname -f): \w\a\]\u@$(hostname -f):\w]\$\[\033[0m\] "
'';
+ console = {
+ earlySetup = true;
+ font = lib.mkForce "ter-v32n";
+ packages = with pkgs; [ terminus_font ];
+ };
}
diff --git a/config/hardware/default.nix b/config/hardware/default.nix
index a4f9ed3..0dd85b3 100644
--- a/config/hardware/default.nix
+++ b/config/hardware/default.nix
@@ -4,18 +4,15 @@
./hardware-configuration.nix
# Community-curated hardware configuration
- nixos-hardware.nixosModules.thinkpad-x1-9th-gen # includes intel cpu and ssd
+ nixos-hardware.nixosModules.lenovo-thinkpad-x1-9th-gen # includes intel cpu and ssd
];
personal.hardware = {
usb.enable = false;
- disks.crypted = "/dev/disk/by-uuid/18b3e6f0-6ad5-471e-bdf4-e1710d99f13f";
+ disks.crypted = "/dev/disk/by-uuid/edfa1320-68eb-4439-bef0-226a83c05376";
firmwareNonFree.enable = true;
keyboard.keyMap = "fr";
- backlights = {
- screen = "intel_backlight";
- keyboard = "dell::kbd_backlight";
- };
sound.enable = false;
};
}
+
diff --git a/config/hardware/hardware-configuration.nix b/config/hardware/hardware-configuration.nix
new file mode 100644
index 0000000..7b8e4f2
--- /dev/null
+++ b/config/hardware/hardware-configuration.nix
@@ -0,0 +1,39 @@
+# 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")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
+ boot.initrd.kernelModules = [ "dm-snapshot" ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/873056aa-7820-4264-84de-59c44806a347";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/ED9D-FCDE";
+ fsType = "vfat";
+ };
+
+ swapDevices =
+ [ { device = "/dev/disk/by-uuid/b9fee327-ac22-49a8-b550-1876e03c4187"; }
+ ];
+
+ # 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
+ # 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.wlp0s20f3.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/config/networking.nix b/config/networking.nix
index 44464eb..09987b8 100644
--- a/config/networking.nix
+++ b/config/networking.nix
@@ -9,7 +9,13 @@
hostName = "hephaistos";
domain = "local";
- useDHCP = false;
- interfaces."???".useDHCP = true;
+ wireless = {
+ enable = true;
+ environmentFile = "/etc/wpa_supplicant/secrets.env";
+ networks.Quentintranet = {
+ authProtocols = [ "SAE" ];
+ psk = "@PSK@";
+ };
+ };
};
}
diff --git a/config/nix.nix b/config/nix.nix
index 01ff7ff..4e8d6ec 100644
--- a/config/nix.nix
+++ b/config/nix.nix
@@ -8,7 +8,7 @@
gc.enable = true;
flake = "git+file:///etc/nixos/";
};
- nix.settings.max-jobs = "???";
+ nix.settings.max-jobs = 4;
nixpkgs.flake = {
setNixPath = true;
setFlakeRegistry = true;