So far everything works. Committing before a possible fuckup
This commit is contained in:
parent
4a2a081d91
commit
ebb5f51a86
7 changed files with 480 additions and 0 deletions
94
flake.nix
Normal file
94
flake.nix
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
{
|
||||
description = "Personal nix-darwin system flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
|
||||
homebrew-core = {
|
||||
url = "github:homebrew/homebrew-core";
|
||||
flake = false;
|
||||
};
|
||||
homebrew-cask = {
|
||||
url = "github:homebrew/homebrew-cask";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nix-darwin, nix-homebrew, homebrew-core, homebrew-cask, home-manager, nixpkgs }:
|
||||
let
|
||||
configuration = { pkgs, ... }: {
|
||||
|
||||
users.users.erogers = {
|
||||
name = "erogers";
|
||||
home = "/Users/erogers";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim # Text editor of choice
|
||||
btop # Resource manager
|
||||
iina # Media player
|
||||
yabai # Tiling window manager
|
||||
skhd # Hotkey daemon
|
||||
# raycast # AI chat/Application launcher/Automation tool
|
||||
# kanata # Keyboard remapping tool
|
||||
];
|
||||
|
||||
services.yabai = {
|
||||
enable = true;
|
||||
extraConfig = builtins.readFile ./dotfiles/yabai/yabairc;
|
||||
};
|
||||
services.skhd = {
|
||||
enable = true;
|
||||
skhdConfig = builtins.readFile ./dotfiles/skhd/skhdrc;
|
||||
};
|
||||
system.primaryUser = "erogers";
|
||||
system.defaults = {
|
||||
dock.autohide = true;
|
||||
finder.AppleShowAllExtensions = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
nix.enable =false;
|
||||
# Necessary for using flakes on this system.
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
# Allow unfree software
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
# Allow for TouchID authentication when executing commands with sudo
|
||||
security.pam.services.sudo_local.touchIdAuth = true;
|
||||
# Set Git commit hash for darwin-version.
|
||||
system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 6;
|
||||
# The platform the configuration will be used on.
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
};
|
||||
in
|
||||
{
|
||||
# Build darwin flake using:
|
||||
# $ darwin-rebuild build --flake .#Angrboda
|
||||
darwinConfigurations."Angrboda" = nix-darwin.lib.darwinSystem {
|
||||
modules = [
|
||||
configuration
|
||||
nix-homebrew.darwinModules.nix-homebrew {
|
||||
nix-homebrew = {
|
||||
enable = true;
|
||||
enableRosetta = true;
|
||||
user = "erogers";
|
||||
autoMigrate = true;
|
||||
};
|
||||
}
|
||||
home-manager.darwinModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.erogers = import ./home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue