From 6617953da44d26cf4cd2f7e392cf168c1a9960aa Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Sun, 26 Nov 2023 16:47:09 -0700 Subject: [PATCH] Include bootstrap and gimp. --- flake.lock | 87 +++++++++++++++++++++++++++++++++++++++++++- flake.nix | 52 ++++++++++++++------------ jrpotter/default.nix | 4 +- 3 files changed, 118 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index 842770c..ba45bfa 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,58 @@ { "nodes": { + "bootstrap": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1701031747, + "narHash": "sha256-4pPmZdvHAmze52z7ftXp2aJYunb5+LPrBRXIOU92RoQ=", + "owner": "jrpotter", + "repo": "bootstrap", + "rev": "ecf4f23589123e2f2ebb5b4c3ca3d1a705791c00", + "type": "github" + }, + "original": { + "owner": "jrpotter", + "ref": "v0.1.0", + "repo": "bootstrap", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -22,6 +75,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1700390070, + "narHash": "sha256-de9KYi8rSJpqvBfNwscWdalIJXPo8NjdIZcEJum1mH0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e4ad989506ec7d71f7302cc3067abd82730a4beb", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1699596684, "narHash": "sha256-XSXP8zjBZJBVvpNb2WmY0eW8O2ce+sVyj1T0/iBRIvg=", @@ -39,8 +108,24 @@ }, "root": { "inputs": { + "bootstrap": "bootstrap", "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 32420df..528d602 100644 --- a/flake.nix +++ b/flake.nix @@ -2,35 +2,41 @@ description = "NixOS Flake"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + bootstrap.url = "github:jrpotter/bootstrap/v0.1.0"; home-manager = { url = "github:nix-community/home-manager/release-23.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; }; - outputs = { self, nixpkgs, home-manager, ... }: { - # Used with `nixos-rebuild --flake .#` - # nixosConfigurations."".config.system.build.toplevel must be a derivation - nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { + outputs = { self, nixpkgs, home-manager, bootstrap, ... }: + let system = "x86_64-linux"; - - # Used to pass non-default parameters to submodules. - # specialArgs = {...}; - - # Modules can be attribute sets or a function that returns an attribute set. - # https://nixos-and-flakes.thiscute.world/nixos-with-flakes/nixos-with-flakes-enabled - modules = [ - ./configuration.nix - home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users.jrpotter = import ./jrpotter; - }; - } - ]; + in + { + # Used with `nixos-rebuild --flake .#` + # nixosConfigurations."".config.system.build.toplevel must be a derivation + nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { + inherit system; + # Modules can be attribute sets or a function that returns an attribute set. + # https://nixos-and-flakes.thiscute.world/nixos-with-flakes/nixos-with-flakes-enabled + modules = [ + ./configuration.nix + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.jrpotter = import ./jrpotter; + # Used to pass non-default parameters to submodules. + extraSpecialArgs = { + inherit system; + bootstrap = bootstrap.packages.${system}.default; + }; + }; + } + ]; + }; }; - }; } diff --git a/jrpotter/default.nix b/jrpotter/default.nix index 03457a3..b136649 100644 --- a/jrpotter/default.nix +++ b/jrpotter/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, bootstrap, ... }: { imports = [ ./git.nix @@ -21,7 +21,9 @@ packages = with pkgs; [ anki-bin bitwarden + bootstrap firefox + gimp mullvad-vpn unzip wezterm