mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 06:19:00 +00:00
default.nix: convert to flake-compat config
Welp, it is easier to use it so here we are.
This commit is contained in:
parent
91b1493fe5
commit
4333feb2c0
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
pkgs = import <nixpkgs> { };
|
pkgs = import <nixpkgs> { };
|
||||||
config' = import <config> { inherit pkgs; };
|
config' = import <config>;
|
||||||
lib = pkgs.lib.extend (import <config/lib/extras/extend-lib.nix>);
|
lib = pkgs.lib.extend (import <config/lib/extras/extend-lib.nix>);
|
||||||
|
|
||||||
modules = import <config/modules/nixos> { inherit lib; isInternal = true; };
|
modules = import <config/modules/nixos> { inherit lib; isInternal = true; };
|
||||||
|
24
default.nix
24
default.nix
@ -1,14 +1,10 @@
|
|||||||
{ pkgs ? import <nixpkgs> { } }:
|
(import
|
||||||
|
(
|
||||||
let
|
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
|
||||||
lib = pkgs.lib.extend (import ./lib/extras/extend-lib.nix);
|
fetchTarball {
|
||||||
in
|
url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||||
{
|
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||||
lib = import ./lib { lib = pkgs.lib; };
|
}
|
||||||
modules.default.imports = import ./modules/nixos { inherit lib; };
|
)
|
||||||
overlays = import ./overlays // rec {
|
{ src = ./.; }
|
||||||
foo-dogsquared-pkgs = final: prev: import ./pkgs { pkgs = prev; };
|
).defaultNix
|
||||||
default = foo-dogsquared-pkgs;
|
|
||||||
};
|
|
||||||
hmModules.default.imports = import ./modules/home-manager { inherit lib; };
|
|
||||||
} // (import ./pkgs { inherit pkgs; })
|
|
||||||
|
21
flake.lock
generated
21
flake.lock
generated
@ -139,6 +139,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_2": {
|
"flake-compat_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"revCount": 57,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_3": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
@ -154,7 +168,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_3": {
|
"flake-compat_4": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
@ -428,7 +442,7 @@
|
|||||||
},
|
},
|
||||||
"neovim-nightly-overlay": {
|
"neovim-nightly-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_3",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"hercules-ci-effects": "hercules-ci-effects",
|
"hercules-ci-effects": "hercules-ci-effects",
|
||||||
"neovim-flake": "neovim-flake",
|
"neovim-flake": "neovim-flake",
|
||||||
@ -575,7 +589,7 @@
|
|||||||
},
|
},
|
||||||
"nixos-wsl": {
|
"nixos-wsl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_3",
|
"flake-compat": "flake-compat_4",
|
||||||
"flake-utils": "flake-utils_6",
|
"flake-utils": "flake-utils_6",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@ -711,6 +725,7 @@
|
|||||||
"devshell": "devshell",
|
"devshell": "devshell",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"emacs-overlay": "emacs-overlay",
|
"emacs-overlay": "emacs-overlay",
|
||||||
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_3",
|
||||||
"helix-editor": "helix-editor",
|
"helix-editor": "helix-editor",
|
||||||
"home-manager": [
|
"home-manager": [
|
||||||
|
@ -75,6 +75,9 @@
|
|||||||
# Add a bunch of pre-compiled indices since mine are always crashing.
|
# Add a bunch of pre-compiled indices since mine are always crashing.
|
||||||
nix-index-database.url = "github:nix-community/nix-index-database";
|
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Make a default.nix compatible stuff.
|
||||||
|
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, ... }:
|
outputs = inputs@{ self, nixpkgs, ... }:
|
||||||
|
Loading…
Reference in New Issue
Block a user