refactor: nix flake (#180)
This commit is contained in:
41
flake.lock
generated
41
flake.lock
generated
@@ -1,58 +1,25 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1710146030,
|
|
||||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714495772,
|
"lastModified": 1715961556,
|
||||||
"narHash": "sha256-BVkhvsIatul5lXMrnPvgKkpxL3zZGQlPbTgDlFJiYCo=",
|
"narHash": "sha256-+NpbZRCRisUHKQJZF3CT+xn14ZZQO+KjxIIanH3Pvn4=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c82cda9c0600a2785cda8e60962bcc9cc86862db",
|
"rev": "4a6b83b05df1a8bd7d99095ec4b4d271f2956b64",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
23
flake.nix
23
flake.nix
@@ -1,17 +1,18 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs.url = "github:nixos/nixpkgs";
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, ... }:
|
outputs =
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
{ nixpkgs, ... }:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
forAllSystems =
|
||||||
|
function:
|
||||||
|
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (
|
||||||
|
system: function nixpkgs.legacyPackages.${system}
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells.default = import ./shell.nix { inherit pkgs; };
|
devShells = forAllSystems (pkgs: {
|
||||||
}
|
default = pkgs.callPackage ./shell.nix { };
|
||||||
);
|
});
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,10 +1,11 @@
|
|||||||
{ pkgs ? import <nixpkgs> { } }:
|
{
|
||||||
|
pkgs ? import <nixpkgs> { },
|
||||||
|
}:
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
name = "dev-shell";
|
name = "dev-shell";
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
python311
|
python311
|
||||||
python311Packages.catppuccin
|
python311Packages.catppuccin
|
||||||
|
sassc
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user