Skip to content

Commit 90b8566

Browse files
committed
update USB image
* has issues with GPU/chrome
1 parent 871c76b commit 90b8566

File tree

2 files changed

+323
-61
lines changed

2 files changed

+323
-61
lines changed

deployment/kiosk-boot.nix

Lines changed: 81 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,20 @@
33
modulesPath,
44
pkgs,
55
self,
6+
config,
67
system,
78
...
89
}: let
910
# change to false when running in qemu
10-
prodImage = true;
11+
prodImage = false;
12+
inherit (self) nixosModules;
1113
in {
12-
imports = [(modulesPath + "/installer/cd-dvd/installation-cd-graphical-gnome.nix")];
14+
imports = [
15+
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
16+
nixosModules.hydra-node
17+
nixosModules.hydra-control-plane
18+
19+
];
1320

1421
boot = {
1522
initrd.availableKernelModules = [
@@ -35,14 +42,50 @@ in {
3542
# To address build time warn
3643
swraid.enable = lib.mkForce false;
3744
};
45+
console.keyMap = "us";
46+
console.packages = with pkgs; [ terminus_font ];
47+
console.font = "ter-i32b";
48+
i18n = {
49+
defaultLocale = "en_US.UTF-8";
50+
};
51+
fonts.fontDir.enable = true;
52+
fonts.enableGhostscriptFonts = true;
53+
fonts.packages = with pkgs; [
54+
# Used by starship for fonts
55+
(nerdfonts.override { fonts = [ "FiraCode" ]; })
56+
corefonts
57+
fira # monospaced
58+
fira-code
59+
powerline-fonts
60+
inconsolata
61+
liberation_ttf
62+
dejavu_fonts
63+
bakoma_ttf
64+
gentium
65+
ubuntu_font_family
66+
terminus_font
67+
unifont # some international languages
68+
];
69+
nixpkgs.config.pulseaudio = true;
70+
hardware = {
71+
pulseaudio.enable = true;
72+
};
73+
sound.enable = true;
3874

3975
documentation.info.enable = false;
4076

4177
environment = {
78+
etc = {
79+
"sway/config".source = ./sway/config;
80+
};
81+
loginShellInit = ''
82+
[[ "$(tty)" == /dev/tty1 ]] && sway --config /etc/sway/config
83+
'';
4284
systemPackages = with self.packages.${system};
4385
[
4486
hydra-node
4587
hydra-tui
88+
hydra-tui-wrapper
4689
hydra-control-plane
4790
hydra-offline-wrapper
4891
hydra-doom-wrapper
@@ -60,15 +103,15 @@ in {
60103
usbutils
61104
util-linux
62105
google-chrome
106+
pavucontrol
107+
vim
108+
tmux
109+
wezterm
110+
sway
63111
]);
64112

65113
};
66114

67-
# Used by starship for fonts
68-
fonts.packages = with pkgs; [
69-
(nerdfonts.override {fonts = ["FiraCode"];})
70-
];
71-
72115
# Disable squashfs for testing only
73116
# Set the flake.nix `imageParameters.prodImage = true;` when ready to build the distribution image to use image compression
74117
isoImage.squashfsCompression = lib.mkIf (!prodImage) ((lib.warn "Generating a testing only ISO with compression disabled") null);
@@ -92,70 +135,47 @@ in {
92135
enableCompletion = true;
93136
};
94137

95-
fzf = {
96-
fuzzyCompletion = true;
97-
keybindings = true;
98-
};
99-
100-
starship = {
101-
enable = true;
102-
settings = {
103-
git_commit = {
104-
tag_disabled = false;
105-
only_detached = false;
106-
};
107-
git_metrics = {
108-
disabled = false;
109-
};
110-
memory_usage = {
111-
disabled = false;
112-
format = "via $symbol[\${ram_pct}]($style) ";
113-
threshold = -1;
114-
};
115-
shlvl = {
116-
disabled = false;
117-
symbol = "↕";
118-
threshold = -1;
119-
};
120-
status = {
121-
disabled = false;
122-
map_symbol = true;
123-
pipestatus = true;
124-
};
125-
time = {
126-
disabled = false;
127-
format = "[\\[ $time \\]]($style) ";
128-
};
129-
};
130-
};
131-
132138
dconf.enable = true;
133139
gnupg.agent.enable = true;
140+
sway = {
141+
enable = true;
142+
extraPackages = with pkgs; [
143+
swaylock
144+
swayidle
145+
xwayland
146+
waybar
147+
mako
148+
kanshi
149+
];
150+
};
151+
waybar.enable = true;
134152
};
135153

136154
networking.hosts = lib.mkForce {
137-
"127.0.0.1" = [ "localhost" "doom-remote.local" "doom-offline.local" ];
138-
"::1" = [ "localhost" "doom-remote.local" "doom-offline.local" ];
155+
"127.0.0.1" = [ "localhost" "offline.doom.local" ];
156+
"::1" = [ "localhost" "offline.doom.local" ];
139157
};
140158
services = {
141-
#cage = {
142-
# enable = true;
143-
# program = "${pkgs.google-chrome}/bin/google-chrome-stable --app=http://doom-remote.local";
144-
# #program = "${pkgs.google-chrome}/bin/google-chrome-stable";
145-
# user = "nixos";
146-
#};
159+
hydra-node = {
160+
enable = true;
161+
};
162+
hydra-control-plane = {
163+
enable = true;
164+
reserved = true;
165+
};
166+
getty.autologinUser = "nixos";
147167
nginx = {
148168
enable = true;
149169
virtualHosts = {
150-
"doom-remote.local" = {
151-
root = self.packages.${system}.hydra-doom-static-remote;
152-
extraConfig = ''
153-
disable_symlinks off;
154-
try_files $uri $uri /index.html;
155-
'';
156-
};
157-
"doom-offline.local" = {
158-
root = self.packages.${system}.hydra-doom-static;
170+
"offline.doom.local" = {
171+
root = self.packages.${system}.hydra-doom-static.overrideAttrs (finalAttrs: prevAttrs: {
172+
passthru = prevAttrs.passthru // {
173+
serverUrl = "http://offline.doom.local:8000";
174+
useMouse = "1";
175+
# uncomment below if you have a cabinet key for POO distribution
176+
#cabinetKey = import ../deployment/cabinet-key.nix;
177+
};
178+
});
159179
extraConfig = ''
160180
disable_symlinks off;
161181
try_files $uri $uri /index.html;

0 commit comments

Comments
 (0)