update, patch nix, reformat

This commit is contained in:
Gerg-L 2024-02-14 19:20:35 -05:00
parent 15529d185d
commit 1dfe51881d
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI
9 changed files with 130 additions and 128 deletions

16
flake.lock generated
View file

@ -215,16 +215,16 @@
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1705968297,
"narHash": "sha256-dGmqJW8v1JPAzv50v2u4MdLrIYLiIXVte4M1wJ0ayyA=",
"lastModified": 1707913978,
"narHash": "sha256-STyfZLkT0Sc6bNkfXVXR8OL0W7LUYHHuw4Bqwhb/Gr0=",
"owner": "NixOS",
"repo": "nix",
"rev": "08bf2846df34b0db3a25d575e8cb34a9518a9dcc",
"rev": "d857914e1a41670893d6571726588659afe7b1e9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "08bf2846df34b0db3a25d575e8cb34a9518a9dcc",
"ref": "d857914e1a41670893d6571726588659afe7b1e9",
"repo": "nix",
"type": "github"
}
@ -527,16 +527,16 @@
},
"unstable": {
"locked": {
"lastModified": 1707689078,
"narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=",
"lastModified": 1707661179,
"narHash": "sha256-dyJ0nyP+S58WgJVigOboHTE5LR1E7MzJvm3fc9zkza8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8",
"rev": "8686026882afa61d77a6fa5b05a25e4769ee09cd",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"ref": "8686026882afa61d77a6fa5b05a25e4769ee09cd",
"repo": "nixpkgs",
"type": "github"
}

View file

@ -11,7 +11,8 @@
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
#ref = "nixos-unstable";
ref = "8686026882afa61d77a6fa5b05a25e4769ee09cd";
};
stable = {
type = "github";
@ -24,7 +25,7 @@
type = "github";
owner = "NixOS";
repo = "nix";
ref = "08bf2846df34b0db3a25d575e8cb34a9518a9dcc";
ref = "d857914e1a41670893d6571726588659afe7b1e9";
inputs.nixpkgs.follows = "stable";
};
nixos-generators = {

View file

@ -1,5 +1,5 @@
_:
{config, ... }:
#{ config, ... }:
{
# users.users = {
# ${config.services.gitea.user} = {

View file

@ -17,7 +17,7 @@ _:
adminpassFile = config.sops.secrets.nextcloud.path;
adminuser = "admin-root";
};
extraOptions = {
settings = {
overwriteprotocol = "https";
default_phone_region = "US";
};

View file

@ -9,12 +9,10 @@ _:
"gerg_ssl_key"
"gerg_ssl_cert"
]
(
_: {
(_: {
owner = config.services.nginx.user;
inherit (config.services.nginx) group;
}
);
});
services.nginx = {
enable = true;

View file

@ -80,8 +80,7 @@ in
enable = true;
qemu = {
#don't hook evdev at vm start
package = pkgs.qemu_kvm.overrideAttrs (
old: {
package = pkgs.qemu_kvm.overrideAttrs (old: {
patches = old.patches ++ [
(pkgs.writeText "qemu.diff" ''
diff --git a/ui/input-linux.c b/ui/input-linux.c
@ -103,8 +102,7 @@ in
return;
'')
];
}
);
});
runAsRoot = true;
ovmf.enable = true;
verbatimConfig = ''

View file

@ -37,8 +37,7 @@ rec {
mkModules =
path:
lib.listToAttrs (
map
(name: {
map (name: {
name = lib.pipe name [
toString
(lib.removeSuffix ".nix")
@ -49,15 +48,13 @@ rec {
(builtins.replaceStrings (lib.singleton "#_file") (lib.singleton ''_file = "${name}";''))
(builtins.toFile (builtins.baseNameOf path))
];
})
(listNixFilesRecursive path)
}) (listNixFilesRecursive path)
);
gerg-utils =
config: outputs:
lib.foldAttrs lib.mergeAttrs { } (
map
(
map (
system:
let
pkgs =
@ -67,8 +64,7 @@ rec {
import unstable { inherit system config; };
in
lib.mapAttrs (name: value: if needsSystem name then { ${system} = value pkgs; } else value) outputs
)
[ "x86_64-linux" ]
) [ "x86_64-linux" ]
);
mkHosts =
@ -101,12 +97,10 @@ rec {
mkDisko =
names:
lib.listToAttrs (
map
(name: {
map (name: {
name = "disko-${name}";
value.disko.devices = import "${self}/disko/${name}.nix" lib;
})
names
}) names
);
/* /<name> -> packages named by directory

View file

@ -1,5 +1,10 @@
inputs:
{ lib, config, ... }:
{
lib,
config,
pkgs,
...
}:
{
#
# Flake registry and $NIX_PATH pinning
@ -10,13 +15,10 @@ inputs:
(x: x // { nixpkgs.flake = inputs.unstable; })
];
environment.etc =
lib.mapAttrs'
(name: value: {
environment.etc = lib.mapAttrs' (name: value: {
name = "nix/path/${name}";
value.source = value.flake;
})
config.nix.registry;
}) config.nix.registry;
nix.nixPath = [ "/etc/nix/path" ];
#
# Ignore global registry
@ -25,7 +27,14 @@ inputs:
#
# Use nix directly from master
#
nix.package = inputs.nix.packages.default;
nix.package = inputs.nix.packages.default.overrideAttrs (old: {
patches = old.patches or [ ] ++ [
(pkgs.fetchpatch {
url = "https://github.com/NixOS/nix/commit/b6ae3be9c6ec4e9de55479188e76fc330b2304dd.patch";
hash = "sha256-VyIywGo1ie059wXmGWx+bNeHz9lNk6nlkJ/Qgd1kmzw=";
})
];
});
#
# Other nix settings
#
@ -56,6 +65,10 @@ inputs:
allowed-users = [ "@wheel" ];
use-xdg-base-directories = true;
auto-allocate-uids = true;
#
# A option for the custom patch
#
reject-flake-config = true;
};
#_file
}

View file

@ -5,8 +5,7 @@
jre,
makeBinaryWrapper,
}:
stdenvNoCC.mkDerivation (
finalAttrs: {
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "papermc";
version = "1.20.1.83";
@ -50,5 +49,4 @@ stdenvNoCC.mkDerivation (
];
mainProgram = "minecraft-server";
};
}
)
})