Compare commits

..

2 commits

Author SHA1 Message Date
caandt 20efd24530 misc 2024-11-08 00:11:23 -06:00
caandt 4f55e2393b add u2h 2024-11-03 20:26:10 -06:00
8 changed files with 142 additions and 5 deletions

View file

@ -1,5 +1,23 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-programs-sqlite": {
"inputs": {
"nixpkgs": [
@ -41,6 +59,28 @@
"type": "github"
}
},
"nix-gaming": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"umu": "umu"
},
"locked": {
"lastModified": 1730425644,
"narHash": "sha256-dfxO6mkn1KkotGQXV93m/2MoS9ayLUwaIIbR3mReLd0=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "bcc7c896b56ccd644ca2daea74dac05c1731f59d",
"type": "github"
},
"original": {
"owner": "fufexan",
"repo": "nix-gaming",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1729665710,
@ -57,6 +97,18 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1727825735,
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1729691686,
@ -77,10 +129,36 @@
"inputs": {
"flake-programs-sqlite": "flake-programs-sqlite",
"home-manager": "home-manager",
"nix-gaming": "nix-gaming",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable"
}
},
"umu": {
"inputs": {
"nixpkgs": [
"nix-gaming",
"nixpkgs"
]
},
"locked": {
"dir": "packaging/nix",
"lastModified": 1729978972,
"narHash": "sha256-Zox0iAi4CRPn4rxrhOetFFZ2jcSipe8tGD8nMTgcjhE=",
"ref": "refs/heads/main",
"rev": "72499f349ca81cb2838eced9d7c465b2cf71c4a2",
"revCount": 825,
"submodules": true,
"type": "git",
"url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix"
},
"original": {
"dir": "packaging/nix",
"submodules": true,
"type": "git",
"url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix"
}
},
"utils": {
"locked": {
"lastModified": 1678901627,

View file

@ -12,6 +12,10 @@
url = "github:wamserma/flake-programs-sqlite";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-gaming = {
url = "github:fufexan/nix-gaming";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
@ -50,6 +54,7 @@
inherit pkgs;
extraSpecialArgs = {
inherit pkgs-stable;
inherit (inputs) nix-gaming;
};
modules = [(users + "/${user}")];
};

View file

@ -1,4 +1,4 @@
{...}: {
{pkgs, ...}: {
imports = [
../../system
./hardware-configuration.nix
@ -10,9 +10,19 @@
videoDrivers = ["amdgpu"];
deviceSection = ''Option "TearFree" "true"'';
};
users.users.ahnwuoa = {
isNormalUser = true;
extraGroups = ["wheel" "podman"];
users.users = {
ahnwuoa = {
isNormalUser = true;
extraGroups = ["wheel" "podman"];
};
u2h = {
isNormalUser = true;
};
};
services.udev.packages = [pkgs.opentabletdriver];
services.xserver.wacom.enable = true;
nix.settings = {
substituters = ["https://nix-gaming.cachix.org"];
trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="];
};
}

View file

@ -0,0 +1,16 @@
{
config,
pkgs,
nix-gaming,
...
}: {
imports = [
../../../../user
];
home.username = "u2h";
home.packages = [
pkgs.opentabletdriver
nix-gaming.packages."x86_64-linux".osu-stable
];
}

24
user/bin/sm Executable file
View file

@ -0,0 +1,24 @@
#!/bin/sh
# string multiply
if [ $# -le 1 ]; then
echo "Usage: ${0##*/} <str> <n>" >&2
exit 1
fi
s="$1"
shift 1
while [ $# -gt 1 ]; do
s="$s $1"
shift 1
done
case $1 in
''|*[!0-9]*) echo "$2 is not a valid number" >&2; exit 2 ;;
esac
i=0
while [ $i -lt $1 ]; do
printf "%s" "$s"
: $((i += 1))
done

View file

@ -85,6 +85,7 @@ alias fonts='fc-list | awk -F: "{ print \$2 }" | sort | uniq | fzf'
alias hz='xrandr --output DisplayPort-1 --mode 1920x1080 --rate'
alias ns='nix-shell'
alias zn='cd ~/.local/nixos'
alias znn='cd ~/.local/nixos/hosts/$(hostname)/users/$(whoami)'
npo() {
nix path-info "nixpkgs#$1" 2> /dev/null
}

View file

@ -46,7 +46,7 @@ if [[ "$TERM" != "linux" ]]; then
# check if still in .bashrc
if declare -F _bashrc_main > /dev/null; then
return
elif [[ "$@" != @("starship_precmd"|""|"__fzf_history__"|"history -a"|"__zoxide_hook") ]]; then
elif [[ "$@" != @("starship_precmd"|""|"__fzf_history__"|"fzf-file-widget"|"history -a"|"__zoxide_hook") ]]; then
printf "\e]0;%s | %s | %s\a" "$(dirs +0)" "$@" "$(date +"%H:%M:%S")"
fi
}

View file

@ -64,6 +64,9 @@ unbind d
bind d run 'sh-tmux -d'
set -g update-environment SH_TMUX_PID
bind C-u copy-mode \; send C-u
bind -T copy-mode-vi C-w send -X scroll-up
bind -T copy-mode-vi C-d send -X scroll-down
### settings
set -g default-terminal "xterm-256color"