From 183b98a728c35c698f460e82151f1ddacdf929ea Mon Sep 17 00:00:00 2001 From: winston Date: Mon, 16 Sep 2024 16:56:18 +0200 Subject: [PATCH] chore: clean up flake inputs --- config/services/atuin.nix | 7 +++- flake.lock | 67 ++++++++++----------------------------- flake.nix | 36 ++++++++++----------- 3 files changed, 40 insertions(+), 70 deletions(-) diff --git a/config/services/atuin.nix b/config/services/atuin.nix index d9ada7f..eb711e0 100644 --- a/config/services/atuin.nix +++ b/config/services/atuin.nix @@ -1,6 +1,11 @@ -{config, ...}: { +{ + config, + pkgs, + ... +}: { services.atuin = { enable = true; + package = pkgs.unstable.atuin; openRegistration = false; maxHistoryLength = 1024 * 16; port = 43473; diff --git a/flake.lock b/flake.lock index 704fdf6..30881b4 100644 --- a/flake.lock +++ b/flake.lock @@ -174,26 +174,6 @@ "type": "github" } }, - "nixinate": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1708891350, - "narHash": "sha256-VOQrKK7Df/IVuNki+NshVuGkTa/Tw0GigPjWcZff6kk=", - "owner": "matthewcroughan", - "repo": "nixinate", - "rev": "452f33c60df5b72ad0858f5f2cf224bdf1f17746", - "type": "github" - }, - "original": { - "owner": "matthewcroughan", - "repo": "nixinate", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1725001927, @@ -258,11 +238,11 @@ "flake-parts": "flake-parts_2", "flake-utils": "flake-utils", "home-manager": "home-manager", - "nixinate": "nixinate", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "pre-commit-hooks": "pre-commit-hooks", "satisfactory-server": "satisfactory-server", + "steam-fetcher": "steam-fetcher", "valheim-server": "valheim-server" } }, @@ -271,44 +251,27 @@ "nixpkgs": [ "nixpkgs" ], - "steam-fetcher": "steam-fetcher" + "steam-fetcher": [ + "steam-fetcher" + ] }, "locked": { - "lastModified": 1726069190, - "narHash": "sha256-UYnjgHSIjxdbRBxpVwvQ5IX5TVfRmgVZsGvwvRHeuPc=", - "path": "/home/winston/satisfactory-flake", - "type": "path" + "lastModified": 1726272490, + "narHash": "sha256-gpbldF84vR73LevX+PuYFRDXuoQBiR8mRDtuSfqvAU4=", + "owner": "nekowinston", + "repo": "satisfactory-server-flake", + "rev": "1b2cb3e067fad90576926df4f3d94ccc206e3225", + "type": "github" }, "original": { - "path": "/home/winston/satisfactory-flake", - "type": "path" + "owner": "nekowinston", + "repo": "satisfactory-server-flake", + "type": "github" } }, "steam-fetcher": { "inputs": { "nixpkgs": [ - "satisfactory-server", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1714795926, - "narHash": "sha256-PkgC9jqoN6cJ8XYzTA2PlrWs7aPJkM3BGiTxNqax0cA=", - "owner": "nix-community", - "repo": "steam-fetcher", - "rev": "12f66eafb7862d91b3e30c14035f96a21941bd9c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "steam-fetcher", - "type": "github" - } - }, - "steam-fetcher_2": { - "inputs": { - "nixpkgs": [ - "valheim-server", "nixpkgs" ] }, @@ -361,7 +324,9 @@ "nixpkgs": [ "nixpkgs" ], - "steam-fetcher": "steam-fetcher_2" + "steam-fetcher": [ + "steam-fetcher" + ] }, "locked": { "lastModified": 1724824251, diff --git a/flake.nix b/flake.nix index 4ec50a3..fbe5f19 100644 --- a/flake.nix +++ b/flake.nix @@ -1,24 +1,23 @@ { outputs = { flake-parts, - self, + nixpkgs, + nixpkgs-unstable, ... } @ inputs: let overlays = [ - (final: _: rec { - atuin = unstable.atuin; + (final: _: { + unstable = nixpkgs-unstable.legacyPackages.${final.system}; prometheus-fail2ban-exporter = final.callPackage ./pkgs/prometheus-fail2ban-exporter {}; - unstable = inputs.nixpkgs-unstable.legacyPackages.${final.system}; }) ]; in flake-parts.lib.mkFlake {inherit inputs;} { flake = { - nixosConfigurations.main-node = inputs.nixpkgs.lib.nixosSystem { + nixosConfigurations.main-node = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ { - _module.args.nixinate.host = "main-node"; nixpkgs = { config.allowUnfree = true; inherit overlays; @@ -30,8 +29,8 @@ inputs.agenix.nixosModules.default inputs.attic.nixosModules.atticd inputs.home-manager.nixosModules.home-manager - inputs.valheim-server.nixosModules.default inputs.satisfactory-server.nixosModules.default + inputs.valheim-server.nixosModules.default ]; specialArgs = {inherit inputs;}; }; @@ -45,12 +44,10 @@ system, ... }: { - _module.args.pkgs = import inputs.nixpkgs { + _module.args.pkgs = import nixpkgs { inherit overlays system; }; - apps = (inputs.nixinate.nixinate.${system} self).nixinate; - pre-commit = { check.enable = true; settings.excludes = ["_sources/"]; @@ -109,24 +106,27 @@ inputs.flake-compat.follows = ""; inputs.flake-utils.follows = "flake-utils"; }; - nixinate = { - url = "github:matthewcroughan/nixinate"; - inputs.nixpkgs.follows = "nixpkgs"; - }; pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs.flake-compat.follows = ""; inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs-stable.follows = "nixpkgs"; }; - valheim-server = { - url = "github:aidalgol/valheim-server-flake"; + + # game servers + steam-fetcher = { + url = "github:nix-community/steam-fetcher"; inputs.nixpkgs.follows = "nixpkgs"; }; satisfactory-server = { - # url = "github:nekowinston/satisfactory-server-flake"; - url = "path:/home/winston/satisfactory-flake"; + url = "github:nekowinston/satisfactory-server-flake"; inputs.nixpkgs.follows = "nixpkgs"; + inputs.steam-fetcher.follows = "steam-fetcher"; + }; + valheim-server = { + url = "github:aidalgol/valheim-server-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.steam-fetcher.follows = "steam-fetcher"; }; };