mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Use the self attribute directly
This commit is contained in:
parent
ec62701a29
commit
6626303217
4 changed files with 26 additions and 7 deletions
16
flake.nix
16
flake.nix
|
|
@ -33,20 +33,30 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {nixpkgs, ...} @ inputs: let
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
...
|
||||||
|
} @ inputs: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
north = nixpkgs.lib.nixosSystem {
|
north = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {
|
||||||
|
inherit self;
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/north
|
./hosts/north
|
||||||
"${./.}/users/seb/@north.nix"
|
"${./.}/users/seb/@north.nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
inspiron = nixpkgs.lib.nixosSystem {
|
inspiron = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {
|
||||||
|
inherit self;
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/inspiron
|
./hosts/inspiron
|
||||||
"${./.}/users/seb/@inspiron.nix"
|
"${./.}/users/seb/@inspiron.nix"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
self,
|
||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
@ -11,7 +12,7 @@
|
||||||
config = lib.mkIf config.myConfig.sops.enable {
|
config = lib.mkIf config.myConfig.sops.enable {
|
||||||
sops = {
|
sops = {
|
||||||
age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"];
|
age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"];
|
||||||
defaultSopsFile = "${inputs.self}/users/${config.home.username}/secrets.yaml";
|
defaultSopsFile = "${self}/users/${config.home.username}/secrets.yaml";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
self,
|
||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
@ -11,7 +12,7 @@
|
||||||
config = lib.mkIf config.myConfig.sops.enable {
|
config = lib.mkIf config.myConfig.sops.enable {
|
||||||
sops = {
|
sops = {
|
||||||
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||||
defaultSopsFile = "${inputs.self}/hosts/${config.networking.hostName}/secrets.yaml";
|
defaultSopsFile = "${self}/hosts/${config.networking.hostName}/secrets.yaml";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,17 @@
|
||||||
{inputs, ...}: {
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = {inherit inputs;};
|
extraSpecialArgs = {
|
||||||
|
inherit self;
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue