🔨 add devshells.nix

This commit is contained in:
Ingolf Wagner 2025-02-13 20:52:49 +13:00
parent 518d509f47
commit 1e9d3c08cf
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 82 additions and 15 deletions

55
flake.lock generated
View file

@ -118,6 +118,24 @@
} }
}, },
"devshell": { "devshell": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1735644329,
"narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=",
"owner": "numtide",
"repo": "devshell",
"rev": "f7795ede5b02664b57035b3b757876703e2c3eac",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"devshell_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nix-topology", "nix-topology",
@ -633,7 +651,7 @@
"landingpage": { "landingpage": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1709213960, "lastModified": 1709213960,
@ -651,7 +669,7 @@
}, },
"nix-topology": { "nix-topology": {
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell_2",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -678,7 +696,7 @@
"flake-parts": "flake-parts_4", "flake-parts": "flake-parts_4",
"nixos-images": "nixos-images", "nixos-images": "nixos-images",
"nixos-stable": "nixos-stable", "nixos-stable": "nixos-stable",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"treefmt-nix": "treefmt-nix_3" "treefmt-nix": "treefmt-nix_3"
}, },
"locked": { "locked": {
@ -935,6 +953,22 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1722073938,
"narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1645527175, "lastModified": 1645527175,
"narHash": "sha256-WeewqaO48sCctiN+iwgZZEJRU29Si7vHHoLCINAvuk8=", "narHash": "sha256-WeewqaO48sCctiN+iwgZZEJRU29Si7vHHoLCINAvuk8=",
@ -949,7 +983,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1734057604, "lastModified": 1734057604,
"narHash": "sha256-EC3eHb8Mk54jnk+C8Mtq2sRAaPJzg6zPvRY6OdNHwSc=", "narHash": "sha256-EC3eHb8Mk54jnk+C8Mtq2sRAaPJzg6zPvRY6OdNHwSc=",
@ -965,7 +999,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1738758495, "lastModified": 1738758495,
"narHash": "sha256-CZ8T4vP3ag2hwkpSZjatxJb55ouszvmnWw09qxGW9TU=", "narHash": "sha256-CZ8T4vP3ag2hwkpSZjatxJb55ouszvmnWw09qxGW9TU=",
@ -981,7 +1015,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1632855891, "lastModified": 1632855891,
"narHash": "sha256-crW76mt9/kbUBiKy/KiSnsQ9JEYgD3StDuYAMVkTbM0=", "narHash": "sha256-crW76mt9/kbUBiKy/KiSnsQ9JEYgD3StDuYAMVkTbM0=",
@ -995,7 +1029,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_6": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1738178544, "lastModified": 1738178544,
"narHash": "sha256-UbM+zJFlze877N5j2YMLKYFX7t05VvmuNX2M0vJ7RfI=", "narHash": "sha256-UbM+zJFlze877N5j2YMLKYFX7t05VvmuNX2M0vJ7RfI=",
@ -1034,7 +1068,7 @@
"polygon-art": { "polygon-art": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1688766095, "lastModified": 1688766095,
@ -1119,6 +1153,7 @@
"inputs": { "inputs": {
"clan-core": "clan-core", "clan-core": "clan-core",
"clan-fact-generators": "clan-fact-generators", "clan-fact-generators": "clan-fact-generators",
"devshell": "devshell",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"healthchecks": "healthchecks", "healthchecks": "healthchecks",
"home-manager": "home-manager", "home-manager": "home-manager",
@ -1127,7 +1162,7 @@
"nix-topology": "nix-topology", "nix-topology": "nix-topology",
"nixos-anywhere": "nixos-anywhere", "nixos-anywhere": "nixos-anywhere",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"nixpkgs-legacy_2211": "nixpkgs-legacy_2211", "nixpkgs-legacy_2211": "nixpkgs-legacy_2211",
"nixpkgs-legacy_2311": "nixpkgs-legacy_2311", "nixpkgs-legacy_2311": "nixpkgs-legacy_2311",
"nixpkgs-legacy_2405": "nixpkgs-legacy_2405", "nixpkgs-legacy_2405": "nixpkgs-legacy_2405",
@ -1192,7 +1227,7 @@
}, },
"srvos": { "srvos": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1738198321, "lastModified": 1738198321,

View file

@ -49,6 +49,7 @@
#telemetry.url = "git+file:///home/palo/dev/nixos/nixos-telemetry"; #telemetry.url = "git+file:///home/palo/dev/nixos/nixos-telemetry";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.url = "github:numtide/treefmt-nix";
devshell.url = "github:numtide/devshell";
# smoke test framwork to trigger tests (enable if I want to use it for real) # smoke test framwork to trigger tests (enable if I want to use it for real)
#smoke = { #smoke = {
@ -62,6 +63,7 @@
inputs@{ inputs@{
clan-core, clan-core,
clan-fact-generators, clan-fact-generators,
devshell,
flake-parts, flake-parts,
healthchecks, healthchecks,
home-manager, home-manager,
@ -412,6 +414,7 @@
clan-core.flakeModules.default clan-core.flakeModules.default
healthchecks.flakeModule healthchecks.flakeModule
./nix/formatter.nix ./nix/formatter.nix
./nix/devshells.nix
./nix/packages ./nix/packages
./nix/topology ./nix/topology
]; ];
@ -441,7 +444,7 @@
home-manager.users.root = import ./homes/root; home-manager.users.root = import ./homes/root;
} }
{ {
clan.core.machineDescription = "Laptop"; clan.core.settings.machine.description = "Laptop";
} }
( (
{ config, ... }: { config, ... }:
@ -471,7 +474,7 @@
home-manager.users.root = import ./homes/root; home-manager.users.root = import ./homes/root;
} }
{ {
clan.core.machineDescription = "Home Server"; clan.core.settings.machine.description = "Home Server";
} }
( (
{ config, ... }: { config, ... }:
@ -504,7 +507,7 @@
home-manager.users.root = import ./homes/root; home-manager.users.root = import ./homes/root;
} }
{ {
clan.core.machineDescription = "Internet Server"; clan.core.settings.machine.description = "Internet Server";
} }
]; ];
}; };
@ -526,7 +529,7 @@
home-manager.users.root = import ./homes/root; home-manager.users.root = import ./homes/root;
} }
{ {
clan.core.machineDescription = "Dummy Internet Server"; clan.core.settings.machine.description = "Dummy Internet Server";
} }
]; ];
}; };
@ -546,7 +549,7 @@
home-manager.users.root = import ./homes/root; home-manager.users.root = import ./homes/root;
} }
{ {
clan.core.machineDescription = "USB-Stick for Backup"; clan.core.settings.machine.description = "USB-Stick for Backup";
} }
]; ];
}; };

29
nix/devshells.nix Normal file
View file

@ -0,0 +1,29 @@
{ inputs, ... }:
{
imports = [ inputs.devshell.flakeModule ];
perSystem =
{
pkgs,
self',
system,
...
}:
{
devshells.default = {
commands = [
{
help = "example command";
name = "example";
command = "echo 'this is an example command'";
}
];
packages = [
inputs.clan-core.packages.${system}.clan-cli
];
};
};
}