From 7d2bf2b8b12c8bef0a4e5199fddf8a7265bce6d0 Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Wed, 25 Jun 2025 16:22:40 -0400 Subject: [PATCH] implement overlays --- flake.lock | 146 ++++++++++++++++++-- flake.nix | 4 +- home/crow/common/optional/desktops/niri.nix | 9 ++ home/crow/common/optional/desktops/sway.nix | 5 - hosts/common/core/default.nix | 3 + overlays/default.nix | 23 +++ 6 files changed, 172 insertions(+), 18 deletions(-) create mode 100644 home/crow/common/optional/desktops/niri.nix delete mode 100644 home/crow/common/optional/desktops/sway.nix create mode 100644 overlays/default.nix diff --git a/flake.lock b/flake.lock index 1ba20b5..cdfe01d 100644 --- a/flake.lock +++ b/flake.lock @@ -135,6 +135,62 @@ "type": "github" } }, + "niri-flake": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1750847367, + "narHash": "sha256-BQzKA0b7B73PRwgQLEs37w1YhLdCm49GB2RhR0Xjt0Y=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "bde02c6f392a7bfd487352a537183ebf2da7f53b", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1748151941, + "narHash": "sha256-z4viQZLgC2bIJ3VrzQnR+q2F3gAOEQpU1H5xHtX/2fs=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "8ba57fcf25d2fc9565131684a839d58703f1dae7", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.05.1", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1750791124, + "narHash": "sha256-F5iVU/hjoSHSSe0gllxm0PcAaseEtGNanYK5Ha3k2Tg=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "37458d94b288945f6cfbd3c5c233f634d59f246c", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -157,7 +213,7 @@ }, "nix-secrets": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1750779498, @@ -175,16 +231,18 @@ }, "nixpkgs": { "locked": { - "lastModified": 1750605355, - "narHash": "sha256-xT8cPLTxlktxI9vSdoBlAVK7dXgd8IK59j7ZwzkkhnI=", + "lastModified": 1750741721, + "narHash": "sha256-Z0djmTa1YmnGMfE9jEe05oO4zggjDmxOGKwt844bUhE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3078b9a9e75f1790e6d6ef9955fdc6a2d1740cc6", + "rev": "4b1164c3215f018c4442463a27689d973cffd750", "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-darwin": { @@ -219,6 +277,22 @@ } }, "nixpkgs-stable": { + "locked": { + "lastModified": 1750622754, + "narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c7ab75210cb8cb16ddd8f290755d9558edde7ee1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { "locked": { "lastModified": 1750622754, "narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=", @@ -251,6 +325,20 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1750605355, + "narHash": "sha256-xT8cPLTxlktxI9vSdoBlAVK7dXgd8IK59j7ZwzkkhnI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3078b9a9e75f1790e6d6ef9955fdc6a2d1740cc6", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1750622754, "narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=", @@ -266,7 +354,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1742288794, "narHash": "sha256-Txwa5uO+qpQXrNG4eumPSD+hHzzYi/CdaM80M9XRLCo=", @@ -282,7 +370,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1741865919, "narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=", @@ -339,7 +427,7 @@ "flake-utils": "flake-utils", "mnw": "mnw", "nil": "nil", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nmd": "nmd", "systems": "systems_2" }, @@ -359,7 +447,7 @@ }, "nvix": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nvf": "nvf" }, "locked": { @@ -381,11 +469,12 @@ "disko": "disko", "hardware": "hardware", "home-manager": "home-manager", + "niri-flake": "niri-flake", "nix-darwin": "nix-darwin", "nix-secrets": "nix-secrets", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-darwin": "nixpkgs-darwin", - "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-unstable": "nixpkgs-unstable", "nixvirt": "nixvirt", "nvix": "nvix", @@ -464,6 +553,39 @@ "repo": "default", "type": "github" } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1748488455, + "narHash": "sha256-IiLr1alzKFIy5tGGpDlabQbe6LV1c9ABvkH6T5WmyRI=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "3ba30b149f9eb2bbf42cf4758d2158ca8cceef73", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.6", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1750821680, + "narHash": "sha256-Bu5unTxnqok2RoU5P394Gh0vRaoyI/5xlOOJDF6akrc=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "2e7c318ac2bbf699b6ab92ef91e661e16415dfac", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index bf3b29f..5899005 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,7 @@ lib = nixpkgs.lib.extend (self: super: {custom = import ./lib {inherit (nixpkgs) lib;};}); in { # Overlays - # overlays = import ./overlays {inherit inputs;}; + overlays = import ./overlays {inherit inputs;}; # Host Configurations nixosConfigurations = builtins.listToAttrs ( @@ -113,6 +113,8 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + niri-flake.url = "github:sodiboo/niri-flake"; + # CrOS inputs nix-secrets.url = "git+ssh://git@github.com/TheWanderingCrow/nix-secrets"; nvix.url = "github:TheWanderingCrow/nvix"; diff --git a/home/crow/common/optional/desktops/niri.nix b/home/crow/common/optional/desktops/niri.nix new file mode 100644 index 0000000..6aa1a4b --- /dev/null +++ b/home/crow/common/optional/desktops/niri.nix @@ -0,0 +1,9 @@ +{ + pkgs, + config, + ... +}: { + home.packages = [ + pkgs.niri + ]; +} diff --git a/home/crow/common/optional/desktops/sway.nix b/home/crow/common/optional/desktops/sway.nix deleted file mode 100644 index e7e3846..0000000 --- a/home/crow/common/optional/desktops/sway.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - wayland.windowManager.sway = { - enable = true; - }; -} diff --git a/hosts/common/core/default.nix b/hosts/common/core/default.nix index bb92c76..9d46ff6 100644 --- a/hosts/common/core/default.nix +++ b/hosts/common/core/default.nix @@ -44,6 +44,9 @@ in { home-manager.backupFileExtension = "bk"; nixpkgs = { + overlays = [ + outputs.overlays.default + ]; config = { allowUnfree = true; }; diff --git a/overlays/default.nix b/overlays/default.nix new file mode 100644 index 0000000..edf8a84 --- /dev/null +++ b/overlays/default.nix @@ -0,0 +1,23 @@ +{inputs, ...}: let + stable-packages = final: _prev: { + stable = import inputs.nixpkgs-stable { + inherit (final) system; + config.allowUnfree = true; + # overlays = [ + # ]; + }; + }; + + unstable-packages = final: _prev: { + unstable = import inputs.nixpkgs-unstable { + inherit (final) system; + config.allowUnfree = true; + # overlays = [ + # ]; + }; + }; +in { + default = final: prev: + (stable-packages final prev) + // (unstable-packages final prev); +}