From 01e53db037121accb4603f3524d0d06fb33c64fd Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Mon, 11 Nov 2024 19:03:13 -0800 Subject: [PATCH] beatific: factor out inline modules --- flake.nix | 15 ++------------- modules/tf2-gperftools.nix | 7 +++++++ modules/unstable-vscode.nix | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 modules/tf2-gperftools.nix create mode 100644 modules/unstable-vscode.nix diff --git a/flake.nix b/flake.nix index 44bded9..a7c9c4f 100644 --- a/flake.nix +++ b/flake.nix @@ -29,19 +29,8 @@ }@inputs: { nixosModules = { beatific = import ./modules/beatific.nix; - tf2-gperftools = ({ ... }: { - environment.systemPackages = [ nixpkgs-2405.legacyPackages."i686-linux".gperftools ]; - }); - unstable-vscode = ({ ... }: let - pkgs = import nixpkgs-unstable { system = "x86_64-linux"; config.allowUnfree = true; }; - in { - virtualisation.docker.enable = true; - environment.systemPackages = [ - pkgs.distrobox - pkgs.vscode - pkgs.icu - ]; - }); + tf2-gperftools = import ./modules/tf2-gperftools.nix { inherit inputs; }; + unstable-vscode = import ./modules/unstable-vscode.nix { inherit inputs; }; }; nixosConfigurations = { diff --git a/modules/tf2-gperftools.nix b/modules/tf2-gperftools.nix new file mode 100644 index 0000000..1817b39 --- /dev/null +++ b/modules/tf2-gperftools.nix @@ -0,0 +1,7 @@ +# Flake inputs +{ inputs, ... }: +# Module inputs +{ ... }: +{ + environment.systemPackages = [ inputs.nixpkgs-2405.legacyPackages."i686-linux".gperftools ]; +} diff --git a/modules/unstable-vscode.nix b/modules/unstable-vscode.nix new file mode 100644 index 0000000..ab7539c --- /dev/null +++ b/modules/unstable-vscode.nix @@ -0,0 +1,14 @@ +# Flake inputs +{ inputs, ... }: +# Module inputs +{ ... }: +let + pkgs = import inputs.nixpkgs-unstable { system = "x86_64-linux"; config.allowUnfree = true; }; +in { + virtualisation.docker.enable = true; + environment.systemPackages = [ + pkgs.distrobox + pkgs.vscode + pkgs.icu + ]; +}