Skip to content

Commit

Permalink
feat(nixos): use overlays to use stable channel for wezterm
Browse files Browse the repository at this point in the history
  • Loading branch information
efueyo committed Nov 15, 2024
1 parent cf3b21c commit 3a9a5a3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
5 changes: 3 additions & 2 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:
{ config, pkgs, outputs, ... }:

{
imports =
Expand Down Expand Up @@ -95,6 +95,7 @@

# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ outputs.overlays.stable-packages ];
fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode"]; })
# fira-code
Expand All @@ -116,7 +117,7 @@
fzf
direnv

wezterm
stable.wezterm
fish
starship

Expand Down
13 changes: 9 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, home-manager, nixpkgs, ... }@inputs: {
# Please replace my-nixos with your hostname
outputs = { self, home-manager, nixpkgs, ... }@inputs: let
inherit (self) outputs;
in {
overlays = import ./overlays {inherit inputs;};
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
system = "x86_64-linux";
modules = [
./configuration.nix
Expand Down
22 changes: 22 additions & 0 deletions overlays/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{inputs, ...}: {
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs final.pkgs;

# This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays
modifications = final: prev: {
# example = prev.example.overrideAttrs (oldAttrs: rec {
# ...
# });
};

# When applied, the stable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.stable'
stable-packages = final: _prev: {
stable = import inputs.nixpkgs-stable {
system = final.system;
config.allowUnfree = true;
};
};
}

0 comments on commit 3a9a5a3

Please sign in to comment.