summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-01-23 22:01:21 +0100
committerAdrian Kummerlaender2019-01-23 22:01:21 +0100
commit6dcb863a291bb2152fd0ecb2c9f43a7aefcedd33 (patch)
tree83dc16ac64cef7efc4e618d5ea1f794aad379ad2 /host
parentd011706a2d5eed7f6ff8dd237cf1f03844b9d6ed (diff)
downloadnixos_system-6dcb863a291bb2152fd0ecb2c9f43a7aefcedd33.tar
nixos_system-6dcb863a291bb2152fd0ecb2c9f43a7aefcedd33.tar.gz
nixos_system-6dcb863a291bb2152fd0ecb2c9f43a7aefcedd33.tar.bz2
nixos_system-6dcb863a291bb2152fd0ecb2c9f43a7aefcedd33.tar.lz
nixos_system-6dcb863a291bb2152fd0ecb2c9f43a7aefcedd33.tar.xz
nixos_system-6dcb863a291bb2152fd0ecb2c9f43a7aefcedd33.tar.zst
nixos_system-6dcb863a291bb2152fd0ecb2c9f43a7aefcedd33.zip
Add work laptop config
Switching machines using NixOS is as simple as it gets. Seriously. This is amazing.
Diffstat (limited to 'host')
-rw-r--r--host/athena.nix54
-rw-r--r--host/hardware/athena.nix31
2 files changed, 85 insertions, 0 deletions
diff --git a/host/athena.nix b/host/athena.nix
new file mode 100644
index 0000000..7a8a692
--- /dev/null
+++ b/host/athena.nix
@@ -0,0 +1,54 @@
+{ pkgs, ... }:
+
+{
+ imports = [
+ ./hardware/athena.nix
+ ./software/desktop
+ ];
+
+ boot = {
+ loader = {
+ systemd-boot.enable = true;
+ efi.canTouchEfiVariables = true;
+ };
+
+ initrd.luks.devices = [ {
+ name = "encrypted";
+ device = "/dev/nvme0n1p2";
+ preLVM = true;
+ allowDiscards = true;
+ } ];
+ };
+
+ networking = {
+ hostName = "athena";
+ firewall.enable = false;
+ networkmanager.enable = true;
+ };
+
+ users.extraUsers.common.extraGroups = [ "networkmanager" ];
+
+ services = {
+ upower.enable = true;
+ acpid.enable = true;
+
+ xserver = {
+ videoDrivers = [ "intel" ];
+
+ synaptics = {
+ enable = true;
+ twoFingerScroll = true;
+ horizontalScroll = false;
+ palmDetect = true;
+ };
+ };
+ };
+
+ hardware.trackpoint = {
+ enable = true;
+ emulateWheel = true;
+ speed = 128;
+ };
+
+ powerManagement.powertop.enable = true;
+}
diff --git a/host/hardware/athena.nix b/host/hardware/athena.nix
new file mode 100644
index 0000000..0682645
--- /dev/null
+++ b/host/hardware/athena.nix
@@ -0,0 +1,31 @@
+# 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 =
+ [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/a382b969-52d6-4946-ae8a-5da3f612410c";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/CC5B-E0DA";
+ fsType = "vfat";
+ };
+
+ swapDevices =
+ [ { device = "/dev/disk/by-uuid/96edaf95-23ce-4859-b82f-048711d2a8d2"; }
+ ];
+
+ nix.maxJobs = lib.mkDefault 4;
+ powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
+}