mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
update, patch nix, reformat
This commit is contained in:
parent
15529d185d
commit
1dfe51881d
9 changed files with 130 additions and 128 deletions
16
flake.lock
generated
16
flake.lock
generated
|
|
@ -215,16 +215,16 @@
|
||||||
"nixpkgs-regression": "nixpkgs-regression"
|
"nixpkgs-regression": "nixpkgs-regression"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705968297,
|
"lastModified": 1707913978,
|
||||||
"narHash": "sha256-dGmqJW8v1JPAzv50v2u4MdLrIYLiIXVte4M1wJ0ayyA=",
|
"narHash": "sha256-STyfZLkT0Sc6bNkfXVXR8OL0W7LUYHHuw4Bqwhb/Gr0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nix",
|
"repo": "nix",
|
||||||
"rev": "08bf2846df34b0db3a25d575e8cb34a9518a9dcc",
|
"rev": "d857914e1a41670893d6571726588659afe7b1e9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "08bf2846df34b0db3a25d575e8cb34a9518a9dcc",
|
"ref": "d857914e1a41670893d6571726588659afe7b1e9",
|
||||||
"repo": "nix",
|
"repo": "nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
@ -527,16 +527,16 @@
|
||||||
},
|
},
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707689078,
|
"lastModified": 1707661179,
|
||||||
"narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=",
|
"narHash": "sha256-dyJ0nyP+S58WgJVigOboHTE5LR1E7MzJvm3fc9zkza8=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8",
|
"rev": "8686026882afa61d77a6fa5b05a25e4769ee09cd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "8686026882afa61d77a6fa5b05a25e4769ee09cd",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
type = "github";
|
type = "github";
|
||||||
owner = "NixOS";
|
owner = "NixOS";
|
||||||
repo = "nixpkgs";
|
repo = "nixpkgs";
|
||||||
ref = "nixos-unstable";
|
#ref = "nixos-unstable";
|
||||||
|
ref = "8686026882afa61d77a6fa5b05a25e4769ee09cd";
|
||||||
};
|
};
|
||||||
stable = {
|
stable = {
|
||||||
type = "github";
|
type = "github";
|
||||||
|
|
@ -24,7 +25,7 @@
|
||||||
type = "github";
|
type = "github";
|
||||||
owner = "NixOS";
|
owner = "NixOS";
|
||||||
repo = "nix";
|
repo = "nix";
|
||||||
ref = "08bf2846df34b0db3a25d575e8cb34a9518a9dcc";
|
ref = "d857914e1a41670893d6571726588659afe7b1e9";
|
||||||
inputs.nixpkgs.follows = "stable";
|
inputs.nixpkgs.follows = "stable";
|
||||||
};
|
};
|
||||||
nixos-generators = {
|
nixos-generators = {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
_:
|
_:
|
||||||
{config, ... }:
|
#{ config, ... }:
|
||||||
{
|
{
|
||||||
# users.users = {
|
# users.users = {
|
||||||
# ${config.services.gitea.user} = {
|
# ${config.services.gitea.user} = {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ _:
|
||||||
adminpassFile = config.sops.secrets.nextcloud.path;
|
adminpassFile = config.sops.secrets.nextcloud.path;
|
||||||
adminuser = "admin-root";
|
adminuser = "admin-root";
|
||||||
};
|
};
|
||||||
extraOptions = {
|
settings = {
|
||||||
overwriteprotocol = "https";
|
overwriteprotocol = "https";
|
||||||
default_phone_region = "US";
|
default_phone_region = "US";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,10 @@ _:
|
||||||
"gerg_ssl_key"
|
"gerg_ssl_key"
|
||||||
"gerg_ssl_cert"
|
"gerg_ssl_cert"
|
||||||
]
|
]
|
||||||
(
|
(_: {
|
||||||
_: {
|
owner = config.services.nginx.user;
|
||||||
owner = config.services.nginx.user;
|
inherit (config.services.nginx) group;
|
||||||
inherit (config.services.nginx) group;
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -80,31 +80,29 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
qemu = {
|
qemu = {
|
||||||
#don't hook evdev at vm start
|
#don't hook evdev at vm start
|
||||||
package = pkgs.qemu_kvm.overrideAttrs (
|
package = pkgs.qemu_kvm.overrideAttrs (old: {
|
||||||
old: {
|
patches = old.patches ++ [
|
||||||
patches = old.patches ++ [
|
(pkgs.writeText "qemu.diff" ''
|
||||||
(pkgs.writeText "qemu.diff" ''
|
diff --git a/ui/input-linux.c b/ui/input-linux.c
|
||||||
diff --git a/ui/input-linux.c b/ui/input-linux.c
|
index e572a2e..a9d76ba 100644
|
||||||
index e572a2e..a9d76ba 100644
|
--- a/ui/input-linux.c
|
||||||
--- a/ui/input-linux.c
|
+++ b/ui/input-linux.c
|
||||||
+++ b/ui/input-linux.c
|
@@ -397,12 +397,6 @@ static void input_linux_complete(UserCreatable *uc, Error **errp)
|
||||||
@@ -397,12 +397,6 @@ static void input_linux_complete(UserCreatable *uc, Error **errp)
|
}
|
||||||
}
|
|
||||||
|
|
||||||
qemu_set_fd_handler(il->fd, input_linux_event, NULL, il);
|
qemu_set_fd_handler(il->fd, input_linux_event, NULL, il);
|
||||||
- if (il->keycount) {
|
- if (il->keycount) {
|
||||||
- /* delay grab until all keys are released */
|
- /* delay grab until all keys are released */
|
||||||
- il->grab_request = true;
|
- il->grab_request = true;
|
||||||
- } else {
|
- } else {
|
||||||
- input_linux_toggle_grab(il);
|
- input_linux_toggle_grab(il);
|
||||||
- }
|
- }
|
||||||
QTAILQ_INSERT_TAIL(&inputs, il, next);
|
QTAILQ_INSERT_TAIL(&inputs, il, next);
|
||||||
il->initialized = true;
|
il->initialized = true;
|
||||||
return;
|
return;
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
}
|
});
|
||||||
);
|
|
||||||
runAsRoot = true;
|
runAsRoot = true;
|
||||||
ovmf.enable = true;
|
ovmf.enable = true;
|
||||||
verbatimConfig = ''
|
verbatimConfig = ''
|
||||||
|
|
|
||||||
|
|
@ -37,38 +37,34 @@ rec {
|
||||||
mkModules =
|
mkModules =
|
||||||
path:
|
path:
|
||||||
lib.listToAttrs (
|
lib.listToAttrs (
|
||||||
map
|
map (name: {
|
||||||
(name: {
|
name = lib.pipe name [
|
||||||
name = lib.pipe name [
|
toString
|
||||||
toString
|
(lib.removeSuffix ".nix")
|
||||||
(lib.removeSuffix ".nix")
|
(lib.removePrefix "${toString path}/")
|
||||||
(lib.removePrefix "${toString path}/")
|
];
|
||||||
];
|
value = lib.pipe name [
|
||||||
value = lib.pipe name [
|
builtins.readFile
|
||||||
builtins.readFile
|
(builtins.replaceStrings (lib.singleton "#_file") (lib.singleton ''_file = "${name}";''))
|
||||||
(builtins.replaceStrings (lib.singleton "#_file") (lib.singleton ''_file = "${name}";''))
|
(builtins.toFile (builtins.baseNameOf path))
|
||||||
(builtins.toFile (builtins.baseNameOf path))
|
];
|
||||||
];
|
}) (listNixFilesRecursive path)
|
||||||
})
|
|
||||||
(listNixFilesRecursive path)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
gerg-utils =
|
gerg-utils =
|
||||||
config: outputs:
|
config: outputs:
|
||||||
lib.foldAttrs lib.mergeAttrs { } (
|
lib.foldAttrs lib.mergeAttrs { } (
|
||||||
map
|
map (
|
||||||
(
|
system:
|
||||||
system:
|
let
|
||||||
let
|
pkgs =
|
||||||
pkgs =
|
if config == { } then
|
||||||
if config == { } then
|
unstable.legacyPackages.${system}
|
||||||
unstable.legacyPackages.${system}
|
else
|
||||||
else
|
import unstable { inherit system config; };
|
||||||
import unstable { inherit system config; };
|
in
|
||||||
in
|
lib.mapAttrs (name: value: if needsSystem name then { ${system} = value pkgs; } else value) outputs
|
||||||
lib.mapAttrs (name: value: if needsSystem name then { ${system} = value pkgs; } else value) outputs
|
) [ "x86_64-linux" ]
|
||||||
)
|
|
||||||
[ "x86_64-linux" ]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
mkHosts =
|
mkHosts =
|
||||||
|
|
@ -101,12 +97,10 @@ rec {
|
||||||
mkDisko =
|
mkDisko =
|
||||||
names:
|
names:
|
||||||
lib.listToAttrs (
|
lib.listToAttrs (
|
||||||
map
|
map (name: {
|
||||||
(name: {
|
name = "disko-${name}";
|
||||||
name = "disko-${name}";
|
value.disko.devices = import "${self}/disko/${name}.nix" lib;
|
||||||
value.disko.devices = import "${self}/disko/${name}.nix" lib;
|
}) names
|
||||||
})
|
|
||||||
names
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/* /<name> -> packages named by directory
|
/* /<name> -> packages named by directory
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
inputs:
|
inputs:
|
||||||
{ lib, config, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
#
|
#
|
||||||
# Flake registry and $NIX_PATH pinning
|
# Flake registry and $NIX_PATH pinning
|
||||||
|
|
@ -10,13 +15,10 @@ inputs:
|
||||||
(x: x // { nixpkgs.flake = inputs.unstable; })
|
(x: x // { nixpkgs.flake = inputs.unstable; })
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.etc =
|
environment.etc = lib.mapAttrs' (name: value: {
|
||||||
lib.mapAttrs'
|
name = "nix/path/${name}";
|
||||||
(name: value: {
|
value.source = value.flake;
|
||||||
name = "nix/path/${name}";
|
}) config.nix.registry;
|
||||||
value.source = value.flake;
|
|
||||||
})
|
|
||||||
config.nix.registry;
|
|
||||||
nix.nixPath = [ "/etc/nix/path" ];
|
nix.nixPath = [ "/etc/nix/path" ];
|
||||||
#
|
#
|
||||||
# Ignore global registry
|
# Ignore global registry
|
||||||
|
|
@ -25,7 +27,14 @@ inputs:
|
||||||
#
|
#
|
||||||
# Use nix directly from master
|
# 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
|
# Other nix settings
|
||||||
#
|
#
|
||||||
|
|
@ -56,6 +65,10 @@ inputs:
|
||||||
allowed-users = [ "@wheel" ];
|
allowed-users = [ "@wheel" ];
|
||||||
use-xdg-base-directories = true;
|
use-xdg-base-directories = true;
|
||||||
auto-allocate-uids = true;
|
auto-allocate-uids = true;
|
||||||
|
#
|
||||||
|
# A option for the custom patch
|
||||||
|
#
|
||||||
|
reject-flake-config = true;
|
||||||
};
|
};
|
||||||
#_file
|
#_file
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,50 +5,48 @@
|
||||||
jre,
|
jre,
|
||||||
makeBinaryWrapper,
|
makeBinaryWrapper,
|
||||||
}:
|
}:
|
||||||
stdenvNoCC.mkDerivation (
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
finalAttrs: {
|
pname = "papermc";
|
||||||
pname = "papermc";
|
|
||||||
|
|
||||||
version = "1.20.1.83";
|
version = "1.20.1.83";
|
||||||
|
|
||||||
src =
|
src =
|
||||||
let
|
let
|
||||||
mcVersion = lib.versions.pad 3 finalAttrs.version;
|
mcVersion = lib.versions.pad 3 finalAttrs.version;
|
||||||
buildNum = builtins.elemAt (lib.splitVersion finalAttrs.version) 3;
|
buildNum = builtins.elemAt (lib.splitVersion finalAttrs.version) 3;
|
||||||
in
|
in
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = "https://papermc.io/api/v2/projects/paper/versions/${mcVersion}/builds/${buildNum}/downloads/paper-${mcVersion}-${buildNum}.jar";
|
url = "https://papermc.io/api/v2/projects/paper/versions/${mcVersion}/builds/${buildNum}/downloads/paper-${mcVersion}-${buildNum}.jar";
|
||||||
hash = "sha256-HQpc3MOXa1wkXqgm9ciQj04FUIyuupnYiu+2RZ/sXE4=";
|
hash = "sha256-HQpc3MOXa1wkXqgm9ciQj04FUIyuupnYiu+2RZ/sXE4=";
|
||||||
};
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
install -D $src $out/share/papermc/papermc.jar
|
|
||||||
|
|
||||||
makeWrapper ${lib.getExe jre} "$out/bin/minecraft-server" \
|
|
||||||
--append-flags "-jar $out/share/papermc/papermc.jar nogui"
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
|
||||||
|
|
||||||
dontUnpack = true;
|
|
||||||
preferLocalBuild = true;
|
|
||||||
allowSubstitutes = false;
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "High-performance Minecraft Server";
|
|
||||||
homepage = "https://papermc.io/";
|
|
||||||
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
||||||
license = lib.licenses.gpl3Only;
|
|
||||||
platforms = lib.platforms.unix;
|
|
||||||
maintainers = with lib.maintainers; [
|
|
||||||
aaronjanse
|
|
||||||
neonfuz
|
|
||||||
];
|
|
||||||
mainProgram = "minecraft-server";
|
|
||||||
};
|
};
|
||||||
}
|
|
||||||
)
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
install -D $src $out/share/papermc/papermc.jar
|
||||||
|
|
||||||
|
makeWrapper ${lib.getExe jre} "$out/bin/minecraft-server" \
|
||||||
|
--append-flags "-jar $out/share/papermc/papermc.jar nogui"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "High-performance Minecraft Server";
|
||||||
|
homepage = "https://papermc.io/";
|
||||||
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
||||||
|
license = lib.licenses.gpl3Only;
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
maintainers = with lib.maintainers; [
|
||||||
|
aaronjanse
|
||||||
|
neonfuz
|
||||||
|
];
|
||||||
|
mainProgram = "minecraft-server";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue