finally, can compile small channel with overlay
This commit is contained in:
58
flake.nix
58
flake.nix
@@ -2,30 +2,21 @@
|
||||
description = "JawZ NixOS flake setup";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
nixpkgs-small.url = "github:nixos/nixpkgs?ref=nixos-unstable-small";
|
||||
nixpkgs-chrome.url = "github:nixos/nixpkgs?rev=05bbf675397d5366259409139039af8077d695ce";
|
||||
ucodenix.url = "github:e-tho/ucodenix";
|
||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
zen-browser.url = "github:MarceColl/zen-browser-flake";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixos-cosmic = {
|
||||
url = "github:lilyinstarlight/nixos-cosmic";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager.url = "github:nix-community/home-manager/master";
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, ... }@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
lib = inputs.nixpkgs.lib // inputs.home-manager.lib;
|
||||
system = "x86_64-linux";
|
||||
makePkgs =
|
||||
repo:
|
||||
@@ -33,27 +24,34 @@
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
pkgs = makePkgs inputs.nixpkgs;
|
||||
pkgs-chrome = makePkgs inputs.nixpkgs-chrome;
|
||||
overlayFile = import ./overlay.nix { inherit pkgs pkgs-chrome; };
|
||||
createConfig = name: {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
createConfig =
|
||||
name:
|
||||
let
|
||||
useGUI = name == "workstation";
|
||||
nixpkgsSelect = if useGUI then inputs.nixpkgs else inputs.nixpkgs-small;
|
||||
pkgs = makePkgs nixpkgsSelect;
|
||||
pkgs-chrome = makePkgs inputs.nixpkgs-chrome;
|
||||
overlayFile = import ./overlay.nix { inherit pkgs pkgs-chrome; };
|
||||
lib = nixpkgsSelect.lib // inputs.home-manager.lib;
|
||||
in
|
||||
lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ overlayFile ]; }
|
||||
./hosts/${name}/configuration.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.nixos-cosmic.nixosModules.default
|
||||
];
|
||||
};
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ overlayFile ]; }
|
||||
./hosts/${name}/configuration.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.nixos-cosmic.nixosModules.default
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
workstation = lib.nixosSystem (createConfig "workstation");
|
||||
miniserver = lib.nixosSystem (createConfig "miniserver");
|
||||
server = lib.nixosSystem (createConfig "server");
|
||||
workstation = createConfig "workstation";
|
||||
miniserver = createConfig "miniserver";
|
||||
server = createConfig "server";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user