From ed4b8cde7651c0760ffb32b08f1931693af8ab30 Mon Sep 17 00:00:00 2001 From: Ryan Butler Date: Sun, 17 Nov 2024 21:51:13 -0500 Subject: [PATCH] Introduce NixOS and devShells (#19) * initial functional flake with inputs and s * added devshell and nixos config * Fixed nixos config (probably) * Nix config finally works * set up deploy-rs * added nix fmt to CI * added nix build to CI --- .envrc.example | 1 + .github/workflows/ci.yaml | 7 + .github/workflows/nix.yaml | 36 +++ .gitignore | 11 +- flake.lock | 281 ++++++++++++++++++ flake.nix | 76 +++++ nix/deploy-rs.nix | 20 ++ nix/devShells.nix | 29 ++ nix/inputs.nix | 15 + nix/nixos/home.nix | 38 +++ nix/nixos/nixosConfigurations.nix | 60 ++++ nix/nixos/servers-us-east-1/configuration.nix | 118 ++++++++ nix/overlays/nixpkgs-unstable.nix | 7 + 13 files changed, 697 insertions(+), 2 deletions(-) create mode 100644 .envrc.example create mode 100644 .github/workflows/nix.yaml create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 nix/deploy-rs.nix create mode 100644 nix/devShells.nix create mode 100644 nix/inputs.nix create mode 100644 nix/nixos/home.nix create mode 100644 nix/nixos/nixosConfigurations.nix create mode 100644 nix/nixos/servers-us-east-1/configuration.nix create mode 100644 nix/overlays/nixpkgs-unstable.nix diff --git a/.envrc.example b/.envrc.example new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc.example @@ -0,0 +1 @@ +use flake diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ea4e192..2ac90a1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,6 +45,13 @@ jobs: with: cargo-profile: ${{ needs.check-inputs.outputs.cargo-profile }} + nix: + name: Nix + needs: check-inputs + uses: ./.github/workflows/nix.yaml + with: + deploy: ${{ needs.check-inputs.outputs.is-default-branch == 'true' }} + container: name: Container needs: [rust, check-inputs] diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml new file mode 100644 index 0000000..ff8baf1 --- /dev/null +++ b/.github/workflows/nix.yaml @@ -0,0 +1,36 @@ +name: Nix CI +on: + workflow_call: + inputs: + deploy: + required: true + type: boolean + +jobs: + fmt: + name: Check Nix Formatting + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v30 + - uses: cachix/cachix-action@v15 + with: + name: nexus-ci + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - run: nix develop -c nixpkgs-fmt --check . + + build: + name: Build NixOS config + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v30 + - uses: cachix/cachix-action@v15 + with: + name: nexus-ci + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Build NixOS machines + run: | + nix build .#nixosConfigurations.servers-us-east-1.config.formats.linode + - name: Run Flake Checks + run: nix flake check diff --git a/.gitignore b/.gitignore index 6daec49..db6c2a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,22 @@ +# Editor stuff /.idea /.vscode +*.swp + +# Build artifacts /target **/artifacts .intentionally-empty-file.o -*.swp +# Macos BS .DS_Store -# For local development +# Nix stuff .direnv .envrc +result + +# For local development my-config.toml # SQLite diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c83970f --- /dev/null +++ b/flake.lock @@ -0,0 +1,281 @@ +{ + "nodes": { + "deploy-rs": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs-unstable" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1727447169, + "narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=", + "owner": "serokell", + "repo": "deploy-rs", + "rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76", + "type": "github" + }, + "original": { + "owner": "serokell", + "repo": "deploy-rs", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1731738660, + "narHash": "sha256-tIXhc9lX1b030v812yVJanSR37OnpTb/OY5rU3TbShA=", + "owner": "nix-community", + "repo": "fenix", + "rev": "e10ba121773f754a30d31b6163919a3e404a434f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixos-unstable" + ] + }, + "locked": { + "lastModified": 1731786860, + "narHash": "sha256-130gQ5k8kZlxjBEeLpE+SvWFgSOFgQFeZlqIik7KgtQ=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "1bd5616e33c0c54d7a5b37db94160635a9b27aeb", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixlib": { + "locked": { + "lastModified": 1731200463, + "narHash": "sha256-qDaAweJjdFbVExqs8aG27urUgcgKufkIngHW3Rzustg=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e04234d263750db01c78a412690363dc2226e68a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixos-24_05": { + "locked": { + "lastModified": 1731652201, + "narHash": "sha256-XUO0JKP1hlww0d7mm3kpmIr4hhtR4zicg5Wwes9cPMg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c21b77913ea840f8bcf9adf4c41cecc2abffd38d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixos-generators": { + "inputs": { + "nixlib": "nixlib", + "nixpkgs": [ + "nixos-unstable" + ] + }, + "locked": { + "lastModified": 1731546190, + "narHash": "sha256-kJix8nLyFIJ3EC7VtoXK/85C4ZN2dC5oWoS8+ErehqI=", + "owner": "nix-community", + "repo": "nixos-generators", + "rev": "06ffce1a8d95e95c06a4bcfa117dd960b14a7101", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-generators", + "type": "github" + } + }, + "nixos-unstable": { + "locked": { + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-24_05-darwin": { + "locked": { + "lastModified": 1730891215, + "narHash": "sha256-i85DPrhDuvzgvIWCpJlbfM2UFtNYbapo20MtQXsvay4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c128e44a249d6180740d0a979b6480d5b795c013", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-24.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1731731112, + "narHash": "sha256-nAlsuFVl77/sioOE3ce7ukm8iC+DmhakoYsDQfcbpLY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "34a626458d686f1b58139620a8b2793e9e123bba", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "deploy-rs": "deploy-rs", + "fenix": "fenix", + "flake-utils": "flake-utils", + "home-manager": "home-manager", + "nixos-24_05": "nixos-24_05", + "nixos-generators": "nixos-generators", + "nixos-unstable": "nixos-unstable", + "nixpkgs-24_05-darwin": "nixpkgs-24_05-darwin", + "nixpkgs-unstable": "nixpkgs-unstable" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1731693936, + "narHash": "sha256-uHUUS1WPyW6ohp5Bt3dAZczUlQ22vOn7YZF8vaPKIEw=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "1b90e979aeee8d1db7fe14603a00834052505497", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3d74a23 --- /dev/null +++ b/flake.nix @@ -0,0 +1,76 @@ +{ + description = "NexusSocial/identity repo"; + + inputs = { + flake-utils.url = "github:numtide/flake-utils"; + + # Linux + nixos-24_05.url = "github:NixOS/nixpkgs/nixos-24.05"; + nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixos-generators = { + url = "github:nix-community/nixos-generators"; + inputs.nixpkgs.follows = "nixos-unstable"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixos-unstable"; + }; + + #Darwin + nixpkgs-24_05-darwin.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + + # For accessing `deploy-rs`'s utility Nix functions + deploy-rs = { + url = "github:serokell/deploy-rs"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + }; + + outputs = inputs-raw@{ flake-utils, ... }: + let + # All systems we may care about evaluating nixpkgs for + systems = with flake-utils.lib.system; [ x86_64-linux aarch64-linux aarch64-darwin x86_64-darwin ]; + perSystem = (system: rec { + inputs = import ./nix/inputs.nix { inherit inputs-raw system; }; + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ + ((import nix/overlays/nixpkgs-unstable.nix) { inherit inputs; }) + ]; + config = { + # allowUnfree = true; + }; + }; + }); + # This `s` helper variable caches each system we care about in one spot + inherit (flake-utils.lib.eachSystem systems (system: { s = perSystem system; })) s; + in + # System-specific stuff goes in here, by using the flake-utils helper functions + flake-utils.lib.eachSystem systems + (system: + let + inherit (s.${system}) pkgs inputs; + in + { + devShells = import ./nix/devShells.nix { inherit system pkgs inputs; }; + packages = { + deploy-rs = inputs.deploy-rs.packages.${system}.deploy-rs; + }; + formatter = pkgs.nixpkgs-fmt; + } + ) + # Next, concatenate deploy-rs stuff to the flake + // import ./nix/deploy-rs.nix { + inputs = s."x86_64-linux".inputs; + } + # Concatenate NixOS stuff + // { + nixosConfigurations = import ./nix/nixos/nixosConfigurations.nix { inherit s; }; + }; +} diff --git a/nix/deploy-rs.nix b/nix/deploy-rs.nix new file mode 100644 index 0000000..ece9108 --- /dev/null +++ b/nix/deploy-rs.nix @@ -0,0 +1,20 @@ +{ inputs }: { + deploy = { + nodes.servers-us-east-1 = { + hostname = "servers-us-east-1.socialvr.net"; + profiles.system = { + user = "root"; # The user to deploy to, not necessarily the same as the SSH user. + path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.servers-us-east-1; + }; + }; + sshUser = "admin"; + + # Timeout for profile activation. + activationTimeout = 240; + # Timeout for profile activation confirmation. + confirmTimeout = 30; + }; + + # This is highly advised by deploy-rs, and will prevent many possible mistakes + checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib; +} diff --git a/nix/devShells.nix b/nix/devShells.nix new file mode 100644 index 0000000..42eb250 --- /dev/null +++ b/nix/devShells.nix @@ -0,0 +1,29 @@ +# Defines all devShells for the flake +{ system, pkgs, inputs }: +let + inherit (inputs) fenix; + rustToolchain = fenix.packages.${system}.fromToolchainFile { + file = ../rust-toolchain.toml; + sha256 = "sha256-yMuSb5eQPO/bHv+Bcf/US8LVMbf/G/0MSfiPwBhiPpk="; + }; + rustPlatform = pkgs.makeRustPlatform { + inherit (rustToolchain) cargo rustc; + }; +in +{ + default = pkgs.mkShell { + # These programs be available to the dev shell + buildInputs = (with pkgs; [ + nixpkgs-fmt + ]) ++ [ + rustToolchain + rustPlatform.bindgenHook + # fenix.packages.${system}.rust-analyzer + ]; + + # Hook the shell to set custom env vars + shellHook = '' + # FOOBAR=1 + ''; + }; +} diff --git a/nix/inputs.nix b/nix/inputs.nix new file mode 100644 index 0000000..5cbf21e --- /dev/null +++ b/nix/inputs.nix @@ -0,0 +1,15 @@ +# Maps to the appropriate flake inputs based on the `system`. +{ inputs-raw, system }: +let + isDarwin = (system == "aarch64-darwin" || system == "x86_64-darwin"); +in +{ + self = inputs-raw.self; + nixpkgs = if isDarwin then inputs-raw.nixpkgs-24_05-darwin else inputs-raw.nixos-unstable; + nixpkgs-unstable = if isDarwin then inputs-raw.nixpkgs-unstable else inputs-raw.nixos-unstable; + # fenix = if isDarwin then inputs-raw.fenix-darwin else inputs-raw.fenix-linux; + fenix = inputs-raw.fenix; + nixos-generators = inputs-raw.nixos-generators; + home-manager = inputs-raw.home-manager; + deploy-rs = inputs-raw.deploy-rs; +} diff --git a/nix/nixos/home.nix b/nix/nixos/home.nix new file mode 100644 index 0000000..22471aa --- /dev/null +++ b/nix/nixos/home.nix @@ -0,0 +1,38 @@ +# This is your home-manager configuration file +# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix) +{ inputs +, username +, lib +, config +, pkgs +, ... +}: { + # You can import other home-manager modules here + imports = [ + # If you want to use home-manager modules from other flakes (such as nix-colors): + # inputs.nix-colors.homeManagerModule + + # You can also split up your configuration and import pieces of it here: + # ./nvim.nix + ]; + + # TODO: Set your username + home = { + inherit username; + homeDirectory = "/home/${username}"; + }; + + # Add stuff for your user as you see fit: + # programs.neovim.enable = true; + # home.packages = with pkgs; [ steam ]; + + # Enable home-manager and git + programs.home-manager.enable = true; + programs.git.enable = true; + + # Nicely reload system units when changing configs + systemd.user.startServices = "sd-switch"; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + home.stateVersion = "24.05"; +} diff --git a/nix/nixos/nixosConfigurations.nix b/nix/nixos/nixosConfigurations.nix new file mode 100644 index 0000000..bc56bc4 --- /dev/null +++ b/nix/nixos/nixosConfigurations.nix @@ -0,0 +1,60 @@ +# Defines all nixosConfigurations for the flake +{ s }: +let + nixosConfig = + { hostname + , username + , system + , nixosConfigFile + , homeConfigFile + }: + let + inherit (s.${system}) pkgs inputs; + in + inputs.nixpkgs-unstable.lib.nixosSystem + rec { + inherit system; + specialArgs = { + inherit inputs hostname username pkgs; modulesPath = "${inputs.nixpkgs-unstable}/nixos/modules"; + }; + modules = [ + # See https://github.com/nix-community/nixos-generators/blob/06ffce1a/README.md#using-as-a-nixos-module + inputs.nixos-generators.nixosModules.all-formats + { + + formatConfigs.linode = { config, ... }: { + # set disk size to to 20G + virtualisation.diskSize = 1 * 1024; + }; + + + } + nixosConfigFile + # setup home-manager + inputs.home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + # include the home-manager module + users.${username} = import homeConfigFile; + extraSpecialArgs = rec { + inherit username pkgs; + }; + }; + # https://github.com/nix-community/home-manager/issues/4026 + # users.users.${username}.home = s.${system}.pkgs.lib.mkForce "/Users/${username}"; + } + ]; + }; +in +{ + "servers-us-east-1" = nixosConfig + { + hostname = "servers-us-east-1"; + username = "admin"; + system = "x86_64-linux"; + nixosConfigFile = ./servers-us-east-1/configuration.nix; + homeConfigFile = ./home.nix; + }; +} diff --git a/nix/nixos/servers-us-east-1/configuration.nix b/nix/nixos/servers-us-east-1/configuration.nix new file mode 100644 index 0000000..a115dcc --- /dev/null +++ b/nix/nixos/servers-us-east-1/configuration.nix @@ -0,0 +1,118 @@ +# This is your system's configuration file. +# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) +{ inputs +, hostname +, username +, lib +, config +, pkgs +, ... +}: { + # You can import other NixOS modules here + imports = [ ]; + + # BEGIN Recommendations from the linode article + boot.loader.grub.forceInstall = true; + boot.loader.grub.device = "nodev"; + boot.loader.timeout = 10; + + # Enables linode's LISH support + boot.kernelParams = [ "console=ttyS0,19200n8" ]; + boot.loader.grub.extraConfig = '' + serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1; + terminal_input serial; + terminal_output serial + ''; + + networking = { + usePredictableInterfaceNames = false; + useDHCP = false; # Disable DHCP globally as we will not need it. + # required for ssh? + interfaces.eth0.useDHCP = true; + }; + + fileSystems."/" = + { + device = "/dev/sda"; + fsType = "ext4"; + }; + + swapDevices = + [{ device = "/dev/sdb"; }]; + # END + + nixpkgs.flake = { + setFlakeRegistry = true; + setNixPath = true; + }; + + nix = + let + flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; + in + { + settings = { + # Enable flakes and new 'nix' command + experimental-features = "nix-command flakes"; + # Opinionated: disable global registry + flake-registry = ""; + # Workaround for https://github.com/NixOS/nix/issues/9574 + nix-path = config.nix.nixPath; + }; + # Opinionated: disable channels + channel.enable = false; + + # Opinionated: make flake registry and nix path match flake inputs + registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; + nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; + }; + + networking.hostName = hostname; + + users.groups = { + plugdev = { }; + }; + users.users = { + ${username} = { + isNormalUser = true; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBLmHbuCMFpOKYvzMOpTOF+iMX9rrY6Y0naarcbWUV8G ryan@ryan-laptop" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL6iX+gVgpmt5qj+VPTtk/SlAjlZTOXH2Ysdao0MLfNS ci@NexusSocial/identity" + ]; + # TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc) + extraGroups = [ + "wheel" + ]; + }; + }; + users.mutableUsers = false; + security.sudo.wheelNeedsPassword = false; # TODO: Change to true once satisfied with config + + # This setups a SSH server. Very important if you're setting up a headless system. + # Feel free to remove if you don't need it. + services.openssh = { + enable = true; + settings = { + # Opinionated: forbid root login through SSH. + # PermitRootLogin = "no"; # didnt work with nixos-generators + # Opinionated: use keys only. + # Remove if you want to SSH using passwords + PasswordAuthentication = false; + }; + }; + + + environment.systemPackages = with pkgs; [ + neovim + ripgrep + + # Recommended by https://www.linode.com/docs/guides/install-nixos-on-linode/#install-diagnostic-tools + inetutils + mtr + sysstat + + ]; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + system.stateVersion = "24.05"; +} diff --git a/nix/overlays/nixpkgs-unstable.nix b/nix/overlays/nixpkgs-unstable.nix new file mode 100644 index 0000000..f2a8ef1 --- /dev/null +++ b/nix/overlays/nixpkgs-unstable.nix @@ -0,0 +1,7 @@ +{ inputs, ... }: +final: _prev: { + unstable = import inputs.nixpkgs-unstable { + system = final.system; + config = final.config; + }; +}