blob: fed862bf9709bddb2bd3c88c030b0fb2bca1bbdb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.vuizvui.user.openlab.base;
in
{
options.vuizvui.user.openlab.base.enable =
mkEnableOption "the base OpenLab configuration";
config = mkIf cfg.enable {
boot.loader.grub.device = mkDefault "/dev/sda";
boot.loader.timeout = 2;
# tmp (and nix builds) should be fast by default
# might make sense to disable that on machines with little RAM
boot.tmpOnTmpfs = mkDefault true;
fileSystems."/" = mkDefault {
device = "/dev/disk/by-label/labtop";
fsType = "ext4";
};
i18n = {
defaultLocale = "de_DE.UTF-8";
};
console = {
font = "lat9w-16";
keyMap = "us";
};
time.timeZone = "Europe/Berlin";
hardware.enableRedistributableFirmware = true;
# TODO: filesystems
environment.systemPackages = with pkgs; let
base = [
ack silver-searcher
fish
git
man-pages
libressl.nc
python3
tmux
screen
vim
wget
];
in base;
# manual generation takes too long on slow machines
programs.man.enable = mkDefault false;
services.openssh.enable = true;
networking.firewall.enable = false;
users.mutableUsers = false;
users.users.openlab = {
uid = 1000;
isNormalUser = true;
password = "openlab";
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = lib.singleton (lib.concatStrings [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJhthfk38lzDvoI7lPqRneI0yBpZEhLD"
"GRBpcXzpPSu+V0YlgrDix5fHhBl+EKfw4aeQNvQNuAky3pDtX+BDK1b7idbz9ZMCExy2a1"
"kBKDVJz/onLSQxiiZMuHlAljVj9iU4uoTOxX3vB85Ok9aZtMP1rByRIWR9e81/km4HdfZT"
"CjFVRLWfvo0s29H7l0fnbG9bb2E6kydlvjnXJnZFXX+KUM16X11lK53ilPdPJdm87VtxeS"
"KZ7GOiBz6q7FHzEd2Zc3CnzgupQiXGSblXrlN22IY3IWfm5S/8RTeQbMLVoH0TncgCeenX"
"H7FU/sXD79ypqQV/WaVVDYMOirsnh/ philip@nyx"
]);
};
};
}
|