diff --git a/example-configuration.nix b/example-configuration.nix deleted file mode 100644 index 84d0f4b..0000000 --- a/example-configuration.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ ... }: -{ - imports = - [ - (import ./main.nix { - hostName = "fw1"; - user = { - name = "ari"; - fullName = "Ari Sosnovsky"; - email = "ariel@sosnovsky.ca"; - }; - }) - ]; -} diff --git a/flake.nix b/flake.nix index d309016..8ce74df 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,15 @@ fullName = "Ari Sosnovsky"; email = "ariel@sosnovsky.ca"; }; + sumoUser = rec { + name = "asosnovsky"; + fullName = user.fullName; + email = "${name}@sumologic.com"; + homepath = "/Users/${name}"; + # extraGitConfigs = [ + # {path = "${user.homepath}/.config/mysumo/gitconfig";} + # ]; + }; homeMangerVersion = "24.05"; lib = (import modules/lib.nix { nixpkgs = nixpkgs; @@ -73,9 +82,9 @@ }; }; darwinConfigurations."asosnovsky-mac" = lib.makeDarwinModule { - user = user; + user = sumoUser; systemStateVersion = 4; - system = "aarch64-darwin"; + system = "x86_64-darwin"; hostName = "asosnovsky-mac"; home-manager = { enable = true; @@ -88,7 +97,7 @@ enable = false; }; configuration = (import ./hosts/asosnovsky-mac.nix { - user = user; + user = sumoUser; }); }; }; diff --git a/fwbook.knsv b/fwbook.knsv deleted file mode 100644 index 3f53bf7..0000000 Binary files a/fwbook.knsv and /dev/null differ diff --git a/modules/home-manager-config.nix b/modules/home-manager-config.nix index 68b1ff9..d257369 100644 --- a/modules/home-manager-config.nix +++ b/modules/home-manager-config.nix @@ -66,7 +66,11 @@ in init = { defaultBranch = "main"; }; }; includes = - (builtins.map (f: { path = gitconfigs + "/" + f; }) gitconfigFiles); + (builtins.map (f: { path = gitconfigs + "/" + f; }) gitconfigFiles) + ++ (if builtins.hasAttr "extraGitConfigs" user then + user.extraGitConfigs + else + [ ]); }; zsh = { enable = true; @@ -81,12 +85,7 @@ in enable = true; clock24 = true; mouse = true; - plugins = with pkgs.tmuxPlugins; [ - nord - cpu - battery - sidebar - ]; + plugins = with pkgs.tmuxPlugins; [ nord cpu battery sidebar ]; }; }; }; diff --git a/modules/main.nix b/modules/main.nix index 24b6931..0026c9e 100644 --- a/modules/main.nix +++ b/modules/main.nix @@ -21,7 +21,7 @@ imports = [ (import ./nix/main.nix { user = user; - systemStateVersion = "23.11"; + systemStateVersion = systemStateVersion; }) ] ++ (if desktop.enable then [ (import ./desktop/main.nix { diff --git a/modules/nix/core.nix b/modules/nix/core.nix index 4d64dd1..a3aecc5 100644 --- a/modules/nix/core.nix +++ b/modules/nix/core.nix @@ -4,7 +4,6 @@ # Nix core system.stateVersion = systemStateVersion; nixpkgs.config.allowUnfree = true; - services.hydra.useSubstitutes = true; nix.settings = { experimental-features = [ "nix-command" "flakes" ]; trusted-substituters = [ @@ -17,15 +16,9 @@ "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" ]; }; - # Set your time zone. - time.timeZone = "America/Toronto"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_CA.UTF-8"; # System Packages programs.zsh.enable = true; - programs.nix-ld.enable = true; environment.systemPackages = with pkgs; [ # nix utils nix-index @@ -35,18 +28,8 @@ # shell tools wget - # misc - glib - glibc ]; # Storage Optim nix.optimise.automatic = true; - nix.optimise.dates = [ "01:00" ]; - services.cron = { - enable = true; - systemCronJobs = [ - "* 23 * * * root nix-collect-garbage --delete-older-than 1d" - "* 23 * * * ${user.name} nix-collect-garbage --delete-older-than 1d" - ]; - }; + } diff --git a/modules/os/core.nix b/modules/os/core.nix index fe2a116..80503fc 100644 --- a/modules/os/core.nix +++ b/modules/os/core.nix @@ -1,8 +1,11 @@ +{ user }: { pkgs, ... }: { # System Packages + services.hydra.useSubstitutes = true; services.flatpak.enable = true; programs.dconf.enable = true; + programs.nix-ld.enable = true; environment.systemPackages = with pkgs; [ # nix utils appimage-run @@ -17,6 +20,8 @@ # misc glib-networking + glib + glibc # printer system-config-printer @@ -24,4 +29,18 @@ services.xserver.excludePackages = with pkgs; [ xterm ]; + # Set your time zone. + time.timeZone = "America/Toronto"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_CA.UTF-8"; + + # Storage Clean up + services.cron = { + enable = true; + systemCronJobs = [ + "* 23 * * * root nix-collect-garbage --delete-older-than 1d" + "* 23 * * * ${user.name} nix-collect-garbage --delete-older-than 1d" + ]; + }; } diff --git a/modules/os/main.nix b/modules/os/main.nix index 20d4d29..5a0e718 100644 --- a/modules/os/main.nix +++ b/modules/os/main.nix @@ -11,7 +11,9 @@ { pkgs, ... }: { imports = [ - ./core.nix + (import ./core.nix { + user = user; + }) ./rootUser.nix (import ./user.nix { user = user;