diff --git a/common/home-manager.nix b/common/home-manager.nix index 171a382..cb4e6bd 100644 --- a/common/home-manager.nix +++ b/common/home-manager.nix @@ -1,9 +1,12 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: { home-manager = { useUserPackages = true; useGlobalPkgs = true; backupFileExtension = "backup"; + extraSpecialArgs = { + inherit inputs; + }; }; } diff --git a/flake.lock b/flake.lock index 5649a79..bdefc62 100644 --- a/flake.lock +++ b/flake.lock @@ -84,6 +84,30 @@ "type": "github" } }, + "firefox-addons": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "dir": "pkgs/firefox-addons", + "lastModified": 1735202720, + "narHash": "sha256-7aEdACqT2B7nZNFjn2Y66Qucfl1AHHVFKxm4yvO0O10=", + "owner": "rycee", + "repo": "nur-expressions", + "rev": "fe816609e68ee1887ee89e43c9ca1aad75362477", + "type": "gitlab" + }, + "original": { + "dir": "pkgs/firefox-addons", + "owner": "rycee", + "ref": "master", + "repo": "nur-expressions", + "type": "gitlab" + } + }, "flake-utils": { "locked": { "lastModified": 1659877975, @@ -100,6 +124,21 @@ } }, "flake-utils_2": { + "locked": { + "lastModified": 1629284811, + "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { "inputs": { "systems": "systems_2" }, @@ -189,7 +228,7 @@ }, "lix-module": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "flakey-profile": "flakey-profile", "lix": "lix", "nixpkgs": [ @@ -213,11 +252,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1734875076, - "narHash": "sha256-Pzyb+YNG5u3zP79zoi8HXYMs15Q5dfjDgwCdUI5B0nY=", + "lastModified": 1735141468, + "narHash": "sha256-VIAjBr1qGcEbmhLwQJD6TABppPMggzOvqFsqkDoMsAY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1807c2b91223227ad5599d7067a61665c52d1295", + "rev": "4005c3ff7505313cbc21081776ad0ce5dfd7a3ce", "type": "github" }, "original": { @@ -229,11 +268,11 @@ }, "nixpkgs-small": { "locked": { - "lastModified": 1735061823, - "narHash": "sha256-mQbroPNNGpJmE5OQSxZe9mQtoO0zoSWGofXtF/nytn4=", + "lastModified": 1735191716, + "narHash": "sha256-rwHLmGc/2OfudyjGnH8h5vQK2e5uJ6gt2GwPhWL9pPk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7fb8b8de039a0269c26f79129260cc029473d576", + "rev": "1dd8f51e62c0ff199e551744ab46fc4fbe6f827a", "type": "github" }, "original": { @@ -261,11 +300,11 @@ }, "nixpkgs-unstable-small": { "locked": { - "lastModified": 1735053414, - "narHash": "sha256-m4CnYqYu5EK18Nl52gYkPUz+S/AIFIUTJM23bGoKoXQ=", + "lastModified": 1735268880, + "narHash": "sha256-7QEFnKkzD13SPxs+UFR5bUFN2fRw+GlL0am72ZjNre4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e905913c43d0547a131ca9c7917fa9089b627e01", + "rev": "7cc0bff31a3a705d3ac4fdceb030a17239412210", "type": "github" }, "original": { @@ -275,21 +314,6 @@ "type": "github" } }, - "nur": { - "locked": { - "lastModified": 1731695757, - "narHash": "sha256-w+bGxRbZpWc6SyBbtjW2ci2fw1zk0udTjFpQW0g0Pc8=", - "owner": "nix-community", - "repo": "NUR", - "rev": "6e17acc00a48253a4d25e5ee4e6c215b8950c039", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, "plasma-manager": { "inputs": { "home-manager": [ @@ -316,11 +340,11 @@ "randomcat": { "flake": false, "locked": { - "lastModified": 1735061438, - "narHash": "sha256-k8fVnM7c8p5eJJTS+8cyI5/lo8m/NPieQLtnhYLdgqY=", + "lastModified": 1735270908, + "narHash": "sha256-MXyZgw41LY9Ji0PX1Q19mWO9IoZ3pkSTgG/mzfBZ1nA=", "owner": "randomnetcat", "repo": "nix-configs", - "rev": "21b3f66c1a7bd94c3f00e12c0b80b53aeab69c25", + "rev": "b4b1967ea9d09d7ff64d77c48261fb0f290e7a0c", "type": "github" }, "original": { @@ -335,6 +359,7 @@ "agenix": "agenix", "birdsong": "birdsong", "colmena": "colmena", + "firefox-addons": "firefox-addons", "home-manager": "home-manager", "home-manager-unstable": "home-manager-unstable", "lix-module": "lix-module", @@ -342,9 +367,30 @@ "nixpkgs-small": "nixpkgs-small", "nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable-small": "nixpkgs-unstable-small", - "nur": "nur", "plasma-manager": "plasma-manager", - "randomcat": "randomcat" + "randomcat": "randomcat", + "scoutshonour": "scoutshonour" + } + }, + "scoutshonour": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1735301893, + "narHash": "sha256-d95MCTUYMCcOQv4LpmWxPuVnx7McezXYs2Idw8u8ngI=", + "ref": "main", + "rev": "f447cd380ea1fb81a0ff8f292b6bbdf0be9c9520", + "revCount": 23, + "type": "git", + "url": "https://git.qenya.tel/qenya/nix-scoutshonour" + }, + "original": { + "ref": "main", + "type": "git", + "url": "https://git.qenya.tel/qenya/nix-scoutshonour" } }, "systems": { diff --git a/flake.nix b/flake.nix index b9177b7..f262071 100644 --- a/flake.nix +++ b/flake.nix @@ -26,9 +26,6 @@ inputs.home-manager.follows = "home-manager-unstable"; }; - # TODO: remove dependency on NUR (#16) - nur.url = "github:nix-community/NUR"; - agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -49,6 +46,11 @@ flake = false; }; + firefox-addons = { + url = "gitlab:rycee/nur-expressions?ref=master&dir=pkgs/firefox-addons"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + # Third-party flake providing package and NixOS module for Actual Budget as # nixpkgs are having trouble: https://github.com/NixOS/nixpkgs/issues/269069 actual = { @@ -57,12 +59,17 @@ }; birdsong.url = "git+https://git.qenya.tel/qenya/birdsong?ref=main"; + + scoutshonour = { + url = "git+https://git.qenya.tel/qenya/nix-scoutshonour?ref=main"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; }; - outputs = inputs@{ self, nixpkgs, nixpkgs-small, lix-module, home-manager, plasma-manager, nur, agenix, colmena, randomcat, actual, birdsong, ... }: { + outputs = inputs@{ self, nixpkgs, nixpkgs-small, colmena, ... }: { nixosConfigurations = self.outputs.colmenaHive.nodes; colmenaHive = colmena.lib.makeHive self.outputs.colmena; - + # The name of this output type is not standardised. I have picked # "homeManagerModules" as the discussion here suggests it's the most common: # https://github.com/nix-community/home-manager/issues/1783 @@ -71,7 +78,7 @@ # https://github.com/NixOS/nix/pull/10858 homeManagerModules = { "qenya".imports = [ - plasma-manager.homeManagerModules.plasma-manager + inputs.plasma-manager.homeManagerModules.plasma-manager ./home/qenya ]; @@ -88,7 +95,10 @@ orm = import nixpkgs-small { system = "x86_64-linux"; }; kalessin = import nixpkgs-small { system = "aarch64-linux"; }; }; - specialArgs = { inherit self; }; + specialArgs = { + inherit self; + inherit inputs; + }; }; defaults = { config, lib, pkgs, ... }: { @@ -98,16 +108,14 @@ deployment.buildOnTarget = lib.mkDefault true; imports = [ - lix-module.nixosModules.default - home-manager.nixosModules.home-manager - nur.nixosModules.nur - { nixpkgs.overlays = [ nur.overlay ]; } - agenix.nixosModules.default - birdsong.nixosModules.default - actual.nixosModules.default + inputs.lix-module.nixosModules.default + inputs.home-manager.nixosModules.home-manager + inputs.agenix.nixosModules.default + inputs.birdsong.nixosModules.default + inputs.actual.nixosModules.default ./common ./services - (builtins.toPath "${randomcat}/services/default.nix") + (builtins.toPath "${inputs.randomcat}/services/default.nix") ]; }; @@ -130,9 +138,9 @@ in pkgs.mkShell { packages = [ - colmena.packages.${system}.colmena - agenix.packages.${system}.default - plasma-manager.packages.${system}.rc2nix + inputs.colmena.packages.${system}.colmena + inputs.agenix.packages.${system}.default + inputs.plasma-manager.packages.${system}.rc2nix ]; }; }; diff --git a/home/qenya/firefox.nix b/home/qenya/firefox.nix index 23642f8..96715e5 100644 --- a/home/qenya/firefox.nix +++ b/home/qenya/firefox.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, osConfig, ... }: +{ config, lib, pkgs, osConfig, inputs, ... }: let inherit (lib) mkIf; @@ -7,12 +7,10 @@ in { programs.firefox = lib.mkIf isGraphical { enable = true; - - # coming in 24.11 - # languagePacks = [ "en-GB" ]; + languagePacks = [ "en-GB" ]; profiles.default = { - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + extensions = with inputs.firefox-addons.packages.${pkgs.hostPlatform.system}; [ bitwarden ublock-origin ]; diff --git a/hosts/tohru/default.nix b/hosts/tohru/default.nix index cebd1cb..cde1a8d 100644 --- a/hosts/tohru/default.nix +++ b/hosts/tohru/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: { imports = [ @@ -31,6 +31,8 @@ "networkmanager" # UI wifi configuration "dialout" # access to serial ports ]; + + nixpkgs.overlays = [ inputs.scoutshonour.overlays.default ]; home-manager.users.qenya = { pkgs, ... }: { home.packages = with pkgs; [ keepassxc @@ -41,8 +43,8 @@ # games openttd prismlauncher - nur.repos.qenya.digital-a-love-story - nur.repos.qenya.dont-take-it-personally-babe + scoutshonour.digital-a-love-story + scoutshonour.dont-take-it-personally-babe ]; };