Skip to content

Commit

Permalink
feat(fish): changed default localization of projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Wittano committed Jul 22, 2024
1 parent 1724605 commit d9f6185
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
7 changes: 4 additions & 3 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
, desktopName
, hostname
, inputs
, config
, ...
}:
with lib; rec {
Expand Down Expand Up @@ -73,12 +74,12 @@ with lib; rec {
systemPackages = with pkgs; [ vim htop bash ];
variables =
let
projectConfigDir = "/home/wittano/projects/config";
homeDir = config.home-manager.users.wittano.home.homeDirectory;
in
{
EDITOR = "vim";
DOTFILES = "${projectConfigDir}/nix-dotfiles/dotfiles";
NIX_DOTFILES = "${projectConfigDir}/nix-dotfiles";
DOTFILES = "${homeDir}/nix-dotfiles/dotfiles";
NIX_DOTFILES = "${homeDir}/nix-dotfiles";
};

shells = with pkgs; [ bash ];
Expand Down
20 changes: 10 additions & 10 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions modules/dev/ide.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ let
cfg = config.modules.dev.lang;

homeDir = config.home-manager.users.wittano.home.homeDirectory;
addProjectDirField = attr: builtins.mapAttrs (n: v: v // { projectDir = "${homeDir}/projects/own/${n}"; }) attr;
addProjectDirField = attr: builtins.mapAttrs (n: v: v // { projectDir = "${homeDir}/projects/${n}"; }) attr;

avaiableIde =
let
mkExtraConfig = ide: mkMerge [
{
home-manager.users.wittano.home.packages = with unstable; [ vscodium ];
home-manager.users.wittano.home.packages = [ ide.package ];
}
(ide.extraConfig or { })
];
Expand Down
6 changes: 3 additions & 3 deletions modules/shell/fish.nix
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ in
let
host = (strings.removeSuffix "-dev" hostname) +
(strings.optionalString (desktopName != "") "-${desktopName}");

templatesAliases = attrsets.mapAttrs'
(n: v: {
name = "t${n}";
Expand Down Expand Up @@ -153,8 +153,8 @@ in
py = "nix run nixpkgs#python3";

# Projects
pnix = "cd $NIX_DOTFILES";
plab = "cd $HOME/projects/config/home-lab";
pnix = "cd $HOME/nix-dotfiles";
plab = "cd $HOME/projects/server/home-lab";

# Nix
nfu = "nix flake update";
Expand Down

0 comments on commit d9f6185

Please sign in to comment.