This commit is contained in:
2025-07-01 16:32:59 +00:00
parent de3b3aea49
commit eb1a74d694
7 changed files with 41 additions and 60 deletions

37
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1712696601,
"narHash": "sha256-puFPFSa/RC83JilUgB48/VL387eu2QN066Jv6X971LY=",
"lastModified": 1751285371,
"narHash": "sha256-/hDU+2AUeFFu5qGHO/UyFMc4UG/x5Cw5uXO36KGTk6c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "062fc6cf99d809921ecef47317752fc92468e6ae",
"rev": "b9c03fbbaf84d85bb28eee530c7e9edc4021ca1b",
"type": "github"
},
"original": {
@@ -16,29 +16,13 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1712437997,
"narHash": "sha256-g0whLLwRvgO2FsyhY8fNk+TWenS3jg5UdlWL4uqgFeo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e38d7cb66ea4f7a0eb6681920615dfcc30fc2920",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1712420723,
"narHash": "sha256-VnG0Eu394Ga2FCe8Q66m6OEQF8iAqjDYsjmtl+N2omk=",
"lastModified": 1744868846,
"narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9e7f26f82acb057498335362905fde6fea4ca50a",
"rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c",
"type": "github"
},
"original": {
@@ -56,15 +40,14 @@
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1712617241,
"narHash": "sha256-a4hbls4vlLRMciv62YrYT/Xs/3Cubce8WFHPUDWwzf8=",
"lastModified": 1750119275,
"narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "538c114cfdf1f0458f507087b1dcf018ce1c0c4c",
"rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2",
"type": "github"
},
"original": {

View File

@@ -14,11 +14,11 @@
networking.interfaces.end0.ipv4.addresses = [
{
address = "192.168.1.228";
address = "192.168.4.228";
prefixLength = 24;
}
];
networking.defaultGateway = "192.168.1.1";
networking.nameservers = ["192.168.1.1" "8.8.8.8"];
networking.defaultGateway = "192.168.4.1";
networking.nameservers = ["192.168.4.1" "8.8.8.8"];
}

View File

@@ -1,5 +1,8 @@
deploy NODE:
nixos-rebuild --flake .#{{NODE}} --fast --target-host root@{{NODE}}.node.dc1.consul --build-host root@{{NODE}}.node.dc1.consul switch
nixos-rebuild --flake .#{{NODE}} --add-root --fast --target-host root@{{NODE}}.node.dc1.consul --build-host root@{{NODE}}.node.dc1.consul switch
deploy-dry NODE:
nixos-rebuild --flake .#{{NODE}} --fast --target-host root@{{NODE}}.node.dc1.consul --build-host root@{{NODE}}.node.dc1.consul dry-activate
deploy-all:
just deploy odroid5

View File

@@ -6,7 +6,6 @@
...
}: {
services.samba.openFirewall = true;
#services.samba-wsdd.enable = true; # make shares visible for windows 10 clients
networking.firewall.allowedTCPPorts = [
5357 # wsdd
@@ -14,29 +13,26 @@
networking.firewall.allowedUDPPorts = [
3702 # wsdd
];
systemd.tmpfiles.rules = [
"d /shares/Public 0777 root root - -"
];
services.samba = {
enable = true;
securityType = "user";
extraConfig = ''
workgroup = WORKGROUP
server string = smbnix
netbios name = smbnix
disable netbios = yes
security = user
#use sendfile = yes
#max protocol = smb2
# note: localhost is the ipv6 localhost ::1
hosts allow = 192.168.1. 127.0.0.1 localhost
hosts deny = 0.0.0.0/0
guest account = nobody
map to guest = bad user
'';
shares = {
settings = {
global = {
workgroup = "WORKGROUP";
"server string" = "smbnix";
"netbios name" = "smbnix";
"disable netbios" = "yes";
security = "user";
#"use sendfile" = "yes";
#"max protocol" = "smb2";
# note: localhost is the ipv6 localhost ::1
"hosts allow" = "192.168.1. 127.0.0.1 localhost";
"hosts deny" = "0.0.0.0/0";
"guest account" = "nobody";
"map to guest" = "bad user";
};
public = {
path = "/shares/Public";
browseable = "no";
@@ -48,8 +44,8 @@
"force group" = "samba-guest";
};
};
};
users.users.samba-guest = {
isSystemUser = true;
description = "Residence of our Samba guest users";
@@ -59,4 +55,4 @@
shell = pkgs.shadow;
};
users.groups.samba-guest = {};
}
}

View File

@@ -32,7 +32,8 @@
};
# Enable nix flakes
nix.package = pkgs.nixFlakes;
# nix.package = pkgs.nixFlakes; #Deprecated
nix.package = pkgs.nixVersions.stable;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';

View File

@@ -8,16 +8,14 @@ with lib; let
cfg = config.boot.loader.kboot-conf;
# The builder used to write during system activation
builder = pkgs.substituteAll {
src = ./generate-kboot-conf.sh;
isExecutable = true;
# The builder used to write during system activation
builder = pkgs.replaceVars ./generate-kboot-conf.sh {
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
inherit (pkgs) bash;
};
# The builder exposed in populateCmd, which runs on the build architecture
populateBuilder = pkgs.buildPackages.substituteAll {
src = ./generate-kboot-conf.sh;
isExecutable = true;
populateBuilder = pkgs.buildPackages.replaceVars ./generate-kboot-conf.sh {
path = with pkgs.buildPackages; [coreutils gnused gnugrep];
inherit (pkgs.buildPackages) bash;
};

View File

@@ -58,7 +58,7 @@
];
services.nomad = {
package = pkgs.nomad_1_6;
package = pkgs.nomad_1_9;
dropPrivileges = false;
enableDocker = true;
enable = true;