treewide: use inputs instead of self

This commit is contained in:
Jordan Holt 2025-03-16 15:45:04 +00:00
parent 130197eeb8
commit 22232f7a84
Signed by: jordan
GPG Key ID: B8CFFF61F1CCF520
28 changed files with 67 additions and 61 deletions

View File

@ -93,7 +93,7 @@
(lib.mapAttrs ( (lib.mapAttrs (
name: value: name: value:
lib.nixosSystem { lib.nixosSystem {
specialArgs = { inherit self; }; specialArgs = { inherit inputs; };
modules = [ modules = [
{ {

View File

@ -1,21 +1,22 @@
{ {
inputs,
config,
pkgs, pkgs,
self,
... ...
}: }:
{ {
imports = [ imports = [
self.inputs.agenix.nixosModules.age inputs.agenix.nixosModules.age
self.inputs.home-manager.nixosModule inputs.home-manager.nixosModule
../modules/nixos ../modules/nixos
]; ];
nixpkgs.overlays = [ nixpkgs.overlays = [
self.inputs.agenix.overlays.default inputs.agenix.overlays.default
(import ../overlays/default.nix) (import ../overlays/default.nix)
(final: prev: { (final: prev: {
unstable = import self.inputs.nixpkgs-unstable { system = final.system; }; unstable = import inputs.nixpkgs-unstable { system = final.system; };
}) })
]; ];
@ -106,8 +107,14 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
sharedModules = [ sharedModules = [
self.inputs.nixvim.homeManagerModules.nixvim inputs.nixvim.homeManagerModules.nixvim
{
home.stateVersion = config.system.stateVersion;
}
]; ];
extraSpecialArgs = {
inherit inputs;
};
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@ -1,13 +1,13 @@
{ {
inputs,
lib, lib,
self,
pkgs, pkgs,
... ...
}: }:
{ {
imports = [ imports = [
self.inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
./hardware-configuration.nix ./hardware-configuration.nix
./disko-config.nix ./disko-config.nix
../desktop.nix ../desktop.nix

View File

@ -1,12 +1,12 @@
{ {
inputs,
lib, lib,
self,
... ...
}: }:
{ {
imports = [ imports = [
self.inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
./hardware-configuration.nix ./hardware-configuration.nix
./disko-config.nix ./disko-config.nix
./mail.nix ./mail.nix

View File

@ -1,6 +1,6 @@
{ {
inputs,
config, config,
self,
... ...
}: }:
@ -20,7 +20,7 @@ let
in in
{ {
imports = [ imports = [
self.inputs.nixos-mailserver.nixosModule inputs.nixos-mailserver.nixosModule
]; ];
services.roundcube = { services.roundcube = {

View File

@ -1,7 +1,7 @@
{ {
inputs,
pkgs, pkgs,
config, config,
self,
... ...
}: }:
@ -179,7 +179,7 @@ in
users.groups.nix-ci-user = { }; users.groups.nix-ci-user = { };
age.secrets."files/services/gitea-runner/${hostname}-token" = { age.secrets."files/services/gitea-runner/${hostname}-token" = {
file = "${self.inputs.secrets}/files/services/gitea-runner/${hostname}-token.age"; file = "${inputs.secrets}/files/services/gitea-runner/${hostname}-token.age";
group = "podman"; group = "podman";
}; };

View File

@ -1,12 +1,12 @@
{ {
inputs,
pkgs, pkgs,
self,
... ...
}: }:
{ {
imports = [ imports = [
self.inputs.nixos-hardware.nixosModules.raspberry-pi-4 inputs.nixos-hardware.nixosModules.raspberry-pi-4
./hardware-configuration.nix ./hardware-configuration.nix
./home-assistant ./home-assistant
../server.nix ../server.nix

View File

@ -1,7 +1,7 @@
{ {
inputs,
config, config,
pkgs, pkgs,
self,
... ...
}: }:
@ -12,7 +12,7 @@
]; ];
age.secrets."files/services/home-assistant/secrets.yaml" = { age.secrets."files/services/home-assistant/secrets.yaml" = {
file = "${self.inputs.secrets}/files/services/home-assistant/secrets.yaml.age"; file = "${inputs.secrets}/files/services/home-assistant/secrets.yaml.age";
path = "${config.services.home-assistant.configDir}/secrets.yaml"; path = "${config.services.home-assistant.configDir}/secrets.yaml";
owner = "hass"; owner = "hass";
group = "hass"; group = "hass";

View File

@ -1,8 +1,8 @@
{ {
inputs,
config, config,
lib, lib,
pkgs, pkgs,
self,
... ...
}: }:
@ -22,7 +22,7 @@
}; };
age.secrets."files/services/zigbee2mqtt/secret.yaml" = { age.secrets."files/services/zigbee2mqtt/secret.yaml" = {
file = "${self.inputs.secrets}/files/services/zigbee2mqtt/secret.yaml.age"; file = "${inputs.secrets}/files/services/zigbee2mqtt/secret.yaml.age";
path = "${config.services.zigbee2mqtt.dataDir}/secret.yaml"; path = "${config.services.zigbee2mqtt.dataDir}/secret.yaml";
owner = "zigbee2mqtt"; owner = "zigbee2mqtt";
group = "zigbee2mqtt"; group = "zigbee2mqtt";

View File

@ -1,14 +1,14 @@
{ {
inputs,
config, config,
lib, lib,
pkgs, pkgs,
self,
... ...
}: }:
{ {
imports = [ imports = [
self.inputs.nixos-hardware.nixosModules.raspberry-pi-4 inputs.nixos-hardware.nixosModules.raspberry-pi-4
./hardware-configuration.nix ./hardware-configuration.nix
../server.nix ../server.nix
]; ];

View File

@ -1,7 +1,7 @@
{ {
inputs,
config, config,
lib, lib,
self,
... ...
}: }:
@ -43,7 +43,7 @@ in
age.secrets = age.secrets =
{ {
"passwords/services/coturn/static-auth-secret" = { "passwords/services/coturn/static-auth-secret" = {
file = "${self.inputs.secrets}/passwords/services/coturn/static-auth-secret.age"; file = "${inputs.secrets}/passwords/services/coturn/static-auth-secret.age";
owner = "turnserver"; owner = "turnserver";
group = "turnserver"; group = "turnserver";
}; };
@ -52,7 +52,7 @@ in
if matrixIntegration then if matrixIntegration then
{ {
"passwords/services/coturn/matrix-turn-config.yml" = { "passwords/services/coturn/matrix-turn-config.yml" = {
file = "${self.inputs.secrets}/passwords/services/coturn/matrix-turn-config.yml.age"; file = "${inputs.secrets}/passwords/services/coturn/matrix-turn-config.yml.age";
owner = "matrix-synapse"; owner = "matrix-synapse";
group = "matrix-synapse"; group = "matrix-synapse";
}; };

View File

@ -1,8 +1,8 @@
{ {
inputs,
config, config,
lib, lib,
pkgs, pkgs,
self,
... ...
}: }:
let let
@ -37,9 +37,9 @@ in
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d '${config.services.gitea.customDir}/public/assets/css' 0750 ${config.services.gitea.user} ${config.services.gitea.group} - -" "d '${config.services.gitea.customDir}/public/assets/css' 0750 ${config.services.gitea.user} ${config.services.gitea.group} - -"
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github.css' - - - - ${self.inputs.gitea-github-theme}/theme-github.css" "L+ '${config.services.gitea.customDir}/public/assets/css/theme-github.css' - - - - ${inputs.gitea-github-theme}/theme-github.css"
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-auto.css' - - - - ${self.inputs.gitea-github-theme}/theme-github-auto.css" "L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-auto.css' - - - - ${inputs.gitea-github-theme}/theme-github-auto.css"
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-dark.css' - - - - ${self.inputs.gitea-github-theme}/theme-github-dark.css" "L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-dark.css' - - - - ${inputs.gitea-github-theme}/theme-github-dark.css"
]; ];
services.gitea = rec { services.gitea = rec {

View File

@ -1,6 +1,6 @@
{ {
inputs,
config, config,
self,
... ...
}: }:
let let
@ -31,7 +31,7 @@ in
}; };
age.secrets."passwords/services/outline/oidc-client-secret" = { age.secrets."passwords/services/outline/oidc-client-secret" = {
file = "${self.inputs.secrets}/passwords/services/outline/oidc-client-secret.age"; file = "${inputs.secrets}/passwords/services/outline/oidc-client-secret.age";
owner = "outline"; owner = "outline";
group = "outline"; group = "outline";
}; };

View File

@ -1,6 +1,6 @@
{ {
inputs,
config, config,
self,
... ...
}: }:
let let
@ -29,7 +29,7 @@ in
}; };
age.secrets."passwords/services/photoprism/admin" = { age.secrets."passwords/services/photoprism/admin" = {
file = "${self.inputs.secrets}/passwords/services/photoprism/admin.age"; file = "${inputs.secrets}/passwords/services/photoprism/admin.age";
}; };
services.photoprism = { services.photoprism = {

View File

@ -1,7 +1,7 @@
{ {
inputs,
config, config,
lib, lib,
self,
... ...
}: }:
@ -33,7 +33,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
age.secrets."passwords/services/borg/${hostname}-passphrase" = { age.secrets."passwords/services/borg/${hostname}-passphrase" = {
file = "${self.inputs.secrets}/passwords/services/borg/${hostname}-passphrase.age"; file = "${inputs.secrets}/passwords/services/borg/${hostname}-passphrase.age";
}; };
services.borgmatic = { services.borgmatic = {

View File

@ -1,8 +1,8 @@
{ {
inputs,
config, config,
lib, lib,
pkgs, pkgs,
self,
... ...
}: }:
@ -25,7 +25,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
age.secrets."passwords/services/tailscale/${hostname}-authkey" = { age.secrets."passwords/services/tailscale/${hostname}-authkey" = {
file = "${self.inputs.secrets}/passwords/services/tailscale/${hostname}-authkey.age"; file = "${inputs.secrets}/passwords/services/tailscale/${hostname}-authkey.age";
}; };
environment.systemPackages = [ pkgs.tailscale ]; environment.systemPackages = [ pkgs.tailscale ];

View File

@ -1,7 +1,7 @@
{ {
inputs,
config, config,
lib, lib,
self,
... ...
}: }:
@ -26,7 +26,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
age.secrets."passwords/networks" = { age.secrets."passwords/networks" = {
file = "${self.inputs.secrets}/passwords/networks.age"; file = "${inputs.secrets}/passwords/networks.age";
}; };
networking = { networking = {

View File

@ -1,14 +1,14 @@
{ {
inputs,
config, config,
pkgs, pkgs,
self,
... ...
}: }:
let let
name = "jordan"; name = "jordan";
in in
{ {
age.secrets."passwords/users/jordan".file = "${self.inputs.secrets}/passwords/users/jordan.age"; age.secrets."passwords/users/jordan".file = "${inputs.secrets}/passwords/users/jordan.age";
users.users.${name} = { users.users.${name} = {
description = "Jordan Holt"; description = "Jordan Holt";

View File

@ -3,7 +3,7 @@
}: }:
{ {
home.programs.git = { programs.git = {
enable = true; enable = true;
aliases = { aliases = {
amend = "commit --amend"; amend = "commit --amend";

View File

@ -3,11 +3,11 @@
}: }:
{ {
home.programs.gpg = { programs.gpg = {
enable = true; enable = true;
}; };
home.services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
enableSshSupport = true; enableSshSupport = true;
}; };

View File

@ -1,7 +1,7 @@
{ {
config,
lib, lib,
pkgs, pkgs,
osConfig,
... ...
}: }:
@ -11,7 +11,7 @@
./firefox.nix ./firefox.nix
./thunderbird.nix ./thunderbird.nix
] ]
++ lib.optionals config.modules.system.desktop.gnome.enable [ ++ lib.optionals osConfig.modules.system.desktop.gnome.enable [
./gnome.nix ./gnome.nix
]; ];

View File

@ -1,13 +1,12 @@
{ {
self, inputs,
... ...
}: }:
{ {
home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme;
self.inputs.firefox-gnome-theme;
home.programs.firefox = { programs.firefox = {
enable = true; enable = true;
profiles.Default = { profiles.Default = {
search = { search = {

View File

@ -1,7 +1,7 @@
{ {
inputs,
lib, lib,
pkgs, pkgs,
self,
... ...
}: }:
@ -199,7 +199,7 @@ in
"Kvantum/kvantum.kvconfig".text = toINI { } { "Kvantum/kvantum.kvconfig".text = toINI { } {
General.theme = "KvLibadwaitaDark"; General.theme = "KvLibadwaitaDark";
}; };
"Kvantum/KvLibadwaita".source = "${self.inputs.kvlibadwaita}/src/KvLibadwaita"; "Kvantum/KvLibadwaita".source = "${inputs.kvlibadwaita}/src/KvLibadwaita";
}; };
home.packages = home.packages =
@ -238,5 +238,5 @@ in
[ ] [ ]
); );
home.services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3; services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
} }

View File

@ -28,5 +28,5 @@
adw-gtk3 adw-gtk3
]; ];
home.services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3; services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
} }

View File

@ -1,13 +1,13 @@
{ {
self, inputs,
... ...
}: }:
{ {
home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source = home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source =
self.inputs.thunderbird-gnome-theme; inputs.thunderbird-gnome-theme;
home.programs.thunderbird = { programs.thunderbird = {
enable = true; enable = true;
profiles.Default = { profiles.Default = {
isDefault = true; isDefault = true;

View File

@ -3,7 +3,7 @@
}: }:
{ {
home.programs.nixvim.config = { programs.nixvim.config = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;

View File

@ -4,7 +4,7 @@
}: }:
{ {
home.programs.password-store = { programs.password-store = {
enable = true; enable = true;
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]); package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
}; };

View File

@ -4,7 +4,7 @@
}: }:
{ {
home.programs = { programs = {
zsh = { zsh = {
enable = true; enable = true;
autocd = true; autocd = true;