MacBook.local-2024-11-28-10-56-04

This commit is contained in:
Alexander Szczepanski
2024-11-28 10:56:04 +01:00
parent 8761abf51c
commit f26936704f
18 changed files with 85 additions and 15 deletions

View File

@ -75,7 +75,7 @@
}; };
sops = { sops = {
defaultSopsFile = lib.mkDefault ../secrets.yaml; defaultSopsFile = lib.mkDefault ../secrets/secrets.yaml;
validateSopsFiles = true; validateSopsFiles = true;
age = { age = {
sshKeyPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"]; sshKeyPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"];
@ -86,7 +86,7 @@
secrets = { secrets = {
hashedPassword = { hashedPassword = {
neededForUsers = true; neededForUsers = true;
sopsFile = ../secrets.yaml; sopsFile = ../secrets/secrets.yaml;
}; };
}; };
}; };

21
flake.lock generated
View File

@ -174,6 +174,26 @@
"type": "github" "type": "github"
} }
}, },
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1732603785,
"narHash": "sha256-AEjWTJwOmSnVYsSJCojKgoguGfFfwel6z/6ud6UFMU8=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "6ab87b7c84d4ee873e937108c4ff80c015a40c7a",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"nix-github-actions": { "nix-github-actions": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -252,6 +272,7 @@
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"impermanence": "impermanence", "impermanence": "impermanence",
"kwin-effects-forceblur": "kwin-effects-forceblur", "kwin-effects-forceblur": "kwin-effects-forceblur",
"nix-darwin": "nix-darwin",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"

View File

@ -28,6 +28,11 @@
url = "github:TamtamHero/fw-fanctrl/packaging/nix"; url = "github:TamtamHero/fw-fanctrl/packaging/nix";
inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs-unstable";
}; };
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
}; };
outputs = { outputs = {
@ -40,6 +45,7 @@
nixpkgs-unstable, nixpkgs-unstable,
sops-nix, sops-nix,
impermanence, impermanence,
nix-darwin,
... ...
} @ inputs: let } @ inputs: let
inherit (self) outputs; inherit (self) outputs;
@ -121,5 +127,18 @@
]; ];
}; };
}; };
darwinConfigurations."MacBook" = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
./machine/macbook/configuration.nix
# home-manager.darwinModules.home-manager
# {
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
# home-manager.users.omerxx = import ./home.nix;
# }
];
};
}; };
} }

View File

@ -22,7 +22,7 @@ in {
]; ];
sops = { sops = {
defaultSopsFile = ../../secrets.yaml; defaultSopsFile = ../../secrets/secrets.yaml;
validateSopsFiles = true; validateSopsFiles = true;
age = { age = {
sshKeyPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"]; sshKeyPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"];
@ -32,7 +32,7 @@ in {
secrets = { secrets = {
borg-key = { borg-key = {
sopsFile = ../../secrets-desktop.yaml; sopsFile = ../../secrets/secrets-desktop.yaml;
owner = config.users.users.alex.name; owner = config.users.users.alex.name;
group = config.users.users.alex.group; group = config.users.users.alex.group;
}; };

View File

@ -21,7 +21,7 @@ in {
]; ];
sops = { sops = {
defaultSopsFile = ../../secrets.yaml; defaultSopsFile = ../../secrets/secrets.yaml;
validateSopsFiles = true; validateSopsFiles = true;
age = { age = {
sshKeyPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"]; sshKeyPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"];
@ -31,7 +31,7 @@ in {
secrets = { secrets = {
borg-key = { borg-key = {
sopsFile = ../../secrets-framework.yaml; sopsFile = ../../secrets/secrets-framework.yaml;
owner = config.users.users.alex.name; owner = config.users.users.alex.name;
group = config.users.users.alex.group; group = config.users.users.alex.group;
}; };

View File

@ -0,0 +1,30 @@
{
config,
pkgs,
lib,
outputs,
inputs,
...
}: {
nixpkgs.hostPlatform = "aarch64-darwin";
system.defaults = {
dock.autohide = true;
dock.mru-spaces = false;
# finder.AppleShowAllExtensions = true;
# finder.FXPreferredViewStyle = "clmv";
screencapture.location = "~/Pictures/screenshots";
screensaver.askForPasswordDelay = 10;
};
services.nix-daemon.enable = true;
nix.settings.experimental-features = "nix-command flakes";
nix = {
configureBuildUsers = true;
useDaemon = true;
};
homebrew.enable = true;
system.stateVersion = 5;
}

View File

@ -13,7 +13,7 @@
]; ];
sops = { sops = {
defaultSopsFile = ../../secrets.yaml; defaultSopsFile = ../../secrets/secrets.yaml;
validateSopsFiles = true; validateSopsFiles = true;
age = { age = {
sshKeyPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"]; sshKeyPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"];
@ -23,7 +23,7 @@
secrets = { secrets = {
borg-key = { borg-key = {
sopsFile = ../../secrets-mini.yaml; sopsFile = ../../secrets/secrets-mini.yaml;
owner = config.users.users.alex.name; owner = config.users.users.alex.name;
group = config.users.users.alex.group; group = config.users.users.alex.group;
}; };

View File

@ -13,7 +13,7 @@
]; ];
sops = { sops = {
defaultSopsFile = ../../secrets.yaml; defaultSopsFile = ../../secrets/secrets.yaml;
validateSopsFiles = true; validateSopsFiles = true;
age = { age = {
sshKeyPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"]; sshKeyPaths = ["/persist/etc/ssh/ssh_host_ed25519_key"];

View File

@ -26,7 +26,7 @@ in {
]; ];
sops = { sops = {
defaultSopsFile = ../../secrets-vps-arm.yaml; defaultSopsFile = ../../secrets/secrets-vps-arm.yaml;
secrets = { secrets = {
borg-key = { borg-key = {
owner = config.users.users.alex.name; owner = config.users.users.alex.name;