machines: add aramis

This commit is contained in:
Bruno BELANYI 2021-04-02 12:00:21 +00:00
parent 9690b0b14b
commit 63791a98a4
6 changed files with 123 additions and 0 deletions

View file

@ -109,6 +109,7 @@
};
nixosConfigurations = lib.mapAttrs buildHost {
aramis = "x86_64-linux";
porthos = "x86_64-linux";
};
};

32
machines/aramis/boot.nix Normal file
View file

@ -0,0 +1,32 @@
{ ... }:
{
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules = [
"nvme"
"sd_mod"
"sdhci_pci"
"usb_storage"
"usbhid"
"xhci_pci"
];
kernelModules = [
"dm-snapshot"
];
luks.devices.crypt = {
device = "/dev/nvme0n1p1";
preLVM = true;
};
};
kernelModules = [
"kvm-intel"
];
extraModulePackages = [ ];
};
}

View file

@ -0,0 +1,38 @@
# 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).
{ config, pkgs, ... }:
{
imports = [
./boot.nix
./hardware.nix
./networking.nix
./sound.nix
];
# Set your time zone.
time.timeZone = "Europe/Paris";
# Enable the X11 windowing system.
# services.xserver.enable = true;
# Configure keymap in X11
# services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = 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. 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).
system.stateVersion = "20.09"; # Did you read the comment?
}

View file

@ -0,0 +1,26 @@
{ lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
};
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = true;
}

View file

@ -0,0 +1,21 @@
{ ... }:
{
networking = {
hostName = "aramis";
domain = "nodomain.local"; # FIXME: gotta fix domain handling
wireless.enable = true;
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
useDHCP = false;
interfaces = {
enp0s31f6.useDHCP = true;
wlp0s20f3.useDHCP = true;
};
};
# Which interface is used to connect to the internet
my.networking.externalInterface = "enp0s3";
}

View file

@ -0,0 +1,5 @@
{ ... }:
{
sound.enable = true;
hardware.pulseaudio.enable = true;
}