galadriel

This commit is contained in:
Your Name
2025-10-13 23:49:13 +02:00
committed by Adrian Gunnar Lauterer
parent 49508224e4
commit 191835ff2b
2 changed files with 82 additions and 66 deletions

View File

@@ -1,82 +1,75 @@
# 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).
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../modules/boot.nix
../../modules/zram.nix
../../modules/nix.nix
../../modules/openssh.nix
../../secrets/sops.nix
../../secrets/sopsconf.nix
../../modules/pam.nix
../../modules/tailscale.nix
../../modules/podman.nix
../../modules/basePackages.nix
../../modules/develPackages.nix
../../modules/boot.nix
../../modules/zram.nix
../../modules/polkit.nix
../../modules/nix.nix
../../modules/openssh.nix
../../secrets/sops.nix
../../secrets/sopsconf.nix
../../modules/pam.nix
../../modules/tailscale.nix
../../modules/podman.nix
../../modules/basePackages.nix
../../modules/develPackages.nix
];
# Bootloader.
#boot.loader.grub.enable = true;
#boot.loader.grub.device = "/dev/nvme0n1";
#boot.loader.grub.useOSProber = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Setup keyfile
boot.initrd.secrets = {
"/boot/crypto_keyfile.bin" = null;
};
#boot.loader.grub.enableCryptodisk = true;
boot.initrd.luks.devices."luks-c88c45f4-58e0-424c-98e0-6e4a73655349".keyFile = "/boot/crypto_keyfile.bin";
networking.hostName = "galadriel"; # Define your hostname.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
time.timeZone = "Europe/Oslo";
# Select internationalisation properties.
i18n.defaultLocale = "nb_NO.UTF-8";
time.timeZone = "Europe/Amsterdam";
# Configure keymap in X11
services.xserver.xkb = {
layout = "no";
variant = "";
};
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Configure console keymap
console.keyMap = "no";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# services.pulseaudio.enable = true;
# OR
# services.pipewire = {
# enable = true;
# pulse.enable = true;
# };
# Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.gunalx = {
isNormalUser = true;
description = "Adrian Gunnar Lauterer";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# programs.firefox.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
# List packages installed in system profile.
# You can use https://search.nixos.org/ to find more packages (and options).
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
git
];
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
git
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
@@ -97,12 +90,29 @@
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# 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. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "25.05"; # Did you read the comment?
}

View File

@@ -8,17 +8,23 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/edc50395-0b8d-4945-8d9e-69fd3dbb6e7e";
fsType = "ext4";
{ device = "/dev/disk/by-uuid/7789ad41-d578-40bc-bf86-b761e0a4921e";
fsType = "btrfs";
};
boot.initrd.luks.devices."luks-c88c45f4-58e0-424c-98e0-6e4a73655349".device = "/dev/disk/by-uuid/c88c45f4-58e0-424c-98e0-6e4a73655349";
boot.initrd.luks.devices."NIXROOT".device = "/dev/disk/by-uuid/082790fd-3d4b-4307-8a43-b9c56bd86e03";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3DE0-D86E";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
@@ -28,7 +34,7 @@
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp7s0f3u3.useDHCP = lib.mkDefault true;
# networking.interfaces.enp7s0f3u2.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;