batman nix
This commit is contained in:
86
hosts/mba/configuration.nix
Normal file
86
hosts/mba/configuration.nix
Normal file
@@ -0,0 +1,86 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
security.pam.enableSudoTouchIdAuth = true;
|
||||
|
||||
# Set Git commit hash for darwin-version.
|
||||
system.configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null;
|
||||
|
||||
system.defaults = {
|
||||
controlcenter = {
|
||||
BatteryShowPercentage = true;
|
||||
NowPlaying = false;
|
||||
};
|
||||
dock = {
|
||||
autohide = false;
|
||||
tilesize = 22;
|
||||
mineffect = "genie";
|
||||
largesize = 32;
|
||||
mru-spaces = true;
|
||||
show-recents = false;
|
||||
|
||||
# don't ned hotcorners
|
||||
wvous-bl-corner = null;
|
||||
wvous-br-corner = null;
|
||||
wvous-tl-corner = null;
|
||||
wvous-tr-corner = null;
|
||||
};
|
||||
finder = {
|
||||
CreateDesktop = false;
|
||||
FXDefaultSearchScope = "SCcf";
|
||||
FXPreferredViewStyle = "Nlsv";
|
||||
NewWindowTarget = "Other";
|
||||
NewWindowTargetPath = "file:///Users/lilj/Downloads";
|
||||
QuitMenuItem = true;
|
||||
ShowPathbar = true;
|
||||
ShowStatusBar = true;
|
||||
ShowRemovableMediaOnDesktop = false;
|
||||
};
|
||||
menuExtraClock = {
|
||||
Show24Hour = false;
|
||||
ShowAMPM = false;
|
||||
ShowSeconds = false;
|
||||
ShowDate = 1;
|
||||
ShowDayOfWeek = true;
|
||||
};
|
||||
NSGlobalDomain = {
|
||||
AppleInterfaceStyle = "Dark";
|
||||
AppleICUForce24HourTime = false;
|
||||
AppleSpacesSwitchOnActivate = true; # Switch to other workspace when switching application
|
||||
"com.apple.keyboard.fnState" = false;
|
||||
"com.apple.sound.beep.feedback" = 0;
|
||||
"com.apple.sound.beep.volume" = 0.7788008;
|
||||
"com.apple.swipescrolldirection" = true;
|
||||
"com.apple.trackpad.scaling" = 1.35;
|
||||
InitialKeyRepeat = 15;
|
||||
KeyRepeat = 3;
|
||||
|
||||
NSAutomaticCapitalizationEnabled = false;
|
||||
NSAutomaticDashSubstitutionEnabled = false;
|
||||
NSAutomaticSpellingCorrectionEnabled = false;
|
||||
NSAutomaticWindowAnimationsEnabled = true;
|
||||
NSScrollAnimationEnabled = true;
|
||||
NSTableViewDefaultSizeMode = 2; # finder sidebar icons size
|
||||
};
|
||||
screencapture = {
|
||||
include-date = false;
|
||||
location = "~/Documents/screenshots";
|
||||
type = "png";
|
||||
};
|
||||
trackpad = {
|
||||
ActuationStrength = 0;
|
||||
Clicking = true;
|
||||
TrackpadRightClick = true;
|
||||
};
|
||||
WindowManager = {
|
||||
EnableStandardClickToShowDesktop = true;
|
||||
EnableTiledWindowMargins = true;
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = 4;
|
||||
|
||||
time.timeZone = "Asia/Calcutta";
|
||||
}
|
||||
16
hosts/mba/default.nix
Normal file
16
hosts/mba/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{outputs, ...}: {
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./mac-apps.nix
|
||||
./nix.nix
|
||||
./users.nix
|
||||
];
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.stable-packages
|
||||
# outputs.overlays.nur
|
||||
];
|
||||
};
|
||||
}
|
||||
38
hosts/mba/home.nix
Normal file
38
hosts/mba/home.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
pkgs,
|
||||
username,
|
||||
email,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# ../../modules/alacritty.nix
|
||||
../../home-modules/git.nix
|
||||
../../home-modules/kitty.nix
|
||||
../../home-modules/nvim.nix
|
||||
../../home-modules/shell.nix
|
||||
../../home-modules/starship.nix
|
||||
../../home-modules/tmux.nix
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
pkgs.air
|
||||
pkgs.bun
|
||||
pkgs.go
|
||||
pkgs.nodejs_23
|
||||
pkgs.pnpm
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.stable-packages
|
||||
# outputs.overlays.nur
|
||||
];
|
||||
};
|
||||
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
50
hosts/mba/mac-apps.nix
Normal file
50
hosts/mba/mac-apps.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [
|
||||
pkgs.fastfetch
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
MANPAGER = "nvim +Man!";
|
||||
};
|
||||
|
||||
# Enable alternative shell support in nix-darwin.
|
||||
# environment.shells = [
|
||||
# pkgs.fish
|
||||
# ];
|
||||
|
||||
fonts.packages = [
|
||||
pkgs.nerd-fonts.jetbrains-mono
|
||||
# Alternate Fonts
|
||||
# pkgs.nerd-fonts.caskaydia-mono
|
||||
# pkgs.nerd-fonts.iosevka
|
||||
];
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
|
||||
onActivation = {
|
||||
autoUpdate = true;
|
||||
upgrade = true;
|
||||
cleanup = "zap";
|
||||
};
|
||||
|
||||
brews = [];
|
||||
casks = [
|
||||
"discord"
|
||||
"obsidian"
|
||||
"raycast"
|
||||
"spotify"
|
||||
"telegram-desktop"
|
||||
|
||||
# CORPO
|
||||
"mongodb-compass"
|
||||
"postman"
|
||||
"slack"
|
||||
"zoom"
|
||||
];
|
||||
};
|
||||
}
|
||||
31
hosts/mba/nix.nix
Normal file
31
hosts/mba/nix.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
# This file seems like generic nix config options could be moved to common in future
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Cross-compile GNU/Linux binaries, or even full GNU/Linux system images
|
||||
# from someone's config, could be useful but idk
|
||||
# nix.linux-builder.enable = true;
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
nixpkgs.hostPlatform = "${system}";
|
||||
|
||||
services.nix-daemon.enable = true;
|
||||
|
||||
nix.gc = {
|
||||
user = "root";
|
||||
automatic = lib.mkDefault true;
|
||||
options = lib.mkDefault "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
# Disable auto-optimise-store because of this issue:
|
||||
# https://github.com/NixOS/nix/issues/7273
|
||||
# nix.settings = {
|
||||
# auto-optimise-store = false;
|
||||
# };
|
||||
}
|
||||
11
hosts/mba/users.nix
Normal file
11
hosts/mba/users.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
# same as nix.nix file, could be moved to common
|
||||
{username, ...}: {
|
||||
system.defaults.smb.NetBIOSName = "lilJ's mba";
|
||||
|
||||
users.users."${username}" = {
|
||||
name = "${username}";
|
||||
home = "/Users/${username}";
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [username];
|
||||
}
|
||||
Reference in New Issue
Block a user