mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
Compare commits
2 commits
c6fd9e1b5f
...
6e42c6d164
Author | SHA1 | Date | |
---|---|---|---|
|
6e42c6d164 | ||
|
857bf4f7ab |
1 changed files with 37 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, dotfiles, ... }:
|
{ pkgs, lib, dotfiles, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
packageSets = with pkgs; rec {
|
packageSets = with pkgs; rec {
|
||||||
|
@ -29,8 +29,10 @@ let
|
||||||
kubelogin-oidc
|
kubelogin-oidc
|
||||||
mosh
|
mosh
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
|
pandoc
|
||||||
ripgrep
|
ripgrep
|
||||||
sops
|
sops
|
||||||
|
texlive.combined.scheme-small
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
];
|
];
|
||||||
|
@ -65,6 +67,37 @@ let
|
||||||
everything = system ++ base ++ languages ++ programs ++ multimedia;
|
everything = system ++ base ++ languages ++ programs ++ multimedia;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# We've got a small issue here. I tested this in a repl, and what I've
|
||||||
|
# observed is that listFilesRecursive spits out [ /full/path/to/default.nix ],
|
||||||
|
# while builtins.readDir spits out { "default.nix" = "regular"; }
|
||||||
|
# In theory, this shouldn't be much of an issue, however, when using readDir
|
||||||
|
# I would be able to do `map (n: "${./.}/${n}"), while when using
|
||||||
|
# listFilesRecursive I have to use `map (n: "${n}").
|
||||||
|
# The difference here is that when using listFilesRecursive, `n` becomes
|
||||||
|
# `/nix/store/<ID>-default.nix`, meaning it can be used as-is, but when using
|
||||||
|
# `readDir` it becomes `default.nix`, meaning the string used in the map
|
||||||
|
# callback must be `"${./.}/${n}"` to get a path to the current derivation
|
||||||
|
# where the nix file lives in.
|
||||||
|
# Currently, I am unsure of the implications of having all files separately.
|
||||||
|
# To do it "the right way" I'd obviously prefer the nix files to be children
|
||||||
|
# of the alymac derivation, but it seems that if I want my map of imports to
|
||||||
|
# be generated from the entire directory listing, it isn't going to work out.
|
||||||
|
# The solution was slightly modified from this Reddit answer:
|
||||||
|
# <https://www.reddit.com/r/NixOS/comments/j5pa9o/comment/g81dvop/>
|
||||||
|
# So, let's get all files in the current directory...
|
||||||
|
importMap = map
|
||||||
|
(n: "${n}")
|
||||||
|
(lib.filesystem.listFilesRecursive ./.);
|
||||||
|
# importMap = map
|
||||||
|
# (n: "${./.}/${n}")
|
||||||
|
# (builtins.attrNames (builtins.readDir ./.));
|
||||||
|
|
||||||
|
# And filter out default.nix
|
||||||
|
importsFiltered =
|
||||||
|
builtins.filter
|
||||||
|
(x: !lib.strings.hasInfix "default" x)
|
||||||
|
importMap;
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Absolutely proprietary.
|
# Absolutely proprietary.
|
||||||
|
@ -90,9 +123,10 @@ in
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = { inherit dotfiles; };
|
extraSpecialArgs = { inherit dotfiles; };
|
||||||
users.alyxia = { pkgs, ... }: {
|
users.alyxia = { pkgs, ... }: {
|
||||||
imports = [ ./zsh.nix ./git.nix ./nvim.nix ];
|
# Defined further above, a list of files to import.
|
||||||
|
imports = importsFiltered;
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = packageSets.everything;
|
packages = packageSets.everything;
|
||||||
|
|
Loading…
Reference in a new issue