mirror of
https://github.com/sadan4/dotfiles.git
synced 2025-06-07 13:03:03 -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 = {
|
virtualisation = {
|
||||||
docker = {
|
docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
environment = {
|
|
||||||
sessionVariables = {
|
|
||||||
# DOCKER_HOST = "unix://$XDG_RUNTIME_DIR/docker.sock";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,44 +1,45 @@
|
||||||
{
|
{
|
||||||
|
util,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
nixpkgs.config.allowInsecurePredicate = (pkg: true);
|
nixpkgs.config.allowInsecurePredicate = (pkg: true);
|
||||||
nixpkgs.config.allowUnfreePredicate = (pkg: true);
|
nixpkgs.config.allowUnfreePredicate = (pkg: true);
|
||||||
|
|
||||||
imports = [
|
imports = util.modulesFromPath ../homeModules [
|
||||||
../homeModules/utils.nix
|
./utils.nix
|
||||||
../homeModules/dev
|
./dev
|
||||||
../homeModules/dev/ide
|
./dev/ide
|
||||||
../homeModules/dev/ide/reverseEng.nix
|
./dev/ide/reverseEng.nix
|
||||||
../homeModules/dev/ide/jb/idea.nix
|
./dev/ide/jb/idea.nix
|
||||||
../homeModules/dev/javascript.nix
|
./dev/javascript.nix
|
||||||
../homeModules/dev/nix.nix
|
./dev/nix.nix
|
||||||
../homeModules/dev/cpp.nix
|
./dev/cpp.nix
|
||||||
../homeModules/dev/go.nix
|
./dev/go.nix
|
||||||
../homeModules/dev/jvm.nix
|
./dev/jvm.nix
|
||||||
../homeModules/dev/python.nix
|
./dev/python.nix
|
||||||
../homeModules/dev/vim.nix
|
./dev/vim.nix
|
||||||
../homeModules/dev/rust.nix
|
./dev/rust.nix
|
||||||
../homeModules/media
|
./media
|
||||||
../homeModules/scripts
|
./scripts
|
||||||
../homeModules/audio.nix
|
./audio.nix
|
||||||
../homeModules/btop.nix
|
./btop.nix
|
||||||
../homeModules/etcher.nix
|
./etcher.nix
|
||||||
../homeModules/flameshot.nix
|
./flameshot.nix
|
||||||
../homeModules/frog.nix
|
./frog.nix
|
||||||
../homeModules/gaming.nix
|
./gaming.nix
|
||||||
../homeModules/git.nix
|
./git.nix
|
||||||
../homeModules/kde.nix
|
./kde.nix
|
||||||
../homeModules/networking.nix
|
./networking.nix
|
||||||
../homeModules/nvim.nix
|
./nvim.nix
|
||||||
../homeModules/obsidian.nix
|
./obsidian.nix
|
||||||
../homeModules/rofi.nix
|
./rofi.nix
|
||||||
../homeModules/social.nix
|
./social.nix
|
||||||
../homeModules/sops.nix
|
./sops.nix
|
||||||
../homeModules/terminal.nix
|
./terminal.nix
|
||||||
../homeModules/virt.nix
|
./virt.nix
|
||||||
../homeModules/web.nix
|
./web.nix
|
||||||
../homeModules/zsh.nix
|
./zsh.nix
|
||||||
];
|
];
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
# nixpkg.config.allowUnfree = true;
|
# 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.home-manager-unstable.nixosModules.default
|
||||||
inputs.nix-index-database.nixosModules.nix-index
|
inputs.nix-index-database.nixosModules.nix-index
|
||||||
{ programs.nix-index-database.comma.enable = true; }
|
{ programs.nix-index-database.comma.enable = true; }
|
||||||
|
./common/util
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
arm-laptop-evo4b5 = nixpkgs.lib.nixosSystem rec {
|
arm-laptop-evo4b5 = nixpkgs.lib.nixosSystem rec {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue