formatted nix files using alejandra

This commit is contained in:
pagedmov
2024-10-31 22:33:10 -04:00
parent c6d381fc58
commit 495d90b0de
45 changed files with 1537 additions and 1504 deletions

View File

@@ -8,10 +8,10 @@
hyprpicker.url = "github:hyprwm/hyprpicker"; hyprpicker.url = "github:hyprwm/hyprpicker";
stylix.url = "github:danth/stylix"; stylix.url = "github:danth/stylix";
nixvim = { nixvim = {
url = "github:nix-community/nixvim"; url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
@@ -41,29 +41,31 @@
} @ inputs: let } @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
username = "pagedmov"; username = "pagedmov";
wallpaper = "${self}/assets/wallpapers/sleeping.png"; wallpaper = "${self}/assets/wallpapers/sleeping.png";
base16scheme = "nord"; # can be easily changed with the chscheme script base16scheme = "nord"; # can be easily changed with the chscheme script
# Map colors from yaml to attribute set # Map colors from yaml to attribute set
# Extracting colors into a set here allows them to be propagated across the entire config, with or without stylix # Extracting colors into a set here allows them to be propagated across the entire config, with or without stylix
lib = nixpkgs.lib; lib = nixpkgs.lib;
pkgs = import nixpkgs { system = "x86_64-linux"; }; pkgs = import nixpkgs {system = "x86_64-linux";};
scheme_path = "${pkgs.base16-schemes}/share/themes/${base16scheme}.yaml"; scheme_path = "${pkgs.base16-schemes}/share/themes/${base16scheme}.yaml";
scheme_string = builtins.readFile scheme_path; scheme_string = builtins.readFile scheme_path;
scheme_list = lib.splitString "\n" "${scheme_string}"; scheme_list = lib.splitString "\n" "${scheme_string}";
colors = lib.filter (line: builtins.match "^ *base[0-9A-F]{2}: .*" line != null) scheme_list; colors = lib.filter (line: builtins.match "^ *base[0-9A-F]{2}: .*" line != null) scheme_list;
scheme = lib.lists.foldl' (acc: line: scheme =
let lib.lists.foldl' (
splitLine = lib.splitString ": " line; acc: line: let
key = builtins.elemAt splitLine 0; splitLine = lib.splitString ": " line;
value = builtins.elemAt splitLine 1; key = builtins.elemAt splitLine 0;
trimmedKey = lib.trim key; value = builtins.elemAt splitLine 1;
cleanValue_step1 = lib.splitString " " value; trimmedKey = lib.trim key;
cleanValue_step2 = builtins.elemAt cleanValue_step1 0; cleanValue_step1 = lib.splitString " " value;
cleanValue_final = builtins.substring 1 (builtins.stringLength cleanValue_step2 - 2) cleanValue_step2; cleanValue_step2 = builtins.elemAt cleanValue_step1 0;
cleanValue_final = builtins.substring 1 (builtins.stringLength cleanValue_step2 - 2) cleanValue_step2;
in in
acc // { "${trimmedKey}" = cleanValue_final; } acc // {"${trimmedKey}" = cleanValue_final;}
) {} colors; ) {}
colors;
in { in {
nixosConfigurations = { nixosConfigurations = {
oganesson = nixpkgs.lib.nixosSystem { oganesson = nixpkgs.lib.nixosSystem {
@@ -75,7 +77,7 @@
modules = [ modules = [
./hosts/desktop ./hosts/desktop
stylix.nixosModules.stylix stylix.nixosModules.stylix
nixvim.nixosModules.nixvim nixvim.nixosModules.nixvim
nur.nixosModules.nur nur.nixosModules.nur
]; ];
}; };
@@ -88,7 +90,7 @@
modules = [ modules = [
./hosts/laptop ./hosts/laptop
stylix.nixosModules.stylix stylix.nixosModules.stylix
nixvim.nixosModules.nixvim nixvim.nixosModules.nixvim
nur.nixosModules.nur nur.nixosModules.nur
]; ];
}; };
@@ -101,7 +103,7 @@
modules = [ modules = [
./hosts/server ./hosts/server
stylix.nixosModules.stylix stylix.nixosModules.stylix
nixvim.nixosModules.nixvim nixvim.nixosModules.nixvim
nur.nixosModules.nur nur.nixosModules.nur
]; ];
}; };
@@ -113,7 +115,7 @@
}; };
modules = [ modules = [
./hosts/installer ./hosts/installer
nixvim.nixosModules.nixvim nixvim.nixosModules.nixvim
]; ];
}; };
}; };

View File

