feat (hosts/shar): base system configuration

This commit is contained in:
Henri Saudubray 2026-01-20 21:57:40 +01:00
parent f6f21ba61d
commit 0d21ef6930
2 changed files with 117 additions and 0 deletions

View file

@ -0,0 +1,82 @@
{ config, pkgs, ... }:
{
imports = [ ./hardware-configuration.nix ];
nix.settings.experimental-features = "nix-command flakes";
system.autoUpgrade.enable = true;
system.autoUpgrade.dates = "weekly";
nix.gc.automatic = true;
nix.gc.dates = "daily";
nix.gc.options = "--delete-older-than 10d";
nix.settings.auto-optimise-store = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.luks.devices."luks-324ce23c-e630-42a1-8558-184e999053a5".device =
"/dev/disk/by-uuid/324ce23c-e630-42a1-8558-184e999053a5";
networking.hostName = "shar";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Paris";
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "fr_FR.UTF-8";
LC_IDENTIFICATION = "fr_FR.UTF-8";
LC_MEASUREMENT = "fr_FR.UTF-8";
LC_MONETARY = "fr_FR.UTF-8";
LC_NAME = "fr_FR.UTF-8";
LC_NUMERIC = "fr_FR.UTF-8";
LC_PAPER = "fr_FR.UTF-8";
LC_TELEPHONE = "fr_FR.UTF-8";
LC_TIME = "fr_FR.UTF-8";
};
services.xserver.enable = true;
services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true;
services.xserver.xkb = {
layout = "fr";
variant = "ergol";
};
services.gnome.gnome-browser-connector.enable = true;
services.printing.enable = true;
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
services.openssh.enable = true;
console.keyMap = "fr";
users.users.hms = {
isNormalUser = true;
description = "hms";
extraGroups = [ "networkmanager" "wheel" ];
packages = [ ];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
helix
wget
];
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
system.stateVersion = "25.11";
}

View file

@ -0,0 +1,35 @@
# 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 = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/mapper/luks-0f1f8ec5-573b-49da-b82c-abffbcd77387";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-0f1f8ec5-573b-49da-b82c-abffbcd77387".device = "/dev/disk/by-uuid/0f1f8ec5-573b-49da-b82c-abffbcd77387";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6388-B8D8";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/mapper/luks-324ce23c-e630-42a1-8558-184e999053a5"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}