Compare commits

..

10 Commits

57 changed files with 2437 additions and 744 deletions

BIN
assets/fonts/Billyfont.zip Normal file

Binary file not shown.

Binary file not shown.

697
flake.lock generated

File diff suppressed because it is too large Load Diff

1202
flake.lock.bak Executable file

File diff suppressed because it is too large Load Diff

207
flake.nix
View File

@@ -4,16 +4,13 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hypr-contrib.url = "github:hyprwm/contrib";
copyparty.url = "github:9001/copyparty";
hyprpicker.url = "github:hyprwm/hyprpicker";
stylix.url = "github:danth/stylix";
disko.url = "github:nix-community/disko";
impermanence.url = "github:nix-community/impermanence";
ghostty.url = "github:ghostty-org/ghostty";
fern.url = "github:km-clay/fern";
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim.url = "github:nix-community/nixvim";
home-manager = {
url = "github:nix-community/home-manager";
@@ -32,176 +29,50 @@
};
};
outputs = { self, home-manager, disko, nixpkgs, impermanence, nixvim, stylix, ... }@inputs:
outputs = { ... }@inputs:
let
system = "x86_64-linux";
movLib = import ./lib {
inherit inputs;
username = "pagedmov";
nixpkgsConfig = {
allowUnfree = true;
};
in {
homeConfigurations = {
oganessonHome = let host = "oganesson"; in home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit system;
config = nixpkgsConfig;
overlays = [
(import ./overlay/overlay.nix { inherit host; root = self; })
];
};
extraSpecialArgs = {
inherit host self username inputs;
};
modules = [
./hosts/desktop/home.nix
./modules/home
stylix.homeModules.stylix
nixvim.homeManagerModules.nixvim
];
};
phosphorousHome = let host = "phosphorous"; in home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit system;
config = nixpkgsConfig;
overlays = [
(import ./overlay/overlay.nix { inherit host; root = self; })
];
};
extraSpecialArgs = {
inherit host self username inputs;
};
modules = [
./hosts/work/home.nix
./modules/home
stylix.homeModules.stylix
nixvim.homeManagerModules.nixvim
];
};
mercuryHome = let host = "mercury"; in home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit system;
config = nixpkgsConfig;
overlays = [
(import ./overlay/overlay.nix { inherit host; root = self; })
];
};
extraSpecialArgs = {
inherit host self username inputs;
};
modules = [
./hosts/laptop/home.nix
./modules/home
stylix.homeModules.stylix
nixvim.homeManagerModules.nixvim
];
};
xenonHome = let host = "xenon"; in home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit system;
config = nixpkgsConfig;
overlays = [
(import ./overlay/overlay.nix { inherit host; root = self; })
];
};
extraSpecialArgs = {
inherit host self username inputs;
};
modules = [
./hosts/server/home.nix
./modules/home
stylix.homeModules.stylix
nixvim.homeManagerModules.nixvim
];
};
};
nixosConfigurations = {
oganesson = nixpkgs.lib.nixosSystem { # Desktop
specialArgs = {
inherit self inputs username;
hosts = movLib.foldHosts [
{
host = "oganesson";
overlays = [
(import ./overlay/overlay.nix { root = self; })
];
};
inherit system;
pkgs = import nixpkgs {
inherit system;
config = nixpkgsConfig;
overlays = [
(import ./overlay/overlay.nix { root = self; })
];
};
modules = [
./hosts/desktop/config.nix
./modules/sys
stylix.nixosModules.stylix
];
};
phosphorous = nixpkgs.lib.nixosSystem { # Desktop
specialArgs = {
inherit self inputs username;
host = "oganesson";
overlays = [
(import ./overlay/overlay.nix { root = self; })
];
};
inherit system;
pkgs = import nixpkgs {
inherit system;
config = nixpkgsConfig;
overlays = [
(import ./overlay/overlay.nix { root = self; })
];
};
modules = [
./hosts/work/config.nix
./modules/sys
stylix.nixosModules.stylix
];
};
mercury = nixpkgs.lib.nixosSystem { # Laptop
specialArgs = {
inherit self inputs username;
hostDir = "desktop";
kind = "both";
}
{
host = "mercury";
};
inherit system;
pkgs = import nixpkgs {
inherit system;
config = nixpkgsConfig;
};
modules = [
./hosts/laptop/config.nix
./modules/sys
stylix.nixosModules.stylix
];
};
xenon = nixpkgs.lib.nixosSystem { # Server
specialArgs = {
inherit self inputs username;
hostDir = "laptop";
kind = "both";
}
{
host = "xenon";
};
inherit system;
pkgs = import nixpkgs {
inherit system;
config = nixpkgsConfig;
};
modules = [
./hosts/server/config.nix
./modules/sys
hostDir = "server";
kind = "both";
extraNixosModules = [
./modules/server
stylix.nixosModules.stylix
];
};
};
}
{
host = "phosphorous";
hostDir = "work";
kind = "both";
extraNixosModules = [
inputs.fern.nixosModules.fern
inputs.copyparty.nixosModules.default
];
extraHomeModules = [
inputs.fern.homeModules.fern
];
extraOverlays = [
inputs.fern.overlays.default
inputs.copyparty.overlays.default
];
}
];
in {
inherit (hosts) nixosConfigurations homeConfigurations;
};
}

View File

@@ -1,5 +1,8 @@
{ slash, pkgs, username, ... }:
{ inputs, pkgs, username, ... }:
let
fern = inputs.fern.packages.${pkgs.stdenv.hostPlatform.system}.default;
in
{
imports = [ ./hardware.nix ];
@@ -39,7 +42,7 @@
${username} = {
isNormalUser = true;
initialPassword = "1234";
shell = pkgs.zsh;
shell = fern;
extraGroups = [ "input" "wheel" "persist" "libvirtd" ];
};
};

View File

@@ -1,4 +1,8 @@
{ slash, pkgs, username, ... }:
{ inputs, pkgs, username, ... }:
let
fern = inputs.fern.packages.${pkgs.stdenv.hostPlatform.system}.default;
in
{
imports = [
./hardware.nix
@@ -33,18 +37,22 @@
shells = [ pkgs.myPkgs.slash pkgs.zsh pkgs.bash ];
};
programs.fern.enable = true;
users = {
groups.persist = { };
groups.davfs2 = { };
users = {
root.initialPassword = "1234";
${username} = {
isNormalUser = true;
initialPassword = "1234";
shell = pkgs.zsh;
extraGroups = [ "input" "wheel" "persist" "libvirtd" ];
shell = pkgs.fern;
extraGroups = [ "davfs2" "input" "wheel" "persist" "libvirtd" ];
};
};
};
security.polkit.enable = true;
security.sudo.extraConfig = ''
${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
'';

34
hosts/work/hardware.nix Normal file → Executable file
View File

@@ -5,33 +5,45 @@
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "uas" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/db4cf956-df00-4c26-851d-419136434eae";
fsType = "ext4";
{ device = "/dev/disk/by-uuid/9a98748d-1953-4316-9788-07d11c5d0af6";
fsType = "btrfs";
options = [ "subvol=root" "compress=zstd:3" "noatime" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/336C-A94E";
{ device = "/dev/disk/by-uuid/5BA1-A9F8";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/00fd7a7c-d916-4a61-abc1-8dde26b4413b";
fsType = "btrfs";
options = [ "compress=zstd:3" "noatime" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/7c03499c-e2a7-4352-8797-a21f094ef90b";
fsType = "btrfs";
options = [ "compress=zstd:3" "noatime" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
zramSwap = {
enable = true;
memoryPercent = 25;
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -0,0 +1,37 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/db4cf956-df00-4c26-851d-419136434eae";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/336C-A94E";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

14
lib/default.nix Normal file
View File

@@ -0,0 +1,14 @@
{ inputs, username, nixpkgsConfig ? { allowUnfree = true; } }:
rec {
mkHost = import ./mk_host.nix;
foldHosts = hosts: inputs.nixpkgs.lib.foldl'
(acc: host:
let result = mkHost ({ inherit inputs username nixpkgsConfig; } // host);
in {
nixosConfigurations = acc.nixosConfigurations // result.nixosConfigurations;
homeConfigurations = acc.homeConfigurations // result.homeConfigurations;
})
{ nixosConfigurations = {}; homeConfigurations = {}; }
hosts;
}

61
lib/mk_host.nix Normal file
View File

@@ -0,0 +1,61 @@
{
inputs,
username,
nixpkgsConfig ? { allowUnfree = true; },
host,
hostDir,
system ? "x86_64-linux",
kind,
extraNixosModules ? [],
extraHomeModules ? [],
extraOverlays ? [],
overlay ? true
}:
let
nixosModules = [
../hosts/${hostDir}/config.nix
../modules/sys
inputs.stylix.nixosModules.stylix
] ++ extraNixosModules;
homeModules = [
../hosts/${hostDir}/home.nix
../modules/home
inputs.stylix.homeModules.stylix
inputs.nixvim.homeModules.nixvim
] ++ extraHomeModules;
pkgs = import inputs.nixpkgs {
inherit system;
config = nixpkgsConfig;
overlays = extraOverlays ++ (if overlay then [
(import ../overlay/overlay.nix { inherit host; root = inputs.self; })
] else []);
};
specialArgs = {
inherit inputs username host;
self = inputs.self;
};
nixosCfg =
if kind == "nixos" || kind == "both" then
inputs.nixpkgs.lib.nixosSystem {
inherit system pkgs specialArgs;
modules = nixosModules;
}
else
null;
homeCfg =
if kind == "home" || kind == "both" then
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = specialArgs;
modules = homeModules;
}
else
null;
in
{
nixosConfigurations = if kind == "nixos" || kind == "both" then { ${host} = nixosCfg; } else {};
homeConfigurations = if kind == "home" || kind == "both" then { ${host + "Home"} = homeCfg; } else {};
}

View File

@@ -7,6 +7,7 @@
./starship.nix
./userpkgs.nix
./zsh
./fern
./swaync.nix
./hyprland.nix
./waybar.nix

View File

@@ -0,0 +1,33 @@
{ lib, config, pkgs, self, ... }:
{
programs.fern = {
aliases = {
mv = "mv -v";
cp = "cp -vr";
gt = "gtrash";
gtp = "${pkgs.myScripts.playshellsound}/bin/playshellsound ${self}/assets/sound/rm.wav && gtrash put";
diff = "diff --color=auto";
sr = "source ~/.fernrc";
psg = "ps aux | grep -v grep | grep -i -e VSZ -e";
mkdir = "mkdir -p";
pk = "pkill -9 -f";
svc = "sudo systemctl";
svcu = "systemctl --user";
iv = "invoke";
cfgfilecount = ''find ".\.nix" $FLAKEPATH | wc -l | toilet -f 3d | lolcat'';
vide = "neovide";
vi = "nvim";
mkexe = "chmod +x";
shortdate = "date +%m-%d-%y";
suvi = "sudoedit";
suvide = "EDITOR=neovide; suvi";
rustdev = "nix develop github:km-clay/devshells#rust";
ga = "playshellsound ${self}/assets/sound/gitadd.wav; git add";
gcomm = "gitcommit_sfx";
gpush = "gitpush_sfx";
gpull = "gitpull_sfx";
grebase = "gitrebase_sfx";
};
};
}

View File

@@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./env.nix
./aliases.nix
./extraconfig.nix
./options.nix
];
}

View File

@@ -0,0 +1,20 @@
{ lib, config, ... }:
{
programs.fern = {
environmentVars = {
SOUNDS_ENABLED = "true";
EDITOR = "nvim";
SUDO_EDITOR = "nvim";
VISUAL = "nvim";
LANG = "en_US.UTF-8";
BROWSER = "firefox";
FLAKEPATH = "$HOME/.sysflake";
STEAMPATH = "$HOME/.local/share/Steam";
FZF_DEFAULT_COMMAND = "fd";
FZF_DEFAULT_OPTS = "--height 40% --layout=reverse --border";
LESS = "-R"; # pager uses alt buffer
};
};
}

View File

@@ -0,0 +1,185 @@
{ lib, config, self, pkgs, ... }:
let
shellsound = "${pkgs.myScripts.playshellsound}/bin/playshellsound";
color-commit = "${pkgs.myScripts.color-commit}/bin/color-commit";
sndpath = "${self}/assets/sound";
in
{
programs.fern = {
settings.extraPreConfig = ''
prompt_topline() {
local last_cmd_status
local last_cmd_runtime
if [ "$?" -eq "0" ]; then
last_cmd_status="\e[1;32m\e[0m"
else
last_cmd_status="\e[1;31m\e[0m"
fi
local user_and_host="\e[1m$USER\e[1;36m@\e[1;31m$HOST\e[0m"
local last_runtime_raw="$(echo -p "\t")"
if [ -z "$last_runtime_raw" ]; then
last_cmd_runtime=""
last_cmd_status=""
else
last_cmd_runtime="\e[1;38;2;249;226;175m󰔛 $(echo -p "\T")\e[0m"
fi
echo -n "$user_and_host $last_cmd_runtime $last_cmd_status\n"
}
prompt_midline() {
git rev-parse --is-inside-work-tree > /dev/null 2>&1 || return
local gitsigns
local status="$(git status --porcelain 2>/dev/null)"
[ -n "$status" ] && echo "$status" | command grep -q '^ [MADR]' && gitsigns="$gitsigns!"
[ -n "$status" ] && echo "$status" | command grep -q '^??' && gitsigns="$gitsigns?"
[ -n "$status" ] && echo "$status" | command grep -q '^[MADR]' && gitsigns="$gitsigns+"
local ahead="$(git rev-list --count @{upstream}..HEAD 2>/dev/null)"
local behind="$(git rev-list --count HEAD..@{upstream} 2>/dev/null)"
[ $ahead -gt 0 ] && gitsigns="$gitsigns"
[ $behind -gt 0 ] && gitsigns="$gitsigns"
local branch="$(git branch --show-current 2>/dev/null)"
if [ -n "$gitsigns" ] || [ -n "$branch" ]; then
if [ -n "$gitsigns" ]; then
gitsigns="\e[1;31m[$gitsigns]"
fi
echo -n "\e[0mon \e[1;35m ''${branch}$gitsigns\e[0m\n"
fi
}
prompt_botline() {
echo -p "\e[1;36m\W\e[1;32m/"
}
prompt() {
local top="$(prompt_topline)"
local mid="$(prompt_midline)"
local bot="$(prompt_botline)"
local dollar="$(echo -p "\$ ")"
local dollar="$(echo -e "\e[1;32m$dollar\e[0m")"
local prompt="$top$mid$bot\n$dollar"
echo -en "$prompt"
}
export PS1="\n\!prompt "
'';
settings.extraPostConfig = ''
encrypt() {
if [ -z "$1" ]; then
echo "Usage: encrypt <text> [recipient]"
return 1
fi
if [ -z "$2" ]; then
gpg --encrypt --armor -r "$1"
else
echo "$1" | gpg --encrypt --armor -r "$2"
fi
}
decrypt() {
if [ -z "$1" ]; then
gpg --decrypt --quiet 2>/dev/null
else
echo "$1" | gpg --decrypt --quiet
fi
}
viflake() {
(
while ! [ -f ./flake.nix ]; do
builtin cd ..
if [ "$PWD" = "/" ]; then
echo "No flake.nix found in this directory or any parent directories."
return 1
fi
done
nvim ./flake.nix
)
}
nvim() {
${shellsound} ${sndpath}/nvim.wav
command nvim "$@"
}
neovide() {
${shellsound} ${sndpath}/nvim.wav
command neovide "$@"
}
grimblast() {
if command grimblast "$@"; then
${shellsound} ${sndpath}/screenshot.wav
fi
}
gitcheckout_sfx() {
if git checkout "$@"; then
${shellsound} ${sndpath}/gitcheckout.wav
else
${shellsound} ${sndpath}/error.wav
fi
}
gitrebase_sfx() {
if git rebase "$@"; then
${shellsound} ${sndpath}/gitrebase.wav
else
${shellsound} ${sndpath}/error.wav
fi
}
gitcommit_sfx() {
local output="$(git commit "$@")"
if [ "$?" -eq "0" ]; then
${shellsound} ${sndpath}/gitcommit.wav
echo "$output" | ${color-commit}
return 0
else
${shellsound} ${sndpath}/error.wav
echo "$output"
return 1
fi
}
gitpush_sfx() {
if git push "$@"; then
${shellsound} ${sndpath}/gitpush.wav
else
${shellsound} ${sndpath}/error.wav
fi
}
gitpull_sfx() {
if git pull "$@"; then
${shellsound} ${sndpath}/gitpull.wav
else
${shellsound} ${sndpath}/error.wav
fi
}
ls() {
eza -1 --group-directories-first --icons "$@"
${shellsound} ${sndpath}/ls.wav
}
mkcd() {
command mkdir -p "$1" && builtin cd "$1"
}
cd() {
eza -1 --group-directories-first --icons "$@" 2> /dev/null
builtin cd "$@"
${shellsound} ${sndpath}/cd.wav
}
vipe() {
local tmp=$(mktemp)
$EDITOR "$tmp" >/dev/tty </dev/tty
cat "$tmp"
rm "$tmp"
}
if [ "$0" = "-fern" ]; then
${shellsound} $FLAKEPATH/assets/sound/login.wav
fi
'';
};
}

View File

@@ -0,0 +1,12 @@
{ lib, config, ... }:
{
programs.fern = {
enable = true;
settings = {
autocd = true;
autoHistory = true;
};
};
}

View File

@@ -1,6 +1,6 @@
{ inputs, pkgs, lib, config, self, host, ... }:
let
desktop = host == "oganesson";
desktop = host == "oganesson" || host == "phosphorous";
screenshot_bind = if desktop then
[
"super, print, exec, grimblast copy area"
@@ -18,10 +18,10 @@ let
"f[1], gapsout:0, gapsin:0"
];
smartGapsWindowrules = [
"bordersize 0, floating:0, onworkspace:w[tv1]"
"rounding 0, floating:0, onworkspace:w[tv1]"
"bordersize 0, floating:0, onworkspace:f[1]"
"rounding 0, floating:0, onworkspace:f[1]"
"border_size 0, match:float 0, match:workspace w[tv1]"
"rounding 0, match:float 0, match:workspace w[tv1]"
"border_size 0, match:float 0, match:workspace f[1]"
"rounding 0, match:float 0, match:workspace f[1]"
];
in {
@@ -43,7 +43,7 @@ in {
config = lib.mkIf config.movOpts.envConfig.hyprlandConfig.enable {
home.packages = with pkgs; [
swaybg
inputs.hypr-contrib.packages.${pkgs.system}.grimblast
inputs.hypr-contrib.packages.${pkgs.stdenv.hostPlatform.system}.grimblast
hyprpicker
grim
slurp
@@ -76,7 +76,7 @@ in {
"swaync &"
"wl-paste --type text --watch cliphist store &"
"wl-paste --type image --watch cliphist store &"
"wl-clip-persist --clipboard both"
"wl-clip-persist --clipboard regular"
"systemctl --user import-environment &"
"hash dbus-update-activation-environment 2>/dev/null &"
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
@@ -108,36 +108,38 @@ in {
"XDG_DATA_HOME,$HOME/.local/share"
"XDG_CACHE_HOME,$HOME/.cache"
];
layerrule = [ "blur,waybar" "ignorezero,waybar" "blur,launcher" ];
windowrulev2 = [
"float, class:^(thunar)$,title:^(.*File Operation Progress.*)$"
"float, class:^(firefox)$,title:^(Library)$"
"float, class:^(thunar)$,title:^(File Operation Progress)$"
"float, class:^(thunar)$,title:^(Confirm to replace files)$"
"float, title:^(bwarn)$"
"float, title:^(bwarn)$"
"noinitialfocus, class:^(steam)$"
"float, class:^(firefox)$,title:^( - Google Mozilla Firefox)$"
"float, class:^(firefox)$,title:^(Firefox Sharing Indicator)$"
"float, class:^(firefox)$,title:^(Firefox )$"
"float, class:(firefox), title:^(*.Sign in.*)$"
layerrule = [
"match:namespace = waybar, blur 1"
"match:namespace = waybar, ignore_alpha 0"
"match:namespace = launcher, blur 1"
];
windowrule = [
"float, class:^(qt5ct)$"
"float, class:^(zoom)$"
"float, class:^(Steam)$"
"idleinhibit focus, class:mpv"
"float, title:^(Picture-in-Picture)$"
"float, class:^(nm-connection-editor)$"
"float, class:^(waypaper)$"
"float, title:^(Sign In)(.*)$"
"float, title:^(Firefox )$"
"nofocus, title:^(Firefox )$"
"float, class:^(firefox)$,title^(Sign in - Google Accounts Mozilla Firefox)$"
"size 0 0, title:^(Firefox )$"
"move 100%-470 15,title:^(Firefox Sharing Indicator)$"
"move 100%-470 15,title:^(Firefox )$"
# From old windowrulev2
"float true, match:class ^(thunar)$, match:title ^(.*File Operation Progress.*)$"
"float true, match:class ^(firefox)$, match:title ^(Library)$"
"float true, match:class ^(thunar)$, match:title ^(File Operation Progress)$"
"float true, match:class ^(thunar)$, match:title ^(Confirm to replace files)$"
"float true, match:title ^(bwarn)$"
"no_initial_focus on, match:class ^(steam)$"
"float true, match:class ^(firefox)$, match:title ^( - Google Mozilla Firefox)$"
"float true, match:class ^(firefox)$, match:title ^(Firefox Sharing Indicator)$"
"float true, match:class ^(firefox)$, match:title ^(Firefox )$"
"float true, match:class ^(firefox)$, match:title ^(.*Sign in.*)$"
# From old windowrule
"float true, match:class ^(qt5ct)$"
"float true, match:class ^(zoom)$"
"float true, match:class ^(Steam)$"
"idle_inhibit focus, match:class ^(mpv)$"
"float true, match:title ^(Picture-in-Picture)$"
"float true, match:class ^(nm-connection-editor)$"
"float true, match:class ^(waypaper)$"
"float true, match:title ^(Sign In)(.*)$"
"float true, match:title ^(Firefox )$"
"no_focus on, match:title ^(Firefox )$"
"float true, match:class ^(firefox)$, match:title ^(Sign in - Google Accounts Mozilla Firefox)$"
"size 0 0, match:title ^(Firefox )$"
"move 100%-470 15, match:title ^(Firefox Sharing Indicator)$"
"move 100%-470 15, match:title ^(Firefox )$"
] ++ smartGapsWindowrules;
input = {
@@ -149,13 +151,12 @@ in {
};
general = {
gaps_in = 5;
gaps_out = 9;
gaps_out = "0, 9, 9, 9"; # top, right, bottom, left
border_size = 3;
"col.active_border" = lib.mkForce "rgba(404042ff)";
"col.inactive_border" = lib.mkForce "rgba(83858a00)";
layout = "dwindle";
resize_on_border = true;
no_border_on_floating = false;
snap = {
enabled = true;
@@ -203,10 +204,6 @@ in {
hide_on_key_press = true;
};
experimental = {
xx_color_management_v4 = true;
};
animations = {
enabled = true;
@@ -243,6 +240,10 @@ in {
"super, l, movefocus, r"
"super, k, movefocus, u"
"super, j, movefocus, d"
"super, y, exec, /home/pagedmov/splitman-ipc.sh start"
"super, u, exec, /home/pagedmov/splitman-ipc.sh split"
"super, i, exec, /home/pagedmov/splitman-ipc.sh stop"
"super, o, exec, /home/pagedmov/splitman-ipc.sh pause"
"super shift, h, movewindow, l"
"super shift, l, movewindow, r"
"super shift, k, movewindow, u"

View File

@@ -1,6 +1,6 @@
{ lib, config, pkgs, inputs, ... }:
let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
scheme = config.lib.stylix.colors;
in {
imports = [ inputs.spicetify-nix.homeManagerModules.default ];

View File

@@ -38,12 +38,12 @@ in {
name = "EnvyCodeR Nerd Font Mono";
};
sansSerif = {
package = pkgs.nerd-fonts.envy-code-r;
name = "EnvyCodeR Nerd Font Mono";
package = pkgs.myPkgs.noto-sans-jp;
name = "Noto Sans JP";
};
serif = {
package = pkgs.nerd-fonts.envy-code-r;
name = "EnvyCodeR Nerd Font Mono";
package = pkgs.myPkgs.noto-sans-jp;
name = "Noto Sans JP";
};
sizes = {
desktop = 10;

View File

@@ -1,4 +1,4 @@
{ lib, config, pkgs, self, ... }:
{ inputs, lib, config, pkgs, self, ... }:
let
scripts = with pkgs; [
@@ -10,6 +10,7 @@ let
myScripts.viconf
myScripts.vipkg
myScripts.fetchfromgh
myScripts.mkshell
myScripts.garbage-collect
myScripts.rebuild
myScripts.chpaper
@@ -24,6 +25,7 @@ let
myScripts.color-commit
myScripts.mntstack
];
pythonWithStuff = pkgs.python3.withPackages(ps: with ps; [ requests ]);
in {
options = {
movOpts.envConfig.userPkgs.enable =
@@ -34,6 +36,7 @@ in {
nemo
feh
gtk3
vicut
imagemagick
vlc
lolcat
@@ -48,9 +51,11 @@ in {
wf-recorder
toilet
vkbasalt
librewolf
firefox
spotify
zathura
tor
tor-browser
chromium
obs-studio
gparted
@@ -59,18 +64,28 @@ in {
rustup
w3m
neovide
python3
claude-code
pythonWithStuff
monero-cli
protonup-qt
piper
libratbag
ghostty
firefox
fd
delta
glfw
glxinfo
mesa-demos
xwayland
discord
cloc
wine
gimp
fira-code
nerd-fonts.fira-code
nodejs_latest
myPkgs.noto-sans-jp
myPkgs.billy-font
] ++ scripts;
};
}

View File

@@ -1,7 +1,6 @@
{ pkgs, host, lib, config, ... }:
{ pkgs, lib, config, ... }:
let
desktop = (host == "oganesson");
layout = config.movOpts.envConfig.hyprlandConfig.workspaceLayout;
workspaces = {
format = "{icon}";
@@ -55,20 +54,7 @@ let
lighter = scheme.base05;
light = scheme.base04;
};
colors = {
color0 = scheme.base08;
color1 = scheme.base09;
color2 = scheme.base0A;
color3 = scheme.base0B;
color4 = scheme.base0C;
color5 = scheme.base0D;
color6 = scheme.base0E;
color7 = scheme.base0F;
};
monitors = config.movOpts.envConfig.hyprlandConfig.monitorNames;
circle-gauge = [ "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" ];
cava-gauge = [ "" "" "" "" "" "" "" "" ];
battery-gauge = [ "󰁺" "󰁻" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
bar-gauge = [
""
""
@@ -80,6 +66,17 @@ let
""
""
];
bar-gauge-critical = [
""
""
""
""
""
""
""
"<span color='#F07178'>!!!!!!!!</span>"
"<span color='#F07178'>CRITICAL</span>"
];
in {
options = {
movOpts.envConfig.waybarConfig.enable =
@@ -159,17 +156,7 @@ in {
interval = 20;
format = "MEM: [ <span color='#272D38'>{icon}</span> ] <span size='8pt'>{percentage}%</span>";
tooltip-format = "MEM_TOT\t: {total}GiB\nSWP_TOT\t: {swapTotal}GiB\n\nMEM_USD\t: {used:0.1f}GiB\nSWP_USD\t: {swapUsed:0.1f}GiB";
format-icons = [
""
""
""
""
""
""
""
"<span color='#F07178'>!!!!!!!!</span>"
"<span color='#F07178'>CRITICAL</span>"
];
format-icons = bar-gauge-critical;
};
cpu = {
@@ -177,23 +164,13 @@ in {
interval = 1;
format = "CPU: [ <span color='#272D38'>{icon}</span> ] <span size='8pt'>{usage}%</span>";
tooltip = true;
format-icons = [
""
""
""
""
""
""
""
"<span color='#272D38'>!!!!!!!!</span>"
"<span color='#272D38'>CRITICAL</span>"
];
format-icons = bar-gauge-critical;
};
};
};
style = ''
* {
font-size: 14px;
font-size: 16px;
border: none;
font-family: EnvyCodeR Nerd Font Mono;
font-weight: Bold;

View File

@@ -14,25 +14,29 @@
gtp = "playshellsound ${self}/assets/sound/rm.wav; gtrash put";
sr = "source ~/.zshrc && source ~/.zshenv";
".." = "cd ..";
rm = "echo 'use \"gtp\" instead'";
psg = "ps aux | grep -v grep | grep -i -e VSZ -e";
mkdir = "mkdir -p";
pk = "pkill -9 -f";
svcu = "systemctl --user";
svc = "sudo systemctl";
viflake = "nvim flake.nix";
iv = "invoke";
cfgfilecount = ''find ".\.nix" $FLAKEPATH | wc -l | toilet -f 3d | lolcat'';
record = "wf-recorder";
vide = "neovide";
pk9 = "pkill -9";
mkexe = "chmod +x";
shortdate = "date '+%m-%d-%y'";
suvi = "sudoedit";
suvide = "EDITOR=neovide; suvi";
rustdev = "nix develop github:km-clay/devshells#rust";
claude = "RAW_SHELL=1 claude";
#git
ga = "playshellsound ${self}/assets/sound/gitadd.wav; git add";
gcomm = "gitcommit_sfx";
gpush = "gitpush_sfx";
gpull = "gitpull_sfx";
greb = "gitrebase_sfx";
rsh = "$HOME/Coding/projects/rust/rsh/target/debug/rsh";
vide = "neovide";
pk9 = "pkill -9";
};
};
};

View File

@@ -15,6 +15,7 @@
BROWSER = "firefox";
FLAKEPATH = "$HOME/.sysflake";
STEAMPATH = "$HOME/.local/share/Steam";
TFPATH = "$STEAMPATH/steamapps/common/Team Fortress 2/";
PATH = "$PATH:$HOME/.userpath/";
FZF_DEFAULT_COMMAND = "fd";
FZF_DEFAULT_OPTS = "--height 40% --layout=reverse --border";

View File

@@ -13,6 +13,33 @@ in
config = lib.mkIf config.movOpts.envConfig.zshConfig.extraConfig.enable {
programs.zsh = {
initContent = ''
claude() {
bash -c "claude $@"
}
logmeds() {
date >> "$HOME"/medlog.txt
}
medlog() {
cat "$HOME"/medlog.txt
}
encrypt() {
if [ -z "$1" ]; then
echo "Usage: encrypt <text> [recipient]"
return 1
fi
if [ -z "$2" ]; then
gpg --encrypt --armor -r "$1"
else
echo "$1" | gpg --encrypt --armor -r "$2"
fi
}
decrypt() {
if [ -z "$1" ]; then
gpg --decrypt --quiet 2>/dev/null
else
echo "$1" | gpg --decrypt --quiet
fi
}
build-drv() { # Put the derivation path in $RESULT instead of making a 'result' symlink
RESULT=$(nix-build "$@" --no-link)
if [ -z "$RESULT" ]; then
@@ -21,12 +48,9 @@ in
export RESULT
echo "\$RESULT = $RESULT"
}
precmd() { # Reset kitty color scheme
if [ "$NIX_SHELL" = "false" ]; then # don't run this in a nix-shell
trap 'NIX_SHELL=false kitty_theme' EXIT SIGINT SIGTERM SIGHUP
else # but still apply ssh theme logic in nix-shell
trap 'kitty_theme' EXIT SIGINT SIGTERM SIGHUP
fi
escaped() {
# escapes regex chars
sed 's/[^^]/[&]/g; s/\^/\\^/g' <<<"$1"
}
nix-shell() {
NIX_SHELL=true command nix-shell "$@" --run zsh
@@ -34,6 +58,18 @@ in
nsp() {
NIX_SHELL=true command nix-shell -p "$@" --run zsh
}
viflake() {
(
while ! [ -f ./flake.nix ]; do
builtin cd ..
if [ "$PWD" = "/" ]; then
echo "No flake.nix found in this directory, or any parent directories."
return 1
fi
done
nvim ./flake.nix
)
}
nvim() {
${shellsound} ${sndpath}/nvim.wav
command nvim "$@"
@@ -43,17 +79,6 @@ in
command neovide "$@"
}
alias vi="nvim"
kitty_theme() {
if [ $TERM = "xterm-kitty" ]; then
if [ -n "$SSH_CONNECTION" ]; then
kitty @ set-colors -a ~/.config/kitty/ssh-theme.conf
elif [ "$name" = "nix-shell-env" ] || [ "$NIX_SHELL" = "true" ]; then
kitty @ set-colors -a ~/.config/kitty/nix-shell-theme.conf
else
kitty @ set-colors -a ~/.config/kitty/default-theme.conf
fi
fi
}
grimblast() {
if command grimblast "$@"; then
${shellsound} ${sndpath}/screenshot.wav
@@ -109,6 +134,7 @@ in
}
unalias ls
ls() {
if [ "$RAW_SHELL" = "1" ]; then command ls; fi
eza -1 --group-directories-first --icons "$@"
${shellsound} ${sndpath}/ls.wav
return 0
@@ -128,14 +154,16 @@ in
}
cd() {
if [ "$RAW_SHELL" = "1" ]; then builtin cd "$@"; return $?; fi
local prev_sounds_enabled="$SOUNDS_ENABLED"
SOUNDS_ENABLED=0
eza -1 --group-directories-first --icons "$@"
SOUNDS_ENABLED=$prev_sounds_enabled
builtin cd "$@"
${shellsound} /nix/store/7a9w7np3qrvmzxjbs7xj05qq2yccgfsj-source/assets/sound/cd.wav
${shellsound} ${sndpath}/cd.wav
return 0
}
if [ ! -e $HOME/.zsh_history ]; then
touch $HOME/.zsh_history
chmod 600 $HOME/.zsh_history
@@ -179,13 +207,12 @@ in
source ${fzf-tab}/fzf-tab.plugin.zsh
bindkey -v
kitty_theme
type starship_zle-keymap-select >/dev/null || \
{
eval "$(starship init zsh)"
}
${shellsound} ${sndpath}/sh-source.wav
[ ! -f $FLAKEPATH/flake.nix ] && echo "WARNING: flake.nix not found at \$FLAKEPATH. Shell aliases for editing config files won't work correctly!" && echo "Edit the FLAKEPATH session variable in zshell.nix to point to the path where you saved the system configuration flake."
[ ! -f $FLAKEPATH/flake.nix ] && echo "WARNING: flake.nix not found at \$FLAKEPATH. Shell aliases for editing config files won't work correctly!" && echo "Edit the FLAKEPATH session variable in zsh/env.nix to point to the path where you saved the system configuration flake."
'';
};
};

View File

@@ -6,9 +6,14 @@
config = lib.mkIf config.movOpts.programConfigs.gitConfig.enable {
programs.git = {
enable = true;
userEmail = "kylerclay@proton.me";
userName = "${username}";
extraConfig = {
settings = {
user = {
email = "kylerclay@proton.me";
name = "${username}";
};
alias = {
draft = "!if git rev-parse > /dev/null 2>&1; then echo \"$1\" >> $(git rev-parse --git-dir)/DRAFT_MSG; else exit 1; fi #";
};
core.pager = "delta";
interactive.diffFilter = "delta --color-only";
delta.navigate = "true";

View File

@@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }: {
{ self, lib, config, pkgs, ... }: {
options = {
movOpts.programConfigs.kittyConfig.enable =
lib.mkEnableOption "enables my kitty configuration";
@@ -9,16 +9,17 @@
font = {
package = lib.mkForce pkgs.nerd-fonts.envy-code-r;
name = lib.mkForce "EnvyCodeR Nerd Font Mono";
size = lib.mkForce 20;
size = lib.mkForce 19;
};
settings = {
confirm_os_window_close = 0;
window_padding_width = 4;
scrollback_lines = 10000;
enable_audio_bell = false;
enable_audio_bell = true;
allow_remote_control = true;
mouse_hide_wait = 60;
command_on_bell = "${pkgs.myScripts.playshellsound}/bin/playshellsound ${self}/assets/sound/bell.wav";
## Tabs
tab_title_template = "{index}";

View File

@@ -1,9 +1,14 @@
{ env, config, pkgs, host, self, ... }: {
programs.nixvim.extraPackages = [
programs.nixvim = {
nixpkgs.useGlobalPackages = true;
extraPackages = [
pkgs.cargo
pkgs.rustc
pkgs.clippy
pkgs.rustup
pkgs.rust-analyzer
pkgs.nerd-fonts.envy-code-r
];
};
imports = [ ./plugins ./options.nix ./keymaps.nix ./autocmd.nix ];
}

View File

@@ -41,7 +41,14 @@ in {
vim.g.vimwiki_list = {{path = '~/vimwiki/', syntax = 'markdown', ext = '.md'}}
vim.filetype.add({
filename = {
[".fernrc"] = "sh",
}
})
vim.opt.number = true
vim.opt.autochdir = false
vim.opt.relativenumber = true
vim.opt.hlsearch = true
vim.opt.incsearch = true
@@ -56,7 +63,7 @@ in {
vim.opt.linebreak = true
vim.opt.textwidth = 0
vim.opt.breakat = " \t!@*-+;:,./?"
vim.opt.guifont = "Fira Code:h18"
vim.opt.guifont = "EnvyCodeR Nerd Font Mono:h18"
vim.g.mapleader = "!"
vim.g.rust_recommended_style = 0

View File

@@ -0,0 +1,8 @@
{
programs.nixvim.plugins = {
claude-code = {
enable = true;
autoLoad = true;
};
};
}

View File

@@ -17,6 +17,7 @@
./nvim-lightbulb.nix
./neocord.nix
./copilot.nix
./claudecode.nix
./plugins.nix
./nvim-tree.nix
./telescope.nix

View File

@@ -77,12 +77,16 @@
jsonls.enable = true;
lua_ls.enable = true;
marksman.enable = true;
csharp_ls.enable = true;
rust_analyzer = {
enable = true;
installCargo = false;
installRustc = false;
settings = {
check.allTargets = false;
check = {
allTargets = false;
command = "clippy";
};
};
};
nixd = {

View File

@@ -2,9 +2,10 @@
programs.nixvim = {
plugins.nvim-tree = {
enable = true;
hijackUnnamedBufferWhenOpening = false;
openOnSetup = false;
onAttach = {
settings = {
hijack_unnamed_buffer_when_opening = false;
on_attach = {
__raw = ''
function(bufnr)
local api = require('nvim-tree.api')
@@ -78,11 +79,12 @@
};
view = {
side = "right";
centralizeSelection = true;
centralize_selection = true;
number = true;
relativenumber = true;
width = 40;
};
};
};
};
}

View File

@@ -4,7 +4,12 @@
programs.nixvim.plugins.rustaceanvim = {
enable = false;
settings = {
server.auto_attach = true;
server = {
auto_attach = true;
default_settings = {
checkOnSave.command = "clippy";
};
};
dap.adapter = false;
};
};

View File

@@ -6,6 +6,7 @@
defaults = {
file_ignore_patterns = [
"%.snap"
"^%.git/"
];
};
pickers = {

View File

@@ -7,6 +7,7 @@
programs.yazi = {
enable = true;
enableZshIntegration = true;
shellWrapperName = "y";
};
};
}

View File

@@ -1,5 +1,8 @@
{ inputs, nixpkgs, nixvim, config, self, username, host, ... }: {
imports = [ (import ./bootloader.nix) ] ++ [ (import ./network.nix) ]
++ [ (import ./powerprofiles.nix) ]
++ [ (import ./kernel.nix) ];
++ [ (import ./kernel.nix) ]
++ [ (import ./input.nix) ];
hardware.keyboard.uhk.enable = true;
}

View File

@@ -0,0 +1,11 @@
{ config, pkgs, ... }: {
i18n.inputMethod = {
type = "fcitx5";
enable = true;
fcitx5.addons = with pkgs; [
fcitx5-gtk
fcitx5-tokyonight
fcitx5-mozc
];
};
}

View File

@@ -12,10 +12,13 @@
"192.168.1.201" = [ "oganesson" ];
"192.168.1.202" = [ "mercury" ];
"192.168.1.134" = [ "hosting.localhost" ];
"192.168.1.140" = [ "panel.test" "dnsman.test" ];
};
firewall = {
enable = true;
allowedTCPPorts = [ 443 8080 ];
allowedUDPPorts = [ 27960 ];
trustedInterfaces = [ "vnet9" "virbr0" "enp0s2" ];
};
};
};

View File

@@ -22,6 +22,7 @@ in {
#snes9x-gtk
#cust-openrct2
mgba
shadps4
cust-prismlauncher
];
};

View File

@@ -1,4 +1,4 @@
{ lib, config, ... }: {
{ lib, config, pkgs, ... }: {
options = {
movOpts.softwareCfg.steamConfig.enable =
lib.mkEnableOption "enables steam configuration";
@@ -7,6 +7,9 @@
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
};
};
}

View File

@@ -3,10 +3,16 @@
movOpts.softwareCfg.sysPkgs.enable =
lib.mkEnableOption "enables default system packages";
};
config = lib.mkIf config.movOpts.softwareCfg.sysPkgs.enable {
config =
let
fern = inputs.fern.packages.${pkgs.stdenv.hostPlatform.system}.default;
in
lib.mkIf config.movOpts.softwareCfg.sysPkgs.enable {
environment.systemPackages = with pkgs; [
dotnetCorePackages.sdk_8_0_4xx
alsa-lib
xwayland
fern
wayland
alsa-utils
bc
@@ -32,7 +38,7 @@
nixos-option
nix-search-cli
nix-template
nixfmt-classic
nixfmt
sshfs
nvd
pamixer
@@ -42,6 +48,12 @@
vim
uhk-agent
jq
jinja2-cli
socat
python3
python313Packages.jinja2
python313Packages.pillow
ffmpeg
wl-clipboard
cmake
libnotify
@@ -53,6 +65,7 @@
man-pages
man-pages-posix
most
wget
];
};
}

View File

@@ -1,10 +1,19 @@
{ lib, config, ... }: {
{ lib, pkgs, config, ... }: {
options = {
movOpts.softwareCfg.sysServices.enable =
lib.mkEnableOption "enables default system services";
};
config = lib.mkIf config.movOpts.softwareCfg.sysServices.enable {
users.users.pagedmov = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBX/xEA6/zfAkjwaDcl+NnCJLMd7OzRru7IKbn+52fi5 root@nixos"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK6QYwnaxkpeN7c1NH5u5z1lv4VqKKAaty2qJ2BXRcg2 pagedmov@nixos"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAFWGaQKygNvvZ/qtR6QFxAA1HQQgoQPCoQbx/cyhEuC pagedmov@nixos"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICOg895UX4fT+1t7icEq5t9U7Ggd9HeDcgFBkyZ4/ghv root@nixos"
];
};
services = {
davfs2.enable = true;
keyd = {
enable = true;
keyboards.default = {
@@ -12,6 +21,39 @@
settings.main = { capslock = "esc"; };
};
};
copyparty = {
enable = true;
settings = {
e2dsa = true;
};
accounts = {
admin = {
passwordFile = "${pkgs.writeText "/run/keys/admin" "admin123"}";
};
pagedmov = {
passwordFile = "${pkgs.writeText "/run/keys/pagedmov" "200231980qwertyuiop"}";
};
testuser = {
passwordFile = "${pkgs.writeText "/run/keys/testuser" "testpassword"}";
};
};
volumes = {
"/" = {
path = "/var/lib/copyparty";
access = {
A = [ "admin " ];
rwmd = [ "pagedmov" ];
};
};
"/testvol" = {
path = "/var/lib/copyparty/testvol";
access = {
A = [ "admin " ];
rwmd = [ "testuser" ];
};
};
};
};
pipewire = {
enable = true;
pulse.enable = true;

View File

@@ -1,4 +1,4 @@
{ lib, config, username, ... }: {
{ lib, config, username, pkgs, ... }: {
options = {
movOpts.softwareCfg.virtConfig.enable =
lib.mkEnableOption "enables virtualization";
@@ -6,5 +6,9 @@
config = lib.mkIf config.movOpts.softwareCfg.virtConfig.enable {
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
environment.systemPackages = with pkgs; [
spice-gtk
usbredir
];
};
}

View File

@@ -5,12 +5,32 @@ let
owner = "xero";
repo = "figlet-fonts";
rev = "master";
sha256 = "sha256-/Qj8CWqn7w1R83enixxgC5ijUrHvqN3C7ZvRCs/AzBI=";
sha256 = "sha256-wT1DjM+3+UasAm2IHavBXs0R8eNMJn9uLtWSqwS+XU0=";
};
in
{
vicutSrc = super.fetchFromGitHub {
owner = "km-clay";
repo = "vicut";
rev = "v0.4.2";
sha256 = "sha256-y5H4m/1ZNYkvhYnfvKs2zVq6dzUgUYsu0UCBGpcoYgQ=";
};
in {
vicut = super.rustPlatform.buildRustPackage {
pname = "vicut";
version = "v0.4.2";
src = vicutSrc;
cargoLock.lockFile = "${vicutSrc}/Cargo.lock";
meta = {
description = "A Vim-based, scriptable, headless text editor for the command line";
homepage = "https://github.com/km-clay/vicut";
license = super.lib.licenses.mit;
maintainers = [];
};
};
toilet = super.toilet.overrideAttrs (old: {
buildInputs = old.buildInputs or [ ] ++ [ extraFigletFonts ];
buildInputs = (old.buildInputs or [ ]) ++ [ extraFigletFonts ];
installPhase = ''
make install PREFIX=$out
@@ -18,34 +38,13 @@ in
cp -r ${extraFigletFonts}/* $out/share/figlet
'';
});
myPkgs = {
# Packages that I've made
slash = super.callPackage ./pkgs/slash/package.nix {};
fzf-tab = super.callPackage ./pkgs/zsh-fzf-tab/package.nix {};
noto-sans-jp = super.callPackage ./pkgs/noto-sans-jp/package.nix {};
billy-font = super.callPackage ./pkgs/billy-font/package.nix {};
};
myScripts = {
# Scripts written using pkgs.writeShellApplication
icanhazip = super.callPackage ./scripts/commands/icanhazip.nix {};
invoke = super.callPackage ./scripts/commands/invoke.nix { self = root; };
git-compose = super.callPackage ./scripts/commands/git-compose.nix { self = root; };
runbg = super.callPackage ./scripts/commands/runbg.nix {};
splash = super.callPackage ./scripts/commands/splash.nix {};
toolbelt = super.callPackage ./scripts/commands/toolbelt.nix {};
viconf = super.callPackage ./scripts/commands/viconf.nix {};
vipkg = super.callPackage ./scripts/commands/vipkg.nix {};
fetchfromgh = super.callPackage ./scripts/nix/fetchfromgh.nix {};
garbage-collect = super.callPackage ./scripts/nix/garbage-collect.nix {};
check_updates = super.callPackage ./scripts/nix/check_updates.nix {};
rebuild = super.callPackage ./scripts/nix/rebuild.nix { inherit host; self = root; };
chpaper = super.callPackage ./scripts/wm-controls/chpaper.nix {};
chscheme = super.callPackage ./scripts/wm-controls/chscheme.nix {};
keyring = super.callPackage ./scripts/wm-controls/keyring.nix {};
playshellsound = super.callPackage ./scripts/wm-controls/playshellsound.nix {};
mkscreenshots = super.callPackage ./scripts/wm-controls/mkscreenshots.nix {};
moveonscreen = super.callPackage ./scripts/wm-controls/moveonscreen.nix {};
s_check = super.callPackage ./scripts/wm-controls/s_check.nix {};
switchmon = super.callPackage ./scripts/wm-controls/switchmon.nix {};
color-commit = super.callPackage ./scripts/misc/color-commit.nix {};
mntstack = super.callPackage ./scripts/misc/mntstack.nix {};
};
myScripts = import ./scripts { inherit super root host; };
}

View File

@@ -0,0 +1,24 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenvNoCC.mkDerivation {
pname = "billy-font";
version = "0.0.1";
src = ../../../assets/fonts/Billyfont.zip;
buildInputs = [
pkgs.unzip
];
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
unzip $src -d $out/share/fonts/truetype
runHook postInstall
'';
}

View File

@@ -0,0 +1,27 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenvNoCC.mkDerivation rec {
pname = "noto-sans-jp";
version = "0.0.1";
src = ../../../assets/fonts/Noto_Sans_JP.zip;
buildInputs = [
pkgs.unzip
];
installPhase = ''
runHook preInstall
unzip $src
mkdir -p $out/share/fonts/truetype
mkdir -p $out/share/doc/${pname}
install -Dm644 ./static/*.ttf $out/share/fonts/truetype
install -Dm644 *.ttf $out/share/fonts/truetype
install -Dm644 *.txt $out/share/doc/${pname}
runHook postInstall
'';
}

View File

@@ -0,0 +1,12 @@
{ super, root }:
{
icanhazip = super.callPackage ./icanhazip.nix {};
invoke = super.callPackage ./invoke.nix { self = root; };
git-compose = super.callPackage ./git-compose.nix { self = root; };
runbg = super.callPackage ./runbg.nix {};
splash = super.callPackage ./splash.nix {};
toolbelt = super.callPackage ./toolbelt.nix {};
viconf = super.callPackage ./viconf.nix {};
vipkg = super.callPackage ./vipkg.nix {};
}

View File

@@ -26,8 +26,8 @@ pkgs.writeShellApplication {
cliphist decode "$selection" | wl-copy
}
btop_cmd() {
if [ "$(cat /etc/hostname)" = "oganesson" ]; then
hostname="$(cat /etc/hostname)"
if [ "$hostname" = "oganesson" ] || [ "$hostname" = "phosphorous" ]; then
hyprctl dispatch resizeactive 20% 155% &&
moveonscreen --center &&
btop &&

View File

@@ -0,0 +1,7 @@
{ super, root, host }:
# We need to fold all of these into a single attribute set
import ./commands { inherit super root; } //
import ./nix { inherit super host root; } //
import ./misc { inherit super; } //
import ./wm-controls { inherit super; }

View File

@@ -0,0 +1,6 @@
{ super }:
{
color-commit = super.callPackage ./color-commit.nix {};
mntstack = super.callPackage ./mntstack.nix {};
}

View File

@@ -0,0 +1,9 @@
{ super, host, root }:
{
fetchfromgh = super.callPackage ./templates/fetchfromgh.nix {};
mkshell = super.callPackage ./templates/mkshell.nix {};
garbage-collect = super.callPackage ./garbage-collect.nix {};
check_updates = super.callPackage ./check_updates.nix {};
rebuild = super.callPackage ./rebuild.nix { inherit host; self = root; };
}

View File

@@ -5,6 +5,7 @@ pkgs.writeShellApplication {
pkgs.myScripts.playshellsound
];
text = ''
exec > /dev/tty 2>&1
checkbools() { [ "$all" = false ] && [ "$system" = false ] && [ "$home" = false ]; }
checkflags() {
str="$1"
@@ -16,6 +17,7 @@ pkgs.writeShellApplication {
"a") if checkbools; then all=true; else echo -e "$usage" && exit 1; fi ;;
"s") if checkbools; then system=true; else echo -e "$usage" && exit 1; fi ;;
"h") if checkbools; then home=true; else echo -e "$usage" && exit 1; fi ;;
"U") if [ "$update" = false ]; then update=true; else echo -e "$usage" && exit 1; fi ;;
"n") if [ "$dry" = false ]; then dry=true; else echo -e "$usage" && exit 1; fi ;;
*) echo -e "$usage" && exit 1 ;;
esac
@@ -26,9 +28,14 @@ pkgs.writeShellApplication {
home=false
all=false
dry=false
update=false
played_start=false
hooray() { playshellsound "${self}/assets/sound/update.wav"; }
damn() { playshellsound "${self}/assets/sound/error.wav"; }
start() { [ "$played_start" = false ] && playshellsound "${self}/assets/sound/nixswitch-start.wav" && played_start=true || true; }
update_done() { playshellsound "${self}/assets/sound/update_alt.wav"; }
usage="\033[1;4;38;2;243;139;168mUsage\033[0m: rebuild -h for home config, rebuild -s for sys config, rebuild -a for both. Including 'n' with the flag does a dry run, i.e. rebuild -nh"
@@ -42,8 +49,10 @@ pkgs.writeShellApplication {
dry_flag=""
[ "$dry" = true ] && dry_flag="-n"
[ "$all" = true ] && if sudo sleep 0.1 && nh os switch $dry_flag -H "${host}" "$FLAKEPATH" && nh home switch $dry_flag -c "${host}Home" "$FLAKEPATH"; then hooray; else damn; fi
[ "$system" = true ] && if nh os switch $dry_flag -H "${host}" "$FLAKEPATH"; then hooray; else damn; fi
[ "$home" = true ] && if nh home switch $dry_flag -c "${host}Home" "$FLAKEPATH"; then hooray; else damn; fi
[ "$update" = true ] && start && (cd "$FLAKEPATH" && nix flake update) && update_done
[ "$all" = true ] && if sudo sleep 0.1 && start && nh os switch $dry_flag -H "${host}" "$FLAKEPATH" && nh home switch $dry_flag -c "${host}Home" "$FLAKEPATH"; then hooray; else damn; fi
[ "$system" = true ] && start && if nh os switch $dry_flag -H "${host}" "$FLAKEPATH"; then hooray; else damn; fi
[ "$home" = true ] && start && if nh home switch $dry_flag -c "${host}Home" "$FLAKEPATH"; then hooray; else damn; fi
'';
}

View File

@@ -0,0 +1,19 @@
{ pkgs ? import <nixpkgs> { } }:
pkgs.writeShellApplication {
name = "mkshell";
runtimeInputs = [];
text = ''
command cat <<EOF
devShells.\''${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [
];
shellHook = '''
export SHELL=\''${pkgs.zsh}/bin/zsh
exec \''${pkgs.zsh}/bin/zsh
''';
};
EOF
'';
}

View File

@@ -0,0 +1,12 @@
{ super }:
{
chpaper = super.callPackage ./chpaper.nix {};
chscheme = super.callPackage ./chscheme.nix {};
keyring = super.callPackage ./keyring.nix {};
playshellsound = super.callPackage ./playshellsound.nix {};
mkscreenshots = super.callPackage ./mkscreenshots.nix {};
moveonscreen = super.callPackage ./moveonscreen.nix {};
s_check = super.callPackage ./s_check.nix {};
switchmon = super.callPackage ./switchmon.nix {};
}

View File

@@ -12,7 +12,7 @@ pkgs.writeShellApplication {
exit 1
fi
if scheck; then
runbg aplay "$1"
runbg aplay "$1" > /dev/null 2>&1
else
exit 1
fi