Compare commits
No commits in common. "02b2b9cf326af491b70f2bc06855905d240efaea" and "34f179465dd7516a6c31e31fd5374dd2e17a9d02" have entirely different histories.
02b2b9cf32
...
34f179465d
38
flake.lock
generated
38
flake.lock
generated
@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765794845,
|
"lastModified": 1764350888,
|
||||||
"narHash": "sha256-YD5QWlGnusNbZCqR3pxG8tRxx9yUXayLZfAJRWspq2s=",
|
"narHash": "sha256-6Rp18zavTlnlZzcoLoBTJMBahL2FycVkw2rAEs3cQvo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "7194cfe5b7a3660726b0fe7296070eaef601cae9",
|
"rev": "2055a08fd0e2fd41318279a5355eb8a161accf26",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -79,11 +79,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765980955,
|
"lastModified": 1764304195,
|
||||||
"narHash": "sha256-rB45jv4uwC90vM9UZ70plfvY/2Kdygs+zlQ07dGQFk4=",
|
"narHash": "sha256-bO7FN/bF6gG7TlZpKAZjO3VvfsLaPFkefeUfJJ7F/7w=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "89c9508bbe9b40d36b3dc206c2483ef176f15173",
|
"rev": "86ff0ef506c209bb397849706e85cc3a913cb577",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -172,11 +172,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765779637,
|
"lastModified": 1764242076,
|
||||||
"narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=",
|
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1306659b587dc277866c7b69eb97e5f07864d8c4",
|
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -188,11 +188,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765687488,
|
"lastModified": 1763049705,
|
||||||
"narHash": "sha256-7YAJ6xgBAQ/Nr+7MI13Tui1ULflgAdKh63m1tfYV7+M=",
|
"narHash": "sha256-A5LS0AJZ1yDPTa2fHxufZN++n8MCmtgrJDtxFxrH4S8=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d02bcc33948ca19b0aaa0213fe987ceec1f4ebe1",
|
"rev": "3acb677ea67d4c6218f33de0db0955f116b7588c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -218,11 +218,11 @@
|
|||||||
},
|
},
|
||||||
"secrets": {
|
"secrets": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764605254,
|
"lastModified": 1762547267,
|
||||||
"narHash": "sha256-xpKD2OS2YgqxmIzuPU07OYtOqp6pccKdamb+oXhch7w=",
|
"narHash": "sha256-bDYmYBJxtsSES+gcpHfpnURA7QDJ3cC1Mg2jzQl5zdg=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "c1bba633c0006784e95d9c10e937a15ea3aaee55",
|
"rev": "601b97ba998f743a333fe7523dd5825816155778",
|
||||||
"revCount": 20,
|
"revCount": 17,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://gitea@git.bulthuis.dev/Jan/nixos-secrets"
|
"url": "ssh://gitea@git.bulthuis.dev/Jan/nixos-secrets"
|
||||||
},
|
},
|
||||||
@ -238,11 +238,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765836173,
|
"lastModified": 1759635238,
|
||||||
"narHash": "sha256-hWRYfdH2ONI7HXbqZqW8Q1y9IRbnXWvtvt/ONZovSNY=",
|
"narHash": "sha256-UvzKi02LMFP74csFfwLPAZ0mrE7k6EiYaKecplyX9Qk=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "443a7f2e7e118c4fc63b7fae05ab3080dd0e5c63",
|
"rev": "6e5a38e08a2c31ae687504196a230ae00ea95133",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
206
hosts/20212060/configuration.nix
Normal file
206
hosts/20212060/configuration.nix
Normal file
@ -0,0 +1,206 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
# State version
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
|
# Machine hostname
|
||||||
|
networking.hostName = "20212060";
|
||||||
|
|
||||||
|
# Admin users
|
||||||
|
users.users.jan.extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"wireshark"
|
||||||
|
"podman"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Set up kerberos
|
||||||
|
security.krb5 = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
libdefaults = {
|
||||||
|
rdns = false;
|
||||||
|
};
|
||||||
|
realms = (inputs.secrets.gewis.krb5Realm);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.netbird = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO: Move clatd setup
|
||||||
|
|
||||||
|
# services.clatd = {
|
||||||
|
# enable = true;
|
||||||
|
# enableNetworkManagerIntegration = true;
|
||||||
|
# };
|
||||||
|
# networking.networkmanager.settings = {
|
||||||
|
# connection."ipv6.clat" = "yes";
|
||||||
|
# };
|
||||||
|
networking.networkmanager.package = pkgs.networkmanager.overrideAttrs (
|
||||||
|
final: prev: {
|
||||||
|
src = pkgs.fetchFromGitLab {
|
||||||
|
domain = "gitlab.freedesktop.org";
|
||||||
|
owner = "Mstrodl";
|
||||||
|
repo = "NetworkManager";
|
||||||
|
# rev = "d367285a1fec5167f2fa94af2ea1448b6e21650e";
|
||||||
|
# sha256 = "0BHxuJ6KtFoVxh2Xt0bq4oM3q87QBhtawyMtixz/cPs=";
|
||||||
|
rev = "fa3b0c6ade05a67316520d143608c5bd9963a23c";
|
||||||
|
hash = "sha256-7TENrRDKXMFPWv6oDuBWBYIBrDvNsy/JGtkppMk1oQo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = prev.postPatch + ''
|
||||||
|
substituteInPlace meson.build \
|
||||||
|
--replace "find_program('clang'" "find_program('${pkgs.stdenv.cc.targetPrefix}clang'"
|
||||||
|
'';
|
||||||
|
|
||||||
|
hardeningDisable = [
|
||||||
|
"zerocallusedregs"
|
||||||
|
"shadowstack"
|
||||||
|
"pacret"
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs =
|
||||||
|
prev.nativeBuildInputs
|
||||||
|
++ (with pkgs; [
|
||||||
|
xdp-tools
|
||||||
|
bpftools
|
||||||
|
buildPackages.llvmPackages.clang
|
||||||
|
buildPackages.llvmPackages.libllvm
|
||||||
|
]);
|
||||||
|
|
||||||
|
buildInputs =
|
||||||
|
prev.buildInputs
|
||||||
|
++ (with pkgs; [
|
||||||
|
libbpf
|
||||||
|
]);
|
||||||
|
|
||||||
|
mesonFlags = prev.mesonFlags ++ [
|
||||||
|
"-Dclat=true"
|
||||||
|
"-Dnbft=false"
|
||||||
|
"-Dbpf-compiler=clang"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
# TODO: Remove once laptop is properly integrated into domain
|
||||||
|
programs.ssh = {
|
||||||
|
package = pkgs.openssh_gssapi;
|
||||||
|
extraConfig = ''
|
||||||
|
GSSAPIAuthentication yes
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable virtualisation for VMs
|
||||||
|
virtualisation.libvirtd.enable = true;
|
||||||
|
|
||||||
|
# Enable wireshark
|
||||||
|
programs.wireshark = {
|
||||||
|
enable = true;
|
||||||
|
dumpcap.enable = true;
|
||||||
|
usbmon.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable Nix-LD
|
||||||
|
programs.nix-ld = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set up wstunnel client
|
||||||
|
services.wstunnel = {
|
||||||
|
enable = true;
|
||||||
|
clients.wg-tunnel = {
|
||||||
|
connectTo = "wss://tunnel.bulthuis.dev:443";
|
||||||
|
settings.local-to-remote = [
|
||||||
|
"udp://51820:10.10.40.100:51820"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable flatpak
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
|
# Set up MADD
|
||||||
|
# services.madd-client = {
|
||||||
|
# enable = true;
|
||||||
|
# endpoint = "http://localhost:3000";
|
||||||
|
# interface = "wlp0s20f3";
|
||||||
|
# };
|
||||||
|
# services.madd-server = {
|
||||||
|
# enable = true;
|
||||||
|
# settings = {
|
||||||
|
# bind = "127.0.0.1:3000";
|
||||||
|
# zone = "lab.bulthuis.dev";
|
||||||
|
# networks = [ "10.0.0.0/8" ];
|
||||||
|
# registration_limit = 1;
|
||||||
|
# dns_server = "127.0.0.1:2053";
|
||||||
|
# tsig_key_name = "madd";
|
||||||
|
# tsig_key_file = "/home/jan/Code/MADD/madd.tsig";
|
||||||
|
# tsig_algorithm = "hmac-sha256";
|
||||||
|
# data_dir = "/var/lib/madd";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Module setup
|
||||||
|
modules = {
|
||||||
|
profiles.laptop.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
virtualisation.podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
dockerSocket.enable = true;
|
||||||
|
autoPrune.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages =
|
||||||
|
let
|
||||||
|
wrapProgram =
|
||||||
|
pkg: bwrapArgs:
|
||||||
|
pkgs.runCommandLocal pkg.name { bwrapArgs = (lib.join " \\\n" bwrapArgs) + " \\"; } ''
|
||||||
|
mkdir -p $out
|
||||||
|
|
||||||
|
# Link all top level folders
|
||||||
|
ln -s ${pkg}/* $out
|
||||||
|
|
||||||
|
# Except for bin
|
||||||
|
rm $out/bin
|
||||||
|
mkdir -p $out/bin
|
||||||
|
|
||||||
|
# Wrap each executable
|
||||||
|
for file in ${pkg}/bin/*; do
|
||||||
|
base=$(basename $file)
|
||||||
|
echo "#!/usr/bin/env bash" > $out/bin/$base
|
||||||
|
echo "exec ${pkgs.bubblewrap}/bin/bwrap \\" >> $out/bin/$base
|
||||||
|
echo "$bwrapArgs" >> $out/bin/$base
|
||||||
|
echo "-- $file \"\$@\"" >> $out/bin/$base
|
||||||
|
chmod +x $out/bin/$base
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
wish = pkgs.writeShellScriptBin "wish" ''
|
||||||
|
env
|
||||||
|
exec ${lib.getExe pkgs.firefox} "$@"
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
[
|
||||||
|
(wrapProgram wish [
|
||||||
|
"--new-session"
|
||||||
|
"--unshare-all"
|
||||||
|
"--clearenv"
|
||||||
|
"--dev /dev"
|
||||||
|
"--proc /proc"
|
||||||
|
"--ro-bind /nix/store /nix/store"
|
||||||
|
"--bind $HOME/Code $HOME/Code"
|
||||||
|
])
|
||||||
|
];
|
||||||
|
}
|
||||||
43
hosts/20212060/hardware-configuration.nix
Normal file
43
hosts/20212060/hardware-configuration.nix
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Machine platform
|
||||||
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
|
|
||||||
|
# Hardware configuration
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"nvme"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"rtsx_pci_sdmmc"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
|
# Filesystems
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/3b91eaeb-ea95-4bea-8dc1-f55af7502d23";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/46BF-DE2C";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Swapfile
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/var/lib/swapfile";
|
||||||
|
size = 16 * 1024;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
120
hosts/20212060/users/compprog.nix
Normal file
120
hosts/20212060/users/compprog.nix
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.stateVersion = "24.11";
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# Desktop environment
|
||||||
|
gnome-text-editor
|
||||||
|
gnome-calculator
|
||||||
|
gnome-console
|
||||||
|
gnome-logs
|
||||||
|
gnome-system-monitor
|
||||||
|
nautilus
|
||||||
|
adwaita-icon-theme
|
||||||
|
gnome-control-center
|
||||||
|
gnome-shell-extensions
|
||||||
|
glib
|
||||||
|
gnome-menus
|
||||||
|
gtk3.out
|
||||||
|
xdg-user-dirs
|
||||||
|
xdg-user-dirs-gtk
|
||||||
|
cantarell-fonts
|
||||||
|
dejavu_fonts
|
||||||
|
source-code-pro
|
||||||
|
source-sans
|
||||||
|
gnome-session
|
||||||
|
adwaita-fonts
|
||||||
|
|
||||||
|
# Coding tools
|
||||||
|
vim-full
|
||||||
|
nano
|
||||||
|
neovim
|
||||||
|
emacs
|
||||||
|
gedit
|
||||||
|
geany
|
||||||
|
kdePackages.kate
|
||||||
|
vscode
|
||||||
|
python310
|
||||||
|
jdk17
|
||||||
|
gnumake
|
||||||
|
gcc
|
||||||
|
lldb
|
||||||
|
# pypy310
|
||||||
|
|
||||||
|
# Runners
|
||||||
|
(writeShellScriptBin "mygcc" "gcc -std=gnu17 -x c -Wall -O2 -static -pipe -o $1 \"$1.c\" -lm")
|
||||||
|
(writeShellScriptBin "mygpp" "g++ -std=gnu++20 -x c++ -Wall -O2 -static -pipe -o $1 \"$1.cpp\" -lm")
|
||||||
|
(writeShellScriptBin "mypython" "python3 $@")
|
||||||
|
(writeShellScriptBin "myjavac" "javac -encoding UTF-8 -sourcepath . -d . $@")
|
||||||
|
(writeShellScriptBin "mykotlinc" "kotlinc -d . $@")
|
||||||
|
];
|
||||||
|
|
||||||
|
modules.profiles.gnome.enable = true;
|
||||||
|
|
||||||
|
programs.vscode = {
|
||||||
|
enable = true;
|
||||||
|
mutableExtensionsDir = false;
|
||||||
|
profiles.default = {
|
||||||
|
extensions = with pkgs.vscode-extensions; [
|
||||||
|
ms-vscode.cpptools
|
||||||
|
ms-dotnettools.csharp
|
||||||
|
formulahendry.code-runner
|
||||||
|
vscjava.vscode-java-debug
|
||||||
|
dbaeumer.vscode-eslint
|
||||||
|
redhat.java
|
||||||
|
ms-python.python
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.firefox;
|
||||||
|
profiles.default = {
|
||||||
|
settings = {
|
||||||
|
"browser.startup.homepage" = "https://domjudge.bulthuis.dev";
|
||||||
|
};
|
||||||
|
bookmarks = {
|
||||||
|
force = true;
|
||||||
|
settings = [
|
||||||
|
{
|
||||||
|
name = "Sites";
|
||||||
|
toolbar = true;
|
||||||
|
bookmarks = [
|
||||||
|
{
|
||||||
|
name = "C Reference";
|
||||||
|
url = "https://en.cppreference.com/w/c";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "C++ Reference";
|
||||||
|
url = "https://en.cppreference.com/w/cpp";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "Python 3.10 documentation";
|
||||||
|
url = "https://docs.python.org/3.10/download.html";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "Java 17 API Specification";
|
||||||
|
url = "https://docs.oracle.com/en/java/javase/17/docs/api/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "Kotlin Language Documentation";
|
||||||
|
url = "https://kotlinlang.org/docs/kotlin-reference.pdf";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "DOMjudge Team Manual";
|
||||||
|
url = "https://www.domjudge.org/docs/manual/main/index.html";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
hosts/20212060/users/jan.nix
Normal file
31
hosts/20212060/users/jan.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.stateVersion = "24.11";
|
||||||
|
|
||||||
|
modules.profiles.jan.enable = true;
|
||||||
|
|
||||||
|
# home.packages = with pkgs; [
|
||||||
|
# opencloud-desktop
|
||||||
|
# code-nautilus
|
||||||
|
# nautilus-open-in-blackbox
|
||||||
|
# ];
|
||||||
|
|
||||||
|
xdg.desktopEntries = {
|
||||||
|
canvas = {
|
||||||
|
name = "Canvas";
|
||||||
|
type = "Application";
|
||||||
|
exec = "${pkgs.chromium}/bin/chromium --app=\"https://canvas.tue.nl\" --user-data-dir=/home/jan/.local/state/Canvas";
|
||||||
|
settings.StartupWMClass = "chrome-canvas.tue.nl__-Default";
|
||||||
|
};
|
||||||
|
overleaf = {
|
||||||
|
name = "Overleaf";
|
||||||
|
type = "Application";
|
||||||
|
exec = "${pkgs.chromium}/bin/chromium --app=\"https://www.overleaf.com\" --user-data-dir=/home/jan/.local/state/Overleaf";
|
||||||
|
settings.StartupWMClass = "chrome-www.overleaf.com__-Default";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -30,15 +30,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set up impermanence
|
|
||||||
modules.impermanence = {
|
|
||||||
enable = true;
|
|
||||||
resetScript = ''
|
|
||||||
# Revert to the blank state for the root directory
|
|
||||||
zfs rollback -r tank/root@blank
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set up kerberos
|
# Set up kerberos
|
||||||
security.krb5 = {
|
security.krb5 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -100,7 +91,7 @@
|
|||||||
clients.wg-tunnel = {
|
clients.wg-tunnel = {
|
||||||
connectTo = "wss://tunnel.bulthuis.dev:443";
|
connectTo = "wss://tunnel.bulthuis.dev:443";
|
||||||
settings.local-to-remote = [
|
settings.local-to-remote = [
|
||||||
"udp://51819:10.10.40.100:51820"
|
"udp://51820:10.10.40.100:51820"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -121,56 +112,6 @@
|
|||||||
autoPrune.enable = true;
|
autoPrune.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable Gnome Remote Desktop
|
|
||||||
services.gnome.gnome-remote-desktop.enable = true;
|
|
||||||
systemd.services."gnome-remote-desktop".wantedBy = [ "graphical.target" ];
|
|
||||||
systemd.services."gnome-remote-desktop".preStart =
|
|
||||||
let
|
|
||||||
credDir = "/var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop";
|
|
||||||
credPath = "${credDir}/credentials.ini";
|
|
||||||
credFile = pkgs.writeText "gnome-remote-desktop-credentials" ''
|
|
||||||
[RDP]
|
|
||||||
credentials={'username': <'remote'>, 'password': <'remote'>}
|
|
||||||
'';
|
|
||||||
script = pkgs.writeScript "gnome-remote-desktop-setup" ''
|
|
||||||
mkdir -p ${credDir}
|
|
||||||
touch ${credPath}
|
|
||||||
chown gnome-remote-desktop:gnome-remote-desktop ${credPath}
|
|
||||||
chmod 600 ${credPath}
|
|
||||||
cat ${credFile} > ${credPath}
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
"${script}";
|
|
||||||
environment.etc."gnome-remote-desktop/grd.conf" = {
|
|
||||||
text = ''
|
|
||||||
[RDP]
|
|
||||||
port=3389
|
|
||||||
tls-key=/run/secrets/gnome-remote-desktop/tls-key
|
|
||||||
tls-cert=/run/secrets/gnome-remote-desktop/tls-crt
|
|
||||||
enabled=true
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
networking.firewall = {
|
|
||||||
allowedTCPPorts = [
|
|
||||||
3389
|
|
||||||
3390
|
|
||||||
];
|
|
||||||
allowedUDPPorts = [
|
|
||||||
3389
|
|
||||||
3390
|
|
||||||
];
|
|
||||||
};
|
|
||||||
sops.secrets."gnome-remote-desktop/tls-key" = {
|
|
||||||
sopsFile = "${inputs.secrets}/secrets/ws-think.enc.yaml";
|
|
||||||
owner = config.users.users.gnome-remote-desktop.name;
|
|
||||||
group = config.users.users.gnome-remote-desktop.group;
|
|
||||||
};
|
|
||||||
sops.secrets."gnome-remote-desktop/tls-crt" = {
|
|
||||||
sopsFile = "${inputs.secrets}/secrets/ws-think.enc.yaml";
|
|
||||||
owner = config.users.users.gnome-remote-desktop.name;
|
|
||||||
group = config.users.users.gnome-remote-desktop.group;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set up hardware
|
# Set up hardware
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,25 +28,4 @@
|
|||||||
settings.StartupWMClass = "chrome-www.overleaf.com__-Default";
|
settings.StartupWMClass = "chrome-www.overleaf.com__-Default";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: Slowly remove
|
|
||||||
modules.impermanence = {
|
|
||||||
directories = [
|
|
||||||
".cache"
|
|
||||||
".config"
|
|
||||||
".cargo"
|
|
||||||
".dbus"
|
|
||||||
".gnupg"
|
|
||||||
".local"
|
|
||||||
".MathWorks"
|
|
||||||
".mozilla"
|
|
||||||
".ssh"
|
|
||||||
".steam"
|
|
||||||
".SteamCloud"
|
|
||||||
".thunderbird"
|
|
||||||
".vscode"
|
|
||||||
".wine"
|
|
||||||
".Wolfram"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,10 +51,6 @@ in
|
|||||||
mission-center
|
mission-center
|
||||||
dconf-editor
|
dconf-editor
|
||||||
gnome-calendar
|
gnome-calendar
|
||||||
gnome-backgrounds
|
|
||||||
gnome-bluetooth
|
|
||||||
gnome-color-manager
|
|
||||||
epiphany
|
|
||||||
|
|
||||||
# For theming gtk3
|
# For theming gtk3
|
||||||
# adw-gtk3 # TODO: Do this better, same for morewaita, not sure if it even works
|
# adw-gtk3 # TODO: Do this better, same for morewaita, not sure if it even works
|
||||||
|
|||||||
@ -45,9 +45,9 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
settings.user.name = cfg.user;
|
userName = cfg.user;
|
||||||
settings.user.email = cfg.email;
|
userEmail = cfg.email;
|
||||||
# ignores = cfg.ignores;
|
ignores = cfg.ignores;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,6 @@ in
|
|||||||
tomoki1207.pdf
|
tomoki1207.pdf
|
||||||
ms-vsliveshare.vsliveshare
|
ms-vsliveshare.vsliveshare
|
||||||
ms-vscode-remote.remote-ssh
|
ms-vscode-remote.remote-ssh
|
||||||
myriad-dreamin.tinymist
|
|
||||||
];
|
];
|
||||||
|
|
||||||
userSettings =
|
userSettings =
|
||||||
|
|||||||
@ -53,8 +53,5 @@ in
|
|||||||
fzf
|
fzf
|
||||||
grc
|
grc
|
||||||
];
|
];
|
||||||
|
|
||||||
# Impermanence
|
|
||||||
modules.impermanence.files = [ ".local/share/fish/fish_history" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
# cfg = config.modules.impermanence;
|
cfg = config.modules.impermanence;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.impermanence = {
|
options.modules.impermanence = {
|
||||||
# enable = mkEnableOption "Impermanence";
|
enable = mkEnableOption "Impermanence";
|
||||||
directories = mkOption {
|
directories = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
@ -23,12 +23,13 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# home.persistence."/persist/home/${config.home.username}" = {
|
home.persistence."/persist/home/${config.home.username}" = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# allowOther = true;
|
hideMounts = true;
|
||||||
# directories = cfg.directories;
|
allowOther = true;
|
||||||
# files = cfg.files;
|
directories = cfg.directories;
|
||||||
# };
|
files = cfg.files;
|
||||||
# };
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,12 +20,6 @@ in
|
|||||||
console.font = "dina";
|
console.font = "dina";
|
||||||
console.earlySetup = true;
|
console.earlySetup = true;
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
noto-fonts
|
|
||||||
fira
|
|
||||||
jetbrains-mono
|
|
||||||
];
|
|
||||||
|
|
||||||
# TODO: Disable default fonts, fonts should be managed per user
|
# TODO: Disable default fonts, fonts should be managed per user
|
||||||
# fonts.enableDefaultPackages = false;
|
# fonts.enableDefaultPackages = false;
|
||||||
# fonts.fontconfig = {
|
# fonts.fontconfig = {
|
||||||
|
|||||||
@ -34,8 +34,24 @@ in
|
|||||||
glib
|
glib
|
||||||
gnome-menus
|
gnome-menus
|
||||||
gtk3.out
|
gtk3.out
|
||||||
|
xdg-user-dirs
|
||||||
|
xdg-user-dirs-gtk
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Enable Gnome Remote Desktop
|
||||||
|
services.gnome.gnome-remote-desktop.enable = true;
|
||||||
|
systemd.services."gnome-remote-desktop".wantedBy = [ "graphical.target" ];
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
3389
|
||||||
|
3390
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
3389
|
||||||
|
3390
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# For GSConnect/KDE Connect
|
# For GSConnect/KDE Connect
|
||||||
# TODO: Move to host config?
|
# TODO: Move to host config?
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
@ -54,9 +70,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Enable dependencies
|
# Enable dependencies
|
||||||
modules.networkmanager.enable = true;
|
modules = {
|
||||||
|
networkmanager.enable = true;
|
||||||
# Impermanence
|
};
|
||||||
modules.impermanence.directories = [ "/etc/NetworkManager/system-connections" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,32 +50,11 @@ in
|
|||||||
# For testing purposes with VM
|
# For testing purposes with VM
|
||||||
virtualisation.vmVariantWithDisko.virtualisation.fileSystems."/persist".neededForBoot = true;
|
virtualisation.vmVariantWithDisko.virtualisation.fileSystems."/persist".neededForBoot = true;
|
||||||
|
|
||||||
environment.persistence = {
|
environment.persistence."/persist/system" = {
|
||||||
"/persist/system" = {
|
enable = true;
|
||||||
enable = true;
|
hideMounts = true;
|
||||||
hideMounts = true;
|
directories = cfg.directories;
|
||||||
directories = cfg.directories;
|
files = cfg.files;
|
||||||
files = cfg.files;
|
|
||||||
};
|
|
||||||
"/persist/home" = {
|
|
||||||
enable = true;
|
|
||||||
hideMounts = true;
|
|
||||||
users = (
|
|
||||||
lib.mapAttrs' (
|
|
||||||
name: value:
|
|
||||||
let
|
|
||||||
user = name;
|
|
||||||
homeDir = "/home/${user}";
|
|
||||||
impConfig = value.modules.impermanence;
|
|
||||||
in
|
|
||||||
lib.nameValuePair user {
|
|
||||||
home = homeDir;
|
|
||||||
directories = impConfig.directories;
|
|
||||||
files = impConfig.files;
|
|
||||||
}
|
|
||||||
) config.home-manager.users
|
|
||||||
);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
jq,
|
|
||||||
lib,
|
|
||||||
moreutils,
|
|
||||||
tinymist,
|
|
||||||
vscode-utils,
|
|
||||||
}:
|
|
||||||
|
|
||||||
vscode-utils.buildVscodeMarketplaceExtension {
|
|
||||||
mktplcRef = {
|
|
||||||
name = "tinymist-vscode-html";
|
|
||||||
publisher = "myriad-dreamin";
|
|
||||||
inherit (tinymist) version;
|
|
||||||
hash = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
jq
|
|
||||||
moreutils
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [ tinymist ];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
cd "$out/$installPrefix"
|
|
||||||
jq '.contributes.configuration.properties."tinymist.serverPath".default = "${lib.getExe tinymist}"' package.json | sponge package.json
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
changelog = "https://marketplace.visualstudio.com/items/myriad-dreamin.tinymist/changelog";
|
|
||||||
description = "VSCode extension for providing an integration solution for Typst";
|
|
||||||
downloadPage = "https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist";
|
|
||||||
homepage = "https://github.com/myriad-dreamin/tinymist";
|
|
||||||
license = lib.licenses.asl20;
|
|
||||||
maintainers = [ ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
82
packages/helix.nix
Normal file
82
packages/helix.nix
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
fetchFromGitHub,
|
||||||
|
fetchzip,
|
||||||
|
lib,
|
||||||
|
rustPlatform,
|
||||||
|
git,
|
||||||
|
installShellFiles,
|
||||||
|
versionCheckHook,
|
||||||
|
nix-update-script,
|
||||||
|
}:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage (final: rec {
|
||||||
|
pname = "helix";
|
||||||
|
version = "25.07.1";
|
||||||
|
|
||||||
|
# This release tarball includes source code for the tree-sitter grammars,
|
||||||
|
# which is not ordinarily part of the repository.
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "helix-editor";
|
||||||
|
repo = "helix";
|
||||||
|
rev = "109c812233e442addccf1739dec4406248bd3244";
|
||||||
|
hash = "sha256-c3fpREWUKGonlmV/aesmyRxbJZQypHgXStR7SwdcCo0=";
|
||||||
|
};
|
||||||
|
grammars = fetchzip {
|
||||||
|
url = "https://github.com/helix-editor/helix/releases/download/${final.version}/helix-${final.version}-source.tar.xz";
|
||||||
|
hash = "sha256-Pj/lfcQXRWqBOTTWt6+Gk61F9F1UmeCYr+26hGdG974=";
|
||||||
|
stripRoot = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoHash = "sha256-g5MfCedLBiz41HMkIHl9NLWiewE8t3H2iRKOuWBmRig=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
git
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
|
||||||
|
env.HELIX_DEFAULT_RUNTIME = "${placeholder "out"}/lib/runtime";
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
# Add the runtime data
|
||||||
|
rm -r runtime
|
||||||
|
cp ${grammars}/languages.toml languages.toml
|
||||||
|
cp -r ${grammars}/runtime runtime
|
||||||
|
chmod -R u+w runtime
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# not needed at runtime
|
||||||
|
rm -r runtime/grammars/sources
|
||||||
|
|
||||||
|
mkdir -p $out/lib
|
||||||
|
cp -r runtime $out/lib
|
||||||
|
installShellCompletion contrib/completion/hx.{bash,fish,zsh}
|
||||||
|
mkdir -p $out/share/{applications,icons/hicolor/256x256/apps}
|
||||||
|
cp contrib/Helix.desktop $out/share/applications
|
||||||
|
cp contrib/helix.png $out/share/icons/hicolor/256x256/apps
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeInstallCheckInputs = [
|
||||||
|
versionCheckHook
|
||||||
|
];
|
||||||
|
versionCheckProgram = "${placeholder "out"}/bin/hx";
|
||||||
|
versionCheckProgramArg = "--version";
|
||||||
|
doInstallCheck = true;
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
updateScript = nix-update-script { };
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Post-modern modal text editor";
|
||||||
|
homepage = "https://helix-editor.com";
|
||||||
|
changelog = "https://github.com/helix-editor/helix/blob/${final.version}/CHANGELOG.md";
|
||||||
|
license = lib.licenses.mpl20;
|
||||||
|
mainProgram = "hx";
|
||||||
|
maintainers = with lib.maintainers; [
|
||||||
|
danth
|
||||||
|
yusdacra
|
||||||
|
zowoq
|
||||||
|
];
|
||||||
|
};
|
||||||
|
})
|
||||||
@ -20,55 +20,8 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
"org/gnome/calendar" = {
|
|
||||||
active-view = "week";
|
|
||||||
};
|
|
||||||
"org/gnome/desktop/background" = {
|
|
||||||
picture-uri = "file://${config.home.homeDirectory}/.local/share/backgrounds/background";
|
|
||||||
};
|
|
||||||
"org/gnome/desktop/input-sources" = {
|
|
||||||
sources = [
|
|
||||||
(lib.gvariant.mkTuple [
|
|
||||||
"xkb"
|
|
||||||
"us"
|
|
||||||
])
|
|
||||||
];
|
|
||||||
xkb-options = [ "caps:escape_shifted_capslock" ];
|
|
||||||
};
|
|
||||||
"org/gnome/desktop/interface" = {
|
|
||||||
accent-color = "purple";
|
|
||||||
enable-hot-corners = false;
|
|
||||||
};
|
|
||||||
"org/gnome/desktop/peripherals/touchpad" = {
|
|
||||||
speed = 0.214;
|
|
||||||
two-finger-scrolling-enabled = true;
|
|
||||||
};
|
|
||||||
"org/gnome/mutter" = {
|
|
||||||
workspaces-only-on-primary = false;
|
|
||||||
};
|
|
||||||
"org/gnome/nautilus/icon-view" = {
|
|
||||||
default-zoom-level = "small";
|
|
||||||
};
|
|
||||||
"org/gnome/nautilus/preferences" = {
|
|
||||||
default-folder-viewer = "icon-view";
|
|
||||||
};
|
|
||||||
"org/gnome/settings-daemon/plugins/color" = {
|
|
||||||
night-light-enabled = true;
|
|
||||||
night-light-schedule-automatic = false;
|
|
||||||
night-light-schedule-from = 20.0;
|
|
||||||
night-light-schedule-to = 6.0;
|
|
||||||
night-light-temperature = 2700;
|
|
||||||
};
|
|
||||||
"org/gnome/shell" = {
|
"org/gnome/shell" = {
|
||||||
disable-extension-version-validation = true;
|
disable-extension-version-validation = true;
|
||||||
enabled-extensions = [
|
|
||||||
"disable-workspace-animation@ethnarque"
|
|
||||||
"gsconnect@andyholmes.github.io"
|
|
||||||
"rounded-window-corners@fxgn"
|
|
||||||
"media-progress@krypion17"
|
|
||||||
"mprisLabel@moon-0xff.github.com"
|
|
||||||
];
|
|
||||||
last-selected-power-profile = "power-saver";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -30,8 +30,7 @@ in
|
|||||||
# ente-auth
|
# ente-auth
|
||||||
audacity
|
audacity
|
||||||
carla
|
carla
|
||||||
# pkgs-stable.winbox
|
pkgs-stable.winbox
|
||||||
winbox4
|
|
||||||
# whatsapp-for-linux
|
# whatsapp-for-linux
|
||||||
wasistlos
|
wasistlos
|
||||||
discord
|
discord
|
||||||
@ -157,18 +156,6 @@ in
|
|||||||
modules = {
|
modules = {
|
||||||
profiles.gnome.enable = true;
|
profiles.gnome.enable = true;
|
||||||
|
|
||||||
impermanence = {
|
|
||||||
directories = [
|
|
||||||
"Code"
|
|
||||||
"Documents"
|
|
||||||
"Games"
|
|
||||||
"Models"
|
|
||||||
"Music"
|
|
||||||
"Pictures"
|
|
||||||
"Videos"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Gaming
|
# Gaming
|
||||||
# retroarch.enable = true;
|
# retroarch.enable = true;
|
||||||
# ryujinx.enable = true;
|
# ryujinx.enable = true;
|
||||||
|
|||||||
@ -19,17 +19,9 @@ in
|
|||||||
bootloader.enable = mkDefault true;
|
bootloader.enable = mkDefault true;
|
||||||
ssh.enable = mkDefault true;
|
ssh.enable = mkDefault true;
|
||||||
|
|
||||||
impermanence = {
|
impermanence.directories = [
|
||||||
files = [
|
"/var/lib/nixos"
|
||||||
"/etc/machine-id"
|
];
|
||||||
"/etc/zfs/zpool.cache" # TODO: Move to zfs module?
|
|
||||||
];
|
|
||||||
directories = [
|
|
||||||
"/var/log/journal"
|
|
||||||
"/var/lib/nixos"
|
|
||||||
"/var/lib/systemd"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# TODO: Remove the secrets module and use sops directly?
|
# TODO: Remove the secrets module and use sops directly?
|
||||||
secrets = {
|
secrets = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user