format && add nix-serve for caching
Some checks failed
/ perform flake analysis (push) Successful in 37s
/ build hive configuration (push) Failing after 8m50s

This commit is contained in:
2026-01-07 15:29:28 +01:00
parent 13b08066ce
commit 56ffeaf5a0
26 changed files with 296 additions and 149 deletions

View File

@@ -2,20 +2,27 @@
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, nodes, ... }:let
{
config,
lib,
pkgs,
nodes,
...
}:
let
sin-address = "192.168.1.14";
in
{
imports =
[
./nginx.nix
# ./striped
# ./cybercoffee
./ollama.nix
./minecraft.nix
# ./shares.nix
];
imports = [
./nginx.nix
# ./striped
# ./cybercoffee
./ollama.nix
./minecraft.nix
./secrets
./nix-serve.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
@@ -29,7 +36,7 @@ in
# nameservers = [ "10.0.0.4" ];
# dhcpcd.extraConfig = "nohook resolv.conf";
firewall = {
allowedTCPPorts = [ nodes.sin.config.services.gitea.settings.server.SSH_PORT ];
};
@@ -37,18 +44,23 @@ in
enable = true;
internalInterfaces = [ "enp1s0" ];
externalInterface = "enp1s0";
forwardPorts = [ {
# TODO refactor this in the gitea/n100 module
sourcePort = nodes.sin.config.services.gitea.settings.server.SSH_PORT;
proto = "tcp";
destination = "${sin-address}:22";
} ];
forwardPorts = [
{
# TODO refactor this in the gitea/n100 module
sourcePort = nodes.sin.config.services.gitea.settings.server.SSH_PORT;
proto = "tcp";
destination = "${sin-address}:22";
}
];
};
};
time.timeZone = "Europe/Paris";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfree = true;
users.users.n100 = {
@@ -57,16 +69,19 @@ in
packages = with pkgs; [
];
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos"
];
};
users.users.root = {
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos"
];
};
environment.systemPackages = with pkgs; [
lunarvim
lunarvim
wget
httpie
tmux
@@ -112,4 +127,3 @@ in
system.stateVersion = "24.11"; # Did you read the comment?
}

View File

@@ -1,4 +1,4 @@
{pkgs, ...}:
{ pkgs, ... }:
{
imports = [
./halflife.nix

View File

@@ -1,2 +1 @@
{...}: {}
{ ... }: { }

View File

@@ -12,23 +12,24 @@
};
# Flake outputs
outputs = inputs@{
self,
nixpkgs,
nix-minecraft,
shoblog-front,
striped-front,
striped-back,
...
}:
{
nixosConfigurations.n100 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./configuration.nix
./hardware-configuration.nix
];
outputs =
inputs@{
self,
nixpkgs,
nix-minecraft,
shoblog-front,
striped-front,
striped-back,
...
}:
{
nixosConfigurations.n100 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./configuration.nix
./hardware-configuration.nix
];
};
};
};
}

View File

@@ -1,47 +1,61 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" "sdhci_pci" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"sd_mod"
"sdhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/swap" =
{ device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
fsType = "btrfs";
options = [ "subvol=swap" ];
};
fileSystems."/swap" = {
device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
fsType = "btrfs";
options = [ "subvol=swap" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D1B9-8019";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D1B9-8019";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ];

12
hosts/thea/nix-serve.nix Normal file
View File

@@ -0,0 +1,12 @@
{
pkgs,
config,
lib,
...
}:
{
services.nix-serve = {
enable = true;
secretKeyFile = config.age.secrets.cache-privkey.path;
};
}

View File

@@ -1,4 +1,5 @@
{inputs, ...}: {
{ inputs, ... }:
{
# virtualisation.docker = {
# enable = true;
# storageDriver = "btrfs";

View File

@@ -0,0 +1 @@
localhost:TiRpr2LzamX/MCKBUmFlZ8inWz94QWGL88fMEHg9Kgc=

View File

@@ -0,0 +1,8 @@
age-encryption.org/v1
-> ssh-ed25519 EVanKw DJoF2jaBg5Z2tF8NOqAXbNK3pODj8vEmgQ2bs3iaV0I
rO+6V0JmPnygEqsnblNwhZBHmsAjLaWgdNd/l2veeYg
-> ssh-ed25519 /uqj4A WW3yjXkYtKbXrANeNCctcNZTNg31LAm3wpaVCXsroA4
fF1mt83MNX5aHpukk2t0vE49wEwiqOlRxMoAxouYJVQ
--- cHVG1C71ko8ZNUMRoaLkw6zmAAjVvPaS5j/hr/P7Xoc
Áq <EFBFBD>c6ªXHNm5.0šÌ<EFBFBD>²ô-âa¶Ä —!¦k]áÚi§Bæ†ÚŠù÷]”ãÖR2 èñ†ñj_ƒ²QzHºDCᲡ!¨dÿ˰bUB®¥îµS€=fwÿÌ
ËÁsö†ò<E280A0>Ä0)¢Á”*€ªKÙÅO¾ÂÈî§Ð½

View File

@@ -0,0 +1,9 @@
{ ... }:
{
age.secrets = {
cache-privkey = {
file = ./cache-privkey.age;
mode = "700";
};
};
}

View File

@@ -1,4 +1,5 @@
{...}: let
{ ... }:
let
sin-address = "192.168.1.14";
in
{

View File

@@ -1,11 +1,12 @@
{inputs, ...}:
{ inputs, ... }:
let
striped-back = inputs.striped-back;
in {
in
{
imports = [
striped-back.nixosModules.default
];
services.striped-back-api = {
enable = true;
@@ -17,7 +18,7 @@ in {
socket.enable = true;
settings.django = {
allowed-hosts = ["striped-api.shobu.fr"];
allowed-hosts = [ "striped-api.shobu.fr" ];
debug = true;
databases = {
default = {

View File

@@ -1,4 +1,5 @@
{striped-back, striped-front, ...}:{
{ striped-back, striped-front, ... }:
{
imports = [
./back.nix
];