mirror of
https://github.com/sadan4/dotfiles.git
synced 2025-03-31 04:31:55 -04:00
work
This commit is contained in:
parent
f5431cbae8
commit
3b9f424694
7 changed files with 95 additions and 40 deletions
|
@ -1,12 +1,9 @@
|
|||
{ NAME }: { ... }: {
|
||||
{ NAME }:
|
||||
{ ... }:
|
||||
{
|
||||
virtualisation = {
|
||||
docker = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
environment = {
|
||||
sessionVariables = {
|
||||
# DOCKER_HOST = "unix://$XDG_RUNTIME_DIR/docker.sock";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,44 +1,45 @@
|
|||
{
|
||||
util,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nixpkgs.config.allowInsecurePredicate = (pkg: true);
|
||||
nixpkgs.config.allowUnfreePredicate = (pkg: true);
|
||||
|
||||
imports = [
|
||||
../homeModules/utils.nix
|
||||
../homeModules/dev
|
||||
../homeModules/dev/ide
|
||||
../homeModules/dev/ide/reverseEng.nix
|
||||
../homeModules/dev/ide/jb/idea.nix
|
||||
../homeModules/dev/javascript.nix
|
||||
../homeModules/dev/nix.nix
|
||||
../homeModules/dev/cpp.nix
|
||||
../homeModules/dev/go.nix
|
||||
../homeModules/dev/jvm.nix
|
||||
../homeModules/dev/python.nix
|
||||
../homeModules/dev/vim.nix
|
||||
../homeModules/dev/rust.nix
|
||||
../homeModules/media
|
||||
../homeModules/scripts
|
||||
../homeModules/audio.nix
|
||||
../homeModules/btop.nix
|
||||
../homeModules/etcher.nix
|
||||
../homeModules/flameshot.nix
|
||||
../homeModules/frog.nix
|
||||
../homeModules/gaming.nix
|
||||
../homeModules/git.nix
|
||||
../homeModules/kde.nix
|
||||
../homeModules/networking.nix
|
||||
../homeModules/nvim.nix
|
||||
../homeModules/obsidian.nix
|
||||
../homeModules/rofi.nix
|
||||
../homeModules/social.nix
|
||||
../homeModules/sops.nix
|
||||
../homeModules/terminal.nix
|
||||
../homeModules/virt.nix
|
||||
../homeModules/web.nix
|
||||
../homeModules/zsh.nix
|
||||
imports = util.modulesFromPath ../homeModules [
|
||||
./utils.nix
|
||||
./dev
|
||||
./dev/ide
|
||||
./dev/ide/reverseEng.nix
|
||||
./dev/ide/jb/idea.nix
|
||||
./dev/javascript.nix
|
||||
./dev/nix.nix
|
||||
./dev/cpp.nix
|
||||
./dev/go.nix
|
||||
./dev/jvm.nix
|
||||
./dev/python.nix
|
||||
./dev/vim.nix
|
||||
./dev/rust.nix
|
||||
./media
|
||||
./scripts
|
||||
./audio.nix
|
||||
./btop.nix
|
||||
./etcher.nix
|
||||
./flameshot.nix
|
||||
./frog.nix
|
||||
./gaming.nix
|
||||
./git.nix
|
||||
./kde.nix
|
||||
./networking.nix
|
||||
./nvim.nix
|
||||
./obsidian.nix
|
||||
./rofi.nix
|
||||
./social.nix
|
||||
./sops.nix
|
||||
./terminal.nix
|
||||
./virt.nix
|
||||
./web.nix
|
||||
./zsh.nix
|
||||
];
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# nixpkg.config.allowUnfree = true;
|
||||
|
|
11
common/util/array.nix
Normal file
11
common/util/array.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
array = rec {
|
||||
popHead = list: lib.lists.ifilter0 (index: _element: index != 0) list;
|
||||
popTail = list: lib.lists.ifilter0 (index: _element: index - 1 != length list) list;
|
||||
head = list: at 0 list;
|
||||
tail = list: at (length list - 1) list;
|
||||
at = index: list: builtins.elemAt list index;
|
||||
length = list: builtins.length list;
|
||||
};
|
||||
}
|
13
common/util/default.nix
Normal file
13
common/util/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
util =
|
||||
(import ./modules.nix { }) // (import ./array.nix { }) // (import ./paths.nix { inherit lib; });
|
||||
in
|
||||
{
|
||||
_module.args = {
|
||||
inherit util;
|
||||
};
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit util;
|
||||
};
|
||||
}
|
4
common/util/modules.nix
Normal file
4
common/util/modules.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
modulesFromPath = root: modules: builtins.map (mod: root + "/" + mod) modules;
|
||||
}
|
28
common/util/paths.nix
Normal file
28
common/util/paths.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
array = import ./array.nix { };
|
||||
in
|
||||
{
|
||||
path = rec {
|
||||
split = { path }: builtins.split "/" "${path}";
|
||||
removeSuffix = suffix: path: lib.removeSuffix suffix "${path}";
|
||||
# ====
|
||||
basename =
|
||||
{
|
||||
path,
|
||||
suffix ? "",
|
||||
}:
|
||||
let
|
||||
basename = if array.length (split path) >= 2 then array.tail (split path);
|
||||
in
|
||||
removeSuffix suffix basename;
|
||||
# nix doesnt support windows
|
||||
delimiter = ":";
|
||||
dirname =
|
||||
path:
|
||||
let
|
||||
ending = basename { inherit path; };
|
||||
in
|
||||
removeSuffix ending path;
|
||||
};
|
||||
}
|
|
@ -160,6 +160,7 @@
|
|||
inputs.home-manager-unstable.nixosModules.default
|
||||
inputs.nix-index-database.nixosModules.nix-index
|
||||
{ programs.nix-index-database.comma.enable = true; }
|
||||
./common/util
|
||||
];
|
||||
};
|
||||
arm-laptop-evo4b5 = nixpkgs.lib.nixosSystem rec {
|
||||
|
|
Loading…
Add table
Reference in a new issue