workmac: move over the nix-darwin configuration
This commit is contained in:
parent
2a7ae8db06
commit
969e3d981c
28
darwin/configuration.nix
Normal file
28
darwin/configuration.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages = [ pkgs.vim ];
|
||||
|
||||
# Use a custom configuration.nix location.
|
||||
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
|
||||
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
# nix.package = pkgs.nix;
|
||||
|
||||
# Create /etc/bashrc that loads the nix-darwin environment.
|
||||
programs.zsh.enable = true; # default shell on catalina
|
||||
|
||||
# system-wide SSH configuration, used by nix-daemon for remote builders
|
||||
|
||||
# show hidden files
|
||||
system.defaults.NSGlobalDomain.AppleShowAllFiles = true;
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 4;
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
}
|
21
flake.lock
21
flake.lock
|
@ -172,6 +172,26 @@
|
|||
"url": "ssh://gitea@git.orlives.de:2342/schmittlauch/home-manager_secrets.git"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710717205,
|
||||
"narHash": "sha256-Wf3gHh5uV6W1TV/A8X8QJf99a5ypDSugY4sNtdJDe0A=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "bcc8afd06e237df060c85bad6af7128e05fd61a3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1707211557,
|
||||
|
@ -303,6 +323,7 @@
|
|||
"home-manager": "home-manager",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"mysecrets": "mysecrets",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixos-unstable": "nixos-unstable",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
|
|
10
flake.nix
10
flake.nix
|
@ -18,6 +18,10 @@
|
|||
url = "github:numtide/treefmt-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-darwin = {
|
||||
url = "github:LnL7/nix-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nur.url = "github:nix-community/NUR";
|
||||
# TODO: possible make this a flake as well
|
||||
|
@ -36,6 +40,7 @@
|
|||
utils,
|
||||
home-manager,
|
||||
treefmt-nix,
|
||||
nix-darwin,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
|
@ -106,6 +111,9 @@
|
|||
lanzaboote.nixosModules.lanzaboote
|
||||
];
|
||||
};
|
||||
darwinConfigurations."OS-MacBook-Pro" = nix-darwin.lib.darwinSystem {
|
||||
modules = [ ./darwin/configuration.nix ];
|
||||
};
|
||||
homeConfigurations = {
|
||||
spiollinux-desktop = mkHomeManager "desktop" "spiollinux" systems.x86_64-linux;
|
||||
os-workmac = mkHomeManager "workmac" "os" systems.aarch64-darwin;
|
||||
|
@ -156,7 +164,7 @@
|
|||
["framenix"]="spiollinux-desktop"
|
||||
["thinknix"]="spiollinux-desktop"
|
||||
# TODO: hostname workmac
|
||||
["os"]="workmac"
|
||||
["OS MacBook Pro"]="workmac"
|
||||
)
|
||||
user=$(id -un)
|
||||
host=$(hostname)
|
||||
|
|
Loading…
Reference in a new issue