@@ -5,21 +5,21 @@
... ...
}: let }: let
install-script = pkgs.writeShellScriptBin "movcfg-install" (builtins.readFile ./movcfg-install.sh); install-script = pkgs.writeShellScriptBin "movcfg-install" (builtins.readFile ./movcfg-install.sh);
extraFigletFonts = pkgs.fetchFromGitHub { extraFigletFonts = pkgs.fetchFromGitHub {
owner = "xero"; owner = "xero";
repo = "figlet-fonts"; repo = "figlet-fonts";
rev = "master"; rev = "master";
sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY=";
}; };
toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: { toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts]; buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts];
installPhase = '' installPhase = ''
make install PREFIX=$out make install PREFIX=$out
mkdir -p $out/share/figlet mkdir -p $out/share/figlet
cp -r ${extraFigletFonts}/* $out/share/figlet cp -r ${extraFigletFonts}/* $out/share/figlet
''; '';
}); });
in { in {
imports = [ imports = [
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"

View File

@@ -1,4 +1,8 @@
{pkgs, username, ...}: { {
pkgs,
username,
...
}: {
system.stateVersion = "24.05"; system.stateVersion = "24.05";
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix = { nix = {
@@ -22,7 +26,7 @@
users.users."${username}" = { users.users."${username}" = {
shell = pkgs.zsh; shell = pkgs.zsh;
isNormalUser = true; isNormalUser = true;
extraGroup = [ "wheel" ]; extraGroup = ["wheel"];
initialPassword = "1111"; initialPassword = "1111";
}; };

View File

@@ -1,7 +1,7 @@
{ {
host, host,
nur, nur,
nixvim, nixvim,
self, self,
inputs, inputs,
username, username,

View File

@@ -5,11 +5,13 @@
}: { }: {
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
(nerdfonts.override { fonts = [ (nerdfonts.override {
"JetBrainsMono" fonts = [
"CascadiaCode" "JetBrainsMono"
"NerdFontsSymbolsOnly" "CascadiaCode"
]; }) "NerdFontsSymbolsOnly"
];
})
]; ];
gtk = { gtk = {
@@ -20,14 +22,14 @@
accent = "frostblue4"; accent = "frostblue4";
}; };
}; };
#cursorTheme = { #cursorTheme = {
# name = "Bibata-Modern-Ice"; # name = "Bibata-Modern-Ice";
# package = pkgs.bibata-cursors; # package = pkgs.bibata-cursors;
# size = 16; # size = 16;
#}; #};
#font = { #font = {
# name = "Iosevka Nerd Font"; # name = "Iosevka Nerd Font";
# package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; # package = pkgs.nerdfonts.override {fonts = ["Iosevka"];};
#}; #};
}; };
} }

View File

@@ -2,17 +2,18 @@
username, username,
host, host,
... ...
}: }: let
desktop = host == "oganesson";
let screenshot_bind =
desktop = (host == "oganesson"); if desktop
screenshot_bind = if desktop then [ # My laptop does not have a printscreen button then [
"super, print, exec, grimblast copy area" # My laptop does not have a printscreen button
] else [ "super, print, exec, grimblast copy area"
"super, insert, exec, grimblast copy area" ]
]; else [
in "super, insert, exec, grimblast copy area"
{ ];
in {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
settings = { settings = {
monitor = monitor =
@@ -81,8 +82,8 @@ in
gaps_in = 4; gaps_in = 4;
gaps_out = 8; gaps_out = 8;
border_size = 2; border_size = 2;
#"col.inactive_border" = "0xff${scheme.base01}"; #"col.inactive_border" = "0xff${scheme.base01}";
#"col.active_border" = "0xff${scheme.base0F}"; #"col.active_border" = "0xff${scheme.base0F}";
border_part_of_window = false; border_part_of_window = false;
no_border_on_floating = false; no_border_on_floating = false;
}; };
@@ -168,46 +169,48 @@ in
"workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert "workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert
]; ];
bind = [ bind =
"super, up, exec, pactl set-sink-volume @default_sink@ +10%" [
"super, down, exec, pactl set-sink-volume @default_sink@ -10%" "super, up, exec, pactl set-sink-volume @default_sink@ +10%"
"super, t, exec, swaync-client -t -sw" "super, down, exec, pactl set-sink-volume @default_sink@ -10%"
"super, a, exec, firefox" "super, t, exec, swaync-client -t -sw"
"super, q, exec, kitty --title Kitty" "super, a, exec, firefox"
"super shift, q, exec, [float;size 40% 30%;move onscreen cursor -50% -50%] kitty --title Kitty" "super, q, exec, kitty --title Kitty"
"super, c, killactive," "super shift, q, exec, [float;size 40% 30%;move onscreen cursor -50% -50%] kitty --title Kitty"
"super, e, exec, nemo" "super, c, killactive,"
"super, p, exec, [float;size 40% 25%;move onscreen cursor] [ ! -f /tmp/keyringfile ] && kitty toolbelt" "super, e, exec, nemo"
"super shift, m, exit," "super, p, exec, [float;size 40% 25%;move onscreen cursor] [ ! -f /tmp/keyringfile ] && kitty toolbelt"
"super, m, exec, fuzzel" "super shift, m, exit,"
"super, r, exec, neovide" "super, m, exec, fuzzel"
"super, b, togglesplit, # dwindle" "super, r, exec, neovide"
"super, f, togglefloating" "super, b, togglesplit, # dwindle"
"super, g, fullscreen" "super, f, togglefloating"
"super, h, movefocus, l" "super, g, fullscreen"
"super, l, movefocus, r" "super, h, movefocus, l"
"super, k, movefocus, u" "super, l, movefocus, r"
"super, j, movefocus, d" "super, k, movefocus, u"
"super shift, h, movewindow, l" "super, j, movefocus, d"
"super shift, l, movewindow, r" "super shift, h, movewindow, l"
"super shift, k, movewindow, u" "super shift, l, movewindow, r"
"super shift, j, movewindow, d" "super shift, k, movewindow, u"
"super, d, exec, switchmon" "super shift, j, movewindow, d"
"super, 1, exec, hyprctl 'dispatch workspace 1'" "super, d, exec, switchmon"
"super, 2, exec, hyprctl 'dispatch workspace 2'" "super, 1, exec, hyprctl 'dispatch workspace 1'"
"super, 3, exec, hyprctl 'dispatch workspace 3'" "super, 2, exec, hyprctl 'dispatch workspace 2'"
"super, 4, exec, hyprctl 'dispatch workspace 4'" "super, 3, exec, hyprctl 'dispatch workspace 3'"
"super, 5, exec, hyprctl 'dispatch workspace 5'" "super, 4, exec, hyprctl 'dispatch workspace 4'"
"super, 6, exec, hyprctl 'dispatch workspace 6'" "super, 5, exec, hyprctl 'dispatch workspace 5'"
"super shift, 1, movetoworkspace, 1" "super, 6, exec, hyprctl 'dispatch workspace 6'"
"super shift, 2, movetoworkspace, 2" "super shift, 1, movetoworkspace, 1"
"super shift, 3, movetoworkspace, 3" "super shift, 2, movetoworkspace, 2"
"super shift, 4, movetoworkspace, 4" "super shift, 3, movetoworkspace, 3"
"super shift, 5, movetoworkspace, 5" "super shift, 4, movetoworkspace, 4"
"super shift, 6, movetoworkspace, 6" "super shift, 5, movetoworkspace, 5"
"super, s, togglespecialworkspace, magic" "super shift, 6, movetoworkspace, 6"
"super shift, s, movetoworkspace, special:magic" "super, s, togglespecialworkspace, magic"
] ++ screenshot_bind; "super shift, s, movetoworkspace, special:magic"
]
++ screenshot_bind;
bindm = [ bindm = [
"super, mouse:272, movewindow" "super, mouse:272, movewindow"
"super, mouse:273, resizewindow" "super, mouse:273, resizewindow"

View File

@@ -2,9 +2,8 @@
inputs, inputs,
host, host,
... ...
}: }: {
{
imports = imports =
[(import ./hyprland.nix)] [(import ./hyprland.nix)]
++ [(import ./config.nix)]; ++ [(import ./config.nix)];
} }

View File

@@ -2,7 +2,7 @@
pkgs, pkgs,
lib, lib,
inputs, inputs,
scheme, scheme,
... ...
}: let }: let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
@@ -21,23 +21,23 @@ in {
hidePodcasts hidePodcasts
shuffle # shuffle+ (special characters are sanitized out of extension names) shuffle # shuffle+ (special characters are sanitized out of extension names)
]; ];
#colorScheme = "custom"; #colorScheme = "custom";
#customColorScheme = { #customColorScheme = {
# text = scheme.base06; # text = scheme.base06;
# subtext = scheme.base04; # subtext = scheme.base04;
# sidebar-text = scheme.base04; # sidebar-text = scheme.base04;
# main = scheme.base00; # main = scheme.base00;
# sidebar = scheme.base01; # sidebar = scheme.base01;
# shadow = scheme.base01; # shadow = scheme.base01;
# selected-row = scheme.base08; # selected-row = scheme.base08;
# button = scheme.base0D; # button = scheme.base0D;
# button-active = scheme.base0C; # button-active = scheme.base0C;
# button-disabled = scheme.base02; # button-disabled = scheme.base02;
# tab-active = scheme.base0E; # tab-active = scheme.base0E;
# notification = scheme.base0A; # notification = scheme.base0A;
# notification-error = scheme.base09; # notification-error = scheme.base09;
# misc = scheme.base0F; # misc = scheme.base0F;
#}; #};
}; };
} }

View File

@@ -1,19 +1,17 @@
{ {
pkgs, pkgs,
scheme, scheme,
wallpaper, wallpaper,
... ...
}: }: {
{
stylix = { stylix = {
enable = true; enable = true;
autoEnable = true; autoEnable = true;
targets = { targets = {
# fzf.enable = true; # fzf.enable = true;
# kitty.enable = true; # kitty.enable = true;
# vesktop.enable = true; # vesktop.enable = true;
waybar.enable = false; waybar.enable = false;
}; };
}; };
} }

File diff suppressed because it is too large Load Diff

View File

@@ -2,24 +2,23 @@
pkgs, pkgs,
host, host,
... ...
}: }: let
let desktop = host == "oganesson";
desktop = (host == "oganesson"); extraFigletFonts = pkgs.fetchFromGitHub {
extraFigletFonts = pkgs.fetchFromGitHub { owner = "xero";
owner = "xero"; repo = "figlet-fonts";
repo = "figlet-fonts"; rev = "master";
rev = "master"; sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY=";
sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; };
}; toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: {
toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: { buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts];
buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts];
installPhase = '' installPhase = ''
make install PREFIX=$out make install PREFIX=$out
mkdir -p $out/share/figlet mkdir -p $out/share/figlet
cp -r ${extraFigletFonts}/* $out/share/figlet cp -r ${extraFigletFonts}/* $out/share/figlet
''; '';
}); });
desktop_pkgs = desktop_pkgs =
if desktop if desktop
@@ -37,9 +36,9 @@ in {
[ [
chafa chafa
nemo nemo
flavours flavours
ags ags
sassc sassc
gtk3 gtk3
sqlite sqlite
gimp gimp

View File

@@ -1,7 +1,4 @@
{ {host, ...}:
host,
...
}:
# Grocery list: # Grocery list:
# Clock # Clock
# CPU/MEM meters # CPU/MEM meters
@@ -11,33 +8,37 @@ host,
# secondary monitor will have a vertical bar on the left side # secondary monitor will have a vertical bar on the left side
# Can contain more info with two bars # Can contain more info with two bars
let let
desktop = (host == "oganesson"); desktop = host == "oganesson";
workspaces = { workspaces = {
format = "{icon}"; format = "{icon}";
format-icons = { format-icons = {
"1" = ""; "1" = "";
"2" = ""; "2" = "";
"3" = ""; "3" = "";
"4" = ""; "4" = "";
"5" = ""; "5" = "";
"6" = ""; "6" = "";
}; };
persistent-workspaces = if desktop then { persistent-workspaces =
"HDMI-A-1" = [ 1 2 3 ]; if desktop
"DP-1" = [ 4 5 6 ]; then {
} else { "HDMI-A-1" = [1 2 3];
"eDP-1" = [ 1 2 3 4 ]; "DP-1" = [4 5 6];
}
else {
"eDP-1" = [1 2 3 4];
}; };
}; };
monitors = if desktop then [ monitors =
"DP-1" if desktop
"HDMI-A-1" then [
] else [ "DP-1"
"eDP-1" "HDMI-A-1"
]; ]
else [
in "eDP-1"
{ ];
in {
programs.waybar.settings.mainBar = { programs.waybar.settings.mainBar = {
layer = "bottom"; layer = "bottom";
output = builtins.elemAt monitors 0; output = builtins.elemAt monitors 0;
@@ -45,7 +46,10 @@ in
name = "mainBar"; name = "mainBar";
margin-left = 8; margin-left = 8;
margin-top = 5; margin-top = 5;
margin-right = if desktop then 8 else 5; margin-right =
if desktop
then 8
else 5;
mode = "dock"; mode = "dock";
"gtk-layer-shell" = true; "gtk-layer-shell" = true;
@@ -81,7 +85,7 @@ in
waves = false; waves = false;
noise_reduction = 0.77; noise_reduction = 0.77;
input_delay = 2; input_delay = 2;
format-icons = ["" "" "" "" "" "" "" "" ]; format-icons = ["" "" "" "" "" "" "" ""];
}; };
"group/hardware" = { "group/hardware" = {
@@ -121,7 +125,15 @@ in
rotate = 270; rotate = 270;
format = "{icon}"; format = "{icon}";
format-icons = [ format-icons = [
"󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" "󰝦"
"󰪞"
"󰪟"
"󰪠"
"󰪡"
"󰪢"
"󰪣"
"󰪤"
"󰪥"
]; ];
}; };
@@ -130,7 +142,15 @@ in
rotate = 270; rotate = 270;
format = "{icon}"; format = "{icon}";
format-icons = [ format-icons = [
"󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" "󰝦"
"󰪞"
"󰪟"
"󰪠"
"󰪡"
"󰪢"
"󰪣"
"󰪤"
"󰪥"
]; ];
max-length = 10; max-length = 10;
tooltip-format = "RAM: {used:0.1f} GB / {total:0.1f} GB"; tooltip-format = "RAM: {used:0.1f} GB / {total:0.1f} GB";
@@ -141,7 +161,15 @@ in
rotate = 270; rotate = 270;
format = "{icon}"; format = "{icon}";
format-icons = [ format-icons = [
"󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" "󰝦"
"󰪞"
"󰪟"
"󰪠"
"󰪡"
"󰪢"
"󰪣"
"󰪤"
"󰪥"
]; ];
tooltip-format = "CPU: {usage:0.1f}%"; tooltip-format = "CPU: {usage:0.1f}%";
}; };
@@ -182,15 +210,16 @@ in
format = "{:%I:%M %p}"; format = "{:%I:%M %p}";
tooltip = false; tooltip = false;
}; };
};
# ------------------------------------------
};
# ------------------------------------------
programs.waybar.settings.sideBar = { programs.waybar.settings.sideBar = {
layer = "bottom"; layer = "bottom";
output = if desktop then builtins.elemAt monitors 1 else builtins.elemAt monitors 0; output =
if desktop
then builtins.elemAt monitors 1
else builtins.elemAt monitors 0;
position = "right"; position = "right";
margin-top = 8; margin-top = 8;
margin-right = 5; margin-right = 5;
@@ -199,12 +228,15 @@ in
mode = "dock"; mode = "dock";
"gtk-layer-shell" = true; "gtk-layer-shell" = true;
modules-left = if desktop then [ modules-left =
"hyprland/workspaces" if desktop
] else [ then [
"group/brightness" "hyprland/workspaces"
"battery" ]
]; else [
"group/brightness"
"battery"
];
modules-center = [ modules-center = [
]; ];
modules-right = [ modules-right = [
@@ -257,7 +289,15 @@ in
tooltip-format-charging = "{capacity}%\nTil full: {time}"; tooltip-format-charging = "{capacity}%\nTil full: {time}";
format = "{icon}"; format = "{icon}";
format-icons = [ format-icons = [
"󰁺" "󰁻" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" "󰁺"
"󰁻"
"󰁽"
"󰁾"
"󰁿"
"󰂀"
"󰂁"
"󰂂"
"󰁹"
]; ];
format-charging = "󰂄"; format-charging = "󰂄";
}; };

View File

@@ -1,33 +1,27 @@
{ {scheme, ...}: let
scheme, bg = {
... darkester = scheme.base00;
}: darkest = scheme.base01;
darker = scheme.base02;
let dark = scheme.base03;
bg = { };
darkester = scheme.base00; fg = {
darkest = scheme.base01; lightester = scheme.base07;
darker = scheme.base02; lightest = scheme.base06;
dark = scheme.base03; lighter = scheme.base05;
}; light = scheme.base04;
fg = { };
lightester = scheme.base07; colors = {
lightest = scheme.base06; color0 = scheme.base08;
lighter = scheme.base05; color1 = scheme.base09;
light = scheme.base04; color2 = scheme.base0A;
}; color3 = scheme.base0B;
colors = { color4 = scheme.base0C;
color0 = scheme.base08; color5 = scheme.base0D;
color1 = scheme.base09; color6 = scheme.base0E;
color2 = scheme.base0A; color7 = scheme.base0F;
color3 = scheme.base0B; };
color4 = scheme.base0C; in {
color5 = scheme.base0D;
color6 = scheme.base0E;
color7 = scheme.base0F;
};
in
{
programs.waybar.style = '' programs.waybar.style = ''
* { * {
border: none; border: none;

View File

@@ -1,111 +1,109 @@
{ self, ...}: {self, ...}: {
{
home.file.".config/neofetch/config.conf".text = '' home.file.".config/neofetch/config.conf".text = ''
username=$(whoami) username=$(whoami)
name_length=''${#username} name_length=''${#username}
total_width=40 total_width=40
side_length=$(( (total_width - name_length - 2) / 2 )) side_length=$(( (total_width - name_length - 2) / 2 ))
top_line=$(printf "%.0s" $(seq 1 $side_length)) top_line=$(printf "%.0s" $(seq 1 $side_length))
top_line="$top_line $username " top_line="$top_line $username "
top_line+=$(printf "%.0s" $(seq 1 $side_length)) top_line+=$(printf "%.0s" $(seq 1 $side_length))
if (( (total_width - name_length) % 2 != 0 )); then if (( (total_width - name_length) % 2 != 0 )); then
top_line+="" top_line+=""
fi fi
print_info() { print_info() {
prin "$top_line" prin "$top_line"
info " " distro info " " distro
info " " kernel info " " kernel
info " " wm info " " wm
info " " shell info " " shell
info " " term info " " term
info " " term_font info " " term_font
info " 󰏗 " packages info " 󰏗 " packages
prin "" prin ""
info cols info cols
prin "\n \n \n \n \n ''${cl3} \n \n ''${cl5} \n \n ''${cl2} \n \n ''${cl6} \n \n ''${cl4} \n \n ''${cl1} \n \n ''${cl7} \n \n ''${cl0}" prin "\n \n \n \n \n ''${cl3} \n \n ''${cl5} \n \n ''${cl2} \n \n ''${cl6} \n \n ''${cl4} \n \n ''${cl1} \n \n ''${cl7} \n \n ''${cl0}"
} }
kernel_shorthand="on" kernel_shorthand="on"
distro_shorthand="on" distro_shorthand="on"
os_arch="off" os_arch="off"
uptime_shorthand="on" uptime_shorthand="on"
memory_percent="on" memory_percent="on"
package_managers="off" package_managers="off"
shell_path="off" shell_path="off"
shell_version="on" shell_version="on"
speed_type="bios_limit" speed_type="bios_limit"
speed_shorthand="on" speed_shorthand="on"
gtk_shorthand="on" gtk_shorthand="on"
gtk2="on" gtk2="on"
gtk3="on" gtk3="on"
colors=(distro) colors=(distro)
bold="on" bold="on"
underline_enabled="on" underline_enabled="on"
underline_char="-" underline_char="-"
separator=" " separator=" "
color_blocks="off" color_blocks="off"
block_range=(0 15) # Colorblocks block_range=(0 15) # Colorblocks
# Colors for custom colorblocks # Colors for custom colorblocks
magenta="\033[1;35m" magenta="\033[1;35m"
green="\033[1;32m" green="\033[1;32m"
white="\033[1;37m" white="\033[1;37m"
blue="\033[1;34m" blue="\033[1;34m"
red="\033[1;31m" red="\033[1;31m"
black="\033[1;40;30m" black="\033[1;40;30m"
yellow="\033[1;33m" yellow="\033[1;33m"
cyan="\033[1;36m" cyan="\033[1;36m"
reset="\033[0m" reset="\033[0m"
bgyellow="\033[1;43;33m" bgyellow="\033[1;43;33m"
bgwhite="\033[1;47;37m" bgwhite="\033[1;47;37m"
cl0="''${reset}" cl0="''${reset}"
cl1="''${magenta}" cl1="''${magenta}"
cl2="''${green}" cl2="''${green}"
cl3="''${white}" cl3="''${white}"
cl4="''${blue}" cl4="''${blue}"
cl5="''${red}" cl5="''${red}"
cl6="''${yellow}" cl6="''${yellow}"
cl7="''${cyan}" cl7="''${cyan}"
cl8="''${black}" cl8="''${black}"
cl9="''${bgyellow}" cl9="''${bgyellow}"
cl10="''${bgwhite}" cl10="''${bgwhite}"
block_width=4 block_width=4
block_height=1 block_height=1
bar_char_elapsed="-" bar_char_elapsed="-"
bar_char_total="=" bar_char_total="="
bar_border="on" bar_border="on"
bar_length=15 bar_length=15
bar_color_elapsed="distro" bar_color_elapsed="distro"
bar_color_total="distro" bar_color_total="distro"
cpu_display="on" cpu_display="on"
memory_display="on" memory_display="on"
battery_display="on" battery_display="on"
disk_display="on" disk_display="on"
image_backend="kitty" image_backend="kitty"
image_source="${self}/assets/images/nixos-logo.png" image_source="${self}/assets/images/nixos-logo.png"
image_size="250px" image_size="250px"
image_loop="off" image_loop="off"
aascii_distro="auto" aascii_distro="auto"
ascii_colors=(distro) ascii_colors=(distro)
ascii_bold="on" ascii_bold="on"
crop_mode="normal" crop_mode="normal"
crop_offset="center" crop_offset="center"
gap=2 gap=2
yoffset=0 yoffset=0
xoffset=0 xoffset=0
stdout="off" stdout="off"
''; '';
} }

View File

@@ -1,11 +1,11 @@
{ {
host, host,
pkgs, pkgs,
self, self,
inputs, inputs,
username, username,
wallpaper, wallpaper,
scheme, scheme,
config, config,
... ...
}: let }: let
@@ -27,8 +27,8 @@ in {
programs.home-manager.enable = true; programs.home-manager.enable = true;
imports = [ imports = [
./programs ./programs
./environment ./environment
./scripts ./scripts
./files.nix ./files.nix
]; ];
home = { home = {

View File

@@ -1,7 +1,7 @@
{ {
host, host,
nur, nur,
nixvim, nixvim,
self, self,
inputs, inputs,
username, username,
@@ -9,7 +9,7 @@
home-manager, home-manager,
... ...
}: let }: let
desktop = (host == "onagesson"); desktop = host == "onagesson";
desktop_modules = desktop_modules =
if desktop if desktop
then [(import ./gaming)] then [(import ./gaming)]
@@ -28,5 +28,5 @@ in {
++ [(import ./password-store.nix)] ++ [(import ./password-store.nix)]
++ [(import ./autojump.nix)] ++ [(import ./autojump.nix)]
++ [(import ./firefox.nix)] ++ [(import ./firefox.nix)]
++ desktop_modules; ++ desktop_modules;
} }

View File

@@ -1,8 +1,11 @@
{pkgs, scheme, ...}: { {
pkgs,
scheme,
...
}: {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
settings = { settings = {
confirm_os_window_close = 0; confirm_os_window_close = 0;
window_padding_width = 4; window_padding_width = 4;
@@ -31,40 +34,40 @@
"ctrl+shift+right" = "no_op"; "ctrl+shift+right" = "no_op";
}; };
extraConfig = '' extraConfig = ''
background #${scheme.base00} background #${scheme.base00}
foreground #${scheme.base05} foreground #${scheme.base05}
selection_background #${scheme.base05} selection_background #${scheme.base05}
selection_foreground #${scheme.base00} selection_foreground #${scheme.base00}
url_color #${scheme.base04} url_color #${scheme.base04}
cursor #${scheme.base05} cursor #${scheme.base05}
active_border_color #${scheme.base03} active_border_color #${scheme.base03}
inactive_border_color #${scheme.base01} inactive_border_color #${scheme.base01}
active_tab_background #${scheme.base00} active_tab_background #${scheme.base00}
active_tab_foreground #${scheme.base05} active_tab_foreground #${scheme.base05}
inactive_tab_background #${scheme.base01} inactive_tab_background #${scheme.base01}
inactive_tab_foreground #${scheme.base04} inactive_tab_foreground #${scheme.base04}
tab_bar_background #${scheme.base01} tab_bar_background #${scheme.base01}
# normal # normal
color0 #${scheme.base01} color0 #${scheme.base01}
color1 #${scheme.base08} color1 #${scheme.base08}
color2 #${scheme.base0B} color2 #${scheme.base0B}
color3 #${scheme.base0A} color3 #${scheme.base0A}
color4 #${scheme.base0D} color4 #${scheme.base0D}
color5 #${scheme.base0E} color5 #${scheme.base0E}
color6 #${scheme.base0C} color6 #${scheme.base0C}
color7 #${scheme.base05} color7 #${scheme.base05}
# bright # bright
color8 #${scheme.base03} color8 #${scheme.base03}
color9 #${scheme.base09} color9 #${scheme.base09}
color10 #${scheme.base01} color10 #${scheme.base01}
color11 #${scheme.base02} color11 #${scheme.base02}
color12 #${scheme.base04} color12 #${scheme.base04}
color13 #${scheme.base06} color13 #${scheme.base06}
color14 #${scheme.base0F} color14 #${scheme.base0F}
color15 #${scheme.base07} color15 #${scheme.base07}
''; '';
}; };
} }

View File

@@ -3,11 +3,11 @@
pkgs, pkgs,
}: }:
pkgs.writeShellScriptBin "splash" '' pkgs.writeShellScriptBin "splash" ''
#!/bin/bash #!/bin/bash
echo "NixOS kernel ver. $(uname -a | awk '{print $3}') x86_64 GNU/Linux" echo "NixOS kernel ver. $(uname -a | awk '{print $3}') x86_64 GNU/Linux"
date +"%A %B %-d %Y" date +"%A %B %-d %Y"
echo
echo " NixOS" | toilet -f 3d | lolcat -S 25
echo echo
echo " NixOS" | toilet -f 3d | lolcat -S 25
echo
'' ''

View File

@@ -1,83 +1,82 @@
{ pkgs, ... }: {pkgs, ...}:
pkgs.writeShellScriptBin "toolbelt" '' pkgs.writeShellScriptBin "toolbelt" ''
hostname=$(cat /etc/hostname) hostname=$(cat /etc/hostname)
cliphistory() { cliphistory() {
selection=$(cliphist list | fzf --preview=" selection=$(cliphist list | fzf --preview="
index=\$(echo {} | awk '{print \$1}'); \ index=\$(echo {} | awk '{print \$1}'); \
mime=\$(cliphist decode \$index | file -i -); \ mime=\$(cliphist decode \$index | file -i -); \
if echo \"\$mime\" | grep -q 'image'; then \ if echo \"\$mime\" | grep -q 'image'; then \
echo \$(cliphist list | rg \"^\$index\" | cut -d ' ' -f 2- | fmt -w 30); \ echo \$(cliphist list | rg \"^\$index\" | cut -d ' ' -f 2- | fmt -w 30); \
else \ else \
cliphist decode \"\$index\" | fmt -w 30; \ cliphist decode \"\$index\" | fmt -w 30; \
fi" --prompt="> " | awk '{print $1}') fi" --prompt="> " | awk '{print $1}')
[ -z "$selection" ] && return 1 [ -z "$selection" ] && return 1
cliphist decode "$selection" | wl-copy cliphist decode "$selection" | wl-copy
} }
btop_cmd() { btop_cmd() {
if [ "$hostname" = 'oganesson' ]; then if [ "$hostname" = 'oganesson' ]; then
hyprctl dispatch resizeactive 20% 140% && hyprctl dispatch resizeactive 20% 140% &&
moveonscreen --center && moveonscreen --center &&
btop && btop &&
hyprctl dispatch resizeactive exact 40% 25% && hyprctl dispatch resizeactive exact 40% 25% &&
moveonscreen moveonscreen
else else
hyprctl dispatch resizeactive exact 60% 68% && hyprctl dispatch resizeactive exact 60% 68% &&
moveonscreen --center && moveonscreen --center &&
btop && btop &&
hyprctl dispatch resizeactive exact 40% 25% && hyprctl dispatch resizeactive exact 40% 25% &&
moveonscreen moveonscreen
fi fi
} }
running=true running=true
declare -A commands=( declare -A commands=(
["Change Wallpaper"]="moveonscreen --center && if chpaper; then running=false; else moveonscreen; fi" ["Change Wallpaper"]="moveonscreen --center && if chpaper; then running=false; else moveonscreen; fi"
["Change System Color Scheme"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && if chscheme; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi" ["Change System Color Scheme"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && if chscheme; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi"
["Open System Monitor"]="hyprctl dispatch resizeactive 20% 140% && moveonscreen --center && btop_cmd && hyprctl dispatch resizeactive exact 40% 25% && moveonscreen" ["Open System Monitor"]="hyprctl dispatch resizeactive 20% 140% && moveonscreen --center && btop_cmd && hyprctl dispatch resizeactive exact 40% 25% && moveonscreen"
["Open Volume Controls"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && alsamixer && hyprctl dispatch resizeactive exact 40% 25% && moveonscreen" ["Open Volume Controls"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && alsamixer && hyprctl dispatch resizeactive exact 40% 25% && moveonscreen"
["Open Keyring"]="hyprctl dispatch resizeactive -300 0 && moveonscreen && if keyring; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi" ["Open Keyring"]="hyprctl dispatch resizeactive -300 0 && moveonscreen && if keyring; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi"
["View Clipboard History"]="hyprctl dispatch resizeactive 45% 120% && moveonscreen --center && if cliphistory;then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi" ["View Clipboard History"]="hyprctl dispatch resizeactive 45% 120% && moveonscreen --center && if cliphistory;then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi"
) )
ordered_commands=( ordered_commands=(
"Open Keyring" "Open Keyring"
"Open System Monitor" "Open System Monitor"
"Open Volume Controls" "Open Volume Controls"
"Change Wallpaper" "Change Wallpaper"
"Change System Color Scheme" "Change System Color Scheme"
"View Clipboard History" "View Clipboard History"
) )
# Use fzf to select a command with preview # Use fzf to select a command with preview
while $running; do while $running; do
selected_command=$(printf "%s\n" "''${ordered_commands[@]}" | fzf --preview=" selected_command=$(printf "%s\n" "''${ordered_commands[@]}" | fzf --preview="
cleaned_key=\$(echo {} | tr -d \"'\"); \ cleaned_key=\$(echo {} | tr -d \"'\"); \
echo \"Cleaned key: \$cleaned_key\"; \ echo \"Cleaned key: \$cleaned_key\"; \
declare -A descriptions=( declare -A descriptions=(
[\"Change Wallpaper\"]=\"Choose a wallpaper to switch to from the assets/wallpapers folder in the system flake directory. Requires rebuilding the system and restarting hyprpaper.\" [\"Change Wallpaper\"]=\"Choose a wallpaper to switch to from the assets/wallpapers folder in the system flake directory. Requires rebuilding the system and restarting hyprpaper.\"
[\"Change System Color Scheme\"]=\"Changes the base16 color scheme used by stylix to color system applications.\" [\"Change System Color Scheme\"]=\"Changes the base16 color scheme used by stylix to color system applications.\"
[\"Open System Monitor\"]=\"Opens a btop window.\" [\"Open System Monitor\"]=\"Opens a btop window.\"
[\"Open Volume Controls\"]=\"Opens alsamixer.\" [\"Open Volume Controls\"]=\"Opens alsamixer.\"
[\"Open Keyring\"]=\"Opens a fuzzy finder with all of the paths held in ~/.password-store. Selecting one uses pass to copy that password to the clipboard. Password is cleared from clipboard history after 45 seconds.\" [\"Open Keyring\"]=\"Opens a fuzzy finder with all of the paths held in ~/.password-store. Selecting one uses pass to copy that password to the clipboard. Password is cleared from clipboard history after 45 seconds.\"
[\"View Clipboard History\"]=\"Opens clipboard history. Selecting an item copies it to the clipboard.\" [\"View Clipboard History\"]=\"Opens clipboard history. Selecting an item copies it to the clipboard.\"
); \ ); \
if [[ -v descriptions[\$cleaned_key] ]]; then \ if [[ -v descriptions[\$cleaned_key] ]]; then \
clear; \ clear; \
echo \''${descriptions[\$cleaned_key]} | fmt -w 28; \ echo \''${descriptions[\$cleaned_key]} | fmt -w 28; \
else \ else \
clear; \ clear; \
echo \"No description available\"; \ echo \"No description available\"; \
fi" --prompt="> ") fi" --prompt="> ")
#Execute the selected command if selection is not empty #Execute the selected command if selection is not empty
if [[ -n $selected_command ]]; then if [[ -n $selected_command ]]; then
eval "''${commands[$selected_command]}" eval "''${commands[$selected_command]}"
else else
running=false running=false
fi fi
done done
'' ''

View File

@@ -1,7 +1,4 @@
{ {pkgs}:
pkgs,
}:
pkgs.writeShellScriptBin "viconf" '' pkgs.writeShellScriptBin "viconf" ''
#!/usr/bin/env bash #!/usr/bin/env bash

View File

@@ -41,19 +41,19 @@
self = self; self = self;
pkgs = pkgs; pkgs = pkgs;
}; };
moveonscreen = import ./wm-controls/moveonscreen.nix { pkgs = pkgs; }; moveonscreen = import ./wm-controls/moveonscreen.nix {pkgs = pkgs;};
toolbelt = import ./commands/toolbelt.nix { pkgs = pkgs; }; toolbelt = import ./commands/toolbelt.nix {pkgs = pkgs;};
viconf = import ./commands/viconf.nix { viconf = import ./commands/viconf.nix {
pkgs = pkgs; pkgs = pkgs;
}; };
chscheme = import ./wm-controls/chscheme.nix { chscheme = import ./wm-controls/chscheme.nix {
pkgs = pkgs; pkgs = pkgs;
}; };
chpaper = import ./wm-controls/chpaper.nix { pkgs = pkgs; }; chpaper = import ./wm-controls/chpaper.nix {pkgs = pkgs;};
in { in {
home.packages = [ home.packages = [
chpaper chpaper
chscheme chscheme
keyring keyring
garbage-collect garbage-collect
invoke invoke

View File

@@ -1,16 +1,15 @@
{ pkgs }: {pkgs}:
pkgs.writeShellScriptBin "chpaper" '' pkgs.writeShellScriptBin "chpaper" ''
paper="$\{self}/assets/wallpapers/$(find "$FLAKEPATH"/assets/wallpapers -exec basename {} \; | rg "\.\w+$" | fzf --preview "chafa -s 30x40 $FLAKEPATH/assets/wallpapers/{}")" paper="$\{self}/assets/wallpapers/$(find "$FLAKEPATH"/assets/wallpapers -exec basename {} \; | rg "\.\w+$" | fzf --preview "chafa -s 30x40 $FLAKEPATH/assets/wallpapers/{}")"
[ "$paper" = "$\{self}/assets/wallpapers/" ] && echo "Cancelling wallpaper change" && exit 1 [ "$paper" = "$\{self}/assets/wallpapers/" ] && echo "Cancelling wallpaper change" && exit 1
echo "$paper" | xargs -I {} sed -i '/wallpaper =/s|"[^"]*"|"{}"|' "$FLAKEPATH"/flake.nix echo "$paper" | xargs -I {} sed -i '/wallpaper =/s|"[^"]*"|"{}"|' "$FLAKEPATH"/flake.nix
echo "Successfully changed wallpaper. Rebuild now?" && \ echo "Successfully changed wallpaper. Rebuild now?" && \
select choice in "Yes" "No"; do select choice in "Yes" "No"; do
case $choice in case $choice in
"Yes") "Yes")
rebuild;pkill -9 hyprpaper;exit 0;; rebuild;pkill -9 hyprpaper;exit 0;;
"No") "No")
echo "Exiting...";exit 0;; echo "Exiting...";exit 0;;
esac esac
done done
'' ''

View File

@@ -1,42 +1,40 @@
{ {pkgs}:
pkgs,
}:
pkgs.writeShellScriptBin "chscheme" '' pkgs.writeShellScriptBin "chscheme" ''
selected_scheme=$(/usr/bin/env ls "$(nix-build '<nixpkgs>' -A base16-schemes)"/share/themes | \ selected_scheme=$(/usr/bin/env ls "$(nix-build '<nixpkgs>' -A base16-schemes)"/share/themes | \
sed 's/\.yaml//g' | \ sed 's/\.yaml//g' | \
fzf --preview 'cat $(nix-build "<nixpkgs>" -A base16-schemes)/share/themes/{}.yaml | \ fzf --preview 'cat $(nix-build "<nixpkgs>" -A base16-schemes)/share/themes/{}.yaml | \
while IFS=": " read -r key value; do \ while IFS=": " read -r key value; do \
if [[ $key =~ base0[0-9A-F] ]]; then \ if [[ $key =~ base0[0-9A-F] ]]; then \
clean_value=$(echo $value | tr -d "\""); \ clean_value=$(echo $value | tr -d "\""); \
r=$((16#''${clean_value:0:2})); \ r=$((16#''${clean_value:0:2})); \
g=$((16#''${clean_value:2:2})); \ g=$((16#''${clean_value:2:2})); \
b=$((16#''${clean_value:4:2})); \ b=$((16#''${clean_value:4:2})); \
printf "\033[48;2;%d;%d;%dm %-20s %s \033[0m\n" $r $g $b $key $clean_value; \ printf "\033[48;2;%d;%d;%dm %-20s %s \033[0m\n" $r $g $b $key $clean_value; \
fi; \ fi; \
done') done')
if [[ -z "$selected_scheme" ]]; then if [[ -z "$selected_scheme" ]]; then
echo "Aborting color scheme change." echo "Aborting color scheme change."
exit 1 exit 1
fi fi
echo "$selected_scheme" | xargs -I {} sed -i '/base16scheme\s*=\s*"/s/"[^"]*"/"{}"/' "$FLAKEPATH"/flake.nix echo "$selected_scheme" | xargs -I {} sed -i '/base16scheme\s*=\s*"/s/"[^"]*"/"{}"/' "$FLAKEPATH"/flake.nix
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Failed to change color scheme." echo "Failed to change color scheme."
exit 1 exit 1
fi fi
echo "Successfully changed system color scheme. Rebuild now?" echo "Successfully changed system color scheme. Rebuild now?"
select choice in "Yes" "No"; do select choice in "Yes" "No"; do
case $choice in case $choice in
"Yes") "Yes")
rebuild rebuild
exit 0 exit 0
;; ;;
"No") "No")
echo "Exiting..." echo "Exiting..."
exit 0 exit 0
;; ;;
esac esac
done done
'' ''

View File

@@ -1,77 +1,76 @@
{ pkgs }: {pkgs}:
pkgs.writeShellScriptBin "moveonscreen" '' pkgs.writeShellScriptBin "moveonscreen" ''
center_window=false center_window=false
if [[ $1 == "--center" ]]; then if [[ $1 == "--center" ]]; then
center_window=true center_window=true
fi fi
cursor_pos=$(hyprctl cursorpos | sed 's/,//') cursor_pos=$(hyprctl cursorpos | sed 's/,//')
cursor_x=$(echo "$cursor_pos" | awk '{print $1}') cursor_x=$(echo "$cursor_pos" | awk '{print $1}')
cursor_y=$(echo "$cursor_pos" | awk '{print $2}') cursor_y=$(echo "$cursor_pos" | awk '{print $2}')
window_info=$(hyprctl activewindow -j) window_info=$(hyprctl activewindow -j)
window_width=$(echo "$window_info" | jq ".size[0]") window_width=$(echo "$window_info" | jq ".size[0]")
window_height=$(echo "$window_info" | jq ".size[1]") window_height=$(echo "$window_info" | jq ".size[1]")
if [ "$center_window" = true ]; then if [ "$center_window" = true ]; then
cursor_x=$((cursor_x - window_width / 2)) cursor_x=$((cursor_x - window_width / 2))
cursor_y=$((cursor_y - window_height / 2)) cursor_y=$((cursor_y - window_height / 2))
if (( cursor_x < 10 )); then if (( cursor_x < 10 )); then
cursor_x=10 cursor_x=10
fi fi
if (( cursor_y < 54 )); then if (( cursor_y < 54 )); then
cursor_y=54 cursor_y=54
fi fi
fi fi
monitors=$(hyprctl monitors -j) monitors=$(hyprctl monitors -j)
monitor_x_min=0 monitor_x_min=0
monitor_x_max=0 monitor_x_max=0
monitor_y_min=0 monitor_y_min=0
monitor_y_max=0 monitor_y_max=0
focused_monitor=-1 focused_monitor=-1
for ((i = 0; i < $(echo "$monitors" | jq 'length'); i++)); do for ((i = 0; i < $(echo "$monitors" | jq 'length'); i++)); do
mon_x=$(echo "$monitors" | jq ".[$i].x") mon_x=$(echo "$monitors" | jq ".[$i].x")
mon_y=$(echo "$monitors" | jq ".[$i].y") mon_y=$(echo "$monitors" | jq ".[$i].y")
mon_width=$(echo "$monitors" | jq ".[$i].width") mon_width=$(echo "$monitors" | jq ".[$i].width")
mon_height=$(echo "$monitors" | jq ".[$i].height") mon_height=$(echo "$monitors" | jq ".[$i].height")
is_focused=$(echo "$monitors" | jq ".[$i].focused") is_focused=$(echo "$monitors" | jq ".[$i].focused")
if [ "$is_focused" = true ]; then if [ "$is_focused" = true ]; then
monitor_x_min=$((mon_x + 10)) monitor_x_min=$((mon_x + 10))
monitor_x_max=$((mon_x + mon_width - 10)) monitor_x_max=$((mon_x + mon_width - 10))
monitor_y_min=$((mon_y + 10)) monitor_y_min=$((mon_y + 10))
monitor_y_max=$((mon_y + mon_height - 10)) monitor_y_max=$((mon_y + mon_height - 10))
focused_monitor=$i focused_monitor=$i
break break
fi fi
done done
if [ "$focused_monitor" -eq -1 ]; then if [ "$focused_monitor" -eq -1 ]; then
exit 1 exit 1
fi fi
if (( cursor_x < monitor_x_min )); then if (( cursor_x < monitor_x_min )); then
adjusted_x=$monitor_x_min adjusted_x=$monitor_x_min
elif (( cursor_x + window_width > monitor_x_max )); then elif (( cursor_x + window_width > monitor_x_max )); then
adjusted_x=$((monitor_x_max - window_width)) adjusted_x=$((monitor_x_max - window_width))
else else
adjusted_x=$cursor_x adjusted_x=$cursor_x
fi fi
if (( cursor_y < monitor_y_min )); then if (( cursor_y < monitor_y_min )); then
adjusted_y=$monitor_y_min adjusted_y=$monitor_y_min
elif (( cursor_y + window_height > monitor_y_max )); then elif (( cursor_y + window_height > monitor_y_max )); then
adjusted_y=$((monitor_y_max - window_height)) adjusted_y=$((monitor_y_max - window_height))
else else
adjusted_y=$cursor_y adjusted_y=$cursor_y
fi fi
hyprctl dispatch moveactive exact "$adjusted_x $adjusted_y" > /dev/null 2>&1 hyprctl dispatch moveactive exact "$adjusted_x $adjusted_y" > /dev/null 2>&1
'' ''

View File

@@ -1,3 +1,8 @@
{config,inputs,scheme,wallpaper,username,...}: {
config,
{} inputs,
scheme,
wallpaper,
username,
...
}: {}

View File

@@ -1,6 +1,9 @@
{ config, pkgs, username, ... }:
{ {
config,
pkgs,
username,
...
}: {
systemd.user.tmpfiles.users."${username}".rules = [ systemd.user.tmpfiles.users."${username}".rules = [
"d /home/${username}/media 0770 ${username} users -" "d /home/${username}/media 0770 ${username} users -"
"d /home/${username}/backup 0770 ${username} users -" "d /home/${username}/backup 0770 ${username} users -"
@@ -10,6 +13,4 @@
"d /home/${username}/inbox 0770 ${username} users -" "d /home/${username}/inbox 0770 ${username} users -"
"d /home/${username}/outbox 0770 ${username} users -" "d /home/${username}/outbox 0770 ${username} users -"
]; ];
} }

View File

@@ -6,12 +6,11 @@
username, username,
host, host,
... ...
}: { }: {
imports = [ imports = [
./hardware ./hardware
./software ./software
./environment ./environment
../home/home-manager.nix ../home/home-manager.nix
]; ];
} }

View File

@@ -1,15 +1,15 @@
{ {
inputs, inputs,
nixpkgs, nixpkgs,
nixvim, nixvim,
config, config,
self, self,
username, username,
host, host,
... ...
}: { }: {
imports = imports =
[(import ./sddm.nix)] [(import ./sddm.nix)]
++ [(import ./issue.nix)] ++ [(import ./issue.nix)]
++ [(import ./stylix.nix)]; ++ [(import ./stylix.nix)];
} }

View File

@@ -1,31 +1,29 @@
{ ... }: {...}: {
{
environment.etc."issue".text = '' environment.etc."issue".text = ''
\e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;81m
\e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;27m \e[38;5;81m \e[38;5;27m
\e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;81m
\e[38;5;27m\e[38;5;81m \e[38;5;27m \e[38;5;27m \e[38;5;81m \e[38;5;27m\e[38;5;81m \e[38;5;27m \e[38;5;27m \e[38;5;81m
\e[38;5;27m\e[38;5;81m \e[38;5;27m \e[38;5;27m \e[38;5;81m \e[38;5;27m\e[38;5;81m \e[38;5;27m \e[38;5;27m \e[38;5;81m
\e[38;5;81m \e[38;5;81m \e[38;5;27m \e[38;5;27m \e[38;5;81m \e[38;5;81m \e[38;5;81m \e[38;5;27m \e[38;5;27m \e[38;5;81m
\e[38;5;81m \e[38;5;81m\e[38;5;27m \e[38;5;27m \e[38;5;81m \e[38;5;81m \e[38;5;81m\e[38;5;27m \e[38;5;27m \e[38;5;81m
\e[38;5;81m \e[38;5;81m\e[38;5;27m \e[38;5;27m \e[38;5;81m \e[38;5;81m \e[38;5;81m\e[38;5;27m \e[38;5;27m \e[38;5;81m
\e[38;5;81m \e[38;5;27m \e[38;5;27m \e[38;5;27m \e[38;5;81m \e[38;5;81m \e[38;5;27m \e[38;5;27m \e[38;5;27m \e[38;5;81m
\e[38;5;81m\e[38;5;27m \e[38;5;27m \e[38;5;27m \e[38;5;81m \e[38;5;81m\e[38;5;27m \e[38;5;27m \e[38;5;27m \e[38;5;81m
\e[38;5;81m\e[38;5;27m \e[38;5;27m \e[38;5;27m \e[38;5;81m \e[38;5;81m\e[38;5;27m \e[38;5;27m \e[38;5;27m \e[38;5;81m
\e[38;5;81m \e[38;5;27m \e[38;5;27m \e[38;5;27m \e[38;5;81m \e[38;5;81m \e[38;5;27m \e[38;5;27m \e[38;5;27m \e[38;5;81m
\e[38;5;81m \e[38;5;27m\e[38;5;81m \e[38;5;27m \e[38;5;81m \e[38;5;81m \e[38;5;27m\e[38;5;81m \e[38;5;27m \e[38;5;81m
\e[38;5;81m \e[38;5;27m\e[38;5;81m \e[38;5;27m \e[38;5;81m \e[38;5;81m \e[38;5;27m\e[38;5;81m \e[38;5;27m \e[38;5;81m
\e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;81m
\e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;81m
\e[38;5;27m \e[38;5;81m \e[38;5;27m \e[38;5;81m
\e[1;32mSystem Maintainer\e[0m: Kyler Clay \e[1;32mSystem Maintainer\e[0m: Kyler Clay
\e[1;32mContact\e[0m: kylerclay@proton.me \e[1;32mContact\e[0m: kylerclay@proton.me
470-403-8522 470-403-8522
Run '\e[1;35mnixos-help\e[0m' for the NixOS manual. Run '\e[1;35mnixos-help\e[0m' for the NixOS manual.
Run '\e[1;35mHyprland\e[0m' to enter the desktop environment. Run '\e[1;35mHyprland\e[0m' to enter the desktop environment.
''; '';
} }

View File

@@ -4,15 +4,17 @@
config, config,
... ...
}: { }: {
environment.systemPackages = [( environment.systemPackages = [
pkgs.catppuccin-sddm.override { (
flavor = "mocha"; pkgs.catppuccin-sddm.override {
font = "JetBrains Mono Nerd Font"; flavor = "mocha";
fontSize = "14"; font = "JetBrains Mono Nerd Font";
loginBackground = true; fontSize = "14";
background = "${self}/assets/wallpapers/dark-waves.jpg"; loginBackground = true;
} background = "${self}/assets/wallpapers/dark-waves.jpg";
)]; }
)
];
services.displayManager.sddm = { services.displayManager.sddm = {
enable = true; enable = true;
wayland.enable = true; wayland.enable = true;

View File

@@ -1,24 +1,22 @@
{ {
pkgs, pkgs,
scheme, scheme,
wallpaper, wallpaper,
... ...
}: }: {
{
stylix = { stylix = {
enable = true; enable = true;
base16Scheme = scheme; base16Scheme = scheme;
image = wallpaper; image = wallpaper;
polarity = "dark"; polarity = "dark";
autoEnable = true; autoEnable = true;
opacity.terminal = 0.5; opacity.terminal = 0.5;
targets = { targets = {
console.enable = true; console.enable = true;
feh.enable = true; feh.enable = true;
grub.enable = true; grub.enable = true;
gtk.enable = true; gtk.enable = true;
nixos-icons.enable = true; nixos-icons.enable = true;
}; };
cursor = { cursor = {
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
@@ -37,12 +35,12 @@
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
name = "JetBrains Mono Nerd Font"; name = "JetBrains Mono Nerd Font";
}; };
sizes = { sizes = {
desktop = 10; desktop = 10;
applications = 14; applications = 14;
terminal = 14; terminal = 14;
popups = 16; popups = 16;
}; };
}; };
}; };
} }

View File

@@ -1,16 +1,14 @@
{ {
inputs, inputs,
nixpkgs, nixpkgs,
nixvim, nixvim,
config, config,
self, self,
username, username,
host, host,
... ...
}: { }: {
imports = imports =
[( import ./bootloader.nix )] [(import ./bootloader.nix)]
++ [( import ./network.nix )]; ++ [(import ./network.nix)];
} }

View File

@@ -1,8 +1,6 @@
{host, ...}: {host, ...}: let
let desktop = host == "oganesson";
desktop = (host == "oganesson"); in {
in
{
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
hostName = hostName =

View File

@@ -6,18 +6,17 @@
username, username,
host, host,
... ...
}: }: let
let desktop = host == "oganesson";
desktop = (host == "oganesson"); desktop_modules =
desktop_modules = if desktop then if desktop
[(import ./virtualization.nix)] ++ [(import ./gaming)] then [(import ./virtualization.nix)] ++ [(import ./gaming)]
else []; else [];
in in {
{
imports = imports =
[(import ./packages.nix)] [(import ./packages.nix)]
++ [(import ./programs.nix)] ++ [(import ./programs.nix)]
++ [(import ./services.nix)] ++ [(import ./services.nix)]
++ [(import ./nixvim)] ++ [(import ./nixvim)]
++ desktop_modules; ++ desktop_modules;
} }

View File

@@ -1,7 +1,5 @@
{ ... }: {...}: {
imports =
{ [(import ./steam.nix)]
imports = ++ [(import ./gaming_pkgs.nix)];
[(import ./steam.nix)]
++ [(import ./gaming_pkgs.nix)];
} }

View File

@@ -1,7 +1,5 @@
{ pkgs, ... }: {pkgs, ...}: {
environment.systemPackages = with pkgs; [
{ snes9x-gtk
environment.systemPackages = with pkgs; [ ];
snes9x-gtk
];
} }

View File

@@ -3,10 +3,10 @@
pkgs, pkgs,
... ...
}: { }: {
imports = [ imports = [
./plugins ./plugins
./options.nix ./options.nix
./keymaps.nix ./keymaps.nix
./autocmd.nix ./autocmd.nix
]; ];
} }

View File

@@ -1,28 +1,30 @@
{ scheme, config, ... }:
{ {
scheme,
config,
...
}: {
programs.nixvim = { programs.nixvim = {
colorschemes.base16 = { colorschemes.base16 = {
enable = true; enable = true;
#colorscheme = { #colorscheme = {
# base00 = "#${scheme.base00}"; # base00 = "#${scheme.base00}";
# base01 = "#${scheme.base01}"; # base01 = "#${scheme.base01}";
# base02 = "#${scheme.base02}"; # base02 = "#${scheme.base02}";
# base03 = "#${scheme.base03}"; # base03 = "#${scheme.base03}";
# base04 = "#${scheme.base04}"; # base04 = "#${scheme.base04}";
# base05 = "#${scheme.base05}"; # base05 = "#${scheme.base05}";
# base06 = "#${scheme.base06}"; # base06 = "#${scheme.base06}";
# base07 = "#${scheme.base07}"; # base07 = "#${scheme.base07}";
# base08 = "#${scheme.base08}"; # base08 = "#${scheme.base08}";
# base09 = "#${scheme.base09}"; # base09 = "#${scheme.base09}";
# base0A = "#${scheme.base0A}"; # base0A = "#${scheme.base0A}";
# base0B = "#${scheme.base0B}"; # base0B = "#${scheme.base0B}";
# base0C = "#${scheme.base0C}"; # base0C = "#${scheme.base0C}";
# base0D = "#${scheme.base0D}"; # base0D = "#${scheme.base0D}";
# base0E = "#${scheme.base0E}"; # base0E = "#${scheme.base0E}";
# base0F = "#${scheme.base0F}"; # base0F = "#${scheme.base0F}";
#}; #};
}; };
enable = true; enable = true;
diagnostics.signs = false; diagnostics.signs = false;
extraConfigLua = '' extraConfigLua = ''

View File

@@ -1,16 +1,16 @@
{ {
imports = [ imports = [
./alpha.nix ./alpha.nix
./haskell.nix ./haskell.nix
./vim-matchup.nix ./vim-matchup.nix
./coq.nix ./coq.nix
./barbar.nix ./barbar.nix
./cmp.nix ./cmp.nix
./lsp.nix ./lsp.nix
./lualine.nix ./lualine.nix
./plugins.nix ./plugins.nix
./nvim-tree.nix ./nvim-tree.nix
./telescope.nix ./telescope.nix
./extra_plugins.nix ./extra_plugins.nix
]; ];
} }

View File

@@ -39,13 +39,13 @@
}; };
}) })
#(pkgs.vimUtils.buildVimPlugin { #(pkgs.vimUtils.buildVimPlugin {
#name = "nvim-ghost.nvim"; #name = "nvim-ghost.nvim";
#src = pkgs.fetchFromGitHub { #src = pkgs.fetchFromGitHub {
#owner = "subnut"; #owner = "subnut";
#repo = "nvim-ghost.nvim"; #repo = "nvim-ghost.nvim";
#rev = "67cc8f38c69d271af1c2430ff5099766f3550eb8"; #rev = "67cc8f38c69d271af1c2430ff5099766f3550eb8";
#hash = "sha256-XldDgPqVeIfUjaRLVUMp88eHBHLzoVgOmT3gupPs+ao="; #hash = "sha256-XldDgPqVeIfUjaRLVUMp88eHBHLzoVgOmT3gupPs+ao=";
#}; #};
#}) #})
]; ];
}; };

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }: { {pkgs, ...}: {
programs.nixvim = { programs.nixvim = {
extraPlugins = [ extraPlugins = [
(pkgs.vimUtils.buildVimPlugin { (pkgs.vimUtils.buildVimPlugin {
name = "haskell-tools.nvim"; name = "haskell-tools.nvim";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "mrcjkb"; owner = "mrcjkb";
@@ -10,9 +10,9 @@
hash = "sha256-f+M35EwAlHwjJ2Xs2u9FLnyH0FJT22D0LLShDXCbEEs="; hash = "sha256-f+M35EwAlHwjJ2Xs2u9FLnyH0FJT22D0LLShDXCbEEs=";
}; };
}) })
]; ];
plugins = { plugins = {
haskell-scope-highlighting.enable = true; haskell-scope-highlighting.enable = true;
}; };
}; };
} }

View File

@@ -14,10 +14,10 @@
nil_ls.enable = true; nil_ls.enable = true;
pyright.enable = true; pyright.enable = true;
sqls.enable = true; sqls.enable = true;
hls = { hls = {
enable = true; enable = true;
installGhc = true; installGhc = true;
}; };
}; };
}; };
}; };

View File

@@ -1,29 +1,29 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins = { plugins = {
dap = { dap = {
enable = true; enable = true;
extensions.dap-ui.enable = true; extensions.dap-ui.enable = true;
}; };
nix.enable = true; nix.enable = true;
neoscroll.enable = true; neoscroll.enable = true;
endwise.enable = true; endwise.enable = true;
firenvim.enable = true; firenvim.enable = true;
floaterm.enable = true; floaterm.enable = true;
fugitive.enable = true; fugitive.enable = true;
gitsigns.enable = true; gitsigns.enable = true;
indent-blankline.enable = true; indent-blankline.enable = true;
lastplace.enable = true; lastplace.enable = true;
markdown-preview.enable = true; markdown-preview.enable = true;
marks.enable = true; marks.enable = true;
nvim-surround.enable = true; nvim-surround.enable = true;
rainbow-delimiters.enable = true; rainbow-delimiters.enable = true;
render-markdown.enable = true; render-markdown.enable = true;
rustaceanvim.enable = true; rustaceanvim.enable = true;
treesitter.enable = true; treesitter.enable = true;
trim.enable = true; trim.enable = true;
trouble.enable = true; trouble.enable = true;
web-devicons.enable = true; web-devicons.enable = true;
}; };
}; };
} }

View File

@@ -9,7 +9,7 @@
alsa-utils alsa-utils
bc bc
cava cava
cabal-install cabal-install
clang clang
clang-tools clang-tools
cliphist cliphist

View File

@@ -1,4 +1,4 @@
{pkgs, ...}: { {...}: {
services = { services = {
pipewire = { pipewire = {
enable = true; enable = true;
@@ -11,6 +11,9 @@
dbus.enable = true; dbus.enable = true;
mullvad-vpn.enable = true; mullvad-vpn.enable = true;
blueman.enable = true; blueman.enable = true;
openssh.enable = true; openssh = {
enable = true;
allowSFTP = true;
};
}; };
} }