diff --git a/flake.lock b/flake.lock index 1a5a0ca..5be13c1 100644 --- a/flake.lock +++ b/flake.lock @@ -45,72 +45,6 @@ "type": "github" } }, - "flake-compat": { - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "revCount": 57, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" - } - }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils-plus": { - "inputs": { - "flake-utils": "flake-utils" - }, - "locked": { - "lastModified": 1696331477, - "narHash": "sha256-YkbRa/1wQWdWkVJ01JvV+75KIdM37UErqKgTf0L54Fk=", - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "rev": "bfc53579db89de750b25b0c5e7af299e0c06d7d3", - "type": "github" - }, - "original": { - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "type": "github" - } - }, "flakeCompat": { "flake": false, "locked": { @@ -147,83 +81,17 @@ "type": "github" } }, - "nix-software-center": { - "inputs": { - "nixos-appstream-data": "nixos-appstream-data", - "nixpkgs": "nixpkgs", - "utils": "utils" - }, - "locked": { - "lastModified": 1730517716, - "narHash": "sha256-hq3jlW5lyT2RkWhJ2/Oo+dt9FXtJ47zDDBBk8A8abMo=", - "owner": "snowfallorg", - "repo": "nix-software-center", - "rev": "216eb549f1ec222c2877d2194f2987527954f2c4", - "type": "github" - }, - "original": { - "owner": "snowfallorg", - "repo": "nix-software-center", - "type": "github" - } - }, - "nixos-appstream-data": { - "inputs": { - "flake-utils": [ - "nix-software-center", - "utils" - ], - "nixpkgs": [ - "nix-software-center", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1712858390, - "narHash": "sha256-XE7gr+zU3N4SHPAhsgk8cVAFp1iBg+Lxxp3y4dUF1vE=", - "owner": "korfuri", - "repo": "nixos-appstream-data", - "rev": "0465d42a4433faa63b7a5eb0b8d397937c9fc13a", - "type": "github" - }, - "original": { - "owner": "korfuri", - "ref": "flake", - "repo": "nixos-appstream-data", - "type": "github" - } - }, - "nixos-conf-editor": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs_2", - "snowfall-lib": "snowfall-lib" - }, - "locked": { - "lastModified": 1707338010, - "narHash": "sha256-UtLeZzDdk96sLTRcWsGrkWCslNUDytrGe0VmOTB/iig=", - "owner": "snowfallorg", - "repo": "nixos-conf-editor", - "rev": "27b5e92f580f794c690093503869aab242f075ab", - "type": "github" - }, - "original": { - "owner": "snowfallorg", - "repo": "nixos-conf-editor", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1692638711, - "narHash": "sha256-J0LgSFgJVGCC1+j5R2QndadWI1oumusg6hCtYAzLID4=", - "owner": "NixOS", + "lastModified": 1741513245, + "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "91a22f76cd1716f9d0149e8a5c68424bb691de15", + "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -245,47 +113,12 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1698318101, - "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "63678e9f3d3afecfeafa0acead6239cdb447574c", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1741513245, - "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "alejandra": "alejandra", "home-manager": "home-manager", - "nix-software-center": "nix-software-center", - "nixos-conf-editor": "nixos-conf-editor", - "nixpkgs": "nixpkgs_3", - "nixpkgs-stable": "nixpkgs-stable", - "systems": "systems_3" + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable" } }, "rust-analyzer-src": { @@ -304,91 +137,6 @@ "repo": "rust-analyzer", "type": "github" } - }, - "snowfall-lib": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils-plus": "flake-utils-plus", - "nixpkgs": [ - "nixos-conf-editor", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1696432959, - "narHash": "sha256-oJQZv2MYyJaVyVJY5IeevzqpGvMGKu5pZcCCJvb+xjc=", - "owner": "snowfallorg", - "repo": "lib", - "rev": "92803a029b5314d4436a8d9311d8707b71d9f0b6", - "type": "github" - }, - "original": { - "owner": "snowfallorg", - "repo": "lib", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "id": "systems", - "type": "indirect" - } - }, - "utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index fd57e46..c285314 100644 --- a/flake.nix +++ b/flake.nix @@ -8,9 +8,6 @@ alejandra.url = "github:kamadorueda/alejandra/3.1.0"; alejandra.inputs.nixpkgs.follows = "nixpkgs"; - nix-software-center.url = "github:snowfallorg/nix-software-center"; - nixos-conf-editor.url = "github:snowfallorg/nixos-conf-editor"; - home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -19,25 +16,12 @@ outputs = { self, - nixpkgs, - home-manager, - systems, ... } @ inputs: let - inherit (self) outputs; - - # copied from https://github.com/Misterio77/nix-config/blob/main/flake.nix - lib = nixpkgs.lib // home-manager.lib; - forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system}); - pkgsFor = lib.genAttrs (import systems) ( - system: - import nixpkgs { - inherit system; - config.allowUnfree = true; - } - ); - in { - inherit lib; + myLib = import ./myLib/default.nix {inherit self inputs;}; + in + with myLib; { + inherit lib; formatter = forEachSystem (pkgs: pkgs.alejandra); @@ -46,22 +30,11 @@ nixosConfigurations = { # Main desktop for games & workstation - hummingbird = lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; - modules = [ - ./hosts/hummingbird - ]; - }; + hummingbird = mkSystem ./hosts/hummingbird; }; homeConfigurations = { - "luna" = lib.homeManagerConfiguration { - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = {inherit inputs outputs;}; - modules = [ - ./home-manager/luna/home.nix - ]; - }; + "luna@hummingbird" = mkHome "x86_64-linux" ./home-manager/luna/home.nix; }; }; } diff --git a/home-manager/luna/common/default.nix b/home-manager/luna/common/default.nix index 7315a5b..ca9f56e 100644 --- a/home-manager/luna/common/default.nix +++ b/home-manager/luna/common/default.nix @@ -5,7 +5,10 @@ config, outputs, ... -}: { +}: +let + debug = builtins.trace "Heloooo"; +in { imports = [ ]; diff --git a/home-manager/luna/home.nix b/home-manager/luna/home.nix index e90f757..b044026 100644 --- a/home-manager/luna/home.nix +++ b/home-manager/luna/home.nix @@ -13,7 +13,6 @@ # The home.packages option allows you to install Nix packages into your # environment. home.packages = [ - alejandra # formatter - fd-find + ]; } diff --git a/hosts/common/default.nix b/hosts/common/default.nix index d4360be..29fd773 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -6,10 +6,6 @@ imports = [ inputs.home-manager.nixosModules.home-manager ]; - home-manager.useGlobalPkgs = true; - home-manager.extraSpecialArgs = { - inherit inputs outputs; - }; } diff --git a/hosts/hummingbird/configuration.nix b/hosts/hummingbird/configuration.nix index f8a04bc..1b740ef 100644 --- a/hosts/hummingbird/configuration.nix +++ b/hosts/hummingbird/configuration.nix @@ -119,8 +119,6 @@ # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. # wget gnome-menus - inputs.nix-software-center.packages.${system}.nix-software-center - inputs.nixos-conf-editor.packages.${system}.nixos-conf-editor ]; # Some programs need SUID wrappers, can be configured further or are