Skip to content

Commit

Permalink
✨ Added games, greeting, more up-to-date nixpkgs versions
Browse files Browse the repository at this point in the history
  • Loading branch information
theobori committed Nov 17, 2024
1 parent 6b86196 commit 0e4c684
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 12 deletions.
16 changes: 16 additions & 0 deletions flake.lock

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

4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

inputs = {
nixpkgs.url = "github:nixos/nixpkgs";

# We assume this version of nixpkgs is more updated than the `nixpkgs` input.
# Will be used within overlay to get the latest version of specific packages.
nixpkgs-unstable.url = "github:nixos/nixpkgs";
nixpkgs-85f7e66.url = "github:nixos/nixpkgs/85f7e662eda4fa3a995556527c87b2524b691933";

home-manager = {
Expand Down
1 change: 1 addition & 0 deletions homes/x86_64-linux/theobori@laptop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ in
};

home.stateVersion = "24.11";
home.enableNixpkgsReleaseCheck = false;
}
20 changes: 20 additions & 0 deletions modules/home/cli/programs/krabby/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
pkgs,
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.${namespace}.cli.programs.krabby;
in
{
options.${namespace}.cli.programs.krabby = {
enable = mkBoolOpt false "Whether or not to enable krabby.";
};

config = mkIf cfg.enable { home.packages = with pkgs; [ krabby ]; };
}
20 changes: 20 additions & 0 deletions modules/home/cli/programs/tldr/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
pkgs,
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.${namespace}.cli.programs.tldr;
in
{
options.${namespace}.cli.programs.tldr = {
enable = mkBoolOpt false "Whether or not to enable tldr.";
};

config = mkIf cfg.enable { home.packages = with pkgs; [ tldr ]; };
}
18 changes: 6 additions & 12 deletions modules/home/cli/shells/fish/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
...
}:
let
inherit (lib) mkIf;
inherit (lib) mkIf getExe;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.${namespace}.cli.shells.fish;
Expand All @@ -21,7 +21,7 @@ in
enable = true;
interactiveShellInit = ''
# There are fish intregration from home-manager module
${pkgs.nix-your-shell}/bin/nix-your-shell --nom fish | source
${getExe pkgs.nix-your-shell} --nom fish | source
set -gx GOPATH $XDG_DATA_HOME/go
set -gx PATH /usr/local/bin /usr/bin ~/.local/bin $GOPATH/bin/ $PATH $HOME/.cargo/bin
Expand All @@ -42,18 +42,12 @@ in
cdi = "zi";
curl = "curlie";
tree = "eza --tree";

# nix
nhh = "nh home switch";
nho = "nh os switch";
nhu = "nh os --update";

nd = "nix develop";
nfu = "nix flake update";
};

functions = {
fish_greeting = '''';
fish_greeting = ''
${getExe pkgs.krabby} name gengar --no-title
'';

hmg = ''
set current_gen (home-manager generations | head -n 1 | awk '{print $7}')
Expand All @@ -64,7 +58,7 @@ in
# If you run the command with comma, running the same command
# will not prompt for confirmation for the rest of the session
if contains $argv[1] $__command_not_found_confirmed_commands
or ${pkgs.gum}/bin/gum confirm --selected.background=2 "Run using comma?"
or ${getExe pkgs.gum} confirm --selected.background=2 "Run using comma?"
# Not bothering with capturing the status of the command, just run it again
if not contains $argv[1] $__command_not_found_confirmed_commands
Expand Down
20 changes: 20 additions & 0 deletions modules/home/games/vkquake/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
pkgs,
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.${namespace}.games.vkquake;
in
{
options.${namespace}.games.vkquake = {
enable = mkBoolOpt false "Enable vkquake.";
};

config = mkIf cfg.enable { home.packages = with pkgs; [ vkquake ]; };
}
2 changes: 2 additions & 0 deletions modules/home/roles/development/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ in
zoxide = enabled;
thefuck = enabled;
lazygit = enabled;
tldr = enabled;
krabby = enabled;
};
};
};
Expand Down
1 change: 1 addition & 0 deletions modules/home/roles/gaming/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ in
teeworlds = enabled;
taterclient-ddnet = enabled;
supermariowar = enabled;
vkquake = enabled;
};
};
};
Expand Down

0 comments on commit 0e4c684

Please sign in to comment.