feat: add devenv

This commit is contained in:
Glen Goodwin 2023-06-07 01:03:26 -04:00
parent cc4f3398ff
commit 327db2d36c
5 changed files with 199 additions and 6 deletions

178
flake.lock generated
View file

@ -1,5 +1,82 @@
{ {
"nodes": { "nodes": {
"devenv": {
"inputs": {
"flake-compat": "flake-compat",
"nix": "nix",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1686054274,
"narHash": "sha256-93aebyN7EMmeFFXisFIvp28UEbrozu79vd3pKPjvNR0=",
"owner": "cachix",
"repo": "devenv",
"rev": "c51a56bac8853c019241fe8d821c0a0d82422835",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "main",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"devenv",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -64,6 +141,46 @@
"type": "github" "type": "github"
} }
}, },
"lowdown-src": {
"flake": false,
"locked": {
"lastModified": 1633514407,
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
"type": "github"
},
"original": {
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
}
},
"nix": {
"inputs": {
"lowdown-src": "lowdown-src",
"nixpkgs": [
"devenv",
"nixpkgs"
],
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1676545802,
"narHash": "sha256-EK4rZ+Hd5hsvXnzSzk2ikhStJnD63odF7SzsQ8CuSPU=",
"owner": "domenkozar",
"repo": "nix",
"rev": "7c91803598ffbcfe4a55c44ac6d49b2cf07a527f",
"type": "github"
},
"original": {
"owner": "domenkozar",
"ref": "relaxed-flakes",
"repo": "nix",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1685290091, "lastModified": 1685290091,
@ -80,6 +197,38 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1678872516,
"narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1685347552, "lastModified": 1685347552,
@ -96,8 +245,37 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks": {
"inputs": {
"flake-compat": [
"devenv",
"flake-compat"
],
"flake-utils": "flake-utils",
"gitignore": "gitignore",
"nixpkgs": [
"devenv",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1682596858,
"narHash": "sha256-Hf9XVpqaGqe/4oDGr30W8HlsWvJXtMsEPHDqHZA6dDg=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "fb58866e20af98779017134319b5663b8215d912",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"devenv": "devenv",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",

View file

@ -15,9 +15,14 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
devenv = {
url = "github:cachix/devenv/main";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = inputs @ { self, nixpkgs, home-manager, hyprland, ... }: outputs = inputs @ { self, nixpkgs, home-manager, hyprland, devenv, ... }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
@ -35,7 +40,7 @@
nixosConfigurations = ( nixosConfigurations = (
import ./hosts { import ./hosts {
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
inherit inputs user system home-manager hyprland; inherit inputs user system home-manager hyprland devenv;
} }
); );
}; };

View file

@ -1,11 +1,11 @@
{ lib, inputs, system, home-manager, user, hyprland, ... }: { lib, inputs, system, home-manager, user, hyprland, devenv, ... }:
{ {
thinkpad = lib.nixosSystem { thinkpad = lib.nixosSystem {
inherit system; inherit system;
specialArgs = { specialArgs = {
inherit user inputs hyprland system; inherit user inputs hyprland system devenv;
host = { host = {
hostName = "thinkpad"; hostName = "thinkpad";
mainMonitor = "eDP-1"; mainMonitor = "eDP-1";
@ -20,7 +20,7 @@
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user; }; home-manager.extraSpecialArgs = { inherit user devenv; };
home-manager.users.${user} = { home-manager.users.${user} = {
imports = [ (import ./home.nix) ] ++ [ (import ./thinkpad/home.nix) ]; imports = [ (import ./home.nix) ] ++ [ (import ./thinkpad/home.nix) ];
}; };

View file

@ -1,10 +1,11 @@
{ config, lib, pkgs, stable, user, ... }: { config, lib, pkgs, stable, user, devenv, ... }:
{ {
imports = # Home Manager Modules imports = # Home Manager Modules
[ (import ../modules/shell/git/home.nix) ] ++ [ (import ../modules/shell/git/home.nix) ] ++
[ (import ../modules/programs/wofi.nix) ] ++ [ (import ../modules/programs/wofi.nix) ] ++
[ (import ../modules/editors/nvim/home.nix) ] ++ [ (import ../modules/editors/nvim/home.nix) ] ++
[ (import ../modules/programs/devenv/home.nix) ] ++
[ (import ../modules/shell/zsh/home.nix) ]; [ (import ../modules/shell/zsh/home.nix) ];
home = { home = {
@ -12,6 +13,7 @@
homeDirectory = "/home/${user}"; homeDirectory = "/home/${user}";
packages = with pkgs; [ packages = with pkgs; [
# Terminal # Terminal
btop # Resource Manager btop # Resource Manager
nitch # Minimal fetch nitch # Minimal fetch

View file

@ -0,0 +1,8 @@
{ config, lib, pkgs, user, devenv, ... }: {
home.packages = with pkgs; [
cachix
devenv.packages.${system}.devenv
];
}