diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-09-25 14:37:02 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-09-25 14:37:02 +0200 |
commit | 71a85e3ee912ec332f4a74d270fbb781f008c1f1 (patch) | |
tree | 44a0d3500086b0ce713856fefb3cf23013899798 | |
parent | 0c21d69535943c5f8deb965f8ff9efd3ee1c7154 (diff) | |
download | nixos-71a85e3ee912ec332f4a74d270fbb781f008c1f1.tar nixos-71a85e3ee912ec332f4a74d270fbb781f008c1f1.tar.gz nixos-71a85e3ee912ec332f4a74d270fbb781f008c1f1.tar.bz2 nixos-71a85e3ee912ec332f4a74d270fbb781f008c1f1.tar.xz nixos-71a85e3ee912ec332f4a74d270fbb781f008c1f1.zip |
First attempts at ymir
-rw-r--r-- | ymir-hw.nix | 36 | ||||
-rw-r--r-- | ymir.nix | 61 |
2 files changed, 97 insertions, 0 deletions
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 @@ | |||
1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ | ||
2 | # and may be overwritten by future invocations. Please make changes | ||
3 | # to /etc/nixos/configuration.nix instead. | ||
4 | { config, lib, pkgs, ... }: | ||
5 | |||
6 | { | ||
7 | imports = | ||
8 | [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> | ||
9 | <nixpkgs/nixos/modules/profiles/qemu-guest.nix> | ||
10 | ]; | ||
11 | |||
12 | boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_blk" ]; | ||
13 | boot.kernelModules = [ ]; | ||
14 | boot.extraModulePackages = [ ]; | ||
15 | |||
16 | fileSystems."/" = | ||
17 | { device = "/dev/disk/by-uuid/e2d0b455-76a2-4e57-aff0-98d1fc2f7806"; | ||
18 | fsType = "ext4"; | ||
19 | }; | ||
20 | |||
21 | fileSystems."/boot" = | ||
22 | { device = "/dev/disk/by-uuid/6e0ba525-114b-4998-952f-c859cf1471d6"; | ||
23 | fsType = "ext2"; | ||
24 | }; | ||
25 | |||
26 | fileSystems."/home" = | ||
27 | { device = "/dev/disk/by-uuid/4284cea9-9a3f-4ee3-8295-ebffa8f6622c"; | ||
28 | fsType = "ext4"; | ||
29 | }; | ||
30 | |||
31 | swapDevices = | ||
32 | [ { device = "/dev/disk/by-uuid/7957964d-aa60-44c4-9c59-9ae21fbca985"; } | ||
33 | ]; | ||
34 | |||
35 | nix.maxJobs = 2; | ||
36 | } | ||
diff --git a/ymir.nix b/ymir.nix new file mode 100644 index 00000000..e7b9b88c --- /dev/null +++ b/ymir.nix | |||
@@ -0,0 +1,61 @@ | |||
1 | { config, pkgs, ... }: | ||
2 | |||
3 | { | ||
4 | imports = | ||
5 | [ | ||
6 | ./ymir-hw.nix | ||
7 | ./custom/zsh.nix | ||
8 | ./users.nix | ||
9 | ]; | ||
10 | |||
11 | boot.loader.grub.enable = true; | ||
12 | boot.loader.grub.version = 2; | ||
13 | |||
14 | networking.hostName = "ymir"; | ||
15 | networking.hostId = "1c5c994e"; | ||
16 | |||
17 | environment.systemPackages = with pkgs; [ | ||
18 | git | ||
19 | mosh | ||
20 | rsync | ||
21 | tmux | ||
22 | zsh | ||
23 | ]; | ||
24 | |||
25 | # List services that you want to enable: | ||
26 | |||
27 | services.openssh = { | ||
28 | enable = true; | ||
29 | }; | ||
30 | |||
31 | services.fcron = { | ||
32 | enable = true; | ||
33 | systab = '' | ||
34 | %weekly * * nix-collect-garbage --delete-older-than '7d' | ||
35 | ''; | ||
36 | }; | ||
37 | |||
38 | networking.firewall = { | ||
39 | enable = true; | ||
40 | allowPing = true; | ||
41 | allowedTCPPorts = [ 22 | ||
42 | ]; | ||
43 | allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh | ||
44 | ]; | ||
45 | }; | ||
46 | |||
47 | services.ntp = { | ||
48 | enable = false; | ||
49 | }; | ||
50 | |||
51 | services.chrony = { | ||
52 | enable = true; | ||
53 | }; | ||
54 | |||
55 | users.extraUsers.root = let | ||
56 | template = (import users/gkleen.nix); | ||
57 | in { | ||
58 | inherit (template) shell; | ||
59 | openssh.authorizedKeys.keyFiles = template.openssh.authorizedKeys.keyFiles; | ||
60 | }; | ||
61 | } | ||