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 000b567
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 39 deletions.
42 changes: 21 additions & 21 deletions flake.lock

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

7 changes: 5 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
description = "theobori's Nix/NixOS Config";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
nixpkgs-85f7e66.url = "github:nixos/nixpkgs/85f7e662eda4fa3a995556527c87b2524b691933";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small";

# 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.
unstable.url = "github:nixos/nixpkgs";

home-manager = {
url = "github:nix-community/home-manager";
Expand Down
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
2 changes: 1 addition & 1 deletion modules/home/system/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ in

nix = {
settings = {
trusted-substituters = [
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://numtide.cachix.org?priority=42"
Expand Down
3 changes: 0 additions & 3 deletions overlays/base16-schemes/default.nix

This file was deleted.

0 comments on commit 000b567

Please sign in to comment.