From 603fbeec3f9639b007cd8bd6a20f32d4c3eb1b63 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 9 Apr 2025 21:53:27 +0800 Subject: [PATCH] templates/fds-private-config: init --- configs/flake-parts/templates.nix | 4 ++ .../configs/flake-parts/default.nix | 13 ++++++ templates/fds-private-config/flake.nix | 43 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 templates/fds-private-config/configs/flake-parts/default.nix create mode 100644 templates/fds-private-config/flake.nix diff --git a/configs/flake-parts/templates.nix b/configs/flake-parts/templates.nix index 71ed652e..8ce011f7 100644 --- a/configs/flake-parts/templates.nix +++ b/configs/flake-parts/templates.nix @@ -30,5 +30,9 @@ path = ../../templates/local-ruby-nix; description = "Local Ruby app development with ruby-nix"; }; + fds-private-config = { + path = ../../templates/fds-private-config; + description = "Basic template for private Nix environment configuration that uses this flake"; + }; }; } diff --git a/templates/fds-private-config/configs/flake-parts/default.nix b/templates/fds-private-config/configs/flake-parts/default.nix new file mode 100644 index 00000000..3d7c0317 --- /dev/null +++ b/templates/fds-private-config/configs/flake-parts/default.nix @@ -0,0 +1,13 @@ +{ lib, pkgs, ... }: + +{ + # Add all of the environment configurations here or split them up into + # individual modules, whichever you prefer. + setups.nixos.configs = { }; + + setups.home-manager.configs = { }; + + setups.wrapper-manager.configs = { }; + + setups.nixvim.configs = { }; +} diff --git a/templates/fds-private-config/flake.nix b/templates/fds-private-config/flake.nix new file mode 100644 index 00000000..8c675acb --- /dev/null +++ b/templates/fds-private-config/flake.nix @@ -0,0 +1,43 @@ +{ + description = "foodogsquared's private repo"; + + nixConfig = { + extra-substituters = + "https://nix-community.cachix.org https://foo-dogsquared.cachix.org"; + extra-trusted-public-keys = + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= foo-dogsquared.cachix.org-1:/2fmqn/gLGvCs5EDeQmqwtus02TUmGy0ZlAEXqRE70E="; + commit-lockfile-summary = "flake.lock: update inputs"; + }; + + inputs = { + nixpkgs.follows = "nixpkgs-unstable"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + home-manager.follows = "home-manager-unstable"; + home-manager-stable.url = "github:nix-community/home-manager/release-24.05"; + home-manager-stable.inputs.nixpkgs.follows = "nixpkgs"; + home-manager-unstable.url = "github:nix-community/home-manager"; + home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs"; + + # My custom modules. + fds-modules.url = "github:foo-dogsquared/nixos-config"; + + # Make a default.nix compatible stuff. Take note, we're giving this a + # unique suffix since there are other flake inputs that uses the same flake + # and we want our `default.nix` to refer to our version. + flake-compat-fds.url = + "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"; + }; + + outputs = inputs: + inputs.flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ "x86_64-linux" "aarch64-linux" ]; + + imports = [ + inputs.fds-modules.flakeModules.default + inputs.fds-modules.flakeModules.baseSetupsConfig + ./configs/flake-parts + ]; + }; +};