From 833dcf277bca8828b2856f5262bb519c1ceb0f98 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 19 Feb 2024 11:05:47 -0600 Subject: [PATCH] remove dead code and make flake input strategy viable --- flake.nix | 22 +++++++--------------- hosts/algiz/default.nix | 4 ++-- hosts/mannaz/default.nix | 4 ++-- hosts/othalan/default.nix | 4 ++-- hosts/othalan/system.nix | 2 -- lib/default.nix | 3 ++- modules/common.nix | 4 ++-- modules/development/dev.nix | 4 ++-- modules/langs/nim.nix | 1 - modules/nix.nix | 3 ++- 10 files changed, 21 insertions(+), 30 deletions(-) diff --git a/flake.nix b/flake.nix index 76083de..0f3417d 100644 --- a/flake.nix +++ b/flake.nix @@ -3,23 +3,15 @@ inputs.inputs.url = "path:./inputs"; - # nixConfig = { - # extra-substituters = [ - # "https://hyprland.cachix.org" - # "https://nixpkgs-wayland.cachix.org" - # "https://daylin.cachix.org" - # ]; - # extra-trusted-public-keys = [ - # "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - # "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" - # "daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k=" - # ]; - # }; - # - outputs = {inputs, ...}: let + outputs = { + inputs, + self, + ... + }: let lib = import ./lib { nixpkgs = inputs.inputs.nixpkgs; - inputs = inputs; + inputs = inputs.inputs; + inherit self; }; inherit (lib) findModules buildHosts buildOizys; in { diff --git a/hosts/algiz/default.nix b/hosts/algiz/default.nix index aafc0ed..5d733f4 100644 --- a/hosts/algiz/default.nix +++ b/hosts/algiz/default.nix @@ -1,9 +1,9 @@ { - inputs, + self, pkgs, ... }: { - imports = with inputs.self.nixosModules; [ + imports = with self.nixosModules; [ docker restic ]; diff --git a/hosts/mannaz/default.nix b/hosts/mannaz/default.nix index d1da065..ce62397 100644 --- a/hosts/mannaz/default.nix +++ b/hosts/mannaz/default.nix @@ -1,5 +1,5 @@ -{inputs, ...}: { - imports = with inputs.self.nixosModules; [ +{self, ...}: { + imports = with self.nixosModules; [ nix-ld ]; diff --git a/hosts/othalan/default.nix b/hosts/othalan/default.nix index 3744f07..bd47a56 100644 --- a/hosts/othalan/default.nix +++ b/hosts/othalan/default.nix @@ -1,9 +1,9 @@ { - inputs, pkgs, + self, ... }: { - imports = with inputs.self.nixosModules; [ + imports = with self.nixosModules; [ nix-ld virtualbox restic diff --git a/hosts/othalan/system.nix b/hosts/othalan/system.nix index 1a1766b..8cec507 100644 --- a/hosts/othalan/system.nix +++ b/hosts/othalan/system.nix @@ -1,5 +1,4 @@ { - config, pkgs, mkRune, ... @@ -32,7 +31,6 @@ rune = "othalan"; runeKind = "ascii"; }; - # + inputs.self.nixosModules.runes.othalan.ascii; # catppuccin/tty move to "module" boot.kernelParams = [ diff --git a/lib/default.nix b/lib/default.nix index 8c08ba9..d2b269b 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,6 +1,7 @@ { inputs, nixpkgs, + self, ... }: let inherit (builtins) concatLists attrValues mapAttrs elemAt match readDir filter listToAttrs; @@ -41,7 +42,7 @@ in rec { isNixFile (listFilesRecursive (../. + "/hosts/${hostname}")); - specialArgs = {inherit inputs mkRune;}; + specialArgs = {inherit inputs mkRune self;}; }; mapHosts = dir: mapAttrs (name: _: mkSystem name) (readDir dir); buildHosts = _: mapHosts ../hosts; diff --git a/modules/common.nix b/modules/common.nix index cda2c7a..ae0ceee 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -1,9 +1,9 @@ { - inputs, lib, + self, ... }: { - imports = with inputs.self.nixosModules; [ + imports = with self.nixosModules; [ users nix cli diff --git a/modules/development/dev.nix b/modules/development/dev.nix index db17530..347018b 100644 --- a/modules/development/dev.nix +++ b/modules/development/dev.nix @@ -1,9 +1,9 @@ { - inputs, pkgs, + self, ... }: { - imports = with inputs.self.nixosModules; [ + imports = with self.nixosModules; [ git ]; programs.zsh.enable = true; diff --git a/modules/langs/nim.nix b/modules/langs/nim.nix index 78da2e0..541eda2 100644 --- a/modules/langs/nim.nix +++ b/modules/langs/nim.nix @@ -1,5 +1,4 @@ { - nixpkgs, config, lib, pkgs, diff --git a/modules/nix.nix b/modules/nix.nix index f9b55da..352c7e4 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -1,5 +1,6 @@ { inputs, + self, pkgs, ... }: { @@ -19,7 +20,7 @@ environment.systemPackages = with pkgs; [ nix-output-monitor alejandra - inputs.self.packages.${pkgs.system}.oizys + self.packages.${pkgs.system}.oizys inputs.pinix.packages.${pkgs.system}.default ];