mirror of
https://github.com/divnix/digga.git
synced 2024-11-30 11:02:29 +03:00
Revert "Merge branch 'nur' into template"
This reverts commit48afb873c1
, reversing changes made to7e58e0457e
.
This commit is contained in:
parent
48afb873c1
commit
cef548d232
26
README.md
26
README.md
@ -1,9 +1,7 @@
|
|||||||
# Introduction
|
# Introduction
|
||||||
A NixOS configuration template using the experimental [flakes][rfc] mechanism.
|
A NixOS configuration template using the experimental [flakes][rfc] mechanism.
|
||||||
Its aim is to provide a generic repository which neatly separates concerns
|
Its aim is to provide a generic repository which neatly separates concerns
|
||||||
and allows one to get up and running with NixOS faster than ever. In addition,
|
and allows one to get up and running with NixOS faster than ever.
|
||||||
conveniences like [home-manager][home-manager] and [NUR][nur] are wired in by
|
|
||||||
default to help make life easier.
|
|
||||||
|
|
||||||
Flakes are still an experimental feature, but once they finally get merged
|
Flakes are still an experimental feature, but once they finally get merged
|
||||||
even more will become possible, i.e. [nixops](https://nixos.org/nixops)
|
even more will become possible, i.e. [nixops](https://nixos.org/nixops)
|
||||||
@ -37,6 +35,7 @@ nixos-generate-config --show-hardware-config > ./hosts/${new_host}.nix
|
|||||||
# any ./profiles you may wish to try out.
|
# any ./profiles you may wish to try out.
|
||||||
$EDITOR ./hosts/${new_host}.nix
|
$EDITOR ./hosts/${new_host}.nix
|
||||||
|
|
||||||
|
|
||||||
# backup existing config and ensure configuration lives in expected location
|
# backup existing config and ensure configuration lives in expected location
|
||||||
mv /etc/nixos /etc/nixos.old
|
mv /etc/nixos /etc/nixos.old
|
||||||
ln -s $PWD /etc/nixos
|
ln -s $PWD /etc/nixos
|
||||||
@ -96,26 +95,6 @@ this flake exports multiple outputs for use in other flakes:
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### NUR usage
|
|
||||||
|
|
||||||
You can use packages, modules and overlays from the
|
|
||||||
[Nix User Repository][nur].
|
|
||||||
|
|
||||||
For modules and overlays, you can pull them in via the new top-level arguements
|
|
||||||
`nurModules` and `nurOverlays`, respectively:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ nurModules, nurOverlays, pkgs, ... }:
|
|
||||||
{
|
|
||||||
# ...
|
|
||||||
imports = [ nurModules."${nur-username}.modules.${aModule}" ];
|
|
||||||
nixpkgs.overlays = [ nurOverlays."${nur-username}".overlays."${anOverlay}" ];
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Packages are installable the same way as without flakes via
|
|
||||||
`pkgs.nur."${nur-username}"."${aPackage}"`.
|
|
||||||
|
|
||||||
# Structure
|
# Structure
|
||||||
|
|
||||||
The structure is here to keep things simple and clean. Anything sufficiently
|
The structure is here to keep things simple and clean. Anything sufficiently
|
||||||
@ -227,7 +206,6 @@ licenses of the respective packages.
|
|||||||
[direnv]: https://direnv.net
|
[direnv]: https://direnv.net
|
||||||
[home-manager]: https://github.com/rycee/home-manager
|
[home-manager]: https://github.com/rycee/home-manager
|
||||||
[NixOS]: https://nixos.org
|
[NixOS]: https://nixos.org
|
||||||
[nur]: https://github.com/nix-community/NUR
|
|
||||||
[old]: https://github.com/nrdxp/nixos
|
[old]: https://github.com/nrdxp/nixos
|
||||||
[pr]: https://github.com/NixOS/nixpkgs/pull/68897
|
[pr]: https://github.com/NixOS/nixpkgs/pull/68897
|
||||||
[rfc]: https://github.com/tweag/rfcs/blob/flakes/rfcs/0049-flakes.md
|
[rfc]: https://github.com/tweag/rfcs/blob/flakes/rfcs/0049-flakes.md
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# this file is an impure recreation of the flake profile currently deployed
|
# this file is an impure recreation of the flake profile currently deployed
|
||||||
# based on the systems hostname. The purpose is so tools which do not yet have
|
# based on the systems hostname. The purpose is so tools which do not yet have
|
||||||
# flake support (e.g `nixos-option`), can work as expected.
|
# flake support (e.g `nixos-option`), can work as expected.
|
||||||
{ lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (builtins) attrNames readDir;
|
inherit (builtins) attrNames readDir;
|
||||||
|
|
||||||
@ -30,12 +30,5 @@ in {
|
|||||||
nixpkgs.overlays = let
|
nixpkgs.overlays = let
|
||||||
overlays = map (name: import (./overlays + "/${name}"))
|
overlays = map (name: import (./overlays + "/${name}"))
|
||||||
(attrNames (readDir ./overlays));
|
(attrNames (readDir ./overlays));
|
||||||
in overlays ++ [
|
in overlays;
|
||||||
(final: prev: {
|
|
||||||
nur = import (builtins.fetchTarball
|
|
||||||
"https://github.com/nix-community/NUR/archive/master.tar.gz") {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
13
flake.lock
13
flake.lock
@ -18,19 +18,6 @@
|
|||||||
"narHash": "sha256-4p9gqMJTVmyH7eSq1euGZWusldWoBfKfi/VwZEPL2Mw=",
|
"narHash": "sha256-4p9gqMJTVmyH7eSq1euGZWusldWoBfKfi/VwZEPL2Mw=",
|
||||||
"originalUrl": "github:nrdxp/nixpkgs/fork",
|
"originalUrl": "github:nrdxp/nixpkgs/fork",
|
||||||
"url": "github:nrdxp/nixpkgs/1e232452ed4c57e9968f4342d9ba044d36403928"
|
"url": "github:nrdxp/nixpkgs/1e232452ed4c57e9968f4342d9ba044d36403928"
|
||||||
},
|
|
||||||
"nur": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": {
|
|
||||||
"inputs": {},
|
|
||||||
"narHash": "sha256-4p9gqMJTVmyH7eSq1euGZWusldWoBfKfi/VwZEPL2Mw=",
|
|
||||||
"originalUrl": "nixpkgs",
|
|
||||||
"url": "github:nrdxp/nixpkgs/1e232452ed4c57e9968f4342d9ba044d36403928"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"narHash": "sha256-i+NZZWnhNcxl73e2FjfgKUn3sW42ZKiVeXNKv72MN14=",
|
|
||||||
"originalUrl": "github:nrdxp/NUR/flake",
|
|
||||||
"url": "github:nrdxp/NUR/c632e4112b19a1b2fa05242a8cc971091d12e154"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": 3
|
"version": 3
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
|
|
||||||
inputs.nixpkgs.url = "github:nrdxp/nixpkgs/fork";
|
inputs.nixpkgs.url = "github:nrdxp/nixpkgs/fork";
|
||||||
inputs.home.url = "github:nrdxp/home-manager/flakes";
|
inputs.home.url = "github:nrdxp/home-manager/flakes";
|
||||||
inputs.nur.url = "github:nrdxp/NUR/flake";
|
|
||||||
|
|
||||||
outputs = args@{ self, home, nixpkgs, nur }:
|
outputs = args@{ self, home, nixpkgs }:
|
||||||
let
|
let
|
||||||
inherit (builtins) listToAttrs baseNameOf attrNames readDir;
|
inherit (builtins) listToAttrs baseNameOf attrNames readDir;
|
||||||
inherit (nixpkgs.lib) removeSuffix;
|
inherit (nixpkgs.lib) removeSuffix;
|
||||||
|
@ -11,8 +11,6 @@ let
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
specialArgs.usr = utils;
|
specialArgs.usr = utils;
|
||||||
specialArgs.nurModules = args.nur.nixosModules;
|
|
||||||
specialArgs.nurOverlays = args.nur.overlays;
|
|
||||||
|
|
||||||
modules = let
|
modules = let
|
||||||
core = ../profiles/core.nix;
|
core = ../profiles/core.nix;
|
||||||
@ -26,7 +24,7 @@ let
|
|||||||
];
|
];
|
||||||
system.configurationRevision = self.rev;
|
system.configurationRevision = self.rev;
|
||||||
|
|
||||||
nixpkgs.overlays = self.overlays ++ [ args.nur.overlay ];
|
nixpkgs.overlays = self.overlays;
|
||||||
};
|
};
|
||||||
|
|
||||||
local = import "${toString ./.}/${this}.nix";
|
local = import "${toString ./.}/${this}.nix";
|
||||||
|
Loading…
Reference in New Issue
Block a user