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 | perform nixos rebuild
switch: switch:
sudo nixos-rebuild switch --flake . --impure sudo nixos-rebuild switch --flake .
## lint | format *.nix ## lint | format *.nix
lint: lint:

View file

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

View file

@ -1,17 +1,31 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e 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 if [[ $# -eq 0 ]]; then
# color=${36:$2} echo please provide rune name
# color=${36:$2} echo options:
color=36 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" FILENAME="Runic_letter_${rune}.png"
IMAGE_URL="https://upload.wikimedia.org/wikipedia/commons/1/16/Runic_letter_othalan.png"
echo "$IMAGE_URL" wget -O $FILENAME "${IMG_SRC[$rune]}"
wget "$IMAGE_URL"
printf "\033[1;%dm\n%s\033[0m \033[1m%s\033[0m\n\n" \ printf "\033[1;%dm\n%s\033[0m \033[1m%s\033[0m\n\n" \
"$color" \ "$color" \
"$(ascii-image-converter "$FILENAME" -n -H 18)" \ "$(ascii-image-converter "$FILENAME" -n -H 10 -b)" \
"$rune" \ "$rune" \
>"${rune}.txt" >"${rune}.txt"

View file

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

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; issue.source = ../etc/issue;
}; };
environment.variables = { # # environment.variables = {
NIX_LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [ # # NIX_LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [
stdenv.cc.cc # # stdenv.cc.cc
openssl # # openssl
# #
zlib # for delta # # zlib # for delta
]; # # ];
NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; # # NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker";
}; # # };
} }