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:
@@ -17,8 +17,10 @@
|
|||||||
|
|
||||||
outputs = inputs:
|
outputs = inputs:
|
||||||
let
|
let
|
||||||
|
local_overlay = import ./overlays;
|
||||||
|
|
||||||
mods = hostname: [
|
mods = hostname: [
|
||||||
{ nixpkgs.overlays = [ inputs.nur.overlay ]; }
|
{ nixpkgs.overlays = [ inputs.nur.overlay local_overlay ]; }
|
||||||
inputs.agenix.nixosModule
|
inputs.agenix.nixosModule
|
||||||
./modules
|
./modules
|
||||||
./profiles/base
|
./profiles/base
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
nix-direnv.enableFlakes = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
pkgs.xonsh-direnv
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ in {
|
|||||||
imports = [
|
imports = [
|
||||||
./modules
|
./modules
|
||||||
./bash.nix
|
./bash.nix
|
||||||
|
./direnv.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./vim.nix
|
./vim.nix
|
||||||
|
|||||||
@@ -35,6 +35,11 @@
|
|||||||
"src.fedoraproject.org pkgs.fedoraproject.org" = {
|
"src.fedoraproject.org pkgs.fedoraproject.org" = {
|
||||||
user = "greghellings";
|
user = "greghellings";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"127.*".extraOptions = {
|
||||||
|
PubkeyAcceptedAlgorithms = "+ssh-rsa";
|
||||||
|
HostkeyAlgorithms = "+ssh-rsa";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -15,13 +15,16 @@ in
|
|||||||
programs.vim = {
|
programs.vim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
ansible-vim
|
||||||
bufexplorer
|
bufexplorer
|
||||||
ctrlp
|
ctrlp
|
||||||
|
direnv-vim
|
||||||
nerdtree
|
nerdtree
|
||||||
vim-gitgutter
|
vim-gitgutter
|
||||||
vim-flake8
|
vim-flake8
|
||||||
vim-fugitive
|
vim-fugitive
|
||||||
vim-indent-guides
|
vim-indent-guides
|
||||||
|
vim-packer
|
||||||
gruvbox
|
gruvbox
|
||||||
syntastic
|
syntastic
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ in {
|
|||||||
# $? == _.rtn
|
# $? == _.rtn
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
xontrib load direnv
|
||||||
'';
|
'';
|
||||||
|
|
||||||
#$PKG_CONFIG_PATH = '/usr/local/lib/pkgconfig'
|
#$PKG_CONFIG_PATH = '/usr/local/lib/pkgconfig'
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
./boot.nix
|
./boot.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./podman.nix
|
./podman.nix
|
||||||
|
./virt.nix
|
||||||
];
|
];
|
||||||
networking.hostName = "jude";
|
networking.hostName = "jude";
|
||||||
greg.gnome.enable= true;
|
greg.gnome.enable= true;
|
||||||
|
|||||||
@@ -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";
|
||||||
|
}
|
||||||
@@ -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 ];
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
self: super:
|
|
||||||
{
|
|
||||||
git = super.git.override {
|
|
||||||
meta.priority = 4;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -10,6 +10,10 @@
|
|||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
min-free = ${toString (1024 * 1024 * 1024) }
|
min-free = ${toString (1024 * 1024 * 1024) }
|
||||||
max-free = ${toString (5 * 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
|
# Use hardlinking instead of copying when possible
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
{ pkgs, agenix, ... }:
|
{ 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
|
# Base packages that need to be in all my hosts
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
agenix.defaultPackage."${system}"
|
agenix.defaultPackage."${system}"
|
||||||
@@ -10,7 +16,7 @@
|
|||||||
findutils
|
findutils
|
||||||
home-manager
|
home-manager
|
||||||
htop
|
htop
|
||||||
python3
|
myPython
|
||||||
pwgen
|
pwgen
|
||||||
tmux
|
tmux
|
||||||
transcrypt
|
transcrypt
|
||||||
|
|||||||
Reference in New Issue
Block a user