all repos — dotfiles @ 1da4b486cb63db998c76045f8f26c3a0d3b852bd

my *nix dotfiles

nix/denna: enable nix-snapshotter
Anirudh Oppiliappan x@icyphox.sh
Fri, 14 Jun 2024 00:19:42 +0300
commit

1da4b486cb63db998c76045f8f26c3a0d3b852bd

parent

0f83f519e2bdd75b74650a02015e6d9300d33e8f

3 files changed, 79 insertions(+), 1 deletions(-)

jump to
M flake.lockflake.lock

@@ -21,6 +21,43 @@ "repo": "nix-darwin",

"type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nix-snapshotter", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704152458, + "narHash": "sha256-DS+dGw7SKygIWf9w4eNBUZsK+4Ug27NwEWmn2tnbycg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "88a2cd8166694ba0b6cb374700799cec53aef527", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [

@@ -38,6 +75,28 @@ },

"original": { "owner": "nix-community", "repo": "home-manager", + "type": "github" + } + }, + "nix-snapshotter": { + "inputs": { + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1715438114, + "narHash": "sha256-btb702TXuhDg0D6tW0dCOy4+II9Wl6BJ0LvpT+O9wrs=", + "owner": "pdtpartners", + "repo": "nix-snapshotter", + "rev": "7b251c9356bc7bb383ebeedcd0045b3ae431bff7", + "type": "github" + }, + "original": { + "owner": "pdtpartners", + "repo": "nix-snapshotter", "type": "github" } },

@@ -96,6 +155,7 @@ "root": {

"inputs": { "darwin": "darwin", "home-manager": "home-manager", + "nix-snapshotter": "nix-snapshotter", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "prompt": "prompt"
M flake.nixflake.nix

@@ -21,12 +21,18 @@ prompt = {

url = "git+https://git.peppe.rs/cli/prompt"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nix-snapshotter = { + url = "github:pdtpartners/nix-snapshotter"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self , nixpkgs , nixos-hardware + , nix-snapshotter , home-manager , prompt , darwin

@@ -109,6 +115,10 @@ denna = nixpkgs.lib.nixosSystem {

system = "x86_64-linux"; modules = [ ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; }) + ({ pkgs, ... }: { + imports = [ nix-snapshotter.nixosModules.default ]; + nixpkgs.overlays = [ nix-snapshotter.overlays.default ]; + }) { imports = [ ./hosts/denna/configuration.nix ]; _module.args.self = self;
M hosts/denna/configuration.nixhosts/denna/configuration.nix

@@ -62,16 +62,17 @@ packages = with pkgs; [ ];

}; nixpkgs.config.allowUnfree = true; - environment.systemPackages = with pkgs; [ vim wget git + nerdctl ]; services = { openssh.enable = true; tailscale.enable = true; + nix-snapshotter.enable = true; }; services.radicale = {

@@ -91,6 +92,13 @@ };

}; }; + + # nix-snapshotter and k3s + virtualisation.containerd = { + enable = true; + nixSnapshotterIntegration = true; + k3sIntegration = true; + }; services.k3s = { enable = true; };