Initial nix-darwin config for mars
This commit is contained in:
21
flake.lock
generated
21
flake.lock
generated
@@ -1,5 +1,25 @@
|
||||
{
|
||||
"nodes": {
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773000227,
|
||||
"narHash": "sha256-zm3ftUQw0MPumYi91HovoGhgyZBlM4o3Zy0LhPNwzXE=",
|
||||
"owner": "nix-darwin",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "da529ac9e46f25ed5616fd634079a5f3c579135f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-darwin",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -155,6 +175,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"fw_nix": "fw_nix",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
|
||||
27
flake.nix
27
flake.nix
@@ -20,6 +20,10 @@
|
||||
url = "git+https://github.com/futureware-tech/nix.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
darwin = {
|
||||
url = "github:nix-darwin/nix-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
@@ -28,6 +32,7 @@
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
vscode-server,
|
||||
darwin,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
@@ -59,6 +64,28 @@
|
||||
];
|
||||
};
|
||||
|
||||
darwinConfigurations.mars = darwin.lib.darwinSystem {
|
||||
system = "x86_64-darwin";
|
||||
specialArgs.primaryUser = "artem";
|
||||
modules = [
|
||||
inputs.fw_nix.nixosModules.tools
|
||||
inputs.fw_nix.nixosModules.nix-settings
|
||||
inputs.fw_nix.nixosModules.futureware
|
||||
({ lib, ... }: {
|
||||
# TODO: find solution to these ugly workarounds
|
||||
options.programs.htop = lib.mkOption {
|
||||
type = lib.types.deferredModule;
|
||||
default = { };
|
||||
};
|
||||
options.programs.git = lib.mkOption {
|
||||
type = lib.types.deferredModule;
|
||||
default = { };
|
||||
};
|
||||
})
|
||||
./hosts/mars/darwin.nix
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations.deimos =
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
|
||||
29
hosts/mars/darwin.nix
Normal file
29
hosts/mars/darwin.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ pkgs, primaryUser, ... }:
|
||||
{
|
||||
nixpkgs.hostPlatform = "x86_64-darwin";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
system.primaryUser = primaryUser;
|
||||
|
||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||
programs.zsh.enable = true;
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
onActivation = {
|
||||
cleanup = "zap";
|
||||
autoUpdate = true;
|
||||
upgrade = true;
|
||||
};
|
||||
casks = [
|
||||
"bambu-studio"
|
||||
];
|
||||
};
|
||||
|
||||
users.users."${primaryUser}" = {
|
||||
name = primaryUser;
|
||||
home = "/Users/${primaryUser}";
|
||||
};
|
||||
|
||||
system.stateVersion = 6; # Never change.
|
||||
}
|
||||
Reference in New Issue
Block a user