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 (
name: value:
lib.nixosSystem {
specialArgs = { inherit self; };
specialArgs = { inherit inputs; };
modules = [
{

View File

@ -1,21 +1,22 @@
{
inputs,
config,
pkgs,
self,
...
}:
{
imports = [
self.inputs.agenix.nixosModules.age
self.inputs.home-manager.nixosModule
inputs.agenix.nixosModules.age
inputs.home-manager.nixosModule
../modules/nixos
];
nixpkgs.overlays = [
self.inputs.agenix.overlays.default
inputs.agenix.overlays.default
(import ../overlays/default.nix)
(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;
useUserPackages = true;
sharedModules = [
self.inputs.nixvim.homeManagerModules.nixvim
inputs.nixvim.homeManagerModules.nixvim
{
home.stateVersion = config.system.stateVersion;
}
];
extraSpecialArgs = {
inherit inputs;
};
};
environment.systemPackages = with pkgs; [

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
{
inputs,
pkgs,
config,
self,
...
}:
@ -179,7 +179,7 @@ in
users.groups.nix-ci-user = { };
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";
};

View File

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

View File

@ -1,7 +1,7 @@
{
inputs,
config,
pkgs,
self,
...
}:
@ -12,7 +12,7 @@
];
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";
owner = "hass";
group = "hass";

View File

@ -1,8 +1,8 @@
{
inputs,
config,
lib,
pkgs,
self,
...
}:
@ -22,7 +22,7 @@
};
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";
owner = "zigbee2mqtt";
group = "zigbee2mqtt";

View File

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

View File

@ -1,7 +1,7 @@
{
inputs,
config,
lib,
self,
...
}:
@ -43,7 +43,7 @@ in
age.secrets =
{
"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";
group = "turnserver";
};
@ -52,7 +52,7 @@ in
if matrixIntegration then
{
"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";
group = "matrix-synapse";
};

View File

@ -1,8 +1,8 @@
{
inputs,
config,
lib,
pkgs,
self,
...
}:
let
@ -37,9 +37,9 @@ in
systemd.tmpfiles.rules = [
"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-auto.css' - - - - ${self.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.css' - - - - ${inputs.gitea-github-theme}/theme-github.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' - - - - ${inputs.gitea-github-theme}/theme-github-dark.css"
];
services.gitea = rec {

View File

@ -1,6 +1,6 @@
{
inputs,
config,
self,
...
}:
let
@ -31,7 +31,7 @@ in
};
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";
group = "outline";
};

View File

@ -1,6 +1,6 @@
{
inputs,
config,
self,
...
}:
let
@ -29,7 +29,7 @@ in
};
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 = {

View File

@ -1,7 +1,7 @@
{
inputs,
config,
lib,
self,
...
}:
@ -33,7 +33,7 @@ in
config = lib.mkIf cfg.enable {
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 = {

View File

@ -1,8 +1,8 @@
{
inputs,
config,
lib,
pkgs,
self,
...
}:
@ -25,7 +25,7 @@ in
config = lib.mkIf cfg.enable {
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 ];

View File

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

View File

@ -1,14 +1,14 @@
{
inputs,
config,
pkgs,
self,
...
}:
let
name = "jordan";
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} = {
description = "Jordan Holt";

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
{
inputs,
lib,
pkgs,
self,
...
}:
@ -199,7 +199,7 @@ in
"Kvantum/kvantum.kvconfig".text = toINI { } {
General.theme = "KvLibadwaitaDark";
};
"Kvantum/KvLibadwaita".source = "${self.inputs.kvlibadwaita}/src/KvLibadwaita";
"Kvantum/KvLibadwaita".source = "${inputs.kvlibadwaita}/src/KvLibadwaita";
};
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
];
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 =
self.inputs.thunderbird-gnome-theme;
inputs.thunderbird-gnome-theme;
home.programs.thunderbird = {
programs.thunderbird = {
enable = true;
profiles.Default = {
isDefault = true;

View File

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

View File

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

View File

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