nixos-dots

nixos dots
git clone git://popovic.xyz/nixos-dots.git
Log | Files | Refs

commit c20be9bdcc7a81b6f3b861fa861c29ff030b8a0c
parent 0b55753a4816ea6de0918e7852584608c7a83cc5
Author: Milutin Popovic <milutin@popovic.xyz>
Date:   Sat,  7 Mar 2026 11:17:41 +0100

add nix-darwin config

Diffstat:
DTODO.md | 3---
Mflake.nix | 34+++++++++++++++++++++++++++++++++-
Asystem/host/mac.nix | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 99 insertions(+), 4 deletions(-)

diff --git a/TODO.md b/TODO.md @@ -1,3 +0,0 @@ -# NixOs config - - encrypted / and swap paritions - diff --git a/flake.nix b/flake.nix @@ -1,9 +1,10 @@ { description = "NixOS"; - inputs = { nixpkgs_stable.url = "nixpkgs/nixos-25.11"; nixpkgs.url = "nixpkgs/nixos-unstable"; + nix-darwin.url = "github:nix-darwin/nix-darwin/master"; + nix-darwin.inputs.nixpkgs.follows = "nixkgs"; nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; nixos-hardware.url = "github:NixOS/nixos-hardware"; betterfox.url = "github:HeitorAugustoLN/betterfox-nix"; @@ -24,6 +25,7 @@ self, nixpkgs_stable, nixpkgs, + nix-darwin, disko, home-manager, nixos-hardware, @@ -116,6 +118,36 @@ ]; }; }; + darwinConfigurations = { + "mac" = let + hostName = "mac"; + system = "nixos-darwin"; + in nix-darwin.lib.darwinSys { + specialArgs = { + inherit system; + inherit hostName; + }; + modules = [ + home-manager.nixosModules.home-manager + sops-nix.nixosModules.sops + ./system/host/mac.nix + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = { + inherit system; + inherit inputs; + standalone = false; + }; + users.mika = import ./users/mika.nix; + }; + } + + ] + + }; + }; homeConfigurations = { mika = home-manager.lib.homeManagerConfiguration { inherit pkgs; diff --git a/system/host/mac.nix b/system/host/mac.nix @@ -0,0 +1,66 @@ +{ + pkgs, + hostName, + system, + ... +} : +{ + pkgs.hostPlatform = system; + + imports = [ + ../../users/root.nix + ../../modules/nix_settings.nix + ] + + environment.variables = { + __ETC_ZSHRC_SOURCED = "1"; + __ETC_ZSHENV_SOURCED = "1"; + }; + + # programs + programs = { + zsh.enable = true; + dconf.enable = true; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + }; + + # users + users = { + users = { + mika = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + initialPassword = "123"; + shell = pkgs.zsh; + }; + root = { + shell = pkgs.zsh; + }; + }; + }; + security.sudo.wheelNeedsPassword = false; + + environment.systemPackages = with pkgs; [ + neovim + wget + git + nix + curl + tree + coreutils + stdenv + dbus-broker + pciutils + util-linux + pstree + wireguard-tools + ]; + + fonts.packages = with pkgs; [ + nerd-fonts.terminess-ttf + terminus_font + ]; +}