This commit is contained in:
Daylin Morgan 2023-01-24 12:09:22 -06:00
parent 8b8a635693
commit fce0937a2e
7 changed files with 170 additions and 41 deletions

View file

@ -1,6 +1,6 @@
## switch | perform nixos rebuild
switch:
sudo nixos-rebuild switch --flake . --impure
sudo nixos-rebuild switch --flake .
## lint | format *.nix
lint:

View file

@ -18,13 +18,14 @@
./modules/environment.nix
];
};
jeran = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./modules/configuration.nix
jeran = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/jeran/configuration.nix
./modules/environment.nix
];
];
specialArgs = { inherit inputs; };
};
};
};
};
}

View file

@ -1,17 +1,31 @@
#!/usr/bin/env bash
set -e
declare -A IMG_SRC
IMG_SRC=(
[jeran]=https://upload.wikimedia.org/wikipedia/commons/0/01/Runic_letter_jeran.png
[othalan]=https://upload.wikimedia.org/wikipedia/commons/1/16/Runic_letter_othalan.png
)
# rune=$1
rune=othalan
# color=${36:$2}
# color=${36:$2}
color=36
if [[ $# -eq 0 ]]; then
echo please provide rune name
echo options:
for i in "${!IMG_SRC[@]}";do
echo $i
done
exit 1
fi
rune=$1
echo $2
color=${36:-$2}
# tmp this?
FILENAME="Runic_letter_${rune}.png"
IMAGE_URL="https://upload.wikimedia.org/wikipedia/commons/1/16/Runic_letter_othalan.png"
echo "$IMAGE_URL"
wget "$IMAGE_URL"
wget -O $FILENAME "${IMG_SRC[$rune]}"
printf "\033[1;%dm\n%s\033[0m \033[1m%s\033[0m\n\n" \
"$color" \
"$(ascii-image-converter "$FILENAME" -n -H 18)" \
"$(ascii-image-converter "$FILENAME" -n -H 10 -b)" \
"$rune" \
>"${rune}.txt"

View file

@ -1,18 +1,19 @@
{ lib, config, pkgs, ... }:
{ inputs, lib, config, pkgs, ... }:
{
# TODO: put in hardware-configuration.nix
imports = [
<nixpkgs/nixos/modules/virtualisation/google-compute-image.nix>
"${inputs.nixpkgs}/nixos/modules/virtualisation/google-compute-image.nix"
];
security.sudo.wheelNeedsPassword = false;
users.defaultUserShell = pkgs.zsh;
users.extraUsers.daylin = {
isNormalUser = true;
extraGroups = ["wheel" "docker"];
useDefaultShell = true;
};
users.motd = (builtin.readFile "motd");
users.defaultUserShell = pkgs.zsh;
users.extraUsers.daylin = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
useDefaultShell = true;
};
services.openssh.passwordAuthentication = true;
services.resolved.enable = true;
system.stateVersion = "22.11";
nixpkgs.config.allowUnfree = true;
@ -34,7 +35,6 @@ useDefaultShell = true;
tmux
wget
unzip
htop
less
gnumake
gcc
@ -52,14 +52,14 @@ useDefaultShell = true;
fzf
delta
ripgrep
lsd
lsd
gh
lazygit
nixpkgs-fmt
nodejs
nodejs
go
rustup
];

12
hosts/jeran/motd Normal file
View file

@ -0,0 +1,12 @@

⠀⠀⠀⠀⠀⣠⣾⠆⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣠⡾⠋⠁⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠺⣯⡀⠀⠸⣷⣄⠀⠀⠀⠀⠀
⠀⠀⠀⠈⠻⣦⡀⠈⠙⢷⣄⠀⠀⠀
⠀⠀⠀⠀⠀⠈⠻⠃⠀⣠⣿⠇⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣠⣾⠟⠁⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠘⠋⠀⠀⠀⠀⠀⠀
 jeran

View file

@ -0,0 +1,103 @@
{ lib, config, pkgs, ... }:
{
imports =
[
<nixpkgs/nixos/modules/installer/virtualbox-demo.nix>
];
nixpkgs.config.allowUnfree = true;
nix.package = pkgs.nixUnstable;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
boot.kernelPackages = pkgs.linuxPackages_latest;
virtualisation.virtualbox.guest.enable = true;
networking.hostName = "nixos-vm"; # Define your hostname.
time.timeZone = "America/Chicago";
programs.zsh.enable = true;
programs.nix-ld.enable = true;
services.xserver = {
enable = true;
displayManager.startx.enable = true;
displayManager.sddm.enable = lib.mkForce false;
displayManager.autoLogin.enable = lib.mkForce false;
windowManager.qtile.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
users = {
defaultUserShell = pkgs.zsh;
users.daylin = {
shell = pkgs.zsh;
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
};
fonts.fonts = with pkgs; [
noto-fonts
noto-fonts-emoji
noto-fonts-extra
(nerdfonts.override { fonts = [ "FiraCode" "FiraMono" ]; })
];
environment.systemPackages = with pkgs; [
fuse
zsh
wget
unzip
less
gnumake
gcc
git
vim
neovim
starship
chezmoi
fzf
delta
gh
nixpkgs-fmt
xdotool
wezterm
eww
rofi
dunst
feh
picom
gtk3
gnome.adwaita-icon-theme
gnome.gnome-settings-daemon
catppuccin-gtk
wavebox
pciutils
(vivaldi.override {
proprietaryCodecs = true;
enableWidevine = false;
commandLineArgs = "--force-dark-mode";
})
vscode.fhs
go
rustup
];
}

View file

@ -8,14 +8,13 @@
issue.source = ../etc/issue;
};
environment.variables = {
NIX_LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [
stdenv.cc.cc
openssl
zlib # for delta
];
NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker";
};
# # environment.variables = {
# # NIX_LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [
# # stdenv.cc.cc
# # openssl
# #
# # zlib # for delta
# # ];
# # NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker";
# # };
}