feat: Formatting and cubert darwin-nix
This commit is contained in:
parent
b8adc59703
commit
8e0fa833fc
5 changed files with 126 additions and 13 deletions
62
common/darwin/common.nix
Normal file
62
common/darwin/common.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
outputs,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) nixpkgs;
|
||||
in {
|
||||
imports = [
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
./fonts.nix
|
||||
./packages.nix
|
||||
];
|
||||
|
||||
home-manager.extraSpecialArgs = {inherit inputs outputs;};
|
||||
|
||||
users.users.kdb424 = {
|
||||
name = "kdb424";
|
||||
home = "/Users/kdb424";
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages = [
|
||||
pkgs.vim
|
||||
];
|
||||
|
||||
#security.pam.enableSudoTouchIdAuth = true;
|
||||
|
||||
environment.shells = builtins.attrValues {inherit (pkgs) bashInteractive zsh;};
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
nix.package = pkgs.nix;
|
||||
nix.extraOptions =
|
||||
''
|
||||
experimental-features = nix-command flakes repl-flake
|
||||
''
|
||||
+ lib.optionalString (pkgs.system == "aarch64-darwin") ''
|
||||
extra-platforms = x86_64-darwin aarch64-darwin
|
||||
'';
|
||||
|
||||
# pin nixpkgs in the system flake registry to the revision used
|
||||
# to build the config
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.overlays = [
|
||||
(final: prev:
|
||||
lib.optionalAttrs (prev.stdenv.system == "aarch64-darwin") {
|
||||
# Add access to x86 packages system is running Apple Silicon
|
||||
pkgs-x86 = import nixpkgs {
|
||||
system = "x86_64-darwin";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
system.stateVersion = 4;
|
||||
}
|
27
common/darwin/fonts.nix
Normal file
27
common/darwin/fonts.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{pkgs, ...}: let
|
||||
nerd-fonts = [
|
||||
"FiraCode"
|
||||
"DroidSansMono"
|
||||
"JetBrainsMono"
|
||||
"FantasqueSansMono"
|
||||
"Iosevka"
|
||||
];
|
||||
in {
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fonts =
|
||||
[
|
||||
(pkgs.nerdfonts.override {fonts = nerd-fonts;})
|
||||
]
|
||||
++ builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
fira-code
|
||||
open-fonts
|
||||
powerline-fonts
|
||||
liberation_ttf
|
||||
iosevka
|
||||
;
|
||||
};
|
||||
};
|
||||
}
|
17
common/darwin/packages.nix
Normal file
17
common/darwin/packages.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
alejandra
|
||||
just
|
||||
vim
|
||||
wget
|
||||
home-manager
|
||||
yadm
|
||||
];
|
||||
}
|
17
flake.nix
17
flake.nix
|
@ -99,18 +99,9 @@
|
|||
amy = mkNixos [./hosts/amy];
|
||||
};
|
||||
|
||||
#darwinConfigurations = {
|
||||
# 14" M1-Pro macbook
|
||||
#sef-macbook = mkDarwin "aarch64-darwin" [ ./darwin/hosts/macbook.nix ];
|
||||
|
||||
# 16" intel MBP (ShareFile dev)
|
||||
#AMERMACC02FC2U2MD6R = mkDarwin "x86_64-darwin" [ ./darwin/hosts/work-macbook.nix ];
|
||||
#};
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
#homeConfigurations = {
|
||||
# TODO: add generic standalone home-manager config
|
||||
#};
|
||||
darwinConfigurations = {
|
||||
# M2 Mac mini
|
||||
cubert = mkDarwin "aarch64-darwin" [./hosts/cubert];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
16
hosts/cubert/default.nix
Normal file
16
hosts/cubert/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) nixpkgs;
|
||||
in {
|
||||
imports = [
|
||||
../../common/darwin/common.nix
|
||||
];
|
||||
|
||||
#home-manager.users.kdb242 = import ../../home-manager/kdb424/hosts/macbook-darwin.nix;
|
||||
|
||||
system.stateVersion = 4;
|
||||
}
|
Loading…
Add table
Reference in a new issue