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

215
flake.nix
View File

@@ -4,16 +4,13 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hypr-contrib.url = "github:hyprwm/contrib"; hypr-contrib.url = "github:hyprwm/contrib";
copyparty.url = "github:9001/copyparty";
hyprpicker.url = "github:hyprwm/hyprpicker"; hyprpicker.url = "github:hyprwm/hyprpicker";
stylix.url = "github:danth/stylix"; stylix.url = "github:danth/stylix";
disko.url = "github:nix-community/disko"; disko.url = "github:nix-community/disko";
impermanence.url = "github:nix-community/impermanence"; fern.url = "github:km-clay/fern";
ghostty.url = "github:ghostty-org/ghostty";
nixvim = { nixvim.url = "github:nix-community/nixvim";
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/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 let
system = "x86_64-linux"; movLib = import ./lib {
username = "pagedmov"; inherit inputs;
nixpkgsConfig = { username = "pagedmov";
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 = { hosts = movLib.foldHosts [
oganesson = nixpkgs.lib.nixosSystem { # Desktop {
specialArgs = { host = "oganesson";
inherit self inputs username; hostDir = "desktop";
host = "oganesson"; kind = "both";
overlays = [ }
(import ./overlay/overlay.nix { root = self; }) {
]; host = "mercury";
}; hostDir = "laptop";
inherit system; kind = "both";
pkgs = import nixpkgs { }
inherit system; {
config = nixpkgsConfig; host = "xenon";
overlays = [ hostDir = "server";
(import ./overlay/overlay.nix { root = self; }) kind = "both";
]; extraNixosModules = [
};
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;
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;
host = "xenon";
};
inherit system;
pkgs = import nixpkgs {
inherit system;
config = nixpkgsConfig;
};
modules = [
./hosts/server/config.nix
./modules/sys
./modules/server ./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 ]; imports = [ ./hardware.nix ];
@@ -39,7 +42,7 @@
${username} = { ${username} = {
isNormalUser = true; isNormalUser = true;
initialPassword = "1234"; initialPassword = "1234";
shell = pkgs.zsh; shell = fern;
extraGroups = [ "input" "wheel" "persist" "libvirtd" ]; 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 = [ imports = [
./hardware.nix ./hardware.nix
@@ -33,18 +37,22 @@
shells = [ pkgs.myPkgs.slash pkgs.zsh pkgs.bash ]; shells = [ pkgs.myPkgs.slash pkgs.zsh pkgs.bash ];
}; };
programs.fern.enable = true;
users = { users = {
groups.persist = { }; groups.persist = { };
groups.davfs2 = { };
users = { users = {
root.initialPassword = "1234"; root.initialPassword = "1234";
${username} = { ${username} = {
isNormalUser = true; isNormalUser = true;
initialPassword = "1234"; initialPassword = "1234";
shell = pkgs.zsh; shell = pkgs.fern;
extraGroups = [ "input" "wheel" "persist" "libvirtd" ]; extraGroups = [ "davfs2" "input" "wheel" "persist" "libvirtd" ];
}; };
}; };
}; };
security.polkit.enable = true;
security.sudo.extraConfig = '' security.sudo.extraConfig = ''
${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild ${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 = 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.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/db4cf956-df00-4c26-851d-419136434eae"; { device = "/dev/disk/by-uuid/9a98748d-1953-4316-9788-07d11c5d0af6";
fsType = "ext4"; fsType = "btrfs";
options = [ "subvol=root" "compress=zstd:3" "noatime" ];
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/336C-A94E"; { device = "/dev/disk/by-uuid/5BA1-A9F8";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; 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 = [ ]; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking zramSwap = {
# (the default) this is the recommended approach. When using systemd-networkd it's enable = true;
# still possible to use this option, but it's recommended to use it in conjunction memoryPercent = 25;
# 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"; 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 ./starship.nix
./userpkgs.nix ./userpkgs.nix
./zsh ./zsh
./fern
./swaync.nix ./swaync.nix
./hyprland.nix ./hyprland.nix
./waybar.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, ... }: { inputs, pkgs, lib, config, self, host, ... }:
let let
desktop = host == "oganesson"; desktop = host == "oganesson" || host == "phosphorous";
screenshot_bind = if desktop then screenshot_bind = if desktop then
[ [
"super, print, exec, grimblast copy area" "super, print, exec, grimblast copy area"
@@ -18,10 +18,10 @@ let
"f[1], gapsout:0, gapsin:0" "f[1], gapsout:0, gapsin:0"
]; ];
smartGapsWindowrules = [ smartGapsWindowrules = [
"bordersize 0, floating:0, onworkspace:w[tv1]" "border_size 0, match:float 0, match:workspace w[tv1]"
"rounding 0, floating:0, onworkspace:w[tv1]" "rounding 0, match:float 0, match:workspace w[tv1]"
"bordersize 0, floating:0, onworkspace:f[1]" "border_size 0, match:float 0, match:workspace f[1]"
"rounding 0, floating:0, onworkspace:f[1]" "rounding 0, match:float 0, match:workspace f[1]"
]; ];
in { in {
@@ -43,7 +43,7 @@ in {
config = lib.mkIf config.movOpts.envConfig.hyprlandConfig.enable { config = lib.mkIf config.movOpts.envConfig.hyprlandConfig.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
swaybg swaybg
inputs.hypr-contrib.packages.${pkgs.system}.grimblast inputs.hypr-contrib.packages.${pkgs.stdenv.hostPlatform.system}.grimblast
hyprpicker hyprpicker
grim grim
slurp slurp
@@ -76,7 +76,7 @@ in {
"swaync &" "swaync &"
"wl-paste --type text --watch cliphist store &" "wl-paste --type text --watch cliphist store &"
"wl-paste --type image --watch cliphist store &" "wl-paste --type image --watch cliphist store &"
"wl-clip-persist --clipboard both" "wl-clip-persist --clipboard regular"
"systemctl --user import-environment &" "systemctl --user import-environment &"
"hash dbus-update-activation-environment 2>/dev/null &" "hash dbus-update-activation-environment 2>/dev/null &"
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &" "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
@@ -108,36 +108,38 @@ in {
"XDG_DATA_HOME,$HOME/.local/share" "XDG_DATA_HOME,$HOME/.local/share"
"XDG_CACHE_HOME,$HOME/.cache" "XDG_CACHE_HOME,$HOME/.cache"
]; ];
layerrule = [ "blur,waybar" "ignorezero,waybar" "blur,launcher" ]; layerrule = [
windowrulev2 = [ "match:namespace = waybar, blur 1"
"float, class:^(thunar)$,title:^(.*File Operation Progress.*)$" "match:namespace = waybar, ignore_alpha 0"
"float, class:^(firefox)$,title:^(Library)$" "match:namespace = launcher, blur 1"
"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.*)$"
];
windowrule = [ windowrule = [
"float, class:^(qt5ct)$" # From old windowrulev2
"float, class:^(zoom)$" "float true, match:class ^(thunar)$, match:title ^(.*File Operation Progress.*)$"
"float, class:^(Steam)$" "float true, match:class ^(firefox)$, match:title ^(Library)$"
"idleinhibit focus, class:mpv" "float true, match:class ^(thunar)$, match:title ^(File Operation Progress)$"
"float, title:^(Picture-in-Picture)$" "float true, match:class ^(thunar)$, match:title ^(Confirm to replace files)$"
"float, class:^(nm-connection-editor)$" "float true, match:title ^(bwarn)$"
"float, class:^(waypaper)$" "no_initial_focus on, match:class ^(steam)$"
"float, title:^(Sign In)(.*)$" "float true, match:class ^(firefox)$, match:title ^( - Google Mozilla Firefox)$"
"float, title:^(Firefox )$" "float true, match:class ^(firefox)$, match:title ^(Firefox Sharing Indicator)$"
"nofocus, title:^(Firefox )$" "float true, match:class ^(firefox)$, match:title ^(Firefox )$"
"float, class:^(firefox)$,title^(Sign in - Google Accounts Mozilla Firefox)$" "float true, match:class ^(firefox)$, match:title ^(.*Sign in.*)$"
"size 0 0, title:^(Firefox )$" # From old windowrule
"move 100%-470 15,title:^(Firefox Sharing Indicator)$" "float true, match:class ^(qt5ct)$"
"move 100%-470 15,title:^(Firefox )$" "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; ] ++ smartGapsWindowrules;
input = { input = {
@@ -149,13 +151,12 @@ in {
}; };
general = { general = {
gaps_in = 5; gaps_in = 5;
gaps_out = 9; gaps_out = "0, 9, 9, 9"; # top, right, bottom, left
border_size = 3; border_size = 3;
"col.active_border" = lib.mkForce "rgba(404042ff)"; "col.active_border" = lib.mkForce "rgba(404042ff)";
"col.inactive_border" = lib.mkForce "rgba(83858a00)"; "col.inactive_border" = lib.mkForce "rgba(83858a00)";
layout = "dwindle"; layout = "dwindle";
resize_on_border = true; resize_on_border = true;
no_border_on_floating = false;
snap = { snap = {
enabled = true; enabled = true;
@@ -203,10 +204,6 @@ in {
hide_on_key_press = true; hide_on_key_press = true;
}; };
experimental = {
xx_color_management_v4 = true;
};
animations = { animations = {
enabled = true; enabled = true;
@@ -243,6 +240,10 @@ in {
"super, l, movefocus, r" "super, l, movefocus, r"
"super, k, movefocus, u" "super, k, movefocus, u"
"super, j, movefocus, d" "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, h, movewindow, l"
"super shift, l, movewindow, r" "super shift, l, movewindow, r"
"super shift, k, movewindow, u" "super shift, k, movewindow, u"

View File

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

View File

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

View File

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

View File

@@ -1,7 +1,6 @@
{ pkgs, host, lib, config, ... }: { pkgs, lib, config, ... }:
let let
desktop = (host == "oganesson");
layout = config.movOpts.envConfig.hyprlandConfig.workspaceLayout; layout = config.movOpts.envConfig.hyprlandConfig.workspaceLayout;
workspaces = { workspaces = {
format = "{icon}"; format = "{icon}";
@@ -55,20 +54,7 @@ let
lighter = scheme.base05; lighter = scheme.base05;
light = scheme.base04; 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; monitors = config.movOpts.envConfig.hyprlandConfig.monitorNames;
circle-gauge = [ "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" ];
cava-gauge = [ "" "" "" "" "" "" "" "" ];
battery-gauge = [ "󰁺" "󰁻" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
bar-gauge = [ bar-gauge = [
"" ""
"" ""
@@ -80,6 +66,17 @@ let
"" ""
"" ""
]; ];
bar-gauge-critical = [
""
""
""
""
""
""
""
"<span color='#F07178'>!!!!!!!!</span>"
"<span color='#F07178'>CRITICAL</span>"
];
in { in {
options = { options = {
movOpts.envConfig.waybarConfig.enable = movOpts.envConfig.waybarConfig.enable =
@@ -159,17 +156,7 @@ in {
interval = 20; interval = 20;
format = "MEM: [ <span color='#272D38'>{icon}</span> ] <span size='8pt'>{percentage}%</span>"; 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"; 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 = [ format-icons = bar-gauge-critical;
""
""
""
""
""
""
""
"<span color='#F07178'>!!!!!!!!</span>"
"<span color='#F07178'>CRITICAL</span>"
];
}; };
cpu = { cpu = {
@@ -177,23 +164,13 @@ in {
interval = 1; interval = 1;
format = "CPU: [ <span color='#272D38'>{icon}</span> ] <span size='8pt'>{usage}%</span>"; format = "CPU: [ <span color='#272D38'>{icon}</span> ] <span size='8pt'>{usage}%</span>";
tooltip = true; tooltip = true;
format-icons = [ format-icons = bar-gauge-critical;
""
""
""
""
""
""
""
"<span color='#272D38'>!!!!!!!!</span>"
"<span color='#272D38'>CRITICAL</span>"
];
}; };
}; };
}; };
style = '' style = ''
* { * {
font-size: 14px; font-size: 16px;
border: none; border: none;
font-family: EnvyCodeR Nerd Font Mono; font-family: EnvyCodeR Nerd Font Mono;
font-weight: Bold; font-weight: Bold;

View File

@@ -14,25 +14,29 @@
gtp = "playshellsound ${self}/assets/sound/rm.wav; gtrash put"; gtp = "playshellsound ${self}/assets/sound/rm.wav; gtrash put";
sr = "source ~/.zshrc && source ~/.zshenv"; sr = "source ~/.zshrc && source ~/.zshenv";
".." = "cd .."; ".." = "cd ..";
rm = "echo 'use \"gtp\" instead'";
psg = "ps aux | grep -v grep | grep -i -e VSZ -e"; psg = "ps aux | grep -v grep | grep -i -e VSZ -e";
mkdir = "mkdir -p"; mkdir = "mkdir -p";
pk = "pkill -9 -f"; pk = "pkill -9 -f";
svcu = "systemctl --user"; svcu = "systemctl --user";
svc = "sudo systemctl"; svc = "sudo systemctl";
viflake = "nvim flake.nix";
iv = "invoke"; iv = "invoke";
cfgfilecount = ''find ".\.nix" $FLAKEPATH | wc -l | toilet -f 3d | lolcat''; cfgfilecount = ''find ".\.nix" $FLAKEPATH | wc -l | toilet -f 3d | lolcat'';
record = "wf-recorder"; 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 #git
ga = "playshellsound ${self}/assets/sound/gitadd.wav; git add"; ga = "playshellsound ${self}/assets/sound/gitadd.wav; git add";
gcomm = "gitcommit_sfx"; gcomm = "gitcommit_sfx";
gpush = "gitpush_sfx"; gpush = "gitpush_sfx";
gpull = "gitpull_sfx"; gpull = "gitpull_sfx";
greb = "gitrebase_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"; BROWSER = "firefox";
FLAKEPATH = "$HOME/.sysflake"; FLAKEPATH = "$HOME/.sysflake";
STEAMPATH = "$HOME/.local/share/Steam"; STEAMPATH = "$HOME/.local/share/Steam";
TFPATH = "$STEAMPATH/steamapps/common/Team Fortress 2/";
PATH = "$PATH:$HOME/.userpath/"; PATH = "$PATH:$HOME/.userpath/";
FZF_DEFAULT_COMMAND = "fd"; FZF_DEFAULT_COMMAND = "fd";
FZF_DEFAULT_OPTS = "--height 40% --layout=reverse --border"; FZF_DEFAULT_OPTS = "--height 40% --layout=reverse --border";

View File

@@ -13,6 +13,33 @@ in
config = lib.mkIf config.movOpts.envConfig.zshConfig.extraConfig.enable { config = lib.mkIf config.movOpts.envConfig.zshConfig.extraConfig.enable {
programs.zsh = { programs.zsh = {
initContent = '' 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 build-drv() { # Put the derivation path in $RESULT instead of making a 'result' symlink
RESULT=$(nix-build "$@" --no-link) RESULT=$(nix-build "$@" --no-link)
if [ -z "$RESULT" ]; then if [ -z "$RESULT" ]; then
@@ -21,12 +48,9 @@ in
export RESULT export RESULT
echo "\$RESULT = $RESULT" echo "\$RESULT = $RESULT"
} }
precmd() { # Reset kitty color scheme escaped() {
if [ "$NIX_SHELL" = "false" ]; then # don't run this in a nix-shell # escapes regex chars
trap 'NIX_SHELL=false kitty_theme' EXIT SIGINT SIGTERM SIGHUP sed 's/[^^]/[&]/g; s/\^/\\^/g' <<<"$1"
else # but still apply ssh theme logic in nix-shell
trap 'kitty_theme' EXIT SIGINT SIGTERM SIGHUP
fi
} }
nix-shell() { nix-shell() {
NIX_SHELL=true command nix-shell "$@" --run zsh NIX_SHELL=true command nix-shell "$@" --run zsh
@@ -34,6 +58,18 @@ in
nsp() { nsp() {
NIX_SHELL=true command nix-shell -p "$@" --run zsh 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() { nvim() {
${shellsound} ${sndpath}/nvim.wav ${shellsound} ${sndpath}/nvim.wav
command nvim "$@" command nvim "$@"
@@ -43,17 +79,6 @@ in
command neovide "$@" command neovide "$@"
} }
alias vi="nvim" 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() { grimblast() {
if command grimblast "$@"; then if command grimblast "$@"; then
${shellsound} ${sndpath}/screenshot.wav ${shellsound} ${sndpath}/screenshot.wav
@@ -109,6 +134,7 @@ in
} }
unalias ls unalias ls
ls() { ls() {
if [ "$RAW_SHELL" = "1" ]; then command ls; fi
eza -1 --group-directories-first --icons "$@" eza -1 --group-directories-first --icons "$@"
${shellsound} ${sndpath}/ls.wav ${shellsound} ${sndpath}/ls.wav
return 0 return 0
@@ -128,14 +154,16 @@ in
} }
cd() { cd() {
if [ "$RAW_SHELL" = "1" ]; then builtin cd "$@"; return $?; fi
local prev_sounds_enabled="$SOUNDS_ENABLED" local prev_sounds_enabled="$SOUNDS_ENABLED"
SOUNDS_ENABLED=0 SOUNDS_ENABLED=0
eza -1 --group-directories-first --icons "$@" eza -1 --group-directories-first --icons "$@"
SOUNDS_ENABLED=$prev_sounds_enabled SOUNDS_ENABLED=$prev_sounds_enabled
builtin cd "$@" builtin cd "$@"
${shellsound} /nix/store/7a9w7np3qrvmzxjbs7xj05qq2yccgfsj-source/assets/sound/cd.wav ${shellsound} ${sndpath}/cd.wav
return 0 return 0
} }
if [ ! -e $HOME/.zsh_history ]; then if [ ! -e $HOME/.zsh_history ]; then
touch $HOME/.zsh_history touch $HOME/.zsh_history
chmod 600 $HOME/.zsh_history chmod 600 $HOME/.zsh_history
@@ -179,13 +207,12 @@ in
source ${fzf-tab}/fzf-tab.plugin.zsh source ${fzf-tab}/fzf-tab.plugin.zsh
bindkey -v bindkey -v
kitty_theme
type starship_zle-keymap-select >/dev/null || \ type starship_zle-keymap-select >/dev/null || \
{ {
eval "$(starship init zsh)" eval "$(starship init zsh)"
} }
${shellsound} ${sndpath}/sh-source.wav ${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 { config = lib.mkIf config.movOpts.programConfigs.gitConfig.enable {
programs.git = { programs.git = {
enable = true; enable = true;
userEmail = "kylerclay@proton.me"; settings = {
userName = "${username}"; user = {
extraConfig = { 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"; core.pager = "delta";
interactive.diffFilter = "delta --color-only"; interactive.diffFilter = "delta --color-only";
delta.navigate = "true"; delta.navigate = "true";

View File

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

View File

@@ -1,9 +1,14 @@
{ env, config, pkgs, host, self, ... }: { { env, config, pkgs, host, self, ... }: {
programs.nixvim.extraPackages = [ programs.nixvim = {
pkgs.cargo nixpkgs.useGlobalPackages = true;
pkgs.rustc extraPackages = [
pkgs.rustup pkgs.cargo
pkgs.rust-analyzer pkgs.rustc
]; pkgs.clippy
pkgs.rustup
pkgs.rust-analyzer
pkgs.nerd-fonts.envy-code-r
];
};
imports = [ ./plugins ./options.nix ./keymaps.nix ./autocmd.nix ]; 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.g.vimwiki_list = {{path = '~/vimwiki/', syntax = 'markdown', ext = '.md'}}
vim.filetype.add({
filename = {
[".fernrc"] = "sh",
}
})
vim.opt.number = true vim.opt.number = true
vim.opt.autochdir = false
vim.opt.relativenumber = true vim.opt.relativenumber = true
vim.opt.hlsearch = true vim.opt.hlsearch = true
vim.opt.incsearch = true vim.opt.incsearch = true
@@ -56,7 +63,7 @@ in {
vim.opt.linebreak = true vim.opt.linebreak = true
vim.opt.textwidth = 0 vim.opt.textwidth = 0
vim.opt.breakat = " \t!@*-+;:,./?" vim.opt.breakat = " \t!@*-+;:,./?"
vim.opt.guifont = "Fira Code:h18" vim.opt.guifont = "EnvyCodeR Nerd Font Mono:h18"
vim.g.mapleader = "!" vim.g.mapleader = "!"
vim.g.rust_recommended_style = 0 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 ./nvim-lightbulb.nix
./neocord.nix ./neocord.nix
./copilot.nix ./copilot.nix
./claudecode.nix
./plugins.nix ./plugins.nix
./nvim-tree.nix ./nvim-tree.nix
./telescope.nix ./telescope.nix

View File

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

View File

@@ -2,12 +2,13 @@
programs.nixvim = { programs.nixvim = {
plugins.nvim-tree = { plugins.nvim-tree = {
enable = true; enable = true;
hijackUnnamedBufferWhenOpening = false;
openOnSetup = false; openOnSetup = false;
onAttach = { settings = {
__raw = '' hijack_unnamed_buffer_when_opening = false;
function(bufnr) on_attach = {
local api = require('nvim-tree.api') __raw = ''
function(bufnr)
local api = require('nvim-tree.api')
local function opts(desc) local function opts(desc)
return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
@@ -73,15 +74,16 @@
vim.keymap.set('n', '<2-LeftMouse>', api.node.open.edit, opts('Open')) vim.keymap.set('n', '<2-LeftMouse>', api.node.open.edit, opts('Open'))
vim.keymap.set('n', '<2-RightMouse>', api.tree.change_root_to_node, opts('CD')) vim.keymap.set('n', '<2-RightMouse>', api.tree.change_root_to_node, opts('CD'))
-- END_DEFAULT_ON_ATTACH -- END_DEFAULT_ON_ATTACH
end end
''; '';
}; };
view = { view = {
side = "right"; side = "right";
centralizeSelection = true; centralize_selection = true;
number = true; number = true;
relativenumber = true; relativenumber = true;
width = 40; width = 40;
};
}; };
}; };
}; };

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,8 @@
{ inputs, nixpkgs, nixvim, config, self, username, host, ... }: { { inputs, nixpkgs, nixvim, config, self, username, host, ... }: {
imports = [ (import ./bootloader.nix) ] ++ [ (import ./network.nix) ] imports = [ (import ./bootloader.nix) ] ++ [ (import ./network.nix) ]
++ [ (import ./powerprofiles.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.201" = [ "oganesson" ];
"192.168.1.202" = [ "mercury" ]; "192.168.1.202" = [ "mercury" ];
"192.168.1.134" = [ "hosting.localhost" ]; "192.168.1.134" = [ "hosting.localhost" ];
"192.168.1.140" = [ "panel.test" "dnsman.test" ];
}; };
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 443 8080 ]; allowedTCPPorts = [ 443 8080 ];
allowedUDPPorts = [ 27960 ];
trustedInterfaces = [ "vnet9" "virbr0" "enp0s2" ];
}; };
}; };
}; };

View File

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

View File

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

View File

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

View File

@@ -1,10 +1,19 @@
{ lib, config, ... }: { { lib, pkgs, config, ... }: {
options = { options = {
movOpts.softwareCfg.sysServices.enable = movOpts.softwareCfg.sysServices.enable =
lib.mkEnableOption "enables default system services"; lib.mkEnableOption "enables default system services";
}; };
config = lib.mkIf config.movOpts.softwareCfg.sysServices.enable { 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 = { services = {
davfs2.enable = true;
keyd = { keyd = {
enable = true; enable = true;
keyboards.default = { keyboards.default = {
@@ -12,6 +21,39 @@
settings.main = { capslock = "esc"; }; 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 = { pipewire = {
enable = true; enable = true;
pulse.enable = true; pulse.enable = true;

View File

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

View File

@@ -5,12 +5,32 @@ let
owner = "xero"; owner = "xero";
repo = "figlet-fonts"; repo = "figlet-fonts";
rev = "master"; 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: { toilet = super.toilet.overrideAttrs (old: {
buildInputs = old.buildInputs or [ ] ++ [ extraFigletFonts ]; buildInputs = (old.buildInputs or [ ]) ++ [ extraFigletFonts ];
installPhase = '' installPhase = ''
make install PREFIX=$out make install PREFIX=$out
@@ -18,34 +38,13 @@ in
cp -r ${extraFigletFonts}/* $out/share/figlet cp -r ${extraFigletFonts}/* $out/share/figlet
''; '';
}); });
myPkgs = { myPkgs = {
# Packages that I've made
slash = super.callPackage ./pkgs/slash/package.nix {}; slash = super.callPackage ./pkgs/slash/package.nix {};
fzf-tab = super.callPackage ./pkgs/zsh-fzf-tab/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 myScripts = import ./scripts { inherit super root host; };
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 {};
};
} }

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 cliphist decode "$selection" | wl-copy
} }
btop_cmd() { btop_cmd() {
hostname="$(cat /etc/hostname)"
if [ "$(cat /etc/hostname)" = "oganesson" ]; then if [ "$hostname" = "oganesson" ] || [ "$hostname" = "phosphorous" ]; then
hyprctl dispatch resizeactive 20% 155% && hyprctl dispatch resizeactive 20% 155% &&
moveonscreen --center && moveonscreen --center &&
btop && 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 pkgs.myScripts.playshellsound
]; ];
text = '' text = ''
exec > /dev/tty 2>&1
checkbools() { [ "$all" = false ] && [ "$system" = false ] && [ "$home" = false ]; } checkbools() { [ "$all" = false ] && [ "$system" = false ] && [ "$home" = false ]; }
checkflags() { checkflags() {
str="$1" str="$1"
@@ -16,6 +17,7 @@ pkgs.writeShellApplication {
"a") if checkbools; then all=true; else echo -e "$usage" && exit 1; fi ;; "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 ;; "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 ;; "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 ;; "n") if [ "$dry" = false ]; then dry=true; else echo -e "$usage" && exit 1; fi ;;
*) echo -e "$usage" && exit 1 ;; *) echo -e "$usage" && exit 1 ;;
esac esac
@@ -26,9 +28,14 @@ pkgs.writeShellApplication {
home=false home=false
all=false all=false
dry=false dry=false
update=false
played_start=false
hooray() { playshellsound "${self}/assets/sound/update.wav"; } hooray() { playshellsound "${self}/assets/sound/update.wav"; }
damn() { playshellsound "${self}/assets/sound/error.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" 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_flag=""
[ "$dry" = true ] && dry_flag="-n" [ "$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 [ "$update" = true ] && start && (cd "$FLAKEPATH" && nix flake update) && update_done
[ "$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 [ "$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 exit 1
fi fi
if scheck; then if scheck; then
runbg aplay "$1" runbg aplay "$1" > /dev/null 2>&1
else else
exit 1 exit 1
fi fi