añade configuración necesaria para shenvs

This commit is contained in:
Fabián Montero 2022-03-29 00:00:36 -06:00
parent 9f72d24109
commit 4b9e6bb4ee
4 changed files with 26 additions and 7 deletions

View file

@ -1,5 +1,4 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
@ -10,7 +9,11 @@
}; };
}; };
outputs = {self, nixpkgs, home-manager, nur, ...}: { outputs = {self, nixpkgs, home-manager, nur, ...}:
let
packages = import ./pkgs;
in
{
nixosConfigurations.posixlycorrect = nixpkgs.lib.nixosSystem { nixosConfigurations.posixlycorrect = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ ( import ./base ) ]; modules = [ ( import ./base ) ];
@ -18,12 +21,16 @@
homeConfigurations."fabian@posixlycorrect" = home-manager.lib.homeManagerConfiguration { homeConfigurations."fabian@posixlycorrect" = home-manager.lib.homeManagerConfiguration {
system = "x86_64-linux"; system = "x86_64-linux";
configuration = import ./home {inherit nixpkgs;}; configuration = import ./home {inherit self nixpkgs;};
username = "fabian"; username = "fabian";
homeDirectory = "/home/fabian"; homeDirectory = "/home/fabian";
stateVersion = "21.11"; stateVersion = "21.11";
}; };
packages.x86_64-linux = import ./pkgs nixpkgs.legacyPackages.x86_64-linux; packages.x86_64-linux = packages nixpkgs.legacyPackages.x86_64-linux;
overlay = self: super: {
local = packages super;
};
}; };
} }

View file

@ -1,8 +1,10 @@
# man page: https://rycee.gitlab.io/home-manager/options.html # man page: https://rycee.gitlab.io/home-manager/options.html
{ nixpkgs }: { nixpkgs, self }:
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: with lib; {
nixpkgs.overlays = [ self.overlay ];
imports = [ ./steam ]; imports = [ ./steam ];
home = { home = {
@ -14,6 +16,11 @@
"EDITOR" = "nvim"; "EDITOR" = "nvim";
"TERMINAL" = "kitty"; "TERMINAL" = "kitty";
}; };
file = {
".shenvs".text = let
keeps = { gcKeep ? [] }: concatStringsSep "\n" (map toString gcKeep);
in keeps (import ../shenvs/config.nix pkgs.local.shenvs);
};
}; };
systemd.user.tmpfiles.rules = [ systemd.user.tmpfiles.rules = [

View file

@ -16,7 +16,7 @@ with pkgs.lib; let
value = import (root + "/${name}"); value = import (root + "/${name}");
}; };
in in
mapAttrs' entry (filterAttrs isMatch (readDir root)); mapAttrs' entry (filterAttrs isMatch (builtins.readDir root));
in { in {
shenvs = let shenvs = let

5
shenvs/config.nix Normal file
View file

@ -0,0 +1,5 @@
shenvs: {
gcKeep = with shenvs; [
armasm
];
}