switch to flakes + lix flake-compat
This commit is contained in:
parent
1626d24aed
commit
1485af5689
5 changed files with 112 additions and 40 deletions
33
entry.nix
Normal file
33
entry.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
let
|
||||
inputs = import ./inputs.nix;
|
||||
modules = import ./util/get-modules.nix inputs;
|
||||
create = import ./create.nix {
|
||||
system = "x86_64-linux";
|
||||
inherit inputs;
|
||||
sharedModules =
|
||||
with inputs;
|
||||
(modules [
|
||||
culr
|
||||
meat
|
||||
niri
|
||||
niri-tag
|
||||
lix-module
|
||||
angrr
|
||||
arbys
|
||||
# smooooth
|
||||
])
|
||||
++ [
|
||||
nix-index-database.nixosModules.nix-index
|
||||
./system/substituters.nix
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = create.systems {
|
||||
quiver = {
|
||||
user = "bolt";
|
||||
imports = with inputs; (modules [ nyx ]);
|
||||
};
|
||||
adrift.user = "plank";
|
||||
};
|
||||
}
|
17
flake.lock
generated
17
flake.lock
generated
|
@ -1,5 +1,21 @@
|
|||
{
|
||||
"nodes": {
|
||||
"__flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1751685974,
|
||||
"narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1",
|
||||
"revCount": 92,
|
||||
"type": "git",
|
||||
"url": "https://git.lix.systems/lix-project/flake-compat.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.lix.systems/lix-project/flake-compat.git"
|
||||
}
|
||||
},
|
||||
"angrr": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
|
@ -1148,6 +1164,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"__flake-compat": "__flake-compat",
|
||||
"angrr": "angrr",
|
||||
"arbys": "arbys",
|
||||
"culr": "culr",
|
||||
|
|
78
flake.nix
78
flake.nix
|
@ -1,42 +1,43 @@
|
|||
{
|
||||
description = "nixos config";
|
||||
|
||||
outputs =
|
||||
inputs:
|
||||
with inputs;
|
||||
let
|
||||
modules = import ./util/get-modules.nix {
|
||||
inherit inputs;
|
||||
};
|
||||
create = import ./create.nix {
|
||||
inherit inputs;
|
||||
system = "x86_64-linux";
|
||||
sharedModules =
|
||||
(modules [
|
||||
culr
|
||||
meat
|
||||
niri
|
||||
niri-tag
|
||||
lix-module
|
||||
angrr
|
||||
arbys
|
||||
# smooooth
|
||||
])
|
||||
++ [
|
||||
nix-index-database.nixosModules.nix-index
|
||||
./system/substituters.nix
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = create.systems {
|
||||
quiver = {
|
||||
user = "bolt";
|
||||
imports = (modules [ nyx ]);
|
||||
};
|
||||
adrift.user = "plank";
|
||||
};
|
||||
};
|
||||
outputs = _: { };
|
||||
# outputs =
|
||||
# inputs:
|
||||
# with inputs;
|
||||
# let
|
||||
# modules = import ./util/get-modules.nix {
|
||||
# inherit inputs;
|
||||
# };
|
||||
# create = import ./create.nix {
|
||||
# inherit inputs;
|
||||
# system = "x86_64-linux";
|
||||
# sharedModules =
|
||||
# (modules [
|
||||
# culr
|
||||
# meat
|
||||
# niri
|
||||
# niri-tag
|
||||
# lix-module
|
||||
# angrr
|
||||
# arbys
|
||||
# # smooooth
|
||||
# ])
|
||||
# ++ [
|
||||
# nix-index-database.nixosModules.nix-index
|
||||
# ./system/substituters.nix
|
||||
# ];
|
||||
# };
|
||||
# in
|
||||
# {
|
||||
# nixosConfigurations = create.systems {
|
||||
# quiver = {
|
||||
# user = "bolt";
|
||||
# imports = (modules [ nyx ]);
|
||||
# };
|
||||
# adrift.user = "plank";
|
||||
# };
|
||||
# };
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
@ -103,6 +104,11 @@
|
|||
angrr.url = "github:linyinfeng/angrr";
|
||||
|
||||
arbys.url = "path:/home/bolt/code/arbys";
|
||||
|
||||
__flake-compat = {
|
||||
url = "git+https://git.lix.systems/lix-project/flake-compat.git";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
15
inputs.nix
Normal file
15
inputs.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
node = lock.nodes.root.inputs.__flake-compat;
|
||||
inherit (lock.nodes.${node}.locked) narHash rev url;
|
||||
flake-compat = builtins.fetchTarball {
|
||||
url = "${url}/archive/${rev}.tar.gz";
|
||||
sha256 = narHash;
|
||||
};
|
||||
flake = import flake-compat {
|
||||
src = ./.;
|
||||
copySourceTreeToStore = false;
|
||||
useBuiltinsFetchTree = true;
|
||||
};
|
||||
in
|
||||
flake.inputs
|
|
@ -1,7 +1,8 @@
|
|||
{ inputs }:
|
||||
inputs:
|
||||
let
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
inherit (inputs.nixpkgs.lib) filterAttrs mapAttrsToList;
|
||||
inherit (builtins) elem;
|
||||
in
|
||||
l:
|
||||
lib.filterAttrs (_: v: builtins.elem v l) inputs
|
||||
|> lib.mapAttrsToList (n: v: v.nixosModules.${n} or v.nixosModules.default)
|
||||
filterAttrs (_: v: elem v l) inputs
|
||||
|> mapAttrsToList (n: v: v.nixosModules.${n} or v.nixosModules.default)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue