mirror of
https://github.com/smg1024/nix-darwin.git
synced 2026-05-22 20:32:59 +09:00
refactor(secret): agenix wip
This commit is contained in:
parent
6e73c7e5a8
commit
3cce7a1884
2 changed files with 28 additions and 10 deletions
30
flake.nix
30
flake.nix
|
|
@ -2,7 +2,10 @@
|
||||||
description = "Nix for Poby's MacOS";
|
description = "Nix for Poby's MacOS";
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
substituters = ["https://cache.nixos.org"];
|
substituters = [
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
inputs = let
|
inputs = let
|
||||||
|
|
@ -10,10 +13,12 @@
|
||||||
in {
|
in {
|
||||||
# nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-unstable"; # comment out for unstable version
|
# nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-unstable"; # comment out for unstable version
|
||||||
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-${stableVersion}-darwin";
|
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-${stableVersion}-darwin";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
url = "github:nix-community/home-manager/release-${stableVersion}";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||||
};
|
};
|
||||||
|
|
||||||
darwin = {
|
darwin = {
|
||||||
url = "github:nix-darwin/nix-darwin/nix-darwin-${stableVersion}";
|
url = "github:nix-darwin/nix-darwin/nix-darwin-${stableVersion}";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||||
|
|
@ -24,6 +29,12 @@
|
||||||
url = "github:notashelf/nvf";
|
url = "github:notashelf/nvf";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# agenix for secrets
|
||||||
|
agenix = {
|
||||||
|
url = "github:ryantm/agenix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {
|
outputs = inputs @ {
|
||||||
|
|
@ -32,6 +43,7 @@
|
||||||
darwin,
|
darwin,
|
||||||
home-manager,
|
home-manager,
|
||||||
nvf,
|
nvf,
|
||||||
|
agenix,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
|
|
@ -52,15 +64,17 @@
|
||||||
./modules/system.nix
|
./modules/system.nix
|
||||||
./modules/apps.nix
|
./modules/apps.nix
|
||||||
./modules/host-users.nix
|
./modules/host-users.nix
|
||||||
|
|
||||||
nvf.darwinModules.default
|
nvf.darwinModules.default
|
||||||
|
agenix.darwinModules.default
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager = {
|
||||||
home-manager.useUserPackages = true;
|
useGlobalPkgs = true;
|
||||||
home-manager.extraSpecialArgs = specialArgs;
|
useUserPackages = true;
|
||||||
home-manager.users.${username} = import ./home;
|
backupFileExtension = "backup";
|
||||||
|
extraSpecialArgs = specialArgs;
|
||||||
|
users.${username} = import ./home;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,14 @@
|
||||||
hostname,
|
hostname,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
networking.hostName = hostname;
|
networking = {
|
||||||
networking.computerName = hostname;
|
hostName = hostname;
|
||||||
|
computerName = hostname;
|
||||||
|
localHostName = hostname;
|
||||||
|
}
|
||||||
|
|
||||||
users.users."${username}" = {
|
users.users."${username}" = {
|
||||||
|
description = "Sangmin Kim";
|
||||||
home = "/Users/${username}";
|
home = "/Users/${username}";
|
||||||
description = username;
|
description = username;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue