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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
{ pkgs, config, ... }:
let
makeWebApp =
{
name,
url,
}:
let
bin = pkgs.writeScriptBin name ''
#!${pkgs.lib.getExe pkgs.bash}
${pkgs.lib.getExe pkgs.chromium} \
--app=${url} \
--start-maximized \
--noerrdialogs \
--disable-translate \
--no-first-run \
--fast \
--fast-start \
--disable-infobars \
--disable-features=TranslateUI \
--disk-cache-dir=/dev/null \
'';
in
pkgs.makeDesktopItem {
inherit name;
exec = pkgs.lib.getExe bin;
icon = "applications-games";
desktopName = name;
comment = "Web app for ${name}";
categories = [ "Game" ];
};
in
{
imports = [
./hardware.nix
];
boot = {
tmp.cleanOnBoot = true;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
zramSwap.enable = true;
networking = {
hostName = "peach";
firewall = {
enable = true;
allowedTCPPorts = [
80
443
];
};
};
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services = {
openssh.enable = true;
tailscale.enable = true;
fail2ban.enable = true;
xserver = {
enable = true;
displayManager = {
lightdm.enable = true;
autoLogin = {
enable = true;
user = "beanboy";
};
};
desktopManager.cinnamon.enable = true;
layout = "us";
xkbVariant = "";
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
age.secrets.beanboy.file = ../secrets/beanboy.age;
users.users = {
"beanboy" = {
isNormalUser = true;
extraGroups = [
"networkmanager"
"wheel"
];
hashedPasswordFile = config.age.secrets.beanboy.path;
packages = with pkgs; [
prismlauncher
# Web apps
(makeWebApp {
name = "Boddle";
url = "https://play.boddlelearning.com/";
})
(makeWebApp {
name = "TimesTables";
url = "https://timestables.com/";
})
];
};
"root".openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+uhnfFLhlyfGGsksSxh5IIY6gnIMryeQ2EiM979kZa"
];
};
system.stateVersion = "22.11";
}
|