main added nix-darwin intel config
This commit is contained in:
parent
61f5bff8d4
commit
3c857c9336
2 changed files with 94 additions and 1 deletions
87
devices/macbook/configuration.nix
Normal file
87
devices/macbook/configuration.nix
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
{pkgs, inputs, ...}: {
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# terminal
|
||||||
|
alacritty
|
||||||
|
ranger
|
||||||
|
(inputs.nixvim.packages.x86_64-darwin.default)
|
||||||
|
|
||||||
|
# nix
|
||||||
|
home-manager
|
||||||
|
alejandra
|
||||||
|
nix-output-monitor
|
||||||
|
|
||||||
|
# work tool
|
||||||
|
git
|
||||||
|
terraform
|
||||||
|
doppler
|
||||||
|
ngrok
|
||||||
|
awscli2
|
||||||
|
pgcli
|
||||||
|
|
||||||
|
# misc
|
||||||
|
ollama
|
||||||
|
sl
|
||||||
|
newsboat
|
||||||
|
|
||||||
|
(writeShellScriptBin "drs" ''
|
||||||
|
darwin-rebuild switch --flake ~/.config/nix-darwin
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
homebrew = {
|
||||||
|
enable = true;
|
||||||
|
onActivation = {
|
||||||
|
autoUpdate = true;
|
||||||
|
cleanup = "zap";
|
||||||
|
};
|
||||||
|
|
||||||
|
brews = [
|
||||||
|
"emacs-plus@29"
|
||||||
|
];
|
||||||
|
|
||||||
|
casks = [
|
||||||
|
# internet
|
||||||
|
"qutebrowser"
|
||||||
|
"firefox"
|
||||||
|
"spotify"
|
||||||
|
|
||||||
|
# work
|
||||||
|
"slack"
|
||||||
|
"tunnelblick"
|
||||||
|
"dbeaver-community"
|
||||||
|
"insomnia"
|
||||||
|
|
||||||
|
# 3D
|
||||||
|
"orcaslicer"
|
||||||
|
"openscad"
|
||||||
|
|
||||||
|
# Utilities
|
||||||
|
"flameshot"
|
||||||
|
"pika"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Auto upgrade nix package and the daemon service.
|
||||||
|
services.nix-daemon.enable = true;
|
||||||
|
# nix.package = pkgs.nix;
|
||||||
|
# Necessary for using flakes on this system.
|
||||||
|
nix.settings.experimental-features = "nix-command flakes";
|
||||||
|
|
||||||
|
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||||
|
programs.zsh.enable = true; # default shell on catalina
|
||||||
|
programs.direnv.enable = true;
|
||||||
|
|
||||||
|
services.yabai = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
services.skhd.enable = true;
|
||||||
|
|
||||||
|
# Used for backwards compatibility, please read the changelog before changing.
|
||||||
|
# $ darwin-rebuild changelog
|
||||||
|
system.stateVersion = 4;
|
||||||
|
|
||||||
|
# The platform the configuration will be used on.
|
||||||
|
nixpkgs.hostPlatform = "x86_64-darwin";
|
||||||
|
}
|
||||||
|
|
@ -3,10 +3,12 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
nix-darwin.url = "github:LnL7/nix-darwin";
|
||||||
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {nixpkgs, sops-nix ,...} @ inputs: {
|
outputs = {nixpkgs, nix-darwin, sops-nix ,...} @ inputs: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
default = nixpkgs.lib.nixosSystem {
|
default = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs;};
|
||||||
|
|
@ -42,6 +44,10 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
darwinConfigurations."Charless-MacBook-Pro" = nix-darwin.lib.darwinSystem {
|
||||||
|
modules = [ ./devices/macbook/configuration.nix ];
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue