From 31eae31dd6a7e31bef96f0fe7f210617da954dae Mon Sep 17 00:00:00 2001 From: Mira Date: Wed, 3 Jul 2024 12:58:48 -0400 Subject: [PATCH] Leptin working --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 4 ++-- leptin/configuration.nix | 36 ++++++++++++++++++++---------------- 3 files changed, 43 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index b700f20..2e55370 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719845423, + "narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "ec12b88104d6c117871fad55e931addac4626756", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1719848872, @@ -18,6 +38,7 @@ }, "root": { "inputs": { + "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index ad9444e..ecb8ec8 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,7 @@ }; }; - outputs = { + outputs = inputs@{ self, nixpkgs, nix-darwin, @@ -26,7 +26,7 @@ }; }; darwinConfigurations = { - leptin = nixpkgs.lib.darwinSystem { + leptin = nix-darwin.lib.darwinSystem { system = "aarch64-darwin"; modules = [ ./leptin/configuration.nix diff --git a/leptin/configuration.nix b/leptin/configuration.nix index 5ccbdac..b4c8147 100644 --- a/leptin/configuration.nix +++ b/leptin/configuration.nix @@ -9,6 +9,7 @@ nix = { package = pkgs.nixFlakes; optimise.automatic = true; + # optimiser.user = "root"; extraOptions = '' experimental-features = nix-command flakes ''; @@ -33,7 +34,7 @@ docker lsd zsh - sheldon + # sheldon starship tealdeer statix @@ -46,21 +47,24 @@ wget ]; programs = { - nh = { - enable = true; - clean.enable = true; - clean.extraArgs = "--keep-since 4d --keep 3"; - flake = "/Users/mira/nix-config"; - }; + # nh = { + # enable = true; + # clean.enable = true; + # clean.extraArgs = "--keep-since 4d --keep 3"; + # flake = "/Users/mira/nix-config"; + # }; }; - fail2ban = { - enable = true; - ignoreIP = ["10.0.0.0/8" "172.16.0.0/12" "192.168.0.0/16"]; - }; - virtualisation.docker = { - enableOnBoot = true; - enable = true; - autoPrune.enable = true; - extraOptions = "--userns-remap=default"; + # fail2ban = { + # enable = true; + # ignoreIP = ["10.0.0.0/8" "172.16.0.0/12" "192.168.0.0/16"]; + # }; + # virtualisation.docker = { + # enableOnBoot = true; + # enable = true; + # autoPrune.enable = true; + # extraOptions = "--userns-remap=default"; + # }; + services = { + nix-daemon.enable = true; }; }