Make development experience work

Add direnv to default build
Add xonsh-direnv package to overlay and xonsh environment
Add virtualisation options
This commit is contained in:
Greg Hellings
2022-05-04 13:57:19 -05:00
parent 2d333a9128
commit f18d1f357c
13 changed files with 97 additions and 9 deletions
+3 -1
View File
@@ -17,8 +17,10 @@
outputs = inputs:
let
local_overlay = import ./overlays;
mods = hostname: [
{ nixpkgs.overlays = [ inputs.nur.overlay ]; }
{ nixpkgs.overlays = [ inputs.nur.overlay local_overlay ]; }
inputs.agenix.nixosModule
./modules
./profiles/base
+13
View File
@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
nix-direnv.enableFlakes = true;
};
home.packages = [
pkgs.xonsh-direnv
];
}
+1
View File
@@ -8,6 +8,7 @@ in {
imports = [
./modules
./bash.nix
./direnv.nix
./git.nix
./ssh.nix
./vim.nix
+5
View File
@@ -35,6 +35,11 @@
"src.fedoraproject.org pkgs.fedoraproject.org" = {
user = "greghellings";
};
"127.*".extraOptions = {
PubkeyAcceptedAlgorithms = "+ssh-rsa";
HostkeyAlgorithms = "+ssh-rsa";
};
};
};
+3
View File
@@ -15,13 +15,16 @@ in
programs.vim = {
enable = true;
plugins = with pkgs.vimPlugins; [
ansible-vim
bufexplorer
ctrlp
direnv-vim
nerdtree
vim-gitgutter
vim-flake8
vim-fugitive
vim-indent-guides
vim-packer
gruvbox
syntastic
];
+2
View File
@@ -49,6 +49,8 @@ in {
# $? == _.rtn
import os
xontrib load direnv
'';
#$PKG_CONFIG_PATH = '/usr/local/lib/pkgconfig'
+1
View File
@@ -5,6 +5,7 @@
./boot.nix
./hardware-configuration.nix
./podman.nix
./virt.nix
];
networking.hostName = "jude";
greg.gnome.enable= true;
+25
View File
@@ -0,0 +1,25 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
ansible
libguestfs
packer
virt-manager
vagrant
];
# Give my user access to the libvirtd process
users.users.greg.extraGroups = [ "libvirtd" ];
virtualisation.libvirtd = {
enable = true;
onBoot = "ignore"; # Do not auto-restart VMs on boot, unless they are marked autostart
};
virtualisation.waydroid = {
enable = true;
};
boot.extraModprobeConfig = "options kvm_amd nested=1";
}
+12
View File
@@ -0,0 +1,12 @@
self: super:
{
xonsh-direnv = super.callPackage ./xonsh-direnv.nix {
#lib = self.lib;
buildPythonPackage = self.python3.pkgs.buildPythonPackage;
fetchPypi = self.python.pkgs.fetchPypi;
};
xonsh = super.xonsh.overridePythonAttrs (old: rec{
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.xonsh-direnv ];
});
}
-6
View File
@@ -1,6 +0,0 @@
self: super:
{
git = super.git.override {
meta.priority = 4;
};
}
+20
View File
@@ -0,0 +1,20 @@
{ lib, buildPythonPackage, fetchPypi, pkgs}:
buildPythonPackage rec {
pname = "xonsh-direnv";
version = "1.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "OLjtGD2lX4Yf3aHrxCWmAbSPZnf8OuVrBu0VFbsna1Y=";
};
meta = with lib; {
description = "Direnv support for Xonsh";
homepage = "https://github.com/74th/xonsh-direnv/";
license = licenses.mit;
maintainers = [];
};
doCheck = false;
}
+4
View File
@@ -10,6 +10,10 @@
experimental-features = nix-command flakes
min-free = ${toString (1024 * 1024 * 1024) }
max-free = ${toString (5 * 1024 * 1024 * 1024) }
# Used by direnv
keep-outputs = true
keep-derivations = true
'';
# Use hardlinking instead of copying when possible
+8 -2
View File
@@ -1,6 +1,12 @@
{ pkgs, agenix, ... }:
{
let
myPackages = pypackages: with pypackages; [
pkgs.xonsh-direnv
];
myPython = pkgs.python3.withPackages myPackages;
in {
# Base packages that need to be in all my hosts
environment.systemPackages = with pkgs; [
agenix.defaultPackage."${system}"
@@ -10,7 +16,7 @@
findutils
home-manager
htop
python3
myPython
pwgen
tmux
transcrypt