feat: switch from flake-utils to flake-parts
This commit is contained in:
76
flake.lock
generated
76
flake.lock
generated
@@ -132,6 +132,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1772408722,
|
||||||
|
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"neovim-nightly-overlay",
|
"neovim-nightly-overlay",
|
||||||
@@ -152,7 +170,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_2": {
|
"flake-parts_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"stylix",
|
"stylix",
|
||||||
@@ -173,24 +191,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fromYaml": {
|
"fromYaml": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -295,7 +295,7 @@
|
|||||||
},
|
},
|
||||||
"neovim-nightly-overlay": {
|
"neovim-nightly-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts_2",
|
||||||
"neovim-src": "neovim-src",
|
"neovim-src": "neovim-src",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
@@ -361,6 +361,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1772328832,
|
||||||
|
"narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs-master": {
|
"nixpkgs-master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774515149,
|
"lastModified": 1774515149,
|
||||||
@@ -476,7 +491,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"assets": "assets",
|
"assets": "assets",
|
||||||
"flake-utils": "flake-utils",
|
"flake-parts": "flake-parts",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"lanzaboote": "lanzaboote",
|
"lanzaboote": "lanzaboote",
|
||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||||
@@ -516,13 +531,13 @@
|
|||||||
"base16-helix": "base16-helix",
|
"base16-helix": "base16-helix",
|
||||||
"base16-vim": "base16-vim",
|
"base16-vim": "base16-vim",
|
||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_3",
|
||||||
"gnome-shell": "gnome-shell",
|
"gnome-shell": "gnome-shell",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"systems": "systems_2",
|
"systems": "systems",
|
||||||
"tinted-foot": "tinted-foot",
|
"tinted-foot": "tinted-foot",
|
||||||
"tinted-kitty": "tinted-kitty",
|
"tinted-kitty": "tinted-kitty",
|
||||||
"tinted-schemes": "tinted-schemes",
|
"tinted-schemes": "tinted-schemes",
|
||||||
@@ -559,21 +574,6 @@
|
|||||||
"type": "github"
|
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tinted-foot": {
|
"tinted-foot": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|||||||
209
flake.nix
209
flake.nix
@@ -6,10 +6,6 @@
|
|||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
||||||
|
|
||||||
# dotfiles = {
|
|
||||||
# url = "git+https://git.janezic.dev/janezicmatej/.dotfiles.git";
|
|
||||||
# flake = false;
|
|
||||||
# };
|
|
||||||
nvim = {
|
nvim = {
|
||||||
url = "git+https://git.janezic.dev/janezicmatej/nvim.git";
|
url = "git+https://git.janezic.dev/janezicmatej/nvim.git";
|
||||||
flake = false;
|
flake = false;
|
||||||
@@ -17,7 +13,7 @@
|
|||||||
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
url = "github:nix-community/home-manager/release-25.11";
|
||||||
@@ -40,118 +36,115 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{
|
inputs@{ flake-parts, nixpkgs, ... }:
|
||||||
nixpkgs,
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
flake-utils,
|
systems = [ "x86_64-linux" ];
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
perSystem =
|
||||||
my-lib = import ./lib { inherit (nixpkgs) lib; };
|
{ system, pkgs, ... }:
|
||||||
|
let
|
||||||
|
my-lib = import ./lib { inherit (nixpkgs) lib; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages =
|
||||||
|
import ./packages
|
||||||
|
{
|
||||||
|
inherit my-lib;
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
inherit pkgs;
|
||||||
|
pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.${system};
|
||||||
|
pkgs-master = inputs.nixpkgs-master.legacyPackages.${system};
|
||||||
|
};
|
||||||
|
|
||||||
overlays = [
|
formatter = pkgs.nixfmt-tree;
|
||||||
(
|
|
||||||
_: prev:
|
|
||||||
let
|
|
||||||
pkgs-unstable = import inputs.nixpkgs-unstable {
|
|
||||||
inherit (prev.stdenv.hostPlatform) system;
|
|
||||||
inherit (prev) config;
|
|
||||||
};
|
|
||||||
pkgs-master = import inputs.nixpkgs-master {
|
|
||||||
inherit (prev.stdenv.hostPlatform) system;
|
|
||||||
inherit (prev) config;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
inherit (pkgs-master) claude-code;
|
|
||||||
# TODO:(@janezicmatej) 2026-03-09 error with stable for telegram-desktop
|
|
||||||
inherit (pkgs-unstable) telegram-desktop;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
|
||||||
|
|
||||||
mkHost = my-lib.mkHost {
|
devShells.default = pkgs.mkShell {
|
||||||
inherit
|
packages = [
|
||||||
nixpkgs
|
pkgs.pre-commit
|
||||||
overlays
|
pkgs.statix
|
||||||
inputs
|
pkgs.shellcheck
|
||||||
;
|
pkgs.shfmt
|
||||||
};
|
pkgs.qemu
|
||||||
|
];
|
||||||
in
|
};
|
||||||
|
|
||||||
{
|
|
||||||
lib = my-lib;
|
|
||||||
|
|
||||||
nixosConfigurations = {
|
|
||||||
fw16 = mkHost "fw16" {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
user = "matej";
|
|
||||||
};
|
|
||||||
tower = mkHost "tower" {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
user = "matej";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# nixos-rebuild build-image --image-variant install-iso --flake .#iso
|
flake =
|
||||||
iso = mkHost "iso" {
|
let
|
||||||
system = "x86_64-linux";
|
my-lib = import ./lib { inherit (nixpkgs) lib; };
|
||||||
};
|
|
||||||
|
|
||||||
ephvm = mkHost "ephvm" {
|
overlays = [
|
||||||
system = "x86_64-linux";
|
(
|
||||||
user = "matej";
|
_: prev:
|
||||||
};
|
let
|
||||||
};
|
pkgs-unstable = import inputs.nixpkgs-unstable {
|
||||||
|
inherit (prev.stdenv.hostPlatform) system;
|
||||||
nixosModules = import ./modules/nixos {
|
inherit (prev) config;
|
||||||
inherit my-lib;
|
};
|
||||||
inherit (nixpkgs) lib;
|
pkgs-master = import inputs.nixpkgs-master {
|
||||||
} { };
|
inherit (prev.stdenv.hostPlatform) system;
|
||||||
|
inherit (prev) config;
|
||||||
homeManagerModules = import ./modules/home-manager {
|
};
|
||||||
inherit my-lib;
|
in
|
||||||
inherit (nixpkgs) lib;
|
{
|
||||||
} { };
|
inherit (pkgs-master) claude-code;
|
||||||
|
# TODO:(@janezicmatej) 2026-03-09 error with stable for telegram-desktop
|
||||||
nixosProfiles = import ./profiles {
|
inherit (pkgs-unstable) telegram-desktop;
|
||||||
inherit my-lib;
|
}
|
||||||
inherit (nixpkgs) lib;
|
)
|
||||||
} { };
|
|
||||||
}
|
|
||||||
// flake-utils.lib.eachDefaultSystem (
|
|
||||||
system:
|
|
||||||
let
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
packages =
|
|
||||||
import ./packages
|
|
||||||
{
|
|
||||||
inherit my-lib;
|
|
||||||
inherit (nixpkgs) lib;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.${system};
|
|
||||||
pkgs-master = inputs.nixpkgs-master.legacyPackages.${system};
|
|
||||||
};
|
|
||||||
|
|
||||||
formatter = pkgs.nixfmt-tree;
|
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
|
||||||
packages = [
|
|
||||||
pkgs.pre-commit
|
|
||||||
pkgs.statix
|
|
||||||
pkgs.shellcheck
|
|
||||||
pkgs.shfmt
|
|
||||||
pkgs.qemu
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
mkHost = my-lib.mkHost {
|
||||||
|
inherit
|
||||||
|
nixpkgs
|
||||||
|
overlays
|
||||||
|
inputs
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
lib = my-lib;
|
||||||
|
|
||||||
|
nixosConfigurations = {
|
||||||
|
fw16 = mkHost "fw16" {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
user = "matej";
|
||||||
|
};
|
||||||
|
tower = mkHost "tower" {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
user = "matej";
|
||||||
|
};
|
||||||
|
|
||||||
|
# nixos-rebuild build-image --image-variant install-iso --flake .#iso
|
||||||
|
iso = mkHost "iso" {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
};
|
||||||
|
|
||||||
|
ephvm = mkHost "ephvm" {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
user = "matej";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixosModules = import ./modules/nixos {
|
||||||
|
inherit my-lib;
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
} { };
|
||||||
|
|
||||||
|
homeManagerModules = import ./modules/home-manager {
|
||||||
|
inherit my-lib;
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
} { };
|
||||||
|
|
||||||
|
nixosProfiles = import ./profiles {
|
||||||
|
inherit my-lib;
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
} { };
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user