config

NixOS config
Log | Files | Refs | README | LICENSE

commit e9e2d315d3154fcba98aedecd90d13e71111a9ce (tree)
parent 7a4535dd8a0698a0d3711729be94d9b2a128acc4
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date:   Fri,  3 Apr 2026 09:08:34 +0000

macworx

Diffstat:
Mflake.lock | 21+++++++++++++++++++++
Mflake.nix | 109+++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
Ahosts/macworx/configuration.nix | 9+++++++++
3 files changed, 95 insertions(+), 44 deletions(-)

diff --git a/flake.lock b/flake.lock @@ -185,6 +185,26 @@ "type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775037210, + "narHash": "sha256-KM2WYj6EA7M/FVZVCl3rqWY+TFV5QzSyyGE2gQxeODU=", + "owner": "nix-darwin", + "repo": "nix-darwin", + "rev": "06648f4902343228ce2de79f291dd5a58ee12146", + "type": "github" + }, + "original": { + "owner": "nix-darwin", + "repo": "nix-darwin", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -323,6 +343,7 @@ "gitignore": "gitignore", "home-manager": "home-manager", "kolide-launcher": "kolide-launcher", + "nix-darwin": "nix-darwin", "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix @@ -43,6 +43,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + nix-darwin = { + url = "github:nix-darwin/nix-darwin"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; @@ -79,6 +84,7 @@ nur, zig, kolide-launcher, + nix-darwin, ... }@inputs: let @@ -97,53 +103,59 @@ # }; # deploy-rs-pkg = null; #}) - (_: super: rec { - gamja = super.callPackage ./pkgs/gamja.nix { }; - weather = super.callPackage ./pkgs/weather { }; - nicer = super.callPackage ./pkgs/nicer.nix { }; - tmuxbash = super.callPackage ./pkgs/tmuxbash.nix { }; - claudes = super.callPackage ./pkgs/claudes.nix { }; - sentinelone = super.callPackage ./pkgs/sentinelone { }; - chronoctl = super.callPackage ./pkgs/chronoctl.nix { }; - mrescue-alpine = super.callPackage ./pkgs/mrescue-alpine.nix { }; - - # needs 0.9.28+ for __attribute__((cleanup)) - tinycc = super.tinycc.overrideAttrs { - version = "0.9.27-unstable-2026-02-07"; - src = super.fetchFromRepoOrCz { - repo = "tinycc"; - rev = "4597a9621e70a337b241d424f4ab4729cb75b426"; - hash = "sha256-/jm00d4BZQateOHkUatc9Y2ZofwvgkRgps72vgAOWno="; + ( + _: super: + rec { + gamja = super.callPackage ./pkgs/gamja.nix { }; + weather = super.callPackage ./pkgs/weather { }; + tmuxbash = super.callPackage ./pkgs/tmuxbash.nix { }; + gcloud-wrapped = super.callPackage ./pkgs/gcloud-wrapped { }; + } + // super.lib.optionalAttrs super.stdenv.isLinux rec { + nicer = super.callPackage ./pkgs/nicer.nix { }; + go-raceless = super.callPackage ./pkgs/go-raceless { inherit (nicer) ; }; + claudes = super.callPackage ./pkgs/claudes.nix { }; + sentinelone = super.callPackage ./pkgs/sentinelone { }; + chronoctl = super.callPackage ./pkgs/chronoctl.nix { }; + mrescue-alpine = super.callPackage ./pkgs/mrescue-alpine.nix { }; + + # needs 0.9.28+ for __attribute__((cleanup)) + tinycc = super.tinycc.overrideAttrs { + version = "0.9.27-unstable-2026-02-07"; + src = super.fetchFromRepoOrCz { + repo = "tinycc"; + rev = "4597a9621e70a337b241d424f4ab4729cb75b426"; + hash = "sha256-/jm00d4BZQateOHkUatc9Y2ZofwvgkRgps72vgAOWno="; + }; }; - }; - mkDebianLive = super.callPackage ./pkgs/mrescue-debian.nix { }; - mrescue-debian-xfce = mkDebianLive { - flavor = "xfce"; - version = "13.3.0"; - hash = "sha256-xvHLR2gOOdsTIu7FrOZdxgfG6keqniEhhf9ywJmtNXQ="; - }; + mkDebianLive = super.callPackage ./pkgs/mrescue-debian.nix { }; + mrescue-debian-xfce = mkDebianLive { + flavor = "xfce"; + version = "13.3.0"; + hash = "sha256-xvHLR2gOOdsTIu7FrOZdxgfG6keqniEhhf9ywJmtNXQ="; + }; - # NixOS netboot rescue image - # Note: Update URL and hash manually from https://nixos.org/download - mrescue-nixos = super.callPackage ./pkgs/mrescue-nixos.nix { }; - - vanta-agent = super.callPackage ./pkgs/vanta-agent.nix { }; - gcloud-wrapped = super.callPackage ./pkgs/gcloud-wrapped { }; - go-raceless = super.callPackage ./pkgs/go-raceless { inherit (nicer) ; }; - - pkgs-unstable = import nixpkgs-unstable { - inherit (super.stdenv.hostPlatform) system; - config.allowUnfree = true; - overlays = [ - (_self: super: { - go = super.go_1_26; - buildGoModule = super.buildGo126Module; - buildGoPackage = super.buildGo126Package; - }) - ]; - }; - }) + # NixOS netboot rescue image + # Note: Update URL and hash manually from https://nixos.org/download + mrescue-nixos = super.callPackage ./pkgs/mrescue-nixos.nix { }; + + vanta-agent = super.callPackage ./pkgs/vanta-agent.nix { }; + } + // { + pkgs-unstable = import nixpkgs-unstable { + inherit (super.stdenv.hostPlatform) system; + config.allowUnfree = true; + overlays = [ + (_self: super: { + go = super.go_1_26; + buildGoModule = super.buildGo126Module; + buildGoPackage = super.buildGo126Package; + }) + ]; + }; + } + ) ]; in @@ -280,6 +292,15 @@ }; + darwinConfigurations = { + macworx = nix-darwin.lib.darwinSystem { + modules = [ + { nixpkgs.overlays = baseOverlays; } + ./hosts/macworx/configuration.nix + ]; + }; + }; + deploy.nodes = { fwminex = { hostname = "fwminex.jakst.vpn"; diff --git a/hosts/macworx/configuration.nix b/hosts/macworx/configuration.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: +{ + nixpkgs.hostPlatform = "aarch64-darwin"; + system.stateVersion = 6; + environment.systemPackages = with pkgs; [ + ripgrep + ghostty-bin + ]; +}