From 8ad1d43730212d017b8e67dd86192810d95743e8 Mon Sep 17 00:00:00 2001 From: Gabriella Bere Date: Sun, 29 Dec 2024 12:17:52 +0000 Subject: [PATCH] moved to using overlays on nixpkgs-unstable (named as default nixpkgs) so that i can specify more easily which package i would like using pkgs.stable.package and even pkgs.main.package if i want to be on the actual bleeding edge --- flake.lock | 244 +++++++++++++++++++-------- flake.nix | 55 ++++-- home-manager/home.nix | 2 +- hosts/gabbielaptop/configuration.nix | 5 +- modules/packages.nix | 90 +++++----- 5 files changed, 258 insertions(+), 138 deletions(-) diff --git a/flake.lock b/flake.lock index dbb50b4..302ea1e 100644 --- a/flake.lock +++ b/flake.lock @@ -89,11 +89,11 @@ }, "crane": { "locked": { - "lastModified": 1730652660, - "narHash": "sha256-+XVYfmVXAiYA0FZT7ijHf555dxCe+AoAT5A6RU+6vSo=", + "lastModified": 1731098351, + "narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=", "owner": "ipetkov", "repo": "crane", - "rev": "a4ca93905455c07cb7e3aca95d4faf7601cba458", + "rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28", "type": "github" }, "original": { @@ -130,11 +130,11 @@ ] }, "locked": { - "lastModified": 1734343412, - "narHash": "sha256-b7G8oFp0Nj01BYUJ6ENC9Qf/HsYAIZvN9k/p0Kg/PFU=", + "lastModified": 1735048446, + "narHash": "sha256-Tc35Y8H+krA6rZeOIczsaGAtobSSBPqR32AfNTeHDRc=", "owner": "nix-community", "repo": "disko", - "rev": "a08bfe06b39e94eec98dd089a2c1b18af01fef19", + "rev": "3a4de9fa3a78ba7b7170dda6bd8b4cdab87c0b21", "type": "github" }, "original": { @@ -247,6 +247,27 @@ "type": "github" } }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -340,11 +361,11 @@ ] }, "locked": { - "lastModified": 1734425854, - "narHash": "sha256-nzE5UbJ41aPEKf8R2ZFYtLkqPmF7EIUbNEdHMBLg0Ig=", + "lastModified": 1734797603, + "narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "0ddd26d0925f618c3a5d85a4fa5eb1e23a09491d", + "rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498", "type": "github" }, "original": { @@ -440,11 +461,11 @@ ] }, "locked": { - "lastModified": 1734622215, - "narHash": "sha256-OOfI0XhSJGHblfdNDhfnn8QnZxng63rWk9eeJ2tCbiI=", + "lastModified": 1735381016, + "narHash": "sha256-CyCZFhMUkuYbSD6bxB/r43EdmDE7hYeZZPTCv0GudO4=", "owner": "nix-community", "repo": "home-manager", - "rev": "1395379a7a36e40f2a76e7b9936cc52950baa1be", + "rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2", "type": "github" }, "original": { @@ -461,11 +482,11 @@ ] }, "locked": { - "lastModified": 1734344598, - "narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=", + "lastModified": 1734862405, + "narHash": "sha256-bXZJvUMJ2A6sIpYcCUAGjYCD5UDzmpmQCdmJSkPhleU=", "owner": "nix-community", "repo": "home-manager", - "rev": "83ecd50915a09dca928971139d3a102377a8d242", + "rev": "cb27edb5221d2f2920a03155f8becc502cf60e35", "type": "github" }, "original": { @@ -535,11 +556,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1731941836, - "narHash": "sha256-zpmAzrvK8KdssBSwiIwwRxaUJ77oWORbW0XFvgCFpTE=", + "lastModified": 1734994463, + "narHash": "sha256-S9MgfQjNt4J3I7obdLOVY23h+Yl/hnyibwGfOl+1uOE=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "2f48272f34174fd2a5ab3df4d8a46919247be879", + "rev": "93e6f0d77548be8757c11ebda5c4235ef4f3bc67", "type": "github" }, "original": { @@ -553,11 +574,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1734127708, - "narHash": "sha256-fXDr93nc3zUDCGS5qhrXAtwBJfiI40jIdoMncLAzbUY=", + "lastModified": 1734848678, + "narHash": "sha256-HtGPXGyzOsHJLq6nwvBV763y6l7fC9FuWIM0hNh1Y6E=", "owner": "musnix", "repo": "musnix", - "rev": "0a2bbd1e2ec78ef268698eb682f39015c1f3ca1d", + "rev": "e76b3cdd23d49a11210a551f8ea4d49d7022e639", "type": "github" }, "original": { @@ -603,13 +624,29 @@ "type": "github" } }, - "nixpkgs-stable": { + "nixpkgs-master": { "locked": { - "lastModified": 1720386169, - "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "lastModified": 1735468399, + "narHash": "sha256-aK9OM244zYI7/8NWRbUK+Ml2tErFyerHuXwb6GdpWsc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "rev": "9640018b2247891251565852d6218d57c135a495", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1730741070, + "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", "type": "github" }, "original": { @@ -619,6 +656,22 @@ "type": "github" } }, + "nixpkgs-stable_2": { + "locked": { + "lastModified": 1735264675, + "narHash": "sha256-MgdXpeX2GuJbtlBrH9EdsUeWl/yXEubyvxM1G+yO4Ak=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d49da4c08359e3c39c4e27c74ac7ac9b70085966", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1733412085, @@ -636,22 +689,6 @@ } }, "nixpkgs_3": { - "locked": { - "lastModified": 1733392399, - "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { "locked": { "lastModified": 1734424634, "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=", @@ -667,7 +704,39 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1735291276, + "narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "634fd46801442d760e09493a794c4f15db2d0cbb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_5": { + "locked": { + "lastModified": 1735291276, + "narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "634fd46801442d760e09493a794c4f15db2d0cbb", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1732238832, "narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=", @@ -698,11 +767,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1734567959, - "narHash": "sha256-ghNQlnI/r6cnknY58x60695sFrYnI6ZUMg65bmoNGqw=", + "lastModified": 1735378670, + "narHash": "sha256-A8aQA+YhJfA8mUpzXOZdlXNnKiZg2EcpCn1srgtBjTs=", "owner": "nix-community", "repo": "nixvim", - "rev": "37608b462772e35220e02bfbd9045d0946564436", + "rev": "f4b0b81ef9eb4e37e75f32caf1f02d5501594811", "type": "github" }, "original": { @@ -711,6 +780,26 @@ "type": "github" } }, + "nur": { + "inputs": { + "flake-parts": "flake-parts_3", + "nixpkgs": "nixpkgs_5", + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1735463528, + "narHash": "sha256-zr2UZCcNj+slr5F+weZn02BBA/LaqhgGtNkx2RHNPcQ=", + "owner": "nix-community", + "repo": "NUR", + "rev": "493dbcd9df5aa49af2695721fc10978009b64dad", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "nuschtosSearch": { "inputs": { "flake-utils": "flake-utils", @@ -748,11 +837,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1730302582, - "narHash": "sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU=", + "lastModified": 1731363552, + "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf", + "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", "type": "github" }, "original": { @@ -770,9 +859,11 @@ "lanzaboote": "lanzaboote", "musnix": "musnix", "nixpkgs": "nixpkgs_4", + "nixpkgs-master": "nixpkgs-master", + "nixpkgs-stable": "nixpkgs-stable_2", "nixvim": "nixvim", + "nur": "nur", "satisfactory-server": "satisfactory-server", - "stablepkgs": "stablepkgs", "stylix": "stylix" } }, @@ -784,11 +875,11 @@ ] }, "locked": { - "lastModified": 1730601085, - "narHash": "sha256-Sgax33jGuvVHTjl1P78IwzlhAGyOxtx5Q26inKja8S4=", + "lastModified": 1731897198, + "narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "8d1b40f8dfd7539aaa3de56e207e22b3cc451825", + "rev": "0be641045af6d8666c11c2c40e45ffc9667839b5", "type": "github" }, "original": { @@ -818,22 +909,6 @@ "type": "github" } }, - "stablepkgs": { - "locked": { - "lastModified": 1734323986, - "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "394571358ce82dff7411395829aa6a3aad45b907", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, "steam-fetcher": { "inputs": { "nixpkgs": [ @@ -865,18 +940,18 @@ "flake-utils": "flake-utils_2", "gnome-shell": "gnome-shell", "home-manager": "home-manager_4", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "systems": "systems_3", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1734531336, - "narHash": "sha256-BWwJTAiWmZudUdUbyets7e3zQfjvZYtkU51blBnUBjw=", + "lastModified": 1735253599, + "narHash": "sha256-aKLAUkdeMH2N5gMDNiOC7KghRNy1necLtLa9+zUcj1g=", "owner": "danth", "repo": "stylix", - "rev": "a2d66f25478103ac9b4adc6d6713794f7005221e", + "rev": "963e77a3a4fc2be670d5a9a6cbeb249b8a43808a", "type": "github" }, "original": { @@ -988,11 +1063,32 @@ ] }, "locked": { - "lastModified": 1733761991, - "narHash": "sha256-s4DalCDepD22jtKL5Nw6f4LP5UwoMcPzPZgHWjAfqbQ=", + "lastModified": 1734704479, + "narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "0ce9d149d99bc383d1f2d85f31f6ebd146e46085", + "rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 3bf849d..ae4fdd7 100644 --- a/flake.nix +++ b/flake.nix @@ -3,8 +3,10 @@ inputs = { # NixOS official package source, using the nixos-24.11 branch as stable and nixos-unstable as default + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - stablepkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + nixpkgs-master.url = "github:NixOS/nixpkgs/master"; + nur.url = "github:nix-community/NUR"; # Home manager using nixos-unstable home-manager = { @@ -47,15 +49,51 @@ outputs = { self, + nixpkgs-stable, nixpkgs, - stablepkgs, + nixpkgs-master, + nur, home-manager, ... }@inputs: let system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - stablepkgs = stablepkgs.legacyPacakges.${system}; + genericModules = [ + { + nix.registry.nixos.flake = inputs.self; + environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath; + nix.nixPath = [ "nixpkgs=${nixpkgs.outPath}" ]; + } +# inputs.home-manager.nixosModules.home-manager +# { +# nix.registry.nixos.flake = inputs.self; +# home-manager.useGlobalPkgs = true; +# home-manager.useUserPackages = true; +# } + ({ config, pkgs, ... }: { + nixpkgs.overlays = [ + overlay-stable + overlay-master + nur.overlay + ]; + } + ) + ]; + # Overlay definitions + # nixpkgs-unstable + overlay-stable = final: prev: { + stable = import nixpkgs-stable { + inherit system; + config.allowUnfree = true; + }; + }; + # nixpkgs-master + overlay-master = final: prev: { + master = import nixpkgs-master { + inherit system; + config.allowUnfree = true; + }; + }; in { nixosConfigurations.gabbielaptop = nixpkgs.lib.nixosSystem { @@ -63,7 +101,7 @@ specialArgs = { inherit inputs; }; - modules = [ + modules = genericModules ++ [ # Import nixos modules here ./hosts/gabbielaptop/configuration.nix ./modules/nh.nix @@ -75,14 +113,11 @@ inputs.musnix.nixosModules.musnix # inputs.stylix.nixosModules.stylix { nix.settings = inputs.aagl.nixConfig; } # Setup cachix for aagl projects - - # Imports home-manager module for use within nixos, not reccomended for use WITH standalone version - # inputs.home-manager.nixosModules.default ]; }; nixosConfigurations.biggerpi = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ + modules = genericModules ++ [ inputs.disko.nixosModules.disko inputs.satisfactory-server.nixosModules.satisfactory ./hosts/biggerpi/configuration.nix @@ -92,7 +127,7 @@ # Standalone home-manager config homeConfigurations.blue = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + pkgs = nixpkgs.legacyPackages.${system}; extraSpecialArgs = { inherit inputs; }; diff --git a/home-manager/home.nix b/home-manager/home.nix index ed49db2..c23a468 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -14,7 +14,7 @@ ./hyprland.nix ./waybar.nix ./swaync.nix - ./flatpak.nix +# ./flatpak.nix ./sober.nix ./hyprlock.nix ./zsh.nix diff --git a/hosts/gabbielaptop/configuration.nix b/hosts/gabbielaptop/configuration.nix index 0cfa2b0..8841c99 100644 --- a/hosts/gabbielaptop/configuration.nix +++ b/hosts/gabbielaptop/configuration.nix @@ -51,7 +51,7 @@ hardware.graphics = { enable = true; enable32Bit = true; - extraPackages = [ pkgs.rocmPackages.clr.icd ]; # Needed for davinci-resolve to utilize the gpu, otherwise it refuses to launch + extraPackages = [ pkgs.stable.rocmPackages.clr.icd ]; # Needed for davinci-resolve to utilize the gpu, otherwise it refuses to launch }; # Enable networking networking.networkmanager.enable = true; @@ -179,7 +179,7 @@ nixpkgs.config.allowUnfree = true; # Enable flatpak for delcarative-flatpak used in home-manager - services.flatpak.enable = true; + # services.flatpak.enable = true; # Enable qmk for managing framework laptop keyboards hardware.keyboard.qmk.enable = true; @@ -187,6 +187,7 @@ # Enable steam and enable steam remoteplay programs.steam.enable = true; programs.steam.remotePlay.openFirewall = true; + programs.steam.package = pkgs.stable.steam; # This desperately needs moving to home.nix but the home-manager module is not yet available diff --git a/modules/packages.nix b/modules/packages.nix index 2076191..67d86f4 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -2,58 +2,46 @@ config, lib, pkgs, - stablepkgs, ... }: { - # All packaged needed from nixos-unstable - environment.systemPackages = - (with pkgs; [ - neovim # nano is installed by default - wget - vesktop - prismlauncher - thunderbird - kdePackages.bluedevil - fastfetch - ungoogled-chromium - qbittorrent - obsidian - p7zip - unrar - wineWowPackages.stable - wine - (wine.override { wineBuild = "wine64"; }) - wine64 - wineWowPackages.staging - winetricks - wineWowPackages.waylandFull - vlc - krename - kdePackages.filelight - protonmail-bridge - obs-studio - pciutils - vial - qmk - dmidecode - wl-clipboard - lutris - tree - tenacity - mediawriter - home-manager - davinci-resolve - ardour - v4l-utils - libreoffice - nixfmt-rfc-style - nixd - ]) - - ++ - - (with stablepkgs; [ - # librewolf - ]); + # All system packages required from nixos-unstable by default + environment.systemPackages = with pkgs; [ + neovim # nano is installed by default + wget + vesktop + prismlauncher + thunderbird + kdePackages.bluedevil + fastfetch + ungoogled-chromium + qbittorrent + p7zip + unrar + wineWowPackages.stable + wine + (wine.override { wineBuild = "wine64"; }) + wine64 + wineWowPackages.staging + winetricks + wineWowPackages.waylandFull + vlc + protonmail-bridge + obs-studio + pciutils + vial + qmk + dmidecode + wl-clipboard + lutris + tree + tenacity + home-manager + davinci-resolve + v4l-utils + libreoffice + nixfmt-rfc-style + nixd + stable.ardour + ]; }