(desktop) Gen 494: reformatted several files using alejandra

This commit is contained in:
pagedMov
2024-10-15 20:16:32 -04:00
parent 1441353258
commit bd1add14bb
98 changed files with 6440 additions and 3256 deletions

4
flake.lock generated
View File

@@ -870,7 +870,7 @@
},
"locked": {
"lastModified": 1,
"narHash": "sha256-wk+pdZUCu13qvhHBrycwrvGnRUaf6dbLchr3yF96C1c=",
"narHash": "sha256-+aYqfRtAoaA4wqPfy4j2biNTVj2TtEmmHXDKOzNoU6g=",
"path": "./pkgs/nixvim",
"type": "path"
},
@@ -1016,7 +1016,7 @@
},
"locked": {
"lastModified": 1,
"narHash": "sha256-S3crmqg/CDKf+QTwnZUR6udyjsvqS0P0y56wGuJmOno=",
"narHash": "sha256-G8k9Ue2ZggJXD17cDXQubY+b4utp2YLnSpQWe06mR4E=",
"path": "./pkgs/toilet",
"type": "path"
},

View File

@@ -43,12 +43,18 @@
toilet.url = "path:./pkgs/toilet";
};
outputs = { nixpkgs, nur, home-manager, self, nvim, toilet, ... }@inputs:
let
outputs = {
nixpkgs,
nur,
home-manager,
self,
nvim,
toilet,
...
} @ inputs: let
system = "x86_64-linux";
username = "pagedmov";
in
{
in {
nixosConfigurations = {
desktop = nixpkgs.lib.nixosSystem {
specialArgs = {

View File

@@ -1,7 +1,12 @@
{ host, inputs, username, nur, pkgs, self, ... }:
{
host,
inputs,
username,
nur,
pkgs,
self,
...
}: {
imports = [
./../../modules/sys
./hardware.nix
@@ -9,4 +14,3 @@
./steam.nix
];
}

View File

@@ -1,9 +1,13 @@
# 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, modulesPath, username, ... }:
{
config,
lib,
modulesPath,
username,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "uas" "sd_mod"];
@@ -11,24 +15,24 @@
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/a687e4e2-8665-43f1-9d62-3e3f21423579";
fileSystems."/" = {
device = "/dev/disk/by-uuid/a687e4e2-8665-43f1-9d62-3e3f21423579";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6EAD-2C48";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/6EAD-2C48";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
fileSystems."/home" =
{ device = "/dev/nvme0n1p5";
fileSystems."/home" = {
device = "/dev/nvme0n1p5";
fsType = "ext4";
};
fileSystems."/home/${username}/steamlib" =
{ device = "/dev/nvme0n1p1";
fileSystems."/home/${username}/steamlib" = {
device = "/dev/nvme0n1p1";
fsType = "ext4";
};

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
system.stateVersion = "24.05";
nixpkgs.config.allowUnfree = true;
nix = {

View File

@@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;

View File

@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
boot = {
kernelModules = ["acpi_call"];
extraModulePackages = with config.boot.kernelPackages;

View File

@@ -1,6 +1,12 @@
{ host, inputs, pkgs, config, self, username, ... }:
{
host,
inputs,
pkgs,
config,
self,
username,
...
}: {
imports = [
./../../modules/sys
./hardware.nix

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
environment = {
variables = {
XCURSOR_SIZE = "24";

View File

@@ -1,11 +1,15 @@
# 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 + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc"];
@@ -13,13 +17,13 @@
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/334f742b-460f-43f8-b819-33086adfa9fb";
fileSystems."/" = {
device = "/dev/disk/by-uuid/334f742b-460f-43f8-b819-33086adfa9fb";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/ECD9-F43B";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/ECD9-F43B";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};

View File

@@ -1,8 +1,5 @@
{ ... }:
{
{...}: {
services = {
keyd = {
enable = true;
keyboards.default = {

View File

@@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
system.stateVersion = "24.05";
nixpkgs.config.allowUnfree = true;
nix = {
@@ -16,10 +14,8 @@
};
};
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
powerManagement.cpuFreqGovernor = "performance";
}

View File

@@ -1,9 +1,13 @@
{ host, nur, self, inputs, username, config, home-manager, ... }:
{
host,
nur,
self,
inputs,
username,
config,
home-manager,
...
}: {
imports =
[(import ./programs/btop.nix)]
++ [(import ./programs/yazi.nix)]

View File

@@ -1,9 +1,11 @@
{ pkgs, inputs, ... }:
let
{
pkgs,
inputs,
...
}: let
nvim = inputs.nvim.packages."x86_64-linux".default;
toilet = inputs.toilet.packages."x86_64-linux".default;
in
{
in {
home.packages = with pkgs; [
gtk3
uhk-agent

View File

@@ -1,6 +1,8 @@
{ pkgs, config, ... }:
{
pkgs,
config,
...
}: {
fonts.fontconfig.enable = true;
home.packages = [
pkgs.nerdfonts

View File

@@ -1,9 +1,11 @@
{ pkgs, inputs, ... }:
let
{
pkgs,
inputs,
...
}: let
nvim = inputs.nvim.packages."x86_64-linux".default;
toilet = inputs.toilet.packages."x86_64-linux".default;
in
{
in {
home.packages = with pkgs; [
gtk3
uhk-agent

View File

@@ -1,9 +1,11 @@
{ pkgs, lib, inputs, ...}:
let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
in
{
pkgs,
lib,
inputs,
...
}: let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
in {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"spotify"

View File

@@ -1,10 +1,13 @@
{ lib, inputs, ... }:
{
lib,
inputs,
...
}: {
programs.starship = {
enable = true;
enableZshIntegration = false;
settings = {
settings =
{
add_newline = true;
right_format = "($custom)";
@@ -15,7 +18,6 @@
"$line_break[ > ](bold #89b4fa)"
];
username = {
show_always = true;
style_user = "bold white";
@@ -55,7 +57,7 @@
};
palette = "catppuccin_mocha";
} // builtins.fromTOML (builtins.readFile "${inputs.catppuccin-starship}/themes/mocha.toml");
}
// builtins.fromTOML (builtins.readFile "${inputs.catppuccin-starship}/themes/mocha.toml");
};
}

View File

@@ -1,6 +1,4 @@
{ self, ... }:
{
{self, ...}: {
programs.zoxide = {
enable = true;
enableZshIntegration = true;
@@ -133,6 +131,4 @@
scheck && runbg aplay ${self}/media/sound/sh-source.wav
'';
};
}

View File

@@ -1,6 +1,9 @@
{ nur, username, self, ... }:
{
nur,
username,
self,
...
}: {
programs.firefox = {
enable = true;
policies = {
@@ -26,25 +29,32 @@
profiles.${username} = {
name = "${username}";
bookmarks = [
{ name = "NixOS Options";
{
name = "NixOS Options";
url = "https://search.nixos.org/options";
}
{ name = "Home Manager Options";
{
name = "Home Manager Options";
url = "https://home-manager-options.extranix.com/";
}
{ name = "Nixvim Docs";
{
name = "Nixvim Docs";
url = "https://nix-community.github.io/nixvim/";
}
{ name = "Rust Manual";
{
name = "Rust Manual";
url = "https://doc.rust-lang.org/book/ch01-03-hello-cargo.html";
}
{ name = "ChatGPT";
{
name = "ChatGPT";
url = "https://chatgpt.com/";
}
{ name = "DataAnnotation";
{
name = "DataAnnotation";
url = "https://app.dataannotation.tech/users/sign_in";
}
{ name = "Nerd Fonts Cheatsheet";
{
name = "Nerd Fonts Cheatsheet";
url = "https://www.nerdfonts.com/cheat-sheet";
}
];

View File

@@ -1,9 +1,13 @@
{ inputs, host, ... }:
let
host_config = if (host == "desktop") then [ ./desktop.nix ] else [ ./laptop.nix ];
in
{
inputs,
host,
...
}: let
host_config =
if (host == "desktop")
then [./desktop.nix]
else [./laptop.nix];
in {
imports =
[(import ./hyprland.nix)]
++ [(import ./hyprpaper.nix)]

View File

@@ -1,9 +1,6 @@
{ username, ... }:
{
{username, ...}: {
wayland.windowManager.hyprland = {
settings = {
monitor = [
"DP-1, 1920x1080@144, 1920x0, 1"
"HDMI-A-1, 1920x1080, 0x0, 1"

View File

@@ -1,6 +1,8 @@
{ inputs, pkgs, ... }:
{
inputs,
pkgs,
...
}: {
home.packages = with pkgs; [
swaybg
inputs.hypr-contrib.packages.${pkgs.system}.grimblast

View File

@@ -1,6 +1,8 @@
{ host, username, ... }:
{
host,
username,
...
}: {
services.hyprpaper = {
enable = true;
settings = {
@@ -9,10 +11,13 @@
splash_offset = 2.0;
preload = ["/home/${username}/Pictures/Wallpapers/cat-leaves.png"];
wallpaper = if (host == "desktop") then [
wallpaper =
if (host == "desktop")
then [
"DP-1,/home/${username}/Pictures/Wallpapers/cat-leaves.png"
"HDMI-A-1,/home/${username}/Pictures/Wallpapers/cat-leaves.png"
] else [
]
else [
"eDP-1,/home/${username}/Pictures/Wallpapers/cat-leaves.png"
];
};

View File

@@ -1,9 +1,6 @@
{ username, ... }:
{
{username, ...}: {
wayland.windowManager.hyprland = {
settings = {
monitor = [
"eDP-1, 1920x1080@144, 1920x0, 1"
];

View File

@@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.autojump = {
enable = true;
enableZshIntegration = true;

View File

@@ -1,6 +1,4 @@
{ inputs, ... }:
{
{inputs, ...}: {
programs.bat = {
enable = true;
config = {

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.btop = {
enable = true;
@@ -17,5 +15,5 @@
};
};
home.packages = (with pkgs; [ nvtopPackages.intel ]);
home.packages = with pkgs; [nvtopPackages.intel];
}

View File

@@ -1,12 +1,16 @@
{ inputs, pkgs, ... }:
{
inputs,
pkgs,
...
}: {
programs.cava = {
enable = true;
};
# https://github.com/catppuccin/cava
home.file.".config/cava/config".text = ''
home.file.".config/cava/config".text =
''
# custom cava config
'' + builtins.readFile "${inputs.catppuccin-cava}/themes/mocha.cava";
''
+ builtins.readFile "${inputs.catppuccin-cava}/themes/mocha.cava";
}

View File

@@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.eza = {
enable = true;
enableZshIntegration = false;

View File

@@ -1,6 +1,7 @@
{ nur, username }:
{
nur,
username,
}: {
programs.firefox = {
enable = true;
policies = {
@@ -26,42 +27,54 @@
profiles.${username} = {
name = "${username}";
bookmarks = [
{ name = "Nix sites";
{
name = "Nix sites";
toolbar = true;
bookmarks = [
{ name = "NixOS Options";
{
name = "NixOS Options";
url = "https://search.nixos.org/options";
}
{ name = "Home Manager Options";
{
name = "Home Manager Options";
url = "https://home-manager-options.extranix.com/";
}
{ name = "Nixvim Docs";
{
name = "Nixvim Docs";
url = "https://nix-community.github.io/nixvim/";
}
{ name = "Noogle";
{
name = "Noogle";
url = "https://noogle.dev/";
}
{ name = "NixOS Wiki";
{
name = "NixOS Wiki";
url = "https://nixos.wiki/";
}
{ name = "NixOS Manual";
{
name = "NixOS Manual";
url = "https://nixos.org/manual/nixos/stable";
}
{ name = "Nixpkgs Reference";
{
name = "Nixpkgs Reference";
url = "https://nixos.org/manual/nixpkgs/stable";
}
];
}
{ name = "Rust Manual";
{
name = "Rust Manual";
url = "https://doc.rust-lang.org/book/ch01-03-hello-cargo.html";
}
{ name = "ChatGPT";
{
name = "ChatGPT";
url = "https://chatgpt.com/";
}
{ name = "DataAnnotation";
{
name = "DataAnnotation";
url = "https://app.dataannotation.tech/users/sign_in";
}
{ name = "Nerd Fonts Cheatsheet";
{
name = "Nerd Fonts Cheatsheet";
url = "https://www.nerdfonts.com/cheat-sheet";
}
];

View File

@@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.fuzzel = {
enable = true;
settings = {

View File

@@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.fzf = {
enable = true;
enableZshIntegration = true;

View File

@@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.git = {
enable = true;
userEmail = "pagedmov@gmail.com";

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.kitty = {
enable = true;

View File

@@ -1,9 +1,6 @@
{ username, ... }:
let
{username, ...}: let
home = "/home/${username}";
in
{
in {
programs.password-store = {
enable = true;
settings = {

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "compress" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "compress" ''
#!/usr/bin/env bash
if (( $# == 1 )) then
@@ -12,4 +13,4 @@ if (( $# == 1 )) then
else
echo "Wrong number of arguments..."
fi
'')
''

View File

@@ -1,9 +1,10 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "crs" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "crs" ''
#!/run/current-system/sw/bin/bash
cargo test && \
cargo run
'')
''

View File

@@ -1,11 +1,12 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "extract" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "extract" ''
#!/usr/bin/env bash
for i in "$@" ; do
tar -xvzf $i
break
done
'')
''

View File

@@ -1,8 +1,9 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "invoke" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "invoke" ''
#!/run/current-system/sw/bin/bash
nix run nixpkgs#$"@"
'')
''

View File

@@ -1,11 +1,12 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "keybinds" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "keybinds" ''
#!/usr/bin/env bash
config_file=~/.config/hypr/hyprland.conf
keybinds=$(grep -oP '(?<=bind=).*' $config_file)
keybinds=$(echo "$keybinds" | sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
rofi -dmenu -theme-str 'window {width: 50%;}' <<< "$keybinds"
'')
''

View File

@@ -1,10 +1,11 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "mcd" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "mcd" ''
#!/run/current-system/sw/bin/bash
mkdir -p "$1"
cd "$1" || exit
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "runbg" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "runbg" ''
#!/usr/bin/env bash
[ $# -eq 0 ] && { # $# is number of args
@@ -18,4 +19,4 @@ tty -s && exec </dev/null # if stdin is a terminal, redirect from null
tty -s <&1 && exec >/dev/null # if stdout is a terminal, redirect to null
tty -s <&2 && exec 2>&1 # stderr to stdout (which might not be null)
"$prog" "$@" & # $@ is all args
'')
''

View File

@@ -1,8 +1,9 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "scheck" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "scheck" ''
#!/run/current-system/sw/bin/bash
[ "$SOUNDS_ENABLED" -eq 1 ]
'')
''

View File

@@ -1,12 +1,12 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "splash" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "splash" ''
#!/bin/bash
echo "NixOS kernel ver. $(uname -a | awk '{print $3}') x86_64 GNU/Linux"
date +"%A %B %-d %Y"
echo -e "\033[38;2;0;180;205m$(toilet -t -f Slant.flf glasshouse)\033[0m"
echo
'')
''

View File

@@ -1,35 +1,117 @@
{ host, self, pkgs, ... }:
let
compress = (import ./commands/compress.nix { self = self; pkgs = pkgs;});
passhelper = (import ./wm-controls/passhelper.nix { self = self; pkgs = pkgs;});
crs = (import ./commands/crs.nix { self = self; pkgs = pkgs;});
extract = (import ./commands/extract.nix { self = self; pkgs = pkgs;});
invoke = (import ./commands/invoke.nix { self = self; pkgs = pkgs;});
splash = (import ./commands/splash.nix { self = self; pkgs = pkgs;});
scheck = (import ./commands/s_check.nix { self = self; pkgs = pkgs;});
runbg = (import ./commands/runbg.nix { self = self; pkgs = pkgs;});
mcd = (import ./commands/mcd.nix { self = self; pkgs = pkgs;});
garbage-collect = (import ./nix/garbage-collect.nix { self = self; pkgs = pkgs;});
homep = (import ./nix/homep.nix { self = self; pkgs = pkgs;});
homer = (import ./nix/homer.nix { self = self; pkgs = pkgs;});
nsp = (import ./nix/nsp.nix { self = self; pkgs = pkgs;});
nixr = (import ./nix/nixr.nix { self = self; pkgs = pkgs;});
nixp = (import ./nix/nixp.nix { self = self; pkgs = pkgs;});
hyprland = (import ./wm-controls/hyprland.nix { pkgs=pkgs; });
lofi = (import ./wm-controls/lofi.nix { self = self; pkgs = pkgs;});
music = (import ./wm-controls/music.nix { self = self; pkgs = pkgs;});
shutdown-script = (import ./wm-controls/shutdown-script.nix { self = self; pkgs = pkgs;});
switchmon = (import ./wm-controls/switchmon.nix { self = self; pkgs = pkgs;});
toggle_blur = (import ./wm-controls/toggle_blur.nix { self = self; pkgs = pkgs;});
toggle_float = (import ./wm-controls/toggle_float.nix { self = self; pkgs = pkgs;});
toggle_oppacity = (import ./wm-controls/toggle_oppacity.nix { self = self; pkgs = pkgs;});
toggle_waybar = (import ./wm-controls/toggle_waybar.nix { self = self; pkgs = pkgs;});
rebuild = (import ./nix/rebuild.nix { host = host; self = self; pkgs = pkgs;});
nixcommit = (import ./nix/nixcommit.nix { host = host; self = self; pkgs = pkgs;});
nixpush = (import ./nix/nixpush.nix { self = self; pkgs = pkgs;});
in
{
host,
self,
pkgs,
...
}: let
compress = import ./commands/compress.nix {
self = self;
pkgs = pkgs;
};
passhelper = import ./wm-controls/passhelper.nix {
self = self;
pkgs = pkgs;
};
crs = import ./commands/crs.nix {
self = self;
pkgs = pkgs;
};
extract = import ./commands/extract.nix {
self = self;
pkgs = pkgs;
};
invoke = import ./commands/invoke.nix {
self = self;
pkgs = pkgs;
};
splash = import ./commands/splash.nix {
self = self;
pkgs = pkgs;
};
scheck = import ./commands/s_check.nix {
self = self;
pkgs = pkgs;
};
runbg = import ./commands/runbg.nix {
self = self;
pkgs = pkgs;
};
mcd = import ./commands/mcd.nix {
self = self;
pkgs = pkgs;
};
garbage-collect = import ./nix/garbage-collect.nix {
self = self;
pkgs = pkgs;
};
homep = import ./nix/homep.nix {
self = self;
pkgs = pkgs;
};
homer = import ./nix/homer.nix {
self = self;
pkgs = pkgs;
};
nsp = import ./nix/nsp.nix {
self = self;
pkgs = pkgs;
};
nixr = import ./nix/nixr.nix {
self = self;
pkgs = pkgs;
};
nixp = import ./nix/nixp.nix {
self = self;
pkgs = pkgs;
};
hyprland = import ./wm-controls/hyprland.nix {pkgs = pkgs;};
lofi = import ./wm-controls/lofi.nix {
self = self;
pkgs = pkgs;
};
music = import ./wm-controls/music.nix {
self = self;
pkgs = pkgs;
};
shutdown-script = import ./wm-controls/shutdown-script.nix {
self = self;
pkgs = pkgs;
};
switchmon = import ./wm-controls/switchmon.nix {
self = self;
pkgs = pkgs;
};
toggle_blur = import ./wm-controls/toggle_blur.nix {
self = self;
pkgs = pkgs;
};
toggle_float = import ./wm-controls/toggle_float.nix {
self = self;
pkgs = pkgs;
};
toggle_oppacity = import ./wm-controls/toggle_oppacity.nix {
self = self;
pkgs = pkgs;
};
toggle_waybar = import ./wm-controls/toggle_waybar.nix {
self = self;
pkgs = pkgs;
};
rebuild = import ./nix/rebuild.nix {
host = host;
self = self;
pkgs = pkgs;
};
nixcommit = import ./nix/nixcommit.nix {
host = host;
self = self;
pkgs = pkgs;
};
nixpush = import ./nix/nixpush.nix {
self = self;
pkgs = pkgs;
};
in {
home.packages = [
compress
passhelper

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "garbage-collect" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "garbage-collect" ''
#!/run/current-system/sw/bin/bash
@@ -28,4 +29,4 @@ fi
total_freed=$(echo "$nix_freed + $rm_freed" | bc)
echo -e "System cleaning complete, freed \033[1;4;38;2;166;227;161m$total_freed MiB\033[0m in total"
scheck && runbg aplay "$HOME/media/sound/sys/rm.wav"
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "homep" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "homep" ''
#!/run/current-system/sw/bin/bash
# Ensure the package manifest is generated or updated
@@ -32,4 +33,4 @@ if [ -n "$selected_packages" ]; then
else
echo "No packages selected."
fi
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "homer" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "homer" ''
#!/run/current-system/sw/bin/bash
selected_packages=$(sed -n '/\[/,/\]/p' "$HOME/sysflakes/glasshouse-desktop/home/userpkgs.nix" | sed '1d;$d' | fzf -m)
@@ -26,4 +27,4 @@ fi
'')
''

View File

@@ -1,7 +1,9 @@
{ self, pkgs, host}:
pkgs.writeShellScriptBin "nixcommit" (''
{
self,
pkgs,
host,
}:
pkgs.writeShellScriptBin "nixcommit" ''
#!/run/current-system/sw/bin/bash
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
@@ -20,6 +22,7 @@ if [ -n "$diffcheck" ]; then
exit
fi
alejandra . &> /dev/null
git add .
# Automatic fixup commit to the most recent commit (HEAD~1)
@@ -43,4 +46,4 @@ fi
scheck && runbg aplay ${self}/media/sound/gitcommit.wav
builtin cd - || exit
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "nixp" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "nixp" ''
#!/run/current-system/sw/bin/bash
# Ensure the package manifest is generated or updated
@@ -32,4 +33,4 @@ if [ -n "$selected_packages" ]; then
else
echo "No packages selected."
fi
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "nixpush" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "nixpush" ''
#!/run/current-system/sw/bin/bash
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
@@ -21,4 +22,4 @@ echo "$commits"
git push
scheck && runbg aplay ${self}/media/sound/gitpush.wav
popd
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "nixr" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "nixr" ''
#!/run/current-system/sw/bin/bash
selected_packages=$(sed -n '/\[/,/\]/p' "$HOME/sysflakes/glasshouse-desktop/sys/packages.nix" | sed '1d;$d' | fzf -m)
@@ -26,4 +27,4 @@ fi
'')
''

View File

@@ -1,8 +1,9 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "nsp" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "nsp" ''
#!/run/current-system/sw/bin/bash
nix-shell -p "$@" --run zsh
'')
''

View File

@@ -1,7 +1,9 @@
{ host, self, pkgs }:
pkgs.writeShellScriptBin "rebuild" (''
{
host,
self,
pkgs,
}:
pkgs.writeShellScriptBin "rebuild" ''
#!/run/current-system/sw/bin/bash
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
@@ -9,7 +11,6 @@ set -e
pushd "$HOME/sysflakes"
nix flake update
git diff
sudo nixos-rebuild switch --flake "$HOME/sysflakes#${host}"
if [ $? -eq 0 ]; then
scheck && runbg aplay ${self}/media/sound/update.wav
@@ -17,4 +18,4 @@ else
scheck && runbg aplay ${self}/media/sound/error.wav
fi
popd
'')
''

View File

@@ -1,10 +1,8 @@
{pkgs, ...}:
pkgs.writeShellScriptBin "hyprland" (''
pkgs.writeShellScriptBin "hyprland" ''
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
exec Hyprland
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "lofi" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "lofi" ''
#!/usr/bin/env bash
if (ps aux | grep mpv | grep -v grep > /dev/null) then
@@ -9,4 +10,4 @@ if (ps aux | grep mpv | grep -v grep > /dev/null) then
else
runbg mpv --no-video https://www.youtube.com/live/jfKfPfyJRdk?si=OF0HKrYFFj33BzMo
fi
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "music" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "music" ''
#!/usr/bin/env bash
if (ps aux | grep audacious | grep -v grep > /dev/null) then
@@ -12,4 +13,4 @@ else
audtool playlist-repeat-status |grep "on" || audtool playlist-repeat-toggle
audtool playlist-shuffle-status|grep "on" || audtool playlist-shuffle-toggle
fi
'')
''

View File

@@ -1,6 +1,9 @@
{ self, pkgs, ... }:
pkgs.writeShellScriptBin "passhelper" (''
{
self,
pkgs,
...
}:
pkgs.writeShellScriptBin "passhelper" ''
#!/run/current-system/sw/bin/bash
# prevent multiple instances, conditional check happens in the hyprland bind
@@ -17,4 +20,4 @@ pass -c "$pass_string" | fmt -w 45
/run/current-system/sw/bin/rm /tmp/passhelperfile
sleep 0.5
exit 0
'')
''

View File

@@ -1,8 +1,9 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "power-menu" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "power-menu" ''
#!/usr/bin/env bash
rofi -show p -modi p:'rofi-power-menu' -theme-str 'window {width: 10em; height: 15em;} listview {lines: 5;}'
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "shutdown-script" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "shutdown-script" ''
#!/usr/bin/env zsh
respond="$(echo " Shutdown\n Restart\n Cancel" | rofi -dmenu)"
@@ -17,4 +18,4 @@ then
else
notify-send "cancel shutdown"
fi
'')
''

View File

@@ -1,8 +1,9 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "switchmon" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "switchmon" ''
#!/bin/zsh
hyprctl dispatch focusmonitor $(echo "$(hyprctl -j monitors)" | jq -r '.[] | select(.focused == false) | .name')
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "toggle_blur" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "toggle_blur" ''
#!/usr/bin/env bash
if hyprctl getoption decoration:blur:enabled | grep "int: 1" >/dev/null ; then
@@ -9,4 +10,4 @@ if hyprctl getoption decoration:blur:enabled | grep "int: 1" >/dev/null ; then
else
hyprctl keyword decoration:blur:enabled true >/dev/null
fi
'')
''

View File

@@ -1,10 +1,11 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "toggle_float" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "toggle_float" ''
#!/usr/bin/env bash
hyprctl dispatch togglefloating
hyprctl dispatch resizeactive exact 950 600
hyprctl dispatch centerwindow
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "toggle_oppacity" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "toggle_oppacity" ''
#!/usr/bin/env bash
if hyprctl getoption decoration:active_opacity | grep "float: 1" >/dev/null ; then
@@ -11,4 +12,4 @@ else
hyprctl keyword decoration:active_opacity 1 >/dev/null
hyprctl keyword decoration:inactive_opacity 1 >/dev/null
fi
'')
''

View File

@@ -1,7 +1,8 @@
{ self, pkgs }:
pkgs.writeShellScriptBin "toggle_waybar" (''
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "toggle_waybar" ''
#!/usr/bin/env bash
SERVICE=".waybar-wrapped"
@@ -12,4 +13,4 @@ then
else
runbg waybar
fi
'')
''

View File

@@ -1,7 +1,5 @@
{ pkgs, ... }:
{
home.packages = (with pkgs; [ swaynotificationcenter ]);
{pkgs, ...}: {
home.packages = with pkgs; [swaynotificationcenter];
xdg.configFile."swaync/style.css".source = ./style.css;
xdg.configFile."swaync/config.json".source = ./config.json;
}

View File

@@ -1,7 +1,6 @@
{ ... }:
{
imports = [ (import ./waybar.nix) ]
{...}: {
imports =
[(import ./waybar.nix)]
++ [(import ./settings.nix)]
++ [(import ./style.nix)];
}

View File

@@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.waybar.settings.mainBar = {
position = "top";
layer = "top";

View File

@@ -1,6 +1,5 @@
{ ... }:
let custom = {
{...}: let
custom = {
font = "JetBrainsMono Nerd Font";
font_size = "22px";
font_weight = "bold";
@@ -9,8 +8,7 @@ let custom = {
tertiary_accent = "#f5f5f5";
background = "#11111B";
};
in
{
in {
programs.waybar.style = ''
* {

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.waybar = {
enable = true;
};

View File

@@ -1,6 +1,12 @@
{ inputs, nixpkgs, config, self, username, host, ... }:
{
inputs,
nixpkgs,
config,
self,
username,
host,
...
}: {
imports =
[(import ./hardware/bootloader.nix)]
++ [(import ./hardware/network.nix)]

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;

View File

@@ -1,10 +1,10 @@
{ host, ... }:
{
{host, ...}: {
networking = {
networkmanager.enable = true;
hostName = if (host == "desktop") then
"argon" else "mercury";
hostName =
if (host == "desktop")
then "argon"
else "mercury";
hosts = {
"192.168.1.163" = ["glasshaus"];
"192.168.1.111" = ["argon"];

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
fonts.packages = with pkgs; [
times-newer-roman
nerdfonts

View File

@@ -1,7 +1,10 @@
{ pkgs, inputs, ... }:
{
pkgs,
inputs,
...
}: {
environment.systemPackages = with pkgs; [
alejandra
alsa-lib
alsa-utils
bc

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs = {
hyprland.enable = true;
zsh.enable = true;

View File

@@ -1,14 +1,19 @@
{ pkgs, self, config, ... }:
{
environment.systemPackages = [(
pkgs,
self,
config,
...
}: {
environment.systemPackages = [
(
pkgs.catppuccin-sddm.override {
flavor = "mocha";
font = "JetBrains Mono";
fontSize = "9";
background = "${self}/media/wallpapers/catppuccin/nixos-catppuccin.png";
}
)];
)
];
services.displayManager.sddm = {
enable = true;
wayland.enable = true;

View File

@@ -1,6 +1,4 @@
{ pkgs, ...}:
{
{pkgs, ...}: {
services = {
pipewire = {
enable = true;

View File

@@ -1,9 +1,14 @@
{ config, inputs, pkgs, username, self, host, ... }:
let
nur = config.nur;
in
{
config,
inputs,
pkgs,
username,
self,
host,
...
}: let
nur = config.nur;
in {
imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = {
useUserPackages = true;

View File

@@ -16,4 +16,3 @@
./autocmd.nix
];
}

View File

@@ -1,8 +1,7 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin { # vimwiki
(pkgs.vimUtils.buildVimPlugin {
# vimwiki
name = "vimwiki";
src = pkgs.fetchFromGitHub {
owner = "vimwiki";

View File

@@ -5,8 +5,14 @@
options = {
icons_enabled = true;
theme = "auto";
component_separators = {left = ""; right = "";};
section_separators = {left = ""; right = "";};
component_separators = {
left = "";
right = "";
};
section_separators = {
left = "";
right = "";
};
always_divide_middle = true;
globalstatus = false;
refresh = {

View File

@@ -3,7 +3,8 @@
enable = true;
hijackUnnamedBufferWhenOpening = false;
openOnSetup = false;
onAttach = { __raw = ''
onAttach = {
__raw = ''
function(bufnr)
local api = require('nvim-tree.api')
@@ -72,7 +73,8 @@ local api = require('nvim-tree.api')
vim.keymap.set('n', '<2-RightMouse>', api.tree.change_root_to_node, opts('CD'))
-- END_DEFAULT_ON_ATTACH
end
''; };
'';
};
view = {
side = "right";
centralizeSelection = true;

View File

@@ -14,8 +14,7 @@
};
};
outputs =
{
outputs = {
nixvim,
flake-parts,
pre-commit-hooks,
@@ -29,21 +28,18 @@
"x86_64-darwin"
];
perSystem =
{
perSystem = {
system,
pkgs,
self',
...
}:
let
}: let
nixvim' = nixvim.legacyPackages.${system};
nvim = nixvim'.makeNixvimWithModule {
inherit pkgs;
module = ./config;
};
in
{
in {
checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;

View File

@@ -5,8 +5,11 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, ... }@inputs:
let
outputs = {
self,
nixpkgs,
...
} @ inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};