From fa0b46c4424e328e07545c0fdd340cbd888630d9 Mon Sep 17 00:00:00 2001 From: vanderscycle Date: Tue, 24 Dec 2024 14:33:44 -0800 Subject: [PATCH 1/3] udpate --- nix-darwin/flake.nix | 3 + .../henri.vandersleyen/configuration.nix | 62 ++++++++++++------- 2 files changed, 42 insertions(+), 23 deletions(-) diff --git a/nix-darwin/flake.nix b/nix-darwin/flake.nix index d229418a..deb70468 100644 --- a/nix-darwin/flake.nix +++ b/nix-darwin/flake.nix @@ -72,6 +72,7 @@ Henris-MacBook-Pro = darwin.lib.darwinSystem { system = "aarch64-darwin"; specialArgs = { + username = "henri.vandersleyen"; inherit inputs; }; modules = [ @@ -81,6 +82,8 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { + username = "henri.vandersleyen"; + system = "aarch64-darwin"; inherit inputs; }; home-manager.users."henri.vandersleyen" = { diff --git a/nix-darwin/users/henri.vandersleyen/configuration.nix b/nix-darwin/users/henri.vandersleyen/configuration.nix index 7f5916ca..19e4a3a5 100644 --- a/nix-darwin/users/henri.vandersleyen/configuration.nix +++ b/nix-darwin/users/henri.vandersleyen/configuration.nix @@ -1,39 +1,55 @@ -{ pkgs, inputs, ... }: +{ + pkgs, + username, + inputs, + ... +}: { imports = [ # ./modules/services/appleTouchId.nix ]; - services.nix-daemon.enable = true; - nix.settings.experimental-features = "nix-command flakes"; - # Optimize storage and automatic scheduled GC running - # If you want to run GC manually, use commands: - # `nix-store --optimize` for finding and eliminating redundant copies of identical store paths - # `nix-store --gc` for optimizing the nix store and removing unreferenced and obsolete store paths - # `nix-collect-garbage -d` for deleting old generations of user profiles - nix.optimise.automatic = true; - nix.gc = { - automatic = true; - # interval = "weekly"; - options = "--delete-older-than 14d"; + + nix = { + settings.experimental-features = "nix-command flakes"; + # Optimize storage and automatic scheduled GC running + # If you want to run GC manually, use commands: + # `nix-store --optimize` for finding and eliminating redundant copies of identical store paths + # `nix-store --gc` for optimizing the nix store and removing unreferenced and obsolete store paths + # `nix-collect-garbage -d` for deleting old generations of user profiles + optimise.automatic = true; + gc = { + automatic = true; + # interval = "weekly"; + options = "--delete-older-than 14d"; + }; + configureBuildUsers = true; + useDaemon = true; + nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; # for nix.nix + }; + + nixpkgs = { + hostPlatform = "aarch64-darwin"; + config.allowUnfree = true; + config.allowUnsupportedSystem = true; }; + + services.nix-daemon.enable = true; # system.configurationRevision = self.rev or self.dirtyRev or null; system.stateVersion = 5; - nixpkgs.hostPlatform = "aarch64-darwin"; - nixpkgs.config.allowUnfree = true; - users.users."henri.vandersleyen".home = "/Users/henri.vandersleyen"; - users.users."henri.vandersleyen".shell = pkgs.nushell; + users.users.${username} = { + home = "/Users/${username}"; + shell = pkgs.nushell; + }; home-manager.backupFileExtension = "backup"; - nix.configureBuildUsers = true; - nix.useDaemon = true; - nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; # for nix.nix # fonts.enableFontDir = true; fonts.packages = with pkgs; [ jetbrains-mono - nerd-font-patcher - recursive - (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) + # nerd-font-patcher + # recursive + # (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) ]; + environment.variables = { # XDG_CONFIG_HOME = "/users/henri.vandersleyen"; # issue with nushell }; From e37e7cd5374b194620a7df29424f2899e5e57a84 Mon Sep 17 00:00:00 2001 From: vanderscycle Date: Tue, 24 Dec 2024 14:34:44 -0800 Subject: [PATCH 2/3] udpate 2 mac --- nix-darwin/users/henri.vandersleyen/home.nix | 28 +++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/nix-darwin/users/henri.vandersleyen/home.nix b/nix-darwin/users/henri.vandersleyen/home.nix index 4662bd70..4c9c31ef 100644 --- a/nix-darwin/users/henri.vandersleyen/home.nix +++ b/nix-darwin/users/henri.vandersleyen/home.nix @@ -1,7 +1,12 @@ # home.nix # home-manager switch -{ config, pkgs, ... }: +{ + config, + username, + pkgs, + ... +}: { imports = [ @@ -34,6 +39,25 @@ home.username = "henri.vandersleyen"; home.homeDirectory = "/Users/henri.vandersleyen"; home.stateVersion = "23.05"; # Please read the comment before changing. + # languages + python.lsp.enable = true; + jsts.lsp.enable = true; + + fish.enable = true; + zsh.enable = true; + nh.flakeLocation = "/home/${username}/Documents/dotFiles/nix-darwin"; + keychain.enable = true; + keychain.keys = "/home/henri/.ssh/knak"; + + git.userEmail = "henri-vandersleyen@protonmail.com"; + git.userName = "vanderscycle"; + git.signingKey = "~/.ssh/knak.pub"; + + home = { + username = "henri.vandersleyen"; + homeDirectory = "/Users/henri.vandersleyen"; + stateVersion = "23.05"; # Please read the comment before changing. + }; # Makes sense for user specific applications that shouldn't be available system-wide home.packages = [ ]; @@ -41,7 +65,6 @@ home.file = { }; home.sessionVariables = { - # for nh FLAKE = "~/Documents/dotFiles/nix-darwin"; }; @@ -51,7 +74,6 @@ "$HOME/.nix-profile/bin" ]; programs.home-manager.enable = true; - # shells # theme catppuccin.flavor = "mocha"; From f738eb6479ceb5c9feb92274d1b14df5070ebf63 Mon Sep 17 00:00:00 2001 From: vanderscycle Date: Tue, 24 Dec 2024 14:38:08 -0800 Subject: [PATCH 3/3] works --- nix-darwin/users/henri.vandersleyen/home.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/nix-darwin/users/henri.vandersleyen/home.nix b/nix-darwin/users/henri.vandersleyen/home.nix index 4c9c31ef..0a9efaf5 100644 --- a/nix-darwin/users/henri.vandersleyen/home.nix +++ b/nix-darwin/users/henri.vandersleyen/home.nix @@ -36,9 +36,6 @@ # ./home-modules/services/appleTouchId.nix ]; - home.username = "henri.vandersleyen"; - home.homeDirectory = "/Users/henri.vandersleyen"; - home.stateVersion = "23.05"; # Please read the comment before changing. # languages python.lsp.enable = true; jsts.lsp.enable = true; @@ -65,8 +62,6 @@ home.file = { }; home.sessionVariables = { - # for nh - FLAKE = "~/Documents/dotFiles/nix-darwin"; }; home.sessionPath = [