From aa360b1a91411fed8698c67db47329bdd70c832c Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Mon, 24 Feb 2020 03:16:25 +0100 Subject: [PATCH] Create work-laptop host --- hosts/work-laptop/configuration.nix | 45 ++++++++++++++++++++ hosts/work-laptop/hardware-configuration.nix | 34 +++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 hosts/work-laptop/configuration.nix create mode 100644 hosts/work-laptop/hardware-configuration.nix diff --git a/hosts/work-laptop/configuration.nix b/hosts/work-laptop/configuration.nix new file mode 100644 index 0000000..f80c1a0 --- /dev/null +++ b/hosts/work-laptop/configuration.nix @@ -0,0 +1,45 @@ +{ config, lib, pkgs, ... }: +{ + imports = [ + ./hardware-configuration.nix + ../../configs/system.nix + ../../configs/user.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking = { + hostName = "thebeast"; + networkmanager.enable = true; + }; + + networking.interfaces.enp0s31f6.useDHCP = true; + networking.interfaces.wlp2s0.useDHCP = true; + + console = { + font = "Lat2-Terminus16"; + keyMap = "fr"; + }; + + i18n = { + defaultLocale = "en_US.UTF-8"; + }; + + time.timeZone = "Europe/Amsterdam"; + + environment.systemPackages = with pkgs; [ + ]; + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + services.openssh.permitRootLogin = "yes"; + + + home-manager.users.froidmpa = {pkgs, config, ...}: { + services.network-manager-applet.enable = true; + }; + # Enable touchpad support. + services.xserver.libinput.enable = true; +} + diff --git a/hosts/work-laptop/hardware-configuration.nix b/hosts/work-laptop/hardware-configuration.nix new file mode 100644 index 0000000..e53b97f --- /dev/null +++ b/hosts/work-laptop/hardware-configuration.nix @@ -0,0 +1,34 @@ +# 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, ... }: + +{ + imports = + [ + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/8d4daa0a-a42c-4765-aaae-a800b24aaf13"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/1d201869-259a-4bd3-b40a-0b19b218a65e"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/669D-7DB4"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/78f08e5a-3ec6-4bb6-b168-d18fdf63ce2f"; } + ]; + + nix.maxJobs = lib.mkDefault 8; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +}