flake: update flake
This commit is contained in:
@@ -26,11 +26,6 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-gaming = {
|
||||
url = "github:fufexan/nix-gaming";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixpkgs-xr = {
|
||||
url = "github:nix-community/nixpkgs-xr";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -104,8 +99,56 @@
|
||||
trusted-users-configuration = { nix, config, ... }: {
|
||||
nix.settings.trusted-users = [ config.users.users.frank.name ];
|
||||
};
|
||||
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
|
||||
packagesFor =
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
nixpkgs.lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
heidisql = pkgs.callPackage ./packages/heidisql/package.nix { };
|
||||
aseprite-thumbnailer-kde = pkgs.callPackage ./packages/aseprite-thumbnailer-kde/package.nix { };
|
||||
};
|
||||
|
||||
formatterFor =
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
pkgs.writeShellApplication {
|
||||
name = "nixfmt";
|
||||
runtimeInputs = [ pkgs.nixfmt ];
|
||||
text = ''
|
||||
flags=()
|
||||
paths=()
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
-*) flags+=("$arg") ;;
|
||||
*) paths+=("$arg") ;;
|
||||
esac
|
||||
done
|
||||
if [ "''${#paths[@]}" -eq 0 ]; then
|
||||
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||
mapfile -t paths < <(git ls-files '*.nix')
|
||||
else
|
||||
mapfile -t paths < <(find . -name '*.nix' -not -path './.devenv/*')
|
||||
fi
|
||||
fi
|
||||
nixfmt "''${flags[@]}" "''${paths[@]}"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
packages = forAllSystems packagesFor;
|
||||
|
||||
formatter = forAllSystems formatterFor;
|
||||
nixosConfigurations = {
|
||||
nero = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
|
||||
Reference in New Issue
Block a user