From 82de1bc7bf1e4df20d33285252a83be10b164278 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Mon, 11 Mar 2024 18:38:30 +0000 Subject: [PATCH] add attic --- flake.lock | 96 ++++++++++++++++++++++++++++++----- flake.nix | 25 ++++++++- sets/attic.nix | 5 ++ system/pearbutter/default.nix | 6 ++- 4 files changed, 116 insertions(+), 16 deletions(-) create mode 100644 sets/attic.nix diff --git a/flake.lock b/flake.lock index c34a4d5..c634b67 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,74 @@ { "nodes": { + "attic": { + "inputs": { + "crane": "crane", + "flake-compat": "flake-compat", + "flake-utils": [ + "utils" + ], + "nix": [ + "nix" + ], + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709460777, + "narHash": "sha256-KJ/3Z6t2XUW/M9KqLPKPSlKLL8L9sQBL6DSEa46TbxI=", + "owner": "nixos-bsd", + "repo": "attic", + "rev": "a963c1c5e26a5ddb63f5c830157dd060ce8bf395", + "type": "github" + }, + "original": { + "owner": "nixos-bsd", + "repo": "attic", + "type": "github" + } + }, + "crane": { + "inputs": { + "nixpkgs": [ + "attic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709400089, + "narHash": "sha256-4A6X9xNWJ0EQhBPjM4JTdxQFDTkSqQchkNfuDWOP068=", + "owner": "ipetkov", + "repo": "crane", + "rev": "766e70fd475cd4d73bd65613d06bbb3dcbb75871", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "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-compat_2": { "flake": false, "locked": { "lastModified": 1673956053, @@ -34,23 +102,21 @@ }, "nix": { "inputs": { - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "libgit2": "libgit2", "nixpkgs": [ - "nixbsd", "nixpkgs" ], "nixpkgs-regression": [ - "nixbsd", "nixpkgs" ] }, "locked": { - "lastModified": 1709952684, - "narHash": "sha256-lgJQicjZsgeMZIBW8wL6LKN+zkUdILIMEl4nzBuMPBI=", + "lastModified": 1710003483, + "narHash": "sha256-nhW5BDyA/YE7Cv27x9HLOlHvJGM2sX2X37tWI0tAFFM=", "owner": "rhelmot", "repo": "nix", - "rev": "d0bd67ea27d9e3db314e8b5f4cda394ca74943a2", + "rev": "213b62084006059cf07768b3e6249efce92c7e83", "type": "github" }, "original": { @@ -62,7 +128,9 @@ }, "nixbsd": { "inputs": { - "nix": "nix", + "nix": [ + "nix" + ], "nixpkgs": [ "nixpkgs" ], @@ -86,11 +154,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1710114440, - "narHash": "sha256-jVHtWfPyM6hl7Xj3iKwOtTF3GuPgzYV50OkKLz0BxsA=", + "lastModified": 1710114529, + "narHash": "sha256-QIkIRJfiycGcOyKguwEkH9pV9b7D9NvLvduIucxirxU=", "owner": "rhelmot", "repo": "nixpkgs", - "rev": "79a0ca3025f415f6674218d7f88bb228d2ba07bb", + "rev": "abba4676b872602e3a4a363b6a68e307e99cb23e", "type": "github" }, "original": { @@ -102,6 +170,8 @@ }, "root": { "inputs": { + "attic": "attic", + "nix": "nix", "nixbsd": "nixbsd", "nixpkgs": "nixpkgs", "utils": "utils" @@ -127,11 +197,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e47b4e4..d6ef1aa 100644 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,23 @@ inputs = { nixpkgs.url = "github:rhelmot/nixpkgs/freebsd-staging"; utils.url = "github:numtide/flake-utils"; + nix = { + url = "github:rhelmot/nix/freebsd-staging"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs-regression.follows = "nixpkgs"; + }; nixbsd = { url = "github:nixos-bsd/nixbsd"; inputs.nixpkgs.follows = "nixpkgs"; inputs.utils.follows = "utils"; + inputs.nix.follows = "nix"; + }; + attic = { + url = "github:nixos-bsd/attic"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "utils"; + inputs.nix.follows = "nix"; + inputs.nixpkgs-stable.follows = "nixpkgs"; }; }; @@ -14,11 +27,19 @@ nixpkgs, nixbsd, utils, + attic, ... - }: + }@inputs: let baseDir = ./system; - makeSystem = module: nixbsd.lib.nixbsdSystem { modules = [ module ]; }; + makeSystem = + module: + nixbsd.lib.nixbsdSystem { + modules = [ module ]; + specialArgs = { + inherit inputs; + }; + }; in { nixosConfigurations = nixpkgs.lib.mapAttrs (name: _: makeSystem (baseDir + "/${name}")) ( diff --git a/sets/attic.nix b/sets/attic.nix new file mode 100644 index 0000000..187cc7e --- /dev/null +++ b/sets/attic.nix @@ -0,0 +1,5 @@ +{ inputs, pkgs, ... }: +{ + nixpkgs.overlays = [ inputs.attic.overlays.default ]; + environment.systemPackages = [ pkgs.attic-client ]; +} diff --git a/system/pearbutter/default.nix b/system/pearbutter/default.nix index bb69074..8dd8727 100644 --- a/system/pearbutter/default.nix +++ b/system/pearbutter/default.nix @@ -1,6 +1,9 @@ { pkgs, ... }: { - imports = [ ./boot-config.nix ]; + imports = [ + ../../sets/attic.nix + ./boot-config.nix + ]; users.users.artemis = { isNormalUser = true; @@ -24,6 +27,7 @@ environment.systemPackages = with pkgs; [ file + freebsd.truss gitMinimal htop hyfetch