diff --git a/flake.lock b/flake.lock index 0cfdeae..2539955 100644 --- a/flake.lock +++ b/flake.lock @@ -38,10 +38,27 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1678654296, + "narHash": "sha256-aVfw3ThpY7vkUeF1rFy10NAkpKDS2imj3IakrzT0Occ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5a1dc8acd977ff3dccd1328b7c4a6995429a656b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" } }, "utils": { diff --git a/flake.nix b/flake.nix index faa79ea..b88987d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,7 @@ { inputs = { nixpkgs.url = github:NixOS/nixpkgs/nixos-22.11; + nixpkgs-unstable.url = github:NixOS/nixpkgs/nixos-unstable; home-manager = { url = github:nix-community/home-manager/release-22.11; @@ -8,10 +9,22 @@ }; }; - outputs = { self, nixpkgs, home-manager }: + outputs = { self, nixpkgs, nixpkgs-unstable, home-manager }: let user = "mandlm"; theme = "dark"; # dark or light + + nixpkgs-config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + + overlay-unstable = final: prev: { + unstable = import nixpkgs-unstable { + system = "x86_64-linux"; + allowUnfree = true; + }; + }; in { nixosConfigurations = { @@ -25,11 +38,12 @@ home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user theme; }; home-manager.users.${user} = { imports = [ ./home-${user}.nix ]; + nixpkgs.config = nixpkgs-config; + nixpkgs.overlays = [ overlay-unstable ]; }; } ]; @@ -45,7 +59,6 @@ home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user theme; }; home-manager.users.${user} = { @@ -53,6 +66,8 @@ ./home-${user}.nix ./machines/apache/home-${user}.nix ]; + nixpkgs.config = nixpkgs-config; + nixpkgs.overlays = [ overlay-unstable ]; }; } ]; @@ -68,7 +83,6 @@ home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user theme; }; home-manager.users.${user} = { @@ -76,6 +90,8 @@ ./home-${user}.nix ./machines/p330/home-${user}.nix ]; + nixpkgs.config = nixpkgs-config; + nixpkgs.overlays = [ overlay-unstable ]; }; } ]; @@ -91,7 +107,6 @@ home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user theme; }; home-manager.users.${user} = { @@ -99,6 +114,8 @@ ./home-${user}.nix ./machines/yoga/home-${user}.nix ]; + nixpkgs.config = nixpkgs-config; + nixpkgs.overlays = [ overlay-unstable ]; }; } ]; diff --git a/home-manager/neovim/default.nix b/home-manager/neovim/default.nix index 958786c..ff6f38c 100644 --- a/home-manager/neovim/default.nix +++ b/home-manager/neovim/default.nix @@ -45,7 +45,7 @@ let }; in { - home.packages = with pkgs; [ + home.packages = with pkgs.unstable; [ xclip # language servers @@ -68,7 +68,7 @@ in ]; # symlink for a stable path - home.file.".vscode-extensions/vscode-lldb".source = pkgs.vscode-extensions.vadimcn.vscode-lldb; + home.file.".vscode-extensions/vscode-lldb".source = pkgs.unstable.vscode-extensions.vadimcn.vscode-lldb; home.sessionVariables = { EDITOR = "nvim"; @@ -77,7 +77,8 @@ in programs = { neovim = { enable = true; - plugins = with pkgs.vimPlugins; [ + # package = pkgs.unstable.neovim; + plugins = with pkgs.unstable.vimPlugins; [ # theme nvim-solarized-lua