migra a version nueva de shenvs
This commit is contained in:
parent
177659997f
commit
8f48524a76
16
flake.lock
16
flake.lock
|
@ -1,5 +1,20 @@
|
|||
{
|
||||
"nodes": {
|
||||
"hm-isolation": {
|
||||
"locked": {
|
||||
"lastModified": 1661479511,
|
||||
"narHash": "sha256-UXGdCX6g0zz+QAZLjJGsJWYAtE3WCjO/0eFYU5mJCUM=",
|
||||
"owner": "3442",
|
||||
"repo": "hm-isolation",
|
||||
"rev": "cd77fe1c8b00bb8aab2f6ad940c0912875c0d334",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "3442",
|
||||
"repo": "hm-isolation",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -54,6 +69,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"hm-isolation": "hm-isolation",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nur": "nur"
|
||||
|
|
|
@ -2,14 +2,15 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
|
||||
hm-isolation.url = "github:3442/hm-isolation";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-22.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {self, nixpkgs, home-manager, nur, ...}:
|
||||
outputs = {self, nixpkgs, home-manager, nur, hm-isolation, ...}:
|
||||
let
|
||||
packages = import ./pkgs;
|
||||
in
|
||||
|
@ -21,7 +22,7 @@
|
|||
|
||||
homeConfigurations."fabian@posixlycorrect" = home-manager.lib.homeManagerConfiguration {
|
||||
system = "x86_64-linux";
|
||||
configuration = import ./home {inherit self nixpkgs;};
|
||||
configuration = import ./home {inherit self nixpkgs hm-isolation; };
|
||||
username = "fabian";
|
||||
homeDirectory = "/home/fabian";
|
||||
stateVersion = "21.11";
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
# man page: https://rycee.gitlab.io/home-manager/options.html
|
||||
|
||||
{ nixpkgs, self }:
|
||||
{ nixpkgs, self, hm-isolation }:
|
||||
{ config, pkgs, lib, ... }: with lib; {
|
||||
|
||||
nixpkgs.overlays = [ self.overlay ];
|
||||
|
||||
imports = [ ./desktop ./steam ./systemd ];
|
||||
imports = [
|
||||
(hm-isolation.homeManagerModule)
|
||||
./desktop
|
||||
./isolation.nix
|
||||
./steam
|
||||
./systemd
|
||||
];
|
||||
|
||||
home = {
|
||||
stateVersion = "21.11"; # No tocar esto
|
||||
|
@ -16,11 +22,6 @@
|
|||
"EDITOR" = "nvim";
|
||||
"TERMINAL" = "kitty";
|
||||
};
|
||||
file = {
|
||||
".shenvs".text = let
|
||||
keeps = { gcKeep ? [] }: concatStringsSep "\n" (map toString gcKeep);
|
||||
in keeps (import ../shenvs/config.nix pkgs.local.shenvs);
|
||||
};
|
||||
keyboard = {
|
||||
layout = "us,latam";
|
||||
options = [ "grp:alt_shift_toggle" ];
|
||||
|
|
18
home/isolation.nix
Normal file
18
home/isolation.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{pkgs, config, lib, ...} :
|
||||
with lib;
|
||||
{
|
||||
home.isolation = {
|
||||
enable = true;
|
||||
btrfsSupport = true;
|
||||
defaults = {
|
||||
static = true;
|
||||
bindHome = "home/";
|
||||
persist = {
|
||||
base = "shenvs";
|
||||
btrfs = true;
|
||||
};
|
||||
};
|
||||
|
||||
modulesUnder = ./shenvs;
|
||||
};
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
pkgs: {
|
||||
paths = with pkgs; [
|
||||
{pkgs, ...} :
|
||||
{
|
||||
packages = with pkgs; [
|
||||
binutils
|
||||
gdb
|
||||
gcc
|
||||
gcc-arm-embedded
|
||||
gnumake
|
||||
lldb
|
|
@ -1,5 +1,6 @@
|
|||
pkgs: {
|
||||
paths = with pkgs; [
|
||||
{pkgs, ...}:
|
||||
{
|
||||
packages = with pkgs; [
|
||||
(octave.withPackages (packages: with packages; [
|
||||
symbolic
|
||||
]))
|
|
@ -1,5 +1,6 @@
|
|||
pkgs: {
|
||||
paths = with pkgs; [
|
||||
{pkgs, ...}:
|
||||
{
|
||||
packages = with pkgs; [
|
||||
pipenv
|
||||
(python310.withPackages ( packages: with packages; [
|
||||
matplotlib
|
|
@ -1,8 +1,9 @@
|
|||
pkgs: {
|
||||
paths = with pkgs; [
|
||||
{pkgs, ... }:
|
||||
{
|
||||
packages = with pkgs; [
|
||||
pipenv
|
||||
(python310.withPackages ( packages: with packages; [
|
||||
setuptools
|
||||
]))
|
||||
]))
|
||||
];
|
||||
}
|
|
@ -86,11 +86,6 @@
|
|||
bindkey ";5C" forward-word
|
||||
bindkey "\e[3~" delete-char
|
||||
|
||||
|
||||
function shenv() {
|
||||
NIXPKGS_ALLOW_UNFREE=1 nix shell 'system#shenvs.'"$1" --impure
|
||||
}
|
||||
|
||||
function use() {
|
||||
nix shell "nixpkgs#$1"
|
||||
}
|
||||
|
|
|
@ -1,34 +1,6 @@
|
|||
pkgs:
|
||||
with pkgs.lib; let
|
||||
inherit (pkgs) buildEnv callPackage writeTextDir;
|
||||
|
||||
importAll = { root, exclude ? [] }:
|
||||
|
||||
# adapted from http://chriswarbo.net/projects/nixos/useful_hacks.html
|
||||
let
|
||||
basename = removeSuffix ".nix";
|
||||
|
||||
isMatch = name: type: (hasSuffix ".nix" name || type == "directory")
|
||||
&& ! elem name (map basename exclude);
|
||||
|
||||
entry = name: _: {
|
||||
name = basename name;
|
||||
value = import (root + "/${name}");
|
||||
};
|
||||
in
|
||||
mapAttrs' entry (filterAttrs isMatch (builtins.readDir root));
|
||||
|
||||
inherit (pkgs) callPackage;
|
||||
in {
|
||||
shenvs = let
|
||||
build = name: { paths, enter ? null }: buildEnv {
|
||||
name = "shenv-${name}";
|
||||
paths = (optional (enter != null) (writeTextDir "lib/shenv/enter" enter))
|
||||
++ paths;
|
||||
};
|
||||
in mapAttrs (name: shenv: build name (shenv pkgs)) (importAll {
|
||||
root = ../shenvs;
|
||||
exclude = [ "config" ];
|
||||
});
|
||||
|
||||
vscode-extensions = pkgs.callPackage ./vscode.nix {};
|
||||
vscode-extensions = callPackage ./vscode.nix {};
|
||||
}
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
shenvs: {
|
||||
gcKeep = with shenvs; [
|
||||
c
|
||||
mad
|
||||
octave
|
||||
proba
|
||||
quartus
|
||||
tcrb
|
||||
];
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
pkgs: {
|
||||
paths = with pkgs; [
|
||||
pipenv
|
||||
(python39.withPackages ( packages: with packages; [
|
||||
psycopg2
|
||||
]))
|
||||
];
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
pkgs: {
|
||||
paths = with pkgs; [
|
||||
(pkgs.quartus-prime-lite.override {
|
||||
supportedDevices = pkgs.lib.singleton "Cyclone V";
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue