Machines: Add Surface Go

This commit is contained in:
Toast 2023-07-17 13:11:53 +02:00
parent 6a83942761
commit 31dcdf1d7c
4 changed files with 183 additions and 0 deletions

View file

@ -0,0 +1,103 @@
# 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, ... }:
{
# Use grub boot loader
boot.loader = {
systemd-boot.enable = false;
grub = {
enable = true;
device = "nodev";
efiSupport = true;
enableCryptodisk = true;
};
efi = {
efiSysMountPoint = "/boot/efi";
canTouchEfiVariables = true;
};
};
networking.hostName = "SurfaceGo"; # Define your hostname.
networking.networkmanager.enable = true; # Enable networking
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Set your time zone.
time.timeZone = "Europe/Madrid";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
keyMap = "es";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the pipewire sound server
services.pipewire = {
enable = true;
pulse.enable = true;
};
# Configure keymap in X11
# services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.toast = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
# List packages installed in system profile. To search, run:
# $ nix search wget
# 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
# ];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# 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;
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./configuration.nix
./hardware-configuration.nix
];
}

View file

@ -0,0 +1,58 @@
# 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" "nvme" "usbhid" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices."SSD".device = "/dev/disk/by-uuid/1d8d7578-d3a1-4ea0-90ad-4257266a6caf";
fileSystems."/" = {
device = "/dev/disk/by-uuid/19a52b40-3ff6-47ff-9402-18d8b289643e";
fsType = "btrfs";
options = [ "subvol=@" "compress=zstd" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/19a52b40-3ff6-47ff-9402-18d8b289643e";
fsType = "btrfs";
options = [ "subvol=@boot" "compress=zstd" ];
};
fileSystems."/nix" ={
device = "/dev/disk/by-uuid/19a52b40-3ff6-47ff-9402-18d8b289643e";
fsType = "btrfs";
options = [ "subvol=@nix" "compress=zstd" ];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/19a52b40-3ff6-47ff-9402-18d8b289643e";
fsType = "btrfs";
options = [ "subvol=@home" "compress=zstd" ];
};
/*fileSystems."/swap" = {
device = "/dev/disk/by-uuid/19a52b40-3ff6-47ff-9402-18d8b289643e";
fsType = "btrfs";
options = [ "subvol=@swapfile" ];
};*/
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/EC76-201F";
fsType = "vfat";
};
swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}