Compare commits
13 commits
a99ea1f4c9
...
dfe51e396b
Author | SHA1 | Date | |
---|---|---|---|
dfe51e396b | |||
d88f956885 | |||
9dd2e5f1d1 | |||
60578c5ad0 | |||
d96bf4f608 | |||
f594c911b4 | |||
7bf0c89a8f | |||
4800ae998d | |||
aad8139fdc | |||
22111b5dc7 | |||
e51b8263ce | |||
863ae3b400 | |||
b6785cff54 |
6 changed files with 133 additions and 102 deletions
60
flake.lock
60
flake.lock
|
@ -9,11 +9,11 @@
|
|||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730444665,
|
||||
"narHash": "sha256-i3FxeHjsHw4AePx3AWVVywy92EEobx/ZER4ignWxNrE=",
|
||||
"lastModified": 1731092955,
|
||||
"narHash": "sha256-L1hLXf4IDZ0KoXbFiSNNZJ7IrReEr/J+CLt6Rl4Ea3M=",
|
||||
"owner": "Kirottu",
|
||||
"repo": "anyrun",
|
||||
"rev": "b3b4f2253d43af3311b3d3fc86973fc3e9559c33",
|
||||
"rev": "d2017f224b2bfd7e33573c7070e7c3e2960c7dcc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -59,11 +59,11 @@
|
|||
"stable": "stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731037643,
|
||||
"narHash": "sha256-N8gaV5bngMQPGyuo/RVdEsHTXvOeqjUhhxXpGea12DE=",
|
||||
"lastModified": 1731249827,
|
||||
"narHash": "sha256-04iOZoJ0D+y3xhZtaCgSBOz8T4hED7oMVkuAOzXT8vU=",
|
||||
"owner": "zhaofengli",
|
||||
"repo": "colmena",
|
||||
"rev": "03f1a18a6fba9ad9c4edb1cc7cf394390c304198",
|
||||
"rev": "a2193487bcf70bbb998ad1a25a4ff02b8d55db7a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -150,11 +150,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731051511,
|
||||
"narHash": "sha256-INZxHLoqy7uTLuMhEEnYkyMgouXvJtBupup2pOpcM+s=",
|
||||
"lastModified": 1731274291,
|
||||
"narHash": "sha256-cZ0QMpv5p2a6WEE+o9uu0a4ma6RzQDOQTbm7PbixWz8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "a8bdb16b473f457609eb76d0dabb2fcb4e1f64b8",
|
||||
"rev": "486250f404f4a4f4f33f8f669d83ca5f6e6b7dfc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -171,11 +171,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731057136,
|
||||
"narHash": "sha256-/E0UgOD6LnDfJPqCwqa1WVEgwDQ6NXXH+Wq89cMUris=",
|
||||
"lastModified": 1731290007,
|
||||
"narHash": "sha256-E8Caw6l/73iVFEYGch8Yc31fXCtSY30xxb+CsTN1gG0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "2313c4189eaef014d01fb260313f58554ddb5e31",
|
||||
"rev": "e94b9aef9633ffb9ea2bebe8c9b999618ec15109",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -403,11 +403,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730837930,
|
||||
"narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
|
||||
"lastModified": 1731235328,
|
||||
"narHash": "sha256-NjavpgE9/bMe/ABvZpyHIUeYF1mqR5lhaep3wB79ucs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
|
||||
"rev": "60bb110917844d354f3c18e05450606a435d2d10",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -427,11 +427,11 @@
|
|||
"spectrum": "spectrum"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730499294,
|
||||
"narHash": "sha256-RxV89z3TwhQT0Wue42aSPh3O7hXGbAFYHHNSnW9h6P8=",
|
||||
"lastModified": 1731240174,
|
||||
"narHash": "sha256-HYu+bPoV3UILhwc4Ar5iQ7aF+DuQWHXl4mljN6Bwq6A=",
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"rev": "93122446d6001f9789d05e565f73bebfa3f53b50",
|
||||
"rev": "dd89404e1885b8d7033106f3898eaef8db660cb2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -539,11 +539,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1730785428,
|
||||
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
|
||||
"lastModified": 1731139594,
|
||||
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
|
||||
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -567,11 +567,11 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1730883749,
|
||||
"narHash": "sha256-mwrFF0vElHJP8X3pFCByJR365Q2463ATp2qGIrDUdlE=",
|
||||
"lastModified": 1730963269,
|
||||
"narHash": "sha256-rz30HrFYCHiWEBCKHMffHbMdWJ35hEkcRVU0h7ms3x0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dba414932936fde69f0606b4f1d87c5bc0003ede",
|
||||
"rev": "83fb6c028368e465cd19bb127b86f971a5e41ebc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -697,11 +697,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731032894,
|
||||
"narHash": "sha256-dQSyYPmrQiPr+PGEd+K8038rubFGz7G/dNXVeaGWE0w=",
|
||||
"lastModified": 1731292155,
|
||||
"narHash": "sha256-fYVoUUtSadbOrH0z0epVQDsStBDS/S/fAK//0ECQAAI=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "d52f2a4c103a0acf09ded857b9e2519ae2360e59",
|
||||
"rev": "7c4cd99ed7604b79e8cb721099ac99c66f656b3a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -718,11 +718,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731047660,
|
||||
"narHash": "sha256-iyp51lPWEQz4c5VH9bVbAuBcFP4crETU2QJYh5V0NYA=",
|
||||
"lastModified": 1731213149,
|
||||
"narHash": "sha256-jR8i6nFLmSmm0cIoeRQ8Q4EBARa3oGaAtEER/OMMxus=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "60e1bce1999f126e3b16ef45f89f72f0c3f8d16f",
|
||||
"rev": "f1675e3b0e1e663a4af49be67ecbc9e749f85eb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
self,
|
||||
comin,
|
||||
caddy-with-plugins,
|
||||
...
|
||||
}:
|
||||
|
@ -14,8 +13,6 @@
|
|||
imports = [
|
||||
(modulesPath + "/virtualisation/lxc-container.nix")
|
||||
|
||||
comin.nixosModules.comin
|
||||
|
||||
../../users/root
|
||||
../../users/erwin
|
||||
|
||||
|
@ -42,6 +39,7 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
rust-motd.enable = true;
|
||||
tailscale.enable = true;
|
||||
};
|
||||
|
||||
|
@ -68,16 +66,6 @@
|
|||
firewall.trustedInterfaces = [ "tailscale0" ];
|
||||
};
|
||||
|
||||
services.comin = {
|
||||
enable = true;
|
||||
remotes = [
|
||||
{
|
||||
name = "origin";
|
||||
url = "https://git.datarift.nl/erwin/nixos-config";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
systemd = {
|
||||
services.logrotate-checkconf.enable = false;
|
||||
|
||||
|
@ -112,28 +100,6 @@
|
|||
sudo.enable = false;
|
||||
};
|
||||
|
||||
programs.rust-motd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
banner = {
|
||||
color = "red";
|
||||
command = "${pkgs.figlet}/bin/figlet -f slant ${config.networking.hostName}";
|
||||
};
|
||||
weather = {
|
||||
loc = "De%20Westereen,%20Netherlands";
|
||||
};
|
||||
uptime = {
|
||||
prefix = "up: ";
|
||||
};
|
||||
filesystems = {
|
||||
root = "/";
|
||||
};
|
||||
memory = {
|
||||
swap_pos = "none";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.secrets = {
|
||||
caddy-env = { };
|
||||
|
|
40
modules/rust-motd/default.nix
Normal file
40
modules/rust-motd/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.eboskma.rust-motd;
|
||||
in
|
||||
{
|
||||
options.eboskma.rust-motd = {
|
||||
enable = mkEnableOption "rust-motd";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.rust-motd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
banner = {
|
||||
color = "red";
|
||||
command = "${pkgs.figlet}/bin/figlet -f slant ${config.networking.hostName}";
|
||||
};
|
||||
weather = {
|
||||
loc = "De%20Westereen,%20Netherlands";
|
||||
};
|
||||
uptime = {
|
||||
prefix = "up: ";
|
||||
};
|
||||
filesystems = {
|
||||
root = "/";
|
||||
};
|
||||
memory = {
|
||||
swap_pos = "none";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -3,25 +3,25 @@
|
|||
"alpha": {
|
||||
"experimental": {
|
||||
"candidateHashFilenames": [
|
||||
"factorio_linux_2.0.14.tar.xz"
|
||||
"factorio_linux_2.0.16.tar.xz"
|
||||
],
|
||||
"name": "factorio_alpha_x64-2.0.14.tar.xz",
|
||||
"name": "factorio_alpha_x64-2.0.16.tar.xz",
|
||||
"needsAuth": true,
|
||||
"sha256": "8853ce1cdea0c142f78c3ebb3b7d51420f9eb28e9113f2be08a12d4e476dcadc",
|
||||
"sha256": "9828ae257a3b2f95de2dae2f262e9d8d6b85f356911449166ceef1472d231e6d",
|
||||
"tarDirectory": "x64",
|
||||
"url": "https://factorio.com/get-download/2.0.14/alpha/linux64",
|
||||
"version": "2.0.14"
|
||||
"url": "https://factorio.com/get-download/2.0.16/alpha/linux64",
|
||||
"version": "2.0.16"
|
||||
},
|
||||
"stable": {
|
||||
"candidateHashFilenames": [
|
||||
"factorio_linux_2.0.14.tar.xz"
|
||||
"factorio_linux_2.0.15.tar.xz"
|
||||
],
|
||||
"name": "factorio_alpha_x64-2.0.14.tar.xz",
|
||||
"name": "factorio_alpha_x64-2.0.15.tar.xz",
|
||||
"needsAuth": true,
|
||||
"sha256": "8853ce1cdea0c142f78c3ebb3b7d51420f9eb28e9113f2be08a12d4e476dcadc",
|
||||
"sha256": "39df353fe8f14394d2618b9627659f3c0c16922362708e681f006083a8f5163e",
|
||||
"tarDirectory": "x64",
|
||||
"url": "https://factorio.com/get-download/2.0.14/alpha/linux64",
|
||||
"version": "2.0.14"
|
||||
"url": "https://factorio.com/get-download/2.0.15/alpha/linux64",
|
||||
"version": "2.0.15"
|
||||
}
|
||||
},
|
||||
"demo": {
|
||||
|
@ -51,51 +51,51 @@
|
|||
"expansion": {
|
||||
"experimental": {
|
||||
"candidateHashFilenames": [
|
||||
"factorio-space-age_linux_2.0.14.tar.xz"
|
||||
"factorio-space-age_linux_2.0.16.tar.xz"
|
||||
],
|
||||
"name": "factorio_expansion_x64-2.0.14.tar.xz",
|
||||
"name": "factorio_expansion_x64-2.0.16.tar.xz",
|
||||
"needsAuth": true,
|
||||
"sha256": "7878444d65dc12815d7ce4d2c941441b8b7e05605e3f0bd69d45d02b3aa8f81a",
|
||||
"sha256": "32ae1b8f525148b3bb1f68e41b398543c2b0da29734f9f3b4f9509a86c64ecf4",
|
||||
"tarDirectory": "x64",
|
||||
"url": "https://factorio.com/get-download/2.0.14/expansion/linux64",
|
||||
"version": "2.0.14"
|
||||
"url": "https://factorio.com/get-download/2.0.16/expansion/linux64",
|
||||
"version": "2.0.16"
|
||||
},
|
||||
"stable": {
|
||||
"candidateHashFilenames": [
|
||||
"factorio-space-age_linux_2.0.14.tar.xz"
|
||||
"factorio-space-age_linux_2.0.15.tar.xz"
|
||||
],
|
||||
"name": "factorio_expansion_x64-2.0.14.tar.xz",
|
||||
"name": "factorio_expansion_x64-2.0.15.tar.xz",
|
||||
"needsAuth": true,
|
||||
"sha256": "7878444d65dc12815d7ce4d2c941441b8b7e05605e3f0bd69d45d02b3aa8f81a",
|
||||
"sha256": "09de33402fee3dbae9d0207409f05a19e2fa8019b53d3de96557d2ec904e10f3",
|
||||
"tarDirectory": "x64",
|
||||
"url": "https://factorio.com/get-download/2.0.14/expansion/linux64",
|
||||
"version": "2.0.14"
|
||||
"url": "https://factorio.com/get-download/2.0.15/expansion/linux64",
|
||||
"version": "2.0.15"
|
||||
}
|
||||
},
|
||||
"headless": {
|
||||
"experimental": {
|
||||
"candidateHashFilenames": [
|
||||
"factorio-headless_linux_2.0.14.tar.xz",
|
||||
"factorio_headless_x64_2.0.14.tar.xz"
|
||||
"factorio-headless_linux_2.0.16.tar.xz",
|
||||
"factorio_headless_x64_2.0.16.tar.xz"
|
||||
],
|
||||
"name": "factorio_headless_x64-2.0.14.tar.xz",
|
||||
"name": "factorio_headless_x64-2.0.16.tar.xz",
|
||||
"needsAuth": false,
|
||||
"sha256": "5a4bc4c3b2a97ed1fc58eb796321e848dcc64435bd91013dd9c78a14a8ce8815",
|
||||
"sha256": "f2069b4b746500d945eeb67ef7eda5e7aebe7fd0294c2af4e117af22a3bbaea3",
|
||||
"tarDirectory": "x64",
|
||||
"url": "https://factorio.com/get-download/2.0.14/headless/linux64",
|
||||
"version": "2.0.14"
|
||||
"url": "https://factorio.com/get-download/2.0.16/headless/linux64",
|
||||
"version": "2.0.16"
|
||||
},
|
||||
"stable": {
|
||||
"candidateHashFilenames": [
|
||||
"factorio-headless_linux_2.0.14.tar.xz",
|
||||
"factorio_headless_x64_2.0.14.tar.xz"
|
||||
"factorio-headless_linux_2.0.15.tar.xz",
|
||||
"factorio_headless_x64_2.0.15.tar.xz"
|
||||
],
|
||||
"name": "factorio_headless_x64-2.0.14.tar.xz",
|
||||
"name": "factorio_headless_x64-2.0.15.tar.xz",
|
||||
"needsAuth": false,
|
||||
"sha256": "5a4bc4c3b2a97ed1fc58eb796321e848dcc64435bd91013dd9c78a14a8ce8815",
|
||||
"sha256": "70b441cb807811a60586c01107248c1d8d7ae043bd1f23675fc924fbaaa538d8",
|
||||
"tarDirectory": "x64",
|
||||
"url": "https://factorio.com/get-download/2.0.14/headless/linux64",
|
||||
"version": "2.0.14"
|
||||
"url": "https://factorio.com/get-download/2.0.15/headless/linux64",
|
||||
"version": "2.0.15"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
15
users/erwin/download-factorio.sh
Normal file
15
users/erwin/download-factorio.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
edition=alpha
|
||||
if [[ $# -ge 1 ]]; then
|
||||
edition="${1}"
|
||||
fi
|
||||
|
||||
releases_file=$(mktemp --suffix=.json)
|
||||
xhs -o "${releases_file}" factorio.com/api/latest-releases
|
||||
|
||||
version=$(jaq -r '.stable.alpha' "${releases_file}")
|
||||
token=$(cat "${FACTORIO_TOKEN_FILE:?}")
|
||||
|
||||
nix-prefetch-url --name "factorio_${edition}_x64-${version}.tar.xz" \
|
||||
"https://factorio.com/get-download/${version}/${edition}/linux64?username=eboskma&token=${token}"
|
|
@ -11,10 +11,21 @@ let
|
|||
homeCfg = config.home-manager.users.erwin;
|
||||
bt = config.eboskma.bluetooth;
|
||||
|
||||
downloadFactorio = pkgs.writeShellScriptBin "download-factorio" ''
|
||||
version=$(${pkgs.xh}/bin/xhs factorio.com/api/latest-releases | ${pkgs.jaq}/bin/jaq -r '.stable.alpha')
|
||||
${pkgs.nix}/bin/nix-prefetch-url --name factorio_alpha_x64-''${version}.tar.xz https://factorio.com/get-download/''${version}/alpha/linux64\?username=eboskma\&token=$(cat ${config.sops.secrets.factorio-token.path})
|
||||
'';
|
||||
downloadFactorio = pkgs.writeShellApplication {
|
||||
name = "download-factorio";
|
||||
text = builtins.readFile ./download-factorio.sh;
|
||||
runtimeInputs = with pkgs; [
|
||||
jaq
|
||||
nix
|
||||
xh
|
||||
];
|
||||
runtimeEnv = {
|
||||
FACTORIO_TOKEN_FILE = config.sops.secrets.factorio-token.path;
|
||||
};
|
||||
derivationArgs = {
|
||||
version = "0.0.1";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.home {
|
||||
|
@ -240,7 +251,6 @@ in
|
|||
(noson.overrideAttrs (_: {
|
||||
qtWrapperArgs = "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ pkgs.libpulseaudio ]}";
|
||||
}))
|
||||
orca-slicer
|
||||
pamedia
|
||||
pass
|
||||
passmark-performancetest
|
||||
|
|
Loading…
Reference in a new issue