feat: switch to devshells

This commit is contained in:
Laureηt 2023-03-19 14:26:56 +01:00
parent 1a214ff102
commit e331fe0121
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI
4 changed files with 75 additions and 75 deletions

2
.envrc
View file

@ -1 +1 @@
use nix
use flake

View file

@ -3,7 +3,9 @@
"agenix": {
"inputs": {
"agenix": "agenix_2",
"flake-utils": "flake-utils",
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
@ -218,11 +220,11 @@
},
"flake-utils": {
"locked": {
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
@ -302,11 +304,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1678729503,
"narHash": "sha256-j+h4Bdqbe+qjzhxdhkRmVgSx2lxJ8HnKeYcAhhnd1zM=",
"lastModified": 1679067095,
"narHash": "sha256-G2dJQURL/CCi+8RP6jNJG8VqgtzEMCA+6mNodd3VR6E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "24c1a6335e3da6a3ecf82f33ac50c2ad66aee346",
"rev": "3239e0b40f242f47bf6c0c37b2fd35ab3e76e370",
"type": "github"
},
"original": {
@ -348,11 +350,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1678654296,
"narHash": "sha256-aVfw3ThpY7vkUeF1rFy10NAkpKDS2imj3IakrzT0Occ=",
"lastModified": 1679081381,
"narHash": "sha256-n4+SbrVohxbgbmOTkodfxc3d8W38OfKowD6YNA8j27o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5a1dc8acd977ff3dccd1328b7c4a6995429a656b",
"rev": "b573a7f69484a7d213680abb70b4f95bdc28eee5",
"type": "github"
},
"original": {
@ -380,22 +382,6 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1670507980,
"narHash": "sha256-riNZa0xzM1it3pzxciwALeMs+0CsBMWIW2FqulzK8vM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2787fc7d1e51404678614bf0fe92fc296746eec0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"poetry2nix": {
"flake": false,
"locked": {
@ -443,6 +429,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"webcord": "webcord"
@ -508,7 +495,9 @@
"webcord": {
"inputs": {
"dream2nix": "dream2nix",
"nixpkgs": "nixpkgs_2",
"nixpkgs": [
"nixpkgs"
],
"webcord": "webcord_2"
},
"locked": {

102
flake.nix
View file

@ -3,10 +3,12 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
agenix = {
url = "github:yaxitech/ragenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
home-manager = {
@ -14,50 +16,62 @@
inputs.nixpkgs.follows = "nixpkgs";
};
webcord.url = "github:fufexan/webcord-flake";
};
outputs = { nixpkgs, agenix, home-manager, webcord, ... }@inputs: {
# colmena
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ ];
};
};
# default config
defaults = { name, ... }: {
imports = [
./hosts/${name}/configuration.nix
home-manager.nixosModules.home-manager
agenix.nixosModules.default
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
};
};
# personnal laptop
neodymium = { ... }: {
home-manager.users.laurent = {
imports = [ webcord.homeManagerModules.default ];
};
deployment = {
allowLocalDeployment = true;
targetHost = null;
};
};
# ovh vps
hydrogen = { ... }: {
deployment = {
targetHost = "178.62.253.235";
targetUser = "root";
};
};
webcord = {
url = "github:fufexan/webcord-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, flake-utils, agenix, home-manager, webcord, ... }@inputs:
# Provide colmena
(flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell { packages = [ pkgs.colmena ]; };
})) // {
# colmena
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ ];
};
};
# default config
defaults = { name, ... }: {
imports = [
./hosts/${name}/configuration.nix
home-manager.nixosModules.home-manager
agenix.nixosModules.default
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
};
};
# personnal laptop
neodymium = { ... }: {
home-manager.users.laurent = {
imports = [ webcord.homeManagerModules.default ];
};
deployment = {
allowLocalDeployment = true;
targetHost = null;
};
};
# ovh vps
hydrogen = { ... }: {
deployment = {
targetHost = "178.62.253.235";
targetUser = "root";
};
};
};
};
}

View file

@ -1,3 +0,0 @@
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell { buildInputs = with pkgs; [ colmena nixfmt ]; }