mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
Compare commits
No commits in common. "fdcefe5c7e2efe9d875529b9bbb92fa49cbfe60b" and "8b82caf336465850e381790c172483a2ec491360" have entirely different histories.
fdcefe5c7e
...
8b82caf336
2 changed files with 15 additions and 35 deletions
|
@ -1,6 +1,5 @@
|
|||
{ pkgs, specialArgs, lib, dotfiles, ... }:
|
||||
{ pkgs, lib, dotfiles, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
textEditor = "nvim";
|
||||
|
||||
|
@ -67,14 +66,9 @@ let
|
|||
ffmpeg
|
||||
];
|
||||
|
||||
fonts = [
|
||||
nerdfonts
|
||||
];
|
||||
|
||||
everything = system ++ base ++ languages ++ programs ++ multimedia ++ fonts;
|
||||
everything = system ++ base ++ languages ++ programs ++ multimedia;
|
||||
};
|
||||
|
||||
# Old solution kept for posterity {{{
|
||||
# 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"; }
|
||||
|
@ -92,30 +86,19 @@ let
|
|||
# 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}")
|
||||
# (lib.filesystem.listFilesRecursive ./.);
|
||||
# importsFiltered =
|
||||
# builtins.filter
|
||||
# (x: !lib.strings.hasInfix "default" x)
|
||||
# importMap;
|
||||
# }}}
|
||||
# (n: "${./.}/${n}")
|
||||
# (builtins.attrNames (builtins.readDir ./.));
|
||||
|
||||
getDir = dir: mapAttrs
|
||||
(file: type:
|
||||
if type == "directory" then getDir "${dir}/${file}" else type
|
||||
)
|
||||
(builtins.readDir dir);
|
||||
|
||||
files = dir: collect isString (mapAttrsRecursive
|
||||
(path: type: concatStringsSep "/" path)
|
||||
(getDir dir));
|
||||
|
||||
validFiles = dir: map
|
||||
(file: ./. + "/${file}")
|
||||
(filter
|
||||
(file: hasSuffix ".nix" file && file != "default.nix")
|
||||
(files dir));
|
||||
# And filter out default.nix
|
||||
importsFiltered =
|
||||
builtins.filter
|
||||
(x: !lib.strings.hasInfix "default" x)
|
||||
importMap;
|
||||
|
||||
in
|
||||
{
|
||||
|
@ -144,8 +127,8 @@ in
|
|||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit dotfiles; };
|
||||
users.alyxia = { pkgs, ... }: {
|
||||
# Defined further above, generates a list of files to import.
|
||||
imports = validFiles ./.;
|
||||
# Defined further above, a list of files to import.
|
||||
imports = importsFiltered;
|
||||
|
||||
home = {
|
||||
packages = packageSets.everything;
|
||||
|
@ -205,7 +188,6 @@ in
|
|||
"itch"
|
||||
"iterm2"
|
||||
"obs"
|
||||
"plexamp"
|
||||
"raycast"
|
||||
"sequel-ace"
|
||||
"shottr"
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
source ${dotfiles}/zsh/zshrc
|
||||
|
||||
export PATH="$PATH:$HOME/.npm-packages/bin"
|
||||
export FRENYARD_SCALE=2.40
|
||||
export RETHINK_API="https://rethink.alyxia.dev"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue