some changes (#104)

* some changes

* remove watchdog

* add cloud mail

* fix typo

* add mc-server

* add mc-server

* fix devtools
This commit is contained in:
Dennis 2024-02-18 06:11:47 +01:00 committed by GitHub
parent 4c4801d6a8
commit b2366d9a44
4 changed files with 89 additions and 41 deletions

42
flake.lock generated
View File

@ -47,11 +47,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1707978135,
"narHash": "sha256-Xje6vjTcVUfPg3+X4PUSlgDxA/MSqzmtjOTW47NRwwM=",
"lastModified": 1708150887,
"narHash": "sha256-lyEaeShLZqQtFO+ULLfxF9fYaYpTal0Ck1B+iKYBOMs=",
"owner": "nix-community",
"repo": "fenix",
"rev": "09ef6ec17141904ca28ddd62f2697f63c2aaa799",
"rev": "761431323e30846bae160e15682cfa687c200606",
"type": "github"
},
"original": {
@ -119,11 +119,11 @@
]
},
"locked": {
"lastModified": 1707919853,
"narHash": "sha256-qxmBGDzutuJ/tsX4gp+Mr7fjxOZBbeT9ixhS5o4iFOw=",
"lastModified": 1708031129,
"narHash": "sha256-EH20hJfNnc1/ODdDVat9B7aKm0B95L3YtkIRwKLvQG8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "043ba285c6dc20f36441d48525402bcb9743c498",
"rev": "3d6791b3897b526c82920a2ab5f61d71985b3cf8",
"type": "github"
},
"original": {
@ -256,11 +256,11 @@
]
},
"locked": {
"lastModified": 1707732516,
"narHash": "sha256-9g4yACr8OQQVbBIdU4/cIj+12oh7RTJim1KxtiNWgmI=",
"lastModified": 1708134366,
"narHash": "sha256-MtjbG+lQHrmxbBdIOlRQ9RBULsszGhqCpVD23y3KMEw=",
"owner": "SuperSandro2000",
"repo": "nixos-modules",
"rev": "043ea48acbfefea334042e9a0b84d6ba9079243f",
"rev": "4e41d2a44dde45e234a7795e5a502d21ad484d52",
"type": "github"
},
"original": {
@ -271,11 +271,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1707956935,
"narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=",
"lastModified": 1708118438,
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c",
"rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80",
"type": "github"
},
"original": {
@ -327,19 +327,19 @@
"type": "github"
}
},
"patch-systemd": {
"patch-aarch64": {
"locked": {
"lastModified": 1707546158,
"narHash": "sha256-nYYJTpzfPMDxI8mzhQsYjIUX+grorqjKEU9Np6Xwy/0=",
"lastModified": 1708156783,
"narHash": "sha256-Jx7kpeyDvHNXFITE0NTwh/5RjqefhUcQ8cQdtJ3/XXs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d934204a0f8d9198e1e4515dd6fec76a139c87f0",
"rev": "1cc67d9bf64b37aed93d7af74d5dfd3b76f665f8",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d934204a0f8d9198e1e4515dd6fec76a139c87f0",
"rev": "1cc67d9bf64b37aed93d7af74d5dfd3b76f665f8",
"type": "github"
}
},
@ -356,7 +356,7 @@
"nixos-modules": "nixos-modules",
"nixpkgs": "nixpkgs",
"nixpkgs-fmt": "nixpkgs-fmt",
"patch-systemd": "patch-systemd",
"patch-aarch64": "patch-aarch64",
"sops-nix": "sops-nix",
"systems": "systems"
}
@ -364,11 +364,11 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1707925466,
"narHash": "sha256-2xxcezb4tvssbVCU69DnTDSMB2lqwEp63JNQt8zuzcs=",
"lastModified": 1708018577,
"narHash": "sha256-B75VUqKvQeIqAUnYw4bGjY3xxrCqzRBJHLbmD0MAWEw=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "dba59970bcccfb3c6fc16ea0d0d79da875f22316",
"rev": "b9b0d29b8e69b02457cfabe20c4c69cdb45f3cc5",
"type": "github"
},
"original": {

View File

@ -4,9 +4,9 @@
nixConfig = {
trusted-users = [ "root" ];
substituters = [
"https://cache.nixos.org"
"https://cache.alicehuston.xyz"
"https://nix-community.cachix.org"
"https://cache.nixos.org/?priority=1&want-mass-query=true"
"https://cache.alicehuston.xyz/?priority=5&want-mass-query=true"
"https://nix-community.cachix.org/?priority=10&want-mass-query=true"
];
trusted-substituters = [
@ -23,8 +23,8 @@
};
inputs = {
# pcsc, fido2, systemd can not cross compile
patch-systemd.url = "github:nixos/nixpkgs?rev=d934204a0f8d9198e1e4515dd6fec76a139c87f0";
# can not cross compile all packages
patch-aarch64.url = "github:nixos/nixpkgs?rev=1cc67d9bf64b37aed93d7af74d5dfd3b76f665f8";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
@ -167,8 +167,8 @@
# files = "\\.nix";
# }
# {
# id = "nix-flake-check";
# entry = "nix flake check";
# id = "check";
# entry = "nix eval";
# language = "system";
# files = "\\.nix";
# pass_filenames = false;
@ -189,6 +189,7 @@
constructSystem = { hostname, users, home ? true, iso ? [ ], modules ? [ ], server ? true, sops ? true, system ? "x86_64-linux", owner ? null }:
lib.nixosSystem {
system = "x86_64-linux";
# pkgs = lib.mkIf (system != "x86_64-linux") (import inputs.patch-aarch64 { inherit (nixpkgs) config; inherit system; }).legacyPackages.${system};
modules = [
nixos-modules.nixosModule
sops-nix.nixosModules.sops
@ -219,13 +220,6 @@
home-manager.users.root = lib.mkIf (owner == user) (import ./users/${user}/home.nix);
}) users) else [ ])
++ lib.optional (system != "x86_64-linux") {
nixpkgs.overlays = [
(_self: super: (builtins.listToAttrs (map (name: {
name = name;
value = inputs.patch-systemd.legacyPackages.${system}.${name};
}) (builtins.attrNames inputs.patch-systemd.legacyPackages.${system}))))
];
} ++ lib.optional (system != "x86_64-linux") {
config.nixpkgs = {
config.allowUnsupportedSystem = true;
buildPlatform = "x86_64-linux";

60
modules/nom.patch Normal file
View File

@ -0,0 +1,60 @@
From 9d8ce77eaa0d207f0d3e96606dc44abc4e8e0ce0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= <sandro.jaeckel@gmail.com>
Date: Sun, 4 Sep 2022 13:04:56 +0200
Subject: [PATCH] nixos-rebuild: use nom if available in PATH
---
.../linux/nixos-rebuild/nixos-rebuild.sh | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
index 2051368a49f64c..395a54819e5417 100755
--- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
+++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
@@ -14,6 +14,10 @@ showSyntax() {
exit 1
}
+nom=nix
+if type -p nom &>/dev/null; then
+ nom=nom
+fi
# Parse the command line.
origArgs=("$@")
@@ -236,7 +240,7 @@ nixBuild() {
logVerbose "Building in legacy (non-flake) mode."
if [ -z "$buildHost" ]; then
logVerbose "No --build-host given, running nix-build locally"
- runCmd nix-build "$@"
+ runCmd $nom-build "$@"
else
logVerbose "buildHost set to \"$buildHost\", running nix-build remotely"
local instArgs=()
@@ -284,10 +288,10 @@ nixFlakeBuild() {
logVerbose "Building in flake mode."
if [[ -z "$buildHost" && -z "$targetHost" && "$action" != switch && "$action" != boot && "$action" != test && "$action" != dry-activate ]]
then
- runCmd nix "${flakeFlags[@]}" build "$@"
+ runCmd $nom build "${flakeFlags[@]}" "$@"
readlink -f ./result
elif [ -z "$buildHost" ]; then
- runCmd nix "${flakeFlags[@]}" build "$@" --out-link "${tmpDir}/result"
+ runCmd $nom build "${flakeFlags[@]}" "$@" --out-link "${tmpDir}/result"
readlink -f "${tmpDir}/result"
else
local attr="$1"
@@ -426,11 +430,11 @@ trap cleanup EXIT
# Re-execute nixos-rebuild from the Nixpkgs tree.
if [[ -z $_NIXOS_REBUILD_REEXEC && -n $canRun && -z $fast ]]; then
if [[ -z $flake ]]; then
- if p=$(runCmd nix-build --no-out-link --expr 'with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild' "${extraBuildFlags[@]}"); then
+ if p=$(runCmd $nom-build --no-out-link --expr 'with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild' "${extraBuildFlags[@]}"); then
SHOULD_REEXEC=1
fi
else
- runCmd nix "${flakeFlags[@]}" build --out-link "${tmpDir}/nixos-rebuild" "$flake#$flakeAttr.config.system.build.nixos-rebuild" "${extraBuildFlags[@]}" "${lockFlags[@]}"
+ runCmd $nom build "${flakeFlags[@]}" --out-link "${tmpDir}/nixos-rebuild" "$flake#$flakeAttr.config.system.build.nixos-rebuild" "${extraBuildFlags[@]}" "${lockFlags[@]}"
if p=$(readlink -e "${tmpDir}/nixos-rebuild"); then
SHOULD_REEXEC=1
fi

View File

@ -149,12 +149,6 @@
};
};
systemd.watchdog = {
device = "/dev/watchdog";
runtimeTime = "30s";
rebootTime = "5m";
};
nix = {
diffSystem = true;
settings = {