Better nix flake configuration
This commit is contained in:
parent
4627af9181
commit
4fca5c8cb1
6 changed files with 22 additions and 48 deletions
17
flake.nix
17
flake.nix
|
|
@ -20,7 +20,7 @@
|
|||
nix-rice = {
|
||||
url = "github:bertof/nix-rice";
|
||||
inputs = {
|
||||
inxpkgs.follows = "nixpkgs-u";
|
||||
nixpkgs.follows = "nixpkgs-u";
|
||||
flake-utils.follows = "flake-utils";
|
||||
};
|
||||
};
|
||||
|
|
@ -86,6 +86,13 @@
|
|||
};
|
||||
pkgs = s: import nixpkgs (nixpkgsSettings s);
|
||||
pkgs-u = s: import nixpkgs-u (nixpkgsSettings s);
|
||||
nixModule = system: { pkgs, ... }: {
|
||||
nixpkgs = nixpkgsSettings { inherit system; };
|
||||
nix = {
|
||||
package = pkgs.unstable.nixVersions.stable;
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
};
|
||||
};
|
||||
homeManagerSettings = {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
|
|
@ -126,7 +133,7 @@
|
|||
odinIntelBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
|
||||
modules = [ (nixModule system) ]
|
||||
++ commonBaseModules ++ odinBaseModules ++ odinIntelModules
|
||||
++ (homeManagerModules { bertof = import ./odin/hm.nix; })
|
||||
++ extraModules;
|
||||
|
|
@ -134,7 +141,7 @@
|
|||
odinNvidiaBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
|
||||
modules = [ (nixModule system) ]
|
||||
++ commonBaseModules ++ odinBaseModules ++ odinNvidiaModules
|
||||
++ (homeManagerModules { bertof = import ./odin/hm.nix; })
|
||||
++ extraModules;
|
||||
|
|
@ -153,7 +160,7 @@
|
|||
thorBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
|
||||
modules = [ (nixModule system) ]
|
||||
++ commonBaseModules ++ thorBaseModules
|
||||
++ (homeManagerModules { bertof = import ./thor/hm.nix; })
|
||||
++ extraModules;
|
||||
|
|
@ -168,7 +175,7 @@
|
|||
lokiBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
|
||||
modules = [ (nixModule system) ]
|
||||
++ commonBaseModules ++ lokiBaseModules
|
||||
++ (homeManagerModules { bertof = import ./loki/hm.nix; })
|
||||
++ extraModules;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue