Satellite dev module (+ other changes probably, including eww install)
This commit is contained in:
parent
5e696cf9d0
commit
da817da3b9
|
@ -50,7 +50,6 @@
|
|||
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
paths.dotfiles = "/home/adrielus/Projects/satellite/dotfiles";
|
||||
};
|
||||
in
|
||||
rec {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [ ./bat.nix ./ssh.nix ./fish.nix ./tmux ./git.nix ./starship.nix ./direnv.nix ];
|
||||
imports = [ ./exa.nix ./bat.nix ./ssh.nix ./fish.nix ./tmux ./git.nix ./starship.nix ./direnv.nix ];
|
||||
|
||||
# Enable bash
|
||||
programs.bash.enable = true;
|
||||
|
@ -11,7 +11,6 @@
|
|||
comma # Intstall and run programs by sticking a , before them
|
||||
bc # Calculator
|
||||
ncdu # TUI disk usage
|
||||
exa # Better ls
|
||||
ripgrep # Better grep
|
||||
fd # Better find
|
||||
httpie # Better curl
|
||||
|
|
6
home/adrielus/features/cli/exa.nix
Normal file
6
home/adrielus/features/cli/exa.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.exa = {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
}
|
|
@ -4,7 +4,6 @@
|
|||
enable = true;
|
||||
|
||||
shellAbbrs = {
|
||||
ls = "exa -la";
|
||||
cat = "bat";
|
||||
};
|
||||
|
||||
|
|
4
home/adrielus/features/desktop/common/eww/default.nix
Normal file
4
home/adrielus/features/desktop/common/eww/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ config, ... }: {
|
||||
programs.eww.enable = true;
|
||||
programs.eww.configDir = config.satellite-dev.path "home/adrielus/features/desktop/common/eww/widgets";
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./common/rofi
|
||||
./common/polybar
|
||||
./common/eww
|
||||
./common/fonts.nix
|
||||
./common/xresources.nix
|
||||
./common/xwallpaper.nix
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{ pkgs, lib, config, paths, ... }:
|
||||
let
|
||||
devMode = true;
|
||||
extraPackages = with pkgs; [
|
||||
# Language servers
|
||||
nodePackages.typescript-language-server # typescript
|
||||
|
@ -40,13 +39,9 @@ let
|
|||
];
|
||||
in
|
||||
let
|
||||
symlink = config.lib.file.mkOutOfStoreSymlink;
|
||||
|
||||
extraRuntime = env: [
|
||||
# Snippets
|
||||
(if devMode
|
||||
then symlink "${paths.dotfiles}/vscode-snippets"
|
||||
else ../../../../dotfiles/vscode-snippets)
|
||||
(config.satellite-dev.path "dotfiles/vscode-snippets")
|
||||
|
||||
# Base16 theme
|
||||
(pkgs.writeTextDir
|
||||
|
@ -95,11 +90,7 @@ in
|
|||
# Do not manage neovim via nix
|
||||
programs.neovim.enable = false;
|
||||
|
||||
home.file.".config/nvim".source =
|
||||
if devMode then
|
||||
symlink "${paths.dotfiles}/neovim" else
|
||||
../../../../dotfiles/neovim;
|
||||
|
||||
home.file.".config/nvim".source = config.satellite-dev.path "dotfiles/neovim";
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
|
||||
home.packages = [
|
||||
|
|
|
@ -19,4 +19,6 @@
|
|||
# obs-studio # video recorder
|
||||
# lmms # music software
|
||||
];
|
||||
|
||||
satellite-dev.enable = true;
|
||||
}
|
||||
|
|
|
@ -5,4 +5,5 @@
|
|||
discord = import ./discord.nix;
|
||||
fonts = import ./fonts.nix;
|
||||
firefox = import ./firefox;
|
||||
satellite-dev = import ./satellite-dev.nix;
|
||||
}
|
||||
|
|
25
modules/home-manager/satellite-dev.nix
Normal file
25
modules/home-manager/satellite-dev.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ lib, config, ... }: {
|
||||
options.satellite-dev = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "While true, makes out of store symlinks for files in dev mode";
|
||||
};
|
||||
|
||||
root = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "~/Projects/satellite";
|
||||
description = "Where the satellite repo is cloned";
|
||||
};
|
||||
|
||||
path = lib.mkOption {
|
||||
type = lib.types.functionTo lib.types.path;
|
||||
description = "The function used to conditionally symlink in or out of store based on the above paths";
|
||||
};
|
||||
};
|
||||
|
||||
config.satellite-dev.path = path:
|
||||
if config.satellite-dev.enable then
|
||||
config.lib.file.mkOutOfStoreSymlink "${config.satellite-dev.root}/${path}"
|
||||
else "${../..}/${path}";
|
||||
}
|
Loading…
Reference in a new issue