From 71a85e3ee912ec332f4a74d270fbb781f008c1f1 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 25 Sep 2015 14:37:02 +0200 Subject: First attempts at ymir --- ymir-hw.nix | 36 ++++++++++++++++++++++++++++++++++++ ymir.nix | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 ymir-hw.nix create mode 100644 ymir.nix diff --git a/ymir-hw.nix b/ymir-hw.nix new file mode 100644 index 00000000..cbb0d307 --- /dev/null +++ b/ymir-hw.nix @@ -0,0 +1,36 @@ +# 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 = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_blk" ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/e2d0b455-76a2-4e57-aff0-98d1fc2f7806"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/6e0ba525-114b-4998-952f-c859cf1471d6"; + fsType = "ext2"; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/4284cea9-9a3f-4ee3-8295-ebffa8f6622c"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/7957964d-aa60-44c4-9c59-9ae21fbca985"; } + ]; + + nix.maxJobs = 2; +} diff --git a/ymir.nix b/ymir.nix new file mode 100644 index 00000000..e7b9b88c --- /dev/null +++ b/ymir.nix @@ -0,0 +1,61 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + ./ymir-hw.nix + ./custom/zsh.nix + ./users.nix + ]; + + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + + networking.hostName = "ymir"; + networking.hostId = "1c5c994e"; + + environment.systemPackages = with pkgs; [ + git + mosh + rsync + tmux + zsh + ]; + + # List services that you want to enable: + + services.openssh = { + enable = true; + }; + + services.fcron = { + enable = true; + systab = '' + %weekly * * nix-collect-garbage --delete-older-than '7d' + ''; + }; + + networking.firewall = { + enable = true; + allowPing = true; + allowedTCPPorts = [ 22 + ]; + allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh + ]; + }; + + services.ntp = { + enable = false; + }; + + services.chrony = { + enable = true; + }; + + users.extraUsers.root = let + template = (import users/gkleen.nix); + in { + inherit (template) shell; + openssh.authorizedKeys.keyFiles = template.openssh.authorizedKeys.keyFiles; + }; +} -- cgit v1.2.3