From a71e0e80b76d3d5b73649728053d436a7af17bd1 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Wed, 26 Jul 2023 15:22:24 +0200 Subject: [PATCH] More worf-config --- flake.nix | 4 +++ hosts/worf/configuration.nix | 55 ++++++++++++++++++++++++++++++++++++ hosts/worf/home.nix | 8 ++++-- 3 files changed, 64 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index f341a64..e89ad80 100644 --- a/flake.nix +++ b/flake.nix @@ -80,5 +80,9 @@ devShells.x86_64-linux = { default = nixpkgs.legacyPackages.x86_64-linux.callPackage ./shell.nix { }; }; + + devShells.aarch64-darwin = { + default = nixpkgs.legacyPackages.aarch64-darwin.callPackage ./shell.nix { }; + }; }; } diff --git a/hosts/worf/configuration.nix b/hosts/worf/configuration.nix index 77b6b07..f115ff8 100644 --- a/hosts/worf/configuration.nix +++ b/hosts/worf/configuration.nix @@ -2,6 +2,17 @@ { # Many settings should be handled by home manager. System-wide settings are however managed here. + nixpkgs.config.allowUnfree = true; + + nix = { + gc = { + automatic = true; + options = "--delete-older-than 2d"; + }; + + settings.experimental-features = ["nix-command" "flakes"]; + }; + # System packages for all users environment.systemPackages = [ pkgs.ripgrep @@ -16,6 +27,50 @@ programs.zsh.enable = true; system.activationScripts.postActivation.text = ''sudo chsh -s ${pkgs.zsh}/bin/zsh''; # Since it's not possible to declare default shell, run this command after build + system.defaults = { + # login window settings + loginwindow = { + # disable guest account + GuestEnabled = false; + # show name instead of username + SHOWFULLNAME = false; + }; + + finder = { + AppleShowAllExtensions = true; + FXEnableExtensionChangeWarning = true; + _FXShowPosixPathInTitle = true; + }; + + + # firewall settings + alf = { + # 0 = disabled 1 = enabled 2 = blocks all connections except for essential services + globalstate = 1; + loggingenabled = 0; + stealthenabled = 1; + }; + + # dock settings + dock = { + autohide = true; + autohide-delay = 0.0; + autohide-time-modifier = 1.0; + tilesize = 80; + static-only = false; + showhidden = false; + show-recents = false; + show-process-indicators = true; + orientation = "bottom"; + mru-spaces = false; + }; + }; + + system.keyboard = { + enableKeyMapping = true; + remapCapsLockToControl = true; + }; + # Auto upgrade nix package and the daemon service. services.nix-daemon.enable = true; nix.package = pkgs.nix; diff --git a/hosts/worf/home.nix b/hosts/worf/home.nix index 8b9f59d..8335979 100644 --- a/hosts/worf/home.nix +++ b/hosts/worf/home.nix @@ -7,9 +7,11 @@ home.packages = with pkgs; [ - iterm2 - #element-desktop + discord exa + iterm2 + neovim + vscode ]; programs = { @@ -21,7 +23,7 @@ }; }; - # symlinks don't work with finder + spotlight, copy them instead + # Copy Applications to ~/Applications to allow them to be launched from Spotlight disabledModules = [ "targets/darwin/linkapps.nix" ]; home.activation = lib.mkIf pkgs.stdenv.isDarwin { copyApplications =