-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfiguration.nix
More file actions
44 lines (34 loc) · 1.11 KB
/
Copy pathconfiguration.nix
File metadata and controls
44 lines (34 loc) · 1.11 KB
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
{ config, pkgs, lib, inputs, ... }:
let get-host-ip = "$(ip route | grep default | cut -d' ' -f3)";
in {
imports = [ inputs.nixos-fhs-compat.nixosModules.combined ];
environment = {
fhs.enable = true;
fhs.linkLibs = true;
lsb.enable = true;
lsb.support32Bit = true;
};
boot.isContainer = true;
networking.useDHCP = false;
networking.hostName = "kalinix";
networking.firewall.enable = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs;
[ waypipe socat dpkg xlibs.xeyes ] ++ import ./pkgs.nix pkgs;
users.users.user = {
isNormalUser = true;
uid = 1000;
description = "Main User";
password = "";
};
systemd.services.waypipe = {
wantedBy = [ "multi-user.target" ];
requires = [ "network.target" ];
path = [ pkgs.socat pkgs.iproute2 ];
script =
"socat UNIX-LISTEN:/tmp/waypipe-server.sock,reuseaddr,fork,mode=777 TCP-CONNECT:${get-host-ip}:1337";
};
environment.shellInit = "export DISPLAY=${get-host-ip}:0";
environment.sessionVariables._JAVA_AWT_WM_NONREPARENTING = "1";
services.getty.autologinUser = "user";
}