From 1b83473c97ae3df53ac1ec7ff179c47e4c57db07 Mon Sep 17 00:00:00 2001 From: James Walker Date: Sun, 7 Mar 2021 22:06:39 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20=20plato:=20initial=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/plato/configuration.nix | 84 ++++++++++++++++++++++++++ hosts/plato/hardware-configuration.nix | 37 ++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 hosts/plato/configuration.nix create mode 100644 hosts/plato/hardware-configuration.nix diff --git a/hosts/plato/configuration.nix b/hosts/plato/configuration.nix new file mode 100644 index 0000000..f25181e --- /dev/null +++ b/hosts/plato/configuration.nix @@ -0,0 +1,84 @@ +{ config, pkgs, ... }: + +{ + imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix + + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.cleanTmpDir = true; + + nixpkgs.config.allowUnfree = true; + + # Set your time zone. + time.timeZone = "America/Toronto"; + + networking.hostName = "plato"; # Define your hostname. + networking.useDHCP = false; + networking.interfaces.enp10s0.useDHCP = true; + networking.interfaces.enp9s0.useDHCP = true; + networking.nameservers = [ "100.100.100.100" "1.1.1.1" ]; + networking.search = [ "walkah.net.beta.tailscale.net" ]; + + security.sudo.wheelNeedsPassword = false; + + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net" + ]; + users.users.walkah = { + isNormalUser = true; + extraGroups = [ "wheel" "docker" ]; + shell = pkgs.zsh; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM8YMax7PGIrcPNIHkpuNRFgn3HJK6Wepm+ycZWO6jfR walkah@walkah-ipadpro11" + ]; + }; + home-manager.users.walkah = import /home/walkah/.config/nixpkgs/home.nix; + + system.autoUpgrade.enable = true; + environment.systemPackages = with pkgs; [ ]; + + fileSystems."/mnt/downloads" = { + device = "192.168.6.100:/volume1/Downloads"; + fsType = "nfs"; + }; + fileSystems."/mnt/music" = { + device = "192.168.6.100:/volume1/Music"; + fsType = "nfs"; + }; + fileSystems."/mnt/video" = { + device = "192.168.6.100:/volume1/Video"; + fsType = "nfs"; + }; + + programs.mosh.enable = true; + programs.zsh.enable = true; + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + services.tailscale.enable = true; + services.keybase.enable = true; + + virtualisation.docker.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # 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. It‘s 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? + +} + diff --git a/hosts/plato/hardware-configuration.nix b/hosts/plato/hardware-configuration.nix new file mode 100644 index 0000000..d89f32f --- /dev/null +++ b/hosts/plato/hardware-configuration.nix @@ -0,0 +1,37 @@ +# 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 = [ + "uhci_hcd" + "ehci_pci" + "ahci" + "xhci_pci" + "firewire_ohci" + "usb_storage" + "usbhid" + "sd_mod" + "sr_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" "wl" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/ea3c68ac-e822-4b71-a8f5-65d9e452a3c2"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/FB06-AB48"; + fsType = "vfat"; + }; + + swapDevices = + [{ device = "/dev/disk/by-uuid/3a812874-3def-4e46-b20d-cd55fa7bdd5f"; }]; + +}