From f1d155e1c8b0b1015ed3ff81da7a78b791f3f2eb Mon Sep 17 00:00:00 2001 From: Dennis Date: Fri, 24 Jan 2025 21:48:29 +0100 Subject: [PATCH] Adds system configuration for dnsc-air --- hosts/dnsc-air/default.nix | 173 +++++++++++++++++++++++++++++++++++++ hosts/dnsc-mac/default.nix | 91 ------------------- 2 files changed, 173 insertions(+), 91 deletions(-) create mode 100644 hosts/dnsc-air/default.nix delete mode 100644 hosts/dnsc-mac/default.nix diff --git a/hosts/dnsc-air/default.nix b/hosts/dnsc-air/default.nix new file mode 100644 index 0000000..6d84620 --- /dev/null +++ b/hosts/dnsc-air/default.nix @@ -0,0 +1,173 @@ +{ + inputs, + outputs, + lib, + config, + pkgs, + ... +}: { + imports = [ + inputs.home-manager.darwinModules.home-manager + ]; + + # Setting the user + networking.hostName = "dnsc-air"; + networking.computerName = "dnsc-air"; + + users.users."dennis"= { + home = "/Users/dennis"; + description = "Dennis Schoepf"; + }; + + nix.settings.trusted-users = [ "dennis" ]; + + # System Packages + environment.systemPackages = with pkgs; [ + git + btop + fish + ripgrep + fzf + fd + fortune + neofetch + neovim + ]; + + # Homebrew + homebrew = { + enable = true; + + onActivation = { + autoUpdate = false; + # 'zap': uninstalls all formulae(and related files) not listed here. + # cleanup = "zap"; + }; + + taps = [ + "homebrew/services" + ]; + + brews = [ + "ffmpeg" + "clojure" + "babashka" + "tree-sitter" + "yt-dlp" + "zoxide" + "nuspell" + "aspell" + "enchant" + "pinentry" + "pinentry-mac" + "shellcheck" + "sqlite" + "tinymist" + "typst" + "rsync" + "fnm" + ]; + + casks = [ + "zen-browser" + "aerospace" + "font-victor-mono" + "font-victor-mono-nerd-font" + "mullvadvpn" + "vlc" + "alfred" + "signal" + "wezterm" + "arc" + "hiddenbar" + "syncthing" + "eurkey" + "karabiner-elements" + "vial" + ]; + }; + + # Shells + environment.shells = [ pkgs.fish ]; + + # System settings + system = { + stateVersion = 5; + activationScripts.postUserActivation.text = '' + /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u + ''; + + defaults = { + smb.NetBIOSName = "dnsc-air"; + + dock = { + autohide = true; + autohide-delay = 0.01; + autohide-time-modifier = 0.01; + expose-group-apps = true; + launchanim = false; + minimize-to-application = true; + orientation = "right"; + show-recents = false; + persistent-apps = [ + "/Applications/Arc.app" + "/Applications/Emacs.app" + "/Applications/WezTerm.app" + "/Applications/Photomator.app" + "/System/Applications/System Settings.app/" + ]; + persistent-others = [ + "/Users/dennis/Downloads" + ]; + }; + + finder = { + AppleShowAllExtensions = true; + CreateDesktop = false; + FXEnableExtensionChangeWarning = false; + FXPreferredViewStyle = "clmv"; + ShowPathbar = true; + ShowStatusBar = true; + }; + + loginwindow = { + LoginwindowText = "\\U03bb dnsc-air (powered by Nix)"; + }; + + menuExtraClock = { + Show24Hour = true; + ShowDate = 0; + }; + + screencapture = { + location = "/Users/dennis/Downloads"; + target = "file"; + }; + + spaces.spans-displays = false; + }; + }; + + # Add ability to used TouchID for sudo authentication + security.pam.enableSudoTouchIdAuth = true; + + # Home Manager Setup + home-manager = { + extraSpecialArgs = { inherit inputs outputs; }; + useGlobalPkgs = true; + users = { + dennis = import ../../home/darwin.nix; + }; + }; + + # Nix settings + # Enable new Nix CLI and flakes + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + services.nix-daemon.enable = true; + nix.package = pkgs.nix; + nix.gc = { + automatic = true; + options = "--delete-older-than 1w"; + }; +} diff --git a/hosts/dnsc-mac/default.nix b/hosts/dnsc-mac/default.nix deleted file mode 100644 index f5d4bf3..0000000 --- a/hosts/dnsc-mac/default.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - - # Setting the user - networking.hostName = "dnsc-mac"; - networking.computerName = "dnsc-mac"; - system.defaults.smb.NetBIOSName = "dnsc-mac"; - - users.users."dennis"= { - home = "/Users/dennis"; - description = username; - }; - - nix.settings.trusted-users = [ username ]; - - # System Packages - environment.systemPackages = with pkgs; [ - git - neovim - ]; - - # Homebrew - homebrew = { - enable = true; - - onActivation = { - autoUpdate = false; - # 'zap': uninstalls all formulae(and related files) not listed here. - # cleanup = "zap"; - }; - - taps = [ - "homebrew/services" - ]; - - # `brew install` - # TODO Feel free to add your favorite apps here. - brews = [ - # "aria2" # download tool - ]; - - # `brew install --cask` - # TODO Feel free to add your favorite apps here. - casks = [ - # "google-chrome" - ]; - }; - - # Programgs - programs.fish.enable = true; - - # System settings - system = { - stateVersion = 5; - activationScripts.postUserActivation.text = '' - /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u - ''; - - defaults = { - menuExtraClock.Show24Hour = true; # show 24 hour clock - }; - }; - - # Add ability to used TouchID for sudo authentication - security.pam.enableSudoTouchIdAuth = true; - - # Home Manager Setup - # Home Manager Setup - home-manager = { - extraSpecialArgs = { inherit inputs outputs; }; - users = { - dennis = import ../../home/server; - }; - }; - - # Nix settings - services.nix-daemon.enable = true; - nix.package = pkgs.nix; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 1w"; - }; - nix.settings.auto-optimise-store = true; -}