[feat] flake: prepare for 24.05

We add an `unstable` overlay (available through `pkgs.unstable`) and pin
nixpkgs to the `nixos-24.05` branch. Neovim is still kept in unstable (I
want to live in the bleeding edge c:).
This commit is contained in:
Jalil David Salamé Messina 2024-06-01 16:24:05 +02:00
parent 3d703f40df
commit 1da87b1153
Signed by: jalil
GPG key ID: F016B9E770737A0B
5 changed files with 55 additions and 38 deletions

View file

@ -349,15 +349,16 @@
]
},
"locked": {
"lastModified": 1717097707,
"narHash": "sha256-HC5vJ3oYsjwsCaSbkIPv80e4ebJpNvFKQTBOGlHvjLs=",
"lastModified": 1716736833,
"narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0eb314b4f0ba337e88123e0b1e57ef58346aafd9",
"rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"repo": "home-manager",
"type": "github"
}
@ -438,16 +439,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1716948383,
"narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=",
"lastModified": 1717144377,
"narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ad57eef4ef0659193044870c731987a6df5cf56b",
"rev": "805a384895c696f802a9bf5bf4720f37385df547",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"ref": "nixos-24.05",
"type": "indirect"
}
},
@ -468,7 +469,7 @@
],
"nix-darwin": [],
"nixpkgs": [
"nixpkgs"
"unstable"
],
"treefmt-nix": "treefmt-nix"
},
@ -499,7 +500,8 @@
"nixpkgs": "nixpkgs",
"nixvim": "nixvim",
"stylix": "stylix",
"systems": "systems"
"systems": "systems",
"unstable": "unstable"
}
},
"stylix": {
@ -521,11 +523,11 @@
]
},
"locked": {
"lastModified": 1716800695,
"narHash": "sha256-5ZHVsIg5akOIWImypmQMX/fXZZf3/7tzqJICLteFGZc=",
"lastModified": 1717250350,
"narHash": "sha256-l7y55WbUrj4NVCzgo3GLmM1Z2HC2uLb8dLUt7FxfI5g=",
"owner": "jalil-salame",
"repo": "stylix",
"rev": "036128f2517b1ff7d33d04773f48ea98d680128f",
"rev": "03a8c7744903f29f017fabeda833834bd873f956",
"type": "github"
},
"original": {
@ -570,6 +572,21 @@
"repo": "treefmt-nix",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1716948383,
"narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ad57eef4ef0659193044870c731987a6df5cf56b",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
}
},
"root": "root",

View file

@ -4,7 +4,8 @@
description = "My NixOS configuration";
# Flake inputs
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs.url = "nixpkgs/nixos-24.05";
unstable.url = "nixpkgs/nixos-unstable";
# Software
jpassmenu = {
url = "github:jalil-salame/jpassmenu";
@ -29,10 +30,11 @@
};
# Modules
home-manager = {
url = "github:nix-community/home-manager";
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
# FIXME: pin to 24.05 when avalialble
stylix = {
url = "github:jalil-salame/stylix/enable-option";
inputs = {
@ -43,7 +45,7 @@
nixvim = {
url = "github:nix-community/nixvim";
inputs = {
nixpkgs.follows = "nixpkgs";
nixpkgs.follows = "unstable";
devshell.follows = "devshell";
nix-darwin.follows = ""; # disable MacOS stuff
home-manager.follows = "home-manager";
@ -69,14 +71,13 @@
outputs = {
self,
nixpkgs,
unstable,
stylix,
home-manager,
nixos-hardware,
jpassmenu,
audiomenu,
nixvim,
# neovim-flake,
# neovim-src,
lix,
lix-module,
...
@ -158,10 +159,15 @@
nixvim = nixvim.overlays.default;
jpassmenu = jpassmenu.overlays.default;
audiomenu = audiomenu.overlays.default;
# FIXME: remove once merged in nixpkgs
# neovim-nightly = final: prev: {
# neovim = final.callPackage (neovim-flake + "/flake/packages/neovim.nix") {inherit neovim-src;};
# };
unstable = final: prev: {
inherit
(unstable.legacyPackages.${prev.system})
gitoxide
jujutsu
wezterm
;
unstable = unstable.legacyPackages.${prev.system};
};
};
# Nix files formatter (run `nix fmt`)

View file

@ -17,7 +17,7 @@ in {
(lib.optionalAttrs canSetAsDefault {defaultEditor = lib.mkDefault true;})
(lib.optionalAttrs notStandalone {enable = lib.mkDefault true;})
(lib.mkIf cfg.enable {
# package = pkgs.neovim;
package = pkgs.unstable.neovim-unwrapped;
globals.mapleader = " ";
# Appearance
colorschemes.gruvbox = {
@ -50,12 +50,12 @@ in {
# Enable local configuration :h 'exrc'
exrc = true; # safe since nvim 0.9
};
plugins = import ./plugins.nix {inherit lib pkgs;};
plugins = import ./plugins.nix {inherit lib;};
keymaps = import ./mappings.nix;
inherit (import ./augroups.nix) autoGroups autoCmd;
extraPlugins = let
plugins = pkgs.vimPlugins;
jjdescription = pkgs.callPackage ./vim-jjdescription.nix {};
plugins = pkgs.unstable.vimPlugins;
jjdescription = pkgs.unstable.callPackage ./vim-jjdescription.nix {};
in [
plugins.nui-nvim
plugins.nvim-web-devicons
@ -63,14 +63,12 @@ in {
];
# Formatting
extraPackages = [
pkgs.stylua
pkgs.shfmt
pkgs.taplo
pkgs.yamlfmt
pkgs.nixpkgs-fmt
pkgs.alejandra
pkgs.nixfmt-classic
pkgs.luajitPackages.jsregexp
pkgs.unstable.stylua
pkgs.unstable.shfmt
pkgs.unstable.taplo
pkgs.unstable.yamlfmt
pkgs.unstable.alejandra
pkgs.unstable.luajitPackages.jsregexp
];
extraConfigLuaPre = ''
-- Lua Pre Config

View file

@ -1,7 +1,4 @@
{
lib,
pkgs,
}: {
{lib}: {
bacon = {
enable = true;
settings.quickfix.enabled = true;

View file

@ -22,7 +22,6 @@ in {
./options.nix
./gui
stylix.nixosModules.stylix
# FIXME(https://github.com/danth/stylix/issues/216): Must configure stylix
{stylix = import ./stylix-config.nix {inherit config pkgs;};}
];