diff options
-rw-r--r-- | bragi-hw.nix | 27 | ||||
-rw-r--r-- | bragi.nix | 60 |
2 files changed, 87 insertions, 0 deletions
diff --git a/bragi-hw.nix b/bragi-hw.nix new file mode 100644 index 00000000..6a14ff09 --- /dev/null +++ b/bragi-hw.nix | |||
@@ -0,0 +1,27 @@ | |||
1 | { config, lib, pkgs, ... }: | ||
2 | |||
3 | { | ||
4 | imports = | ||
5 | [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> | ||
6 | ]; | ||
7 | |||
8 | boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "usb_storage" ]; | ||
9 | boot.kernelModules = [ "kvm-amd" ]; | ||
10 | boot.extraModulePackages = [ ]; | ||
11 | |||
12 | fileSystems."/" = | ||
13 | { device = "/dev/disk/by-uuid/15fc072d-5fdf-4ec7-b029-50d09b4dc5ea"; | ||
14 | fsType = "ext4"; | ||
15 | }; | ||
16 | |||
17 | fileSystems."/home" = | ||
18 | { device = "/dev/disk/by-uuid/c76d9b7c-ba84-49d3-a7c9-b53e201b76c6"; | ||
19 | fsType = "ext4"; | ||
20 | }; | ||
21 | |||
22 | swapDevices = | ||
23 | [ { device = "/dev/disk/by-uuid/2b13b997-59e8-4f59-bc84-554eb0df7482"; } | ||
24 | ]; | ||
25 | |||
26 | nix.maxJobs = 2; | ||
27 | } | ||
diff --git a/bragi.nix b/bragi.nix new file mode 100644 index 00000000..9852dfa4 --- /dev/null +++ b/bragi.nix | |||
@@ -0,0 +1,60 @@ | |||
1 | { config, pkgs, ... }: | ||
2 | |||
3 | { | ||
4 | imports = | ||
5 | [ | ||
6 | ./bragi-hw.nix | ||
7 | ]; | ||
8 | |||
9 | boot.loader.grub.enable = true; | ||
10 | boot.loader.grub.version = 2; | ||
11 | boot.loader.grub.device = "/dev/sda"; | ||
12 | |||
13 | boot.loader.grub.extraConfig = "serial; terminal_output.serial"; | ||
14 | boot.kernelParams = [ "console=ttyS0,115200" | ||
15 | ]; | ||
16 | |||
17 | networking.hostName = "bragi"; | ||
18 | networking.hostId = "2af11085"; | ||
19 | networking.wireless.enable = true; | ||
20 | |||
21 | networking.firewall = { | ||
22 | allowPing = true; | ||
23 | allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh-server | ||
24 | ]; | ||
25 | }; | ||
26 | |||
27 | environment.systemPackages = with pkgs; [ | ||
28 | git | ||
29 | mosh | ||
30 | rsync | ||
31 | jack2 | ||
32 | tmux | ||
33 | ]; | ||
34 | |||
35 | # List services that you want to enable: | ||
36 | |||
37 | services.openssh.enable = true; | ||
38 | |||
39 | services.fcron = { | ||
40 | enable = true; | ||
41 | systab = '' | ||
42 | %weekly * * nix-collect-garbage --delete-older-than '7d' | ||
43 | ''; | ||
44 | }; | ||
45 | |||
46 | users.extraUsers.guest = { | ||
47 | name = "gkleen"; | ||
48 | isNormalUser = true; | ||
49 | uid = 1000; | ||
50 | createHome = true; | ||
51 | home = "/home/gkleen"; | ||
52 | shell = "${pkgs.zsh}/bin/zsh"; | ||
53 | openssh.authorizedKeys.keys = [ "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBABVMu+0txXdxdTSY8POAYVXbuOEDW6VxJzaYwQljc9kzM63VUZuE606R0g2ZGr9A+Gk6qO6fpCiq4SM+1Yygz5yHgGlbO750TOGaTe6KSGw+u3miaeDviejmxTqetGmiJe7BTLRAbYHjRgD5SkK/Ovos0cDSyOfZ5aha/ehox+proQKGA== gkleen@cathy" | ||
54 | ]; | ||
55 | extraGroups = [ "wheel" ]; | ||
56 | hashedPassword = "$6$MBq4kwM68$Eg8O6m76mM2905VppNZO67J3EHqJVBuIWQkz.MFFa7afVQKhGuSSYHl50WkkFYXHEY5MIM7IjWYZ0UJwq2IDJ0"; | ||
57 | }; | ||
58 | |||
59 | security.setuidPrograms = ["mount.nfs"]; | ||
60 | } | ||