Skip to content

Commit f22ea46

Browse files
committed
sync some old dotfiles and add future interop
add: some dotfiles (.Xresources, .bash_profile), bitlbee config file, feat: add nixos-based config and gentoo's portage tryout. feat: add cgroups skel for programs using electron todo: finish gnu-iproute2 and net-tools on openbsd scripts, vide qemu repos fix: minor changes on the nvim lua config
1 parent 81ecb91 commit f22ea46

File tree

11 files changed

+305
-8
lines changed

11 files changed

+305
-8
lines changed

.config/nvim/lua/user/set.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,9 +719,8 @@ autocmd('Filetype', {
719719

720720
-- function test
721721

722-
function myFunction()
722+
local myFunction()
723723
print("Hello from myFunction!")
724-
end
725724

726725
--write
727726
local writer = [[

dotfiles/.Xresources

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
! config can be added there or also here below.
88
! For comments use "!"
99

10+
! load with ; xrdb -load ./dotfiles/.Xresources
11+
Sxiv.background: #ebdbb2
12+
1013
Xft.dpi: 96
1114
Xft.antialias: true
1215
Xft.hinting: true
@@ -20,7 +23,7 @@ Xft.lcdfilter: lcddefault
2023
!0.3!
2124

2225

23-
/* !! brogrammer:
26+
!! brogrammer:
2427
*.foreground: #d6dbe5
2528
*.background: #131313
2629
*.color0: #1f1f1f
@@ -39,13 +42,13 @@ Xft.lcdfilter: lcddefault
3942
*.color14: #0f7ddb
4043
*.color7: #d6dbe5
4144
*.color15: #ffffff
42-
*.colorBD: #d6dbe5 */
45+
*.colorBD: #d6dbe5
4346
!======================
4447
!======================
4548

46-
!batman theme from iterm2-color-schemes (pyrophos).
49+
/*!batman theme from iterm2-color-schemes (pyrophos).
4750
!.cursorColor and .color14 changed.
48-
! special
51+
! special /*
4952
*.foreground: #6f6f6f
5053
*.background: #1b1d1e
5154
*.cursorColor: #feed6c
@@ -80,5 +83,6 @@ Xft.lcdfilter: lcddefault
8083

8184
! white
8285
*.color7: #c6c5bf
83-
*.color15: #dadbd6
84-
86+
*.color15: #dadbd6*/
87+
88+

dotfiles/.bash_profile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
# ~/.bash_profile
3+
#
4+
5+
[[ -f ~/.bashrc ]] && . ~/.bashrc
6+
7+
8+
export PATH="$PATH:/home/asari/.local/bin"
9+
10+
alias kubectl="kubecolor"
11+
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
12+
#export PATH="$PATH:/opt/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/home/asari/.dotnet/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/asari/.local/bin:/home/asari/bin/Discord"
13+
#export discord="home/asari/Downloads/messengers/discord/Discord/Discord:/home/asari/bin"
14+
#export discord="home/asari/Downloads/messengers/discord/Discord/Discord"
15+
#export digital_hneemann="/home/asari/Downloads/other-tools/science/digital-logic/Digital/Digital.sh"
16+
17+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
18+
19+
. "/home/asari/.wasmedge/env"
20+
. "$HOME/.cargo/env"
21+
22+
23+
24+
# sets up the LFS variable
25+
#
26+
export KJX=/mnt/kjx
27+
28+
export PATH=~/bin:$PATH

etc/bitlbee/bitlbee.conf

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
## BitlBee default configuration file
2+
##
3+
## Comments are marked like this. The rest of the file is INI-style. The
4+
## comments should tell you enough about what all settings mean.
5+
##
6+
7+
[settings]
8+
9+
## RunMode:
10+
##
11+
## Inetd -- Run from inetd (default)
12+
## Daemon -- Run as a stand-alone daemon, serving all users from one process.
13+
## This saves memory if there are more users, the downside is that when one
14+
## user hits a crash-bug, all other users will also lose their connection.
15+
## ForkDaemon -- Run as a stand-alone daemon, but keep all clients in separate
16+
## child processes. This should be pretty safe and reliable to use instead
17+
## of inetd mode.
18+
##
19+
# RunMode = Inetd
20+
21+
## User:
22+
##
23+
## If BitlBee is started by root as a daemon, it can drop root privileges,
24+
## and change to the specified user.
25+
##
26+
User = bitlbee
27+
28+
## DaemonPort/DaemonInterface:
29+
##
30+
## For daemon mode, you can specify on what interface and port the daemon
31+
## should be listening for connections.
32+
##
33+
DaemonInterface = 127.0.0.1 #0.0.0.0
34+
DaemonPort = 6667
35+
36+
## ClientInterface:
37+
##
38+
## If for any reason, you want BitlBee to use a specific address/interface
39+
## for outgoing traffic (IM connections, HTTP(S), etc.), set it here.
40+
##
41+
# ClientInterface = 0.0.0.0
42+
43+
## AuthMode
44+
##
45+
## Open -- Accept connections from anyone, use NickServ for user authentication.
46+
## (default)
47+
## Closed -- Require authorization (using the PASS command during login) before
48+
## allowing the user to connect at all.
49+
## Registered -- Only allow registered users to use this server; this disables
50+
## the register- and the account command until the user identifies itself.
51+
##
52+
# AuthMode = Open
53+
54+
## AuthBackend
55+
##
56+
## By default, the authentication data for a user is stored in the storage
57+
## backend. If you want to authenticate against another authentication system
58+
## (e.g. ldap), you can specify that here.
59+
##
60+
## Beware that this disables password changes and causes passwords for the
61+
## accounts people create to be stored in plain text instead of encrypted with
62+
## their bitlbee password.
63+
##
64+
## Currently available backends:
65+
##
66+
## - storage (internal storage)
67+
## - pam (Linux PAM authentication)
68+
## - ldap (LDAP server configured in the openldap settings)
69+
#
70+
# AuthBackend = storage
71+
#
72+
73+
## AuthPassword
74+
##
75+
## Password the user should enter when logging into a closed BitlBee server.
76+
## You can also have a BitlBee-style MD5 hash here. Format: "md5:", followed
77+
## by a hash as generated by "bitlbee -x hash <password>".
78+
##
79+
# AuthPassword = ItllBeBitlBee ## Heh.. Our slogan. ;-)
80+
## or
81+
# AuthPassword = md5:gzkK0Ox/1xh+1XTsQjXxBJ571Vgl
82+
83+
## OperPassword
84+
##
85+
## Password that unlocks access to special operator commands.
86+
##
87+
# OperPassword = ChangeMe!
88+
## or
89+
# OperPassword = md5:I0mnZbn1t4R731zzRdDN2/pK7lRX
90+
91+
## AllowAccountAdd
92+
##
93+
## Whether to allow registered and identified users to add new accounts using
94+
## 'account add'
95+
##
96+
# AllowAccountAdd 1
97+
98+
## HostName
99+
##
100+
## Normally, BitlBee gets a hostname using getsockname(). If you have a nicer
101+
## alias for your BitlBee daemon, you can set it here and BitlBee will identify
102+
## itself with that name instead.
103+
##
104+
# HostName = localhost
105+
106+
## MotdFile
107+
##
108+
## Specify an alternative MOTD (Message Of The Day) file. Default value depends
109+
## on the --etcdir argument to configure.
110+
##
111+
# MotdFile = /etc/bitlbee/motd.txt
112+
113+
## ConfigDir
114+
##
115+
## Specify an alternative directory to store all the per-user configuration
116+
## files. (.nicks/.accounts)
117+
##
118+
# ConfigDir = /var/lib/bitlbee
119+
120+
## Ping settings
121+
##
122+
## BitlBee can send PING requests to the client to check whether it's still
123+
## alive. This is not very useful on local servers, but it does make sense
124+
## when most clients connect to the server over a real network interface.
125+
## (Public servers) Pinging the client will make sure lost clients are
126+
## detected and cleaned up sooner.
127+
##
128+
## PING requests are sent every PingInterval seconds. If no PONG reply has
129+
## been received for PingTimeOut seconds, BitlBee aborts the connection.
130+
##
131+
## To disable the pinging, set at least one of these to 0.
132+
##
133+
# PingInterval = 180
134+
# PingTimeOut = 300
135+
136+
## Using proxy servers for outgoing connections
137+
##
138+
## If you're running BitlBee on a host which is behind a restrictive firewall
139+
## and a proxy server, you can tell BitlBee to use that proxy server here.
140+
## The setting has to be a URL, formatted like one of these examples:
141+
##
142+
## (Obviously, the username and password are optional)
143+
##
144+
# Proxy = http://john:[email protected]:8080
145+
# Proxy = socks4://socksproxy.localnet.com
146+
# Proxy = socks5://socksproxy.localnet.com
147+
148+
## Protocols offered by bitlbee
149+
##
150+
## As recompiling may be quite unpractical for some people, this option
151+
## allows to remove the support of protocol, even if compiled in. If
152+
## nothing is given, there are no restrictions.
153+
##
154+
# Protocols = jabber yahoo
155+
156+
## Trusted CAs
157+
##
158+
## Path to a file containing a list of trusted certificate authorities used in
159+
## the verification of server certificates.
160+
##
161+
## Uncomment this and make sure the file actually exists and contains all
162+
## certificate authorities you're willing to accept (default value should
163+
## work on at least Debian/Ubuntu systems with the "ca-certificates" package
164+
## installed). As long as the line is commented out, SSL certificate
165+
## verification is completely disabled.
166+
##
167+
## The location of this file may be different on other distros/OSes. For
168+
## example, try /etc/ssl/ca-bundle.pem on OpenSUSE.
169+
##
170+
# CAfile = /etc/ssl/certs/ca-certificates.crt
171+
172+
[defaults]
173+
174+
## Here you can override the defaults for some per-user settings. Users are
175+
## still able to override your defaults, so this is not a way to restrict
176+
## your users...
177+
178+
## To enable private mode by default, for example:
179+
180+
## private = 1

etc/nixos/configuration.nix

Whitespace-only changes.

etc/portage/make.a6-1450.conf

Whitespace-only changes.

etc/portage/make.r51600af.conf

Whitespace-only changes.

flake.nix

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
description = "A custom package for dotfiles management";
3+
4+
# Nixpkgs / NixOS version to use.
5+
inputs.nixpkgs.url = "nixpkgs/nixos-21.11";
6+
7+
outputs = { self, nixpkgs }:
8+
let
9+
10+
# Generate a user-friendly version number.
11+
version = builtins.substring 0 1 self.lastModifiedDate;
12+
13+
# System types to support.
14+
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
15+
16+
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
17+
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
18+
19+
# Nixpkgs instantiated for supported system types.
20+
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
21+
22+
in
23+
{
24+
25+
# Provide some binary packages for selected system types.
26+
packages = forAllSystems (system:
27+
let
28+
pkgs = nixpkgsFor.${system};
29+
in
30+
{
31+
# The default package for 'nix build'. This makes sense if the
32+
# flake provides only one package or there is a clear "main"
33+
# package.
34+
default = pkgs.buildGoModule {
35+
pname = "go-hello";
36+
inherit version;
37+
# In 'nix develop', we don't need a copy of the source tree
38+
# in the Nix store.
39+
src = ./.;
40+
41+
# This hash locks the dependencies of this package. It is
42+
# necessary because of how Go requires network access to resolve
43+
# VCS. See https://www.tweag.io/blog/2021-03-04-gomod2nix/ for
44+
# details. Normally one can build with a fake sha256 and rely on native Go
45+
# mechanisms to tell you what the hash should be or determine what
46+
# it should be "out-of-band" with other tooling (eg. gomod2nix).
47+
# To begin with it is recommended to set this, but one must
48+
# remeber to bump this hash when your dependencies change.
49+
#vendorSha256 = pkgs.lib.fakeSha256;
50+
51+
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
52+
};
53+
});
54+
};
55+
}
56+

scripts/discord-cgroups.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
DISCORD_PATH="/opt/discord/Discord"
4+
5+
if [ -f "$DISCORD_PATH" ]; then
6+
echo $((512 * 1024 * 1024)) | sudo tee /sys/kernel/cgroup/
7+
fi

scripts/gnul+iproute2.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
ip
4+
5+
sudo iw dev wlp2s0 scan | grep SSID
6+
7+

0 commit comments

Comments
 (0)