From e574a725cac3255aad67b59b65fc61d1391b7deb Mon Sep 17 00:00:00 2001 From: Kenny Ballou Date: Wed, 1 May 2019 10:38:37 -0600 Subject: nix: initial configurations Add an initial set of configurations as well as configurations for the `phenex` machine. Signed-off-by: Kenny Ballou --- phenex/configuration.nix | 41 +++++++++++++++++++++++++ phenex/hardware-configuration.nix | 64 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 phenex/configuration.nix create mode 100644 phenex/hardware-configuration.nix (limited to 'phenex') diff --git a/phenex/configuration.nix b/phenex/configuration.nix new file mode 100644 index 0000000..4dcf769 --- /dev/null +++ b/phenex/configuration.nix @@ -0,0 +1,41 @@ +# 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 = + [ ./hardware-configuration.nix + ./secrets.nix + ./services/clamav.nix + ./services/firewall.nix + ./services/dnsmasq.nix + ./services/sound.nix + ./services/x11.nix + ./services/x11-laptop.nix + ./services/kde.nix + ./services/compton.nix + ./services/haveged.nix + ./system/i18n.nix + ./system/networking.nix + ./system/packages.nix + ./system/timezone.nix + ./system/users.nix + ./system/yubikey-gpg.nix + ]; + + networking.hostName = "phenex"; + + # 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; }; + + # This value determines the NixOS release with which your system is to be + # compatible, in order to avoid breaking some software such as database + # servers. You should change this only after NixOS release notes say you + # should. + system.stateVersion = "19.03"; # Did you read the comment? + +} diff --git a/phenex/hardware-configuration.nix b/phenex/hardware-configuration.nix new file mode 100644 index 0000000..1aec3dc --- /dev/null +++ b/phenex/hardware-configuration.nix @@ -0,0 +1,64 @@ +# 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 = + [ + ]; + + # Use the GRUB 2 boot loader. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.devices = [ + "/dev/disk/by-id/wwn-0x5002538e000c21b7" + "/dev/disk/by-id/wwn-0x5002538e40de02bf" + ]; + boot.initrd.luks.devices.cryptroot.device = "/dev/disk/by-uuid/64dbda22-7a05-4d1c-a64b-bbbc779f1bdc"; + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/d8009534-e327-4c83-965d-91791736db2a"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/211b4a9d-71b5-4262-9082-cac1c7a6b60b"; + fsType = "ext4"; + }; + + fileSystems."/var" = + { device = "/dev/disk/by-uuid/7b849f20-ac8e-4158-b595-fc7fa46f713f"; + fsType = "ext4"; + }; + + fileSystems."/var/lib/docker" = + { device = "/dev/disk/by-uuid/7ece83d5-9f2f-4775-8efa-c53783f3a607"; + fsType = "btrfs"; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/cae3edd4-e35f-4338-ab74-d2df99fc5689"; + fsType = "ext4"; + }; + + fileSystems."/gnu" = + { device = "/dev/disk/by-uuid/8726cdc2-aeed-40f4-81b9-402b78fb14a0"; + fsType = "ext4"; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/7f348443-ac88-427a-979a-6bcc359ab47a"; + fsType = "xfs"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/493df1a1-83bd-4fec-8cbb-2242533751f0"; } + ]; + + nix.maxJobs = lib.mkDefault 4; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +} -- cgit v1.2.1