chore!: prepare for multi-host config
This commit is contained in:
parent
98ea8fbe7d
commit
f6f21ba61d
3 changed files with 25 additions and 2 deletions
105
hosts/selune/configuration.nix
Normal file
105
hosts/selune/configuration.nix
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
# Use flakes.
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
# Automatic updating.
|
||||
system.autoUpgrade.enable = true;
|
||||
system.autoUpgrade.dates = "weekly";
|
||||
|
||||
# Automatic cleanup.
|
||||
nix.gc.automatic = true;
|
||||
nix.gc.dates = "daily";
|
||||
nix.gc.options = "--delete-older-than 10d";
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.initrd.luks.devices."luks-374c6259-18c4-462b-9f30-9c9648de00ae".device =
|
||||
"/dev/disk/by-uuid/374c6259-18c4-462b-9f30-9c9648de00ae";
|
||||
|
||||
networking = {
|
||||
hostName = "nixos";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
# Select internationalisation properties.
|
||||
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 = {
|
||||
# Use X11.
|
||||
enable = true;
|
||||
# Set keyboard layout in X11.
|
||||
xkb.layout = "fr";
|
||||
xkb.variant = "ergol";
|
||||
};
|
||||
# Use GNOME.
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
|
||||
services.gnome.gnome-browser-connector.enable = true;
|
||||
# Use CUPS for printing.
|
||||
services.printing.enable = true;
|
||||
# Use pipewire for audio.
|
||||
services.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Configure console keymap.
|
||||
console.keyMap = "fr";
|
||||
|
||||
# Define a user account.
|
||||
users.users.hms = {
|
||||
isNormalUser = true;
|
||||
description = "hms";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
packages = [ ];
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [ ];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
helix
|
||||
wget
|
||||
gnumake
|
||||
clang
|
||||
];
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
53
hosts/selune/hardware-configuration.nix
Normal file
53
hosts/selune/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# 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,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"thunderbolt"
|
||||
"vmd"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/luks-de976821-5bfe-4c34-92ff-5d4d607e42c4";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-de976821-5bfe-4c34-92ff-5d4d607e42c4".device =
|
||||
"/dev/disk/by-uuid/de976821-5bfe-4c34-92ff-5d4d607e42c4";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/6137-E7B4";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/mapper/luks-374c6259-18c4-462b-9f30-9c9648de00ae"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue