(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": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-wk+pdZUCu13qvhHBrycwrvGnRUaf6dbLchr3yF96C1c=", "narHash": "sha256-+aYqfRtAoaA4wqPfy4j2biNTVj2TtEmmHXDKOzNoU6g=",
"path": "./pkgs/nixvim", "path": "./pkgs/nixvim",
"type": "path" "type": "path"
}, },
@@ -1016,7 +1016,7 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-S3crmqg/CDKf+QTwnZUR6udyjsvqS0P0y56wGuJmOno=", "narHash": "sha256-G8k9Ue2ZggJXD17cDXQubY+b4utp2YLnSpQWe06mR4E=",
"path": "./pkgs/toilet", "path": "./pkgs/toilet",
"type": "path" "type": "path"
}, },

View File

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

View File

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

View File

@@ -1,46 +1,50 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, username, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; config,
lib,
modulesPath,
username,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "uas" "sd_mod" ]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "uas" "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/a687e4e2-8665-43f1-9d62-3e3f21423579"; device = "/dev/disk/by-uuid/a687e4e2-8665-43f1-9d62-3e3f21423579";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/6EAD-2C48"; device = "/dev/disk/by-uuid/6EAD-2C48";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = ["fmask=0022" "dmask=0022"];
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/nvme0n1p5"; device = "/dev/nvme0n1p5";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/home/${username}/steamlib" = fileSystems."/home/${username}/steamlib" = {
{ device = "/dev/nvme0n1p1"; device = "/dev/nvme0n1p1";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [ ]; swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (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 # 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`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp14s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp14s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = { hardware = {

View File

@@ -1,13 +1,11 @@
{ pkgs, ... }: {pkgs, ...}: {
{
system.stateVersion = "24.05"; system.stateVersion = "24.05";
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix = { nix = {
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ]; experimental-features = ["nix-command" "flakes"];
substituters = [ "https://nix-gaming.cachix.org" ]; substituters = ["https://nix-gaming.cachix.org"];
}; };
gc = { gc = {
automatic = true; automatic = true;

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,30 +1,34 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/334f742b-460f-43f8-b819-33086adfa9fb"; device = "/dev/disk/by-uuid/334f742b-460f-43f8-b819-33086adfa9fb";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/ECD9-F43B"; device = "/dev/disk/by-uuid/ECD9-F43B";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = ["fmask=0022" "dmask=0022"];
}; };
swapDevices = [ ]; swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's

View File

@@ -1,12 +1,9 @@
{ ... }: {...}: {
{
services = { services = {
keyd = { keyd = {
enable = true; enable = true;
keyboards.default = { keyboards.default = {
ids = [ "*" ]; ids = ["*"];
settings.main = { settings.main = {
capslock = "esc"; capslock = "esc";
}; };
@@ -36,8 +33,8 @@
PLATFORM_PROFILE_ON_AC = "performance"; PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "performance"; PLATFORM_PROFILE_ON_BAT = "performance";
INTEL_GPU_MIN_FREQ_ON_AC=500; INTEL_GPU_MIN_FREQ_ON_AC = 500;
INTEL_GPU_MIN_FREQ_ON_BAT=500; INTEL_GPU_MIN_FREQ_ON_BAT = 500;
# INTEL_GPU_MAX_FREQ_ON_AC=0; # INTEL_GPU_MAX_FREQ_ON_AC=0;
# INTEL_GPU_MAX_FREQ_ON_BAT=0; # INTEL_GPU_MAX_FREQ_ON_BAT=0;
# INTEL_GPU_BOOST_FREQ_ON_AC=0; # INTEL_GPU_BOOST_FREQ_ON_AC=0;

View File

@@ -1,13 +1,11 @@
{ ... }: {...}: {
{
system.stateVersion = "24.05"; system.stateVersion = "24.05";
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix = { nix = {
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ]; experimental-features = ["nix-command" "flakes"];
substituters = [ "https://nix-gaming.cachix.org" ]; substituters = ["https://nix-gaming.cachix.org"];
}; };
gc = { gc = {
automatic = true; automatic = true;
@@ -16,10 +14,8 @@
}; };
}; };
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
powerManagement.cpuFreqGovernor = "performance"; powerManagement.cpuFreqGovernor = "performance";
} }

View File

@@ -1,29 +1,33 @@
{ host, nur, self, inputs, username, config, home-manager, ... }:
{ {
host,
nur,
self,
inputs,
username,
config,
home-manager,
...
}: {
imports = imports =
[ (import ./programs/btop.nix) ] [(import ./programs/btop.nix)]
++ [ (import ./programs/yazi.nix) ] ++ [(import ./programs/yazi.nix)]
++ [ (import ./programs/kitty.nix) ] ++ [(import ./programs/kitty.nix)]
++ [ (import ./programs/fuzzel.nix) ] ++ [(import ./programs/fuzzel.nix)]
++ [ (import ./programs/eza.nix) ] ++ [(import ./programs/eza.nix)]
++ [ (import ./programs/cava.nix) ] ++ [(import ./programs/cava.nix)]
++ [ (import ./programs/bat.nix) ] ++ [(import ./programs/bat.nix)]
++ [ (import ./programs/fzf.nix) ] ++ [(import ./programs/fzf.nix)]
++ [ (import ./programs/git.nix) ] ++ [(import ./programs/git.nix)]
++ [ (import ./programs/password-store.nix) ] ++ [(import ./programs/password-store.nix)]
++ [ (import ./programs/autojump.nix) ] ++ [(import ./programs/autojump.nix)]
++ [ (import ./environment/gtk.nix) ] ++ [(import ./environment/gtk.nix)]
++ [ (import ./environment/spicetify.nix) ] ++ [(import ./environment/spicetify.nix)]
++ [ (import ./environment/starship.nix) ] ++ [(import ./environment/starship.nix)]
++ [ (import ./environment/desktop_userpkgs.nix) ] ++ [(import ./environment/desktop_userpkgs.nix)]
++ [ (import ./environment/zshell.nix) ] ++ [(import ./environment/zshell.nix)]
++ [ (import ./firefox/firefox.nix) ] ++ [(import ./firefox/firefox.nix)]
++ [ (import ./hyprland) ] ++ [(import ./hyprland)]
++ [ (import ./scripts ) ] ++ [(import ./scripts)]
++ [ (import ./swaync/swaync.nix) ] ++ [(import ./swaync/swaync.nix)]
++ [ (import ./waybar) ]; ++ [(import ./waybar)];
} }

View File

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

View File

@@ -1,10 +1,12 @@
{ pkgs, config, ... }:
{ {
pkgs,
config,
...
}: {
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home.packages = [ home.packages = [
pkgs.nerdfonts pkgs.nerdfonts
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" "Noto" ]; }) (pkgs.nerdfonts.override {fonts = ["JetBrainsMono" "Noto"];})
pkgs.twemoji-color-font pkgs.twemoji-color-font
pkgs.noto-fonts-emoji pkgs.noto-fonts-emoji
]; ];

View File

@@ -1,9 +1,11 @@
{ pkgs, inputs, ... }: {
let pkgs,
inputs,
...
}: let
nvim = inputs.nvim.packages."x86_64-linux".default; nvim = inputs.nvim.packages."x86_64-linux".default;
toilet = inputs.toilet.packages."x86_64-linux".default; toilet = inputs.toilet.packages."x86_64-linux".default;
in in {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
gtk3 gtk3
uhk-agent 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: nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [ builtins.elem (lib.getName pkg) [
"spotify" "spotify"

View File

@@ -1,10 +1,13 @@
{ lib, inputs, ... }:
{ {
lib,
inputs,
...
}: {
programs.starship = { programs.starship = {
enable = true; enable = true;
enableZshIntegration = false; enableZshIntegration = false;
settings = { settings =
{
add_newline = true; add_newline = true;
right_format = "($custom)"; right_format = "($custom)";
@@ -15,7 +18,6 @@
"$line_break[ > ](bold #89b4fa)" "$line_break[ > ](bold #89b4fa)"
]; ];
username = { username = {
show_always = true; show_always = true;
style_user = "bold white"; style_user = "bold white";
@@ -29,7 +31,7 @@
character = { character = {
success_symbol = "[ -> ](bold green)"; success_symbol = "[ -> ](bold green)";
error_symbol = "[ -> ](bold red)"; error_symbol = "[ -> ](bold red)";
# error_symbol = "[ ](bold #89dceb)[ ✗](bold red)"; # error_symbol = "[ ](bold #89dceb)[ ✗](bold red)";
}; };
cmd_duration = { cmd_duration = {
@@ -55,7 +57,7 @@
}; };
palette = "catppuccin_mocha"; 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 = { programs.zoxide = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
@@ -22,7 +20,7 @@
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
plugins = [ "git" "fzf" ]; plugins = ["git" "fzf"];
}; };
enableCompletion = true; enableCompletion = true;
@@ -50,7 +48,7 @@
sr = "source ~/.zshrc"; sr = "source ~/.zshrc";
".." = "cd .."; ".." = "cd ..";
rm = "echo 'use \"gtp\" instead'"; 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";
zrc = "nvim $HOME/dots/zshell.nix"; zrc = "nvim $HOME/dots/zshell.nix";
@@ -133,6 +131,4 @@
scheck && runbg aplay ${self}/media/sound/sh-source.wav scheck && runbg aplay ${self}/media/sound/sh-source.wav
''; '';
}; };
} }

View File

@@ -1,13 +1,16 @@
{ nur, username, self, ... }:
{ {
nur,
username,
self,
...
}: {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
policies = { policies = {
DisableTelemetry = true; DisableTelemetry = true;
DisableFirefoxStudies = true; DisableFirefoxStudies = true;
EnableTrackingProtection = { EnableTrackingProtection = {
Value= true; Value = true;
Locked = true; Locked = true;
Cryptomining = true; Cryptomining = true;
Fingerprinting = true; Fingerprinting = true;
@@ -26,25 +29,32 @@
profiles.${username} = { profiles.${username} = {
name = "${username}"; name = "${username}";
bookmarks = [ bookmarks = [
{ name = "NixOS Options"; {
name = "NixOS Options";
url = "https://search.nixos.org/options"; url = "https://search.nixos.org/options";
} }
{ name = "Home Manager Options"; {
name = "Home Manager Options";
url = "https://home-manager-options.extranix.com/"; url = "https://home-manager-options.extranix.com/";
} }
{ name = "Nixvim Docs"; {
name = "Nixvim Docs";
url = "https://nix-community.github.io/nixvim/"; 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"; url = "https://doc.rust-lang.org/book/ch01-03-hello-cargo.html";
} }
{ name = "ChatGPT"; {
name = "ChatGPT";
url = "https://chatgpt.com/"; url = "https://chatgpt.com/";
} }
{ name = "DataAnnotation"; {
name = "DataAnnotation";
url = "https://app.dataannotation.tech/users/sign_in"; url = "https://app.dataannotation.tech/users/sign_in";
} }
{ name = "Nerd Fonts Cheatsheet"; {
name = "Nerd Fonts Cheatsheet";
url = "https://www.nerdfonts.com/cheat-sheet"; url = "https://www.nerdfonts.com/cheat-sheet";
} }
]; ];

View File

@@ -1,11 +1,15 @@
{ 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 = imports =
[ (import ./hyprland.nix) ] [(import ./hyprland.nix)]
++ [ (import ./hyprpaper.nix) ] ++ [(import ./hyprpaper.nix)]
++ host_config; ++ host_config;
} }

View File

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

View File

@@ -1,6 +1,8 @@
{ inputs, pkgs, ... }:
{ {
inputs,
pkgs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
swaybg swaybg
inputs.hypr-contrib.packages.${pkgs.system}.grimblast inputs.hypr-contrib.packages.${pkgs.system}.grimblast
@@ -13,7 +15,7 @@
wayland wayland
direnv direnv
]; ];
systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ]; systemd.user.targets.hyprland-session.Unit.Wants = ["xdg-desktop-autostart.target"];
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
xwayland = { xwayland = {

View File

@@ -1,18 +1,23 @@
{ host, username, ... }:
{ {
host,
username,
...
}: {
services.hyprpaper = { services.hyprpaper = {
enable = true; enable = true;
settings = { settings = {
ipc = "on"; ipc = "on";
splash = false; splash = false;
splash_offset = 2.0; splash_offset = 2.0;
preload = [ "/home/${username}/Pictures/Wallpapers/cat-leaves.png" ]; 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" "DP-1,/home/${username}/Pictures/Wallpapers/cat-leaves.png"
"HDMI-A-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" "eDP-1,/home/${username}/Pictures/Wallpapers/cat-leaves.png"
]; ];
}; };

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.btop = { programs.btop = {
enable = true; 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 = { programs.cava = {
enable = true; enable = true;
}; };
# https://github.com/catppuccin/cava # https://github.com/catppuccin/cava
home.file.".config/cava/config".text = '' home.file.".config/cava/config".text =
''
# custom cava config # custom cava config
'' + builtins.readFile "${inputs.catppuccin-cava}/themes/mocha.cava"; ''
+ builtins.readFile "${inputs.catppuccin-cava}/themes/mocha.cava";
} }

View File

@@ -1,10 +1,8 @@
{ ... }: {...}: {
{
programs.eza = { programs.eza = {
enable = true; enable = true;
enableZshIntegration = false; enableZshIntegration = false;
extraOptions = [ "-1" "-h" "--group-directories-first" ]; extraOptions = ["-1" "-h" "--group-directories-first"];
icons = "auto"; icons = "auto";
git = true; git = true;
}; };

View File

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

View File

@@ -1,6 +1,4 @@
{ ... }: {...}: {
{
programs.fuzzel = { programs.fuzzel = {
enable = true; enable = true;
settings = { settings = {
@@ -9,7 +7,7 @@
line-height = 25; line-height = 25;
fields = "name,generic,comment,categories,filename,keywords"; fields = "name,generic,comment,categories,filename,keywords";
terminal = "kitty"; terminal = "kitty";
prompt = "' '" ; prompt = "' '";
icon-theme = "Papirus-Dark"; icon-theme = "Papirus-Dark";
layer = "top"; layer = "top";
lines = 10; lines = 10;

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,16 @@
{ self, pkgs }: {
self,
pkgs,
}:
pkgs.writeShellScriptBin "compress" ''
#!/usr/bin/env bash
if (( $# == 1 )) then
pkgs.writeShellScriptBin "compress" (''
#!/usr/bin/env bash
if (( $# == 1 )) then
# echo -ne "Archive name: " # echo -ne "Archive name: "
# read name # read name
# tar -cvzf "$name.tar.gz" $1 # tar -cvzf "$name.tar.gz" $1
tar -cvzf "$1.tar.gz" $1 tar -cvzf "$1.tar.gz" $1
else else
echo "Wrong number of arguments..." echo "Wrong number of arguments..."
fi fi
'') ''

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,21 +1,22 @@
{ self, pkgs }: {
self,
pkgs,
}:
pkgs.writeShellScriptBin "runbg" ''
#!/usr/bin/env bash
[ $# -eq 0 ] && { # $# is number of args
pkgs.writeShellScriptBin "runbg" (''
#!/usr/bin/env bash
[ $# -eq 0 ] && { # $# is number of args
echo "$(basename $0): missing command" >&2 echo "$(basename $0): missing command" >&2
exit 1 exit 1
} }
prog="$(which "$1")" # see below prog="$(which "$1")" # see below
[ -z "$prog" ] && { [ -z "$prog" ] && {
echo "$(basename $0): unknown command: $1" >&2 echo "$(basename $0): unknown command: $1" >&2
exit 1 exit 1
} }
shift # remove $1, now $prog, from args shift # remove $1, now $prog, from args
tty -s && exec </dev/null # if stdin is a terminal, redirect from null 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 <&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) tty -s <&2 && exec 2>&1 # stderr to stdout (which might not be null)
"$prog" "$@" & # $@ is all args "$prog" "$@" & # $@ is all args
'') ''

View File

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

View File

@@ -1,12 +1,12 @@
{ self, pkgs }: {
self,
pkgs,
pkgs.writeShellScriptBin "splash" ('' }:
#!/bin/bash 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
'')
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 = [ home.packages = [
compress compress
passhelper passhelper

View File

@@ -1,31 +1,32 @@
{ self, pkgs }: {
self,
pkgs,
}:
pkgs.writeShellScriptBin "garbage-collect" ''
#!/run/current-system/sw/bin/bash
pkgs.writeShellScriptBin "garbage-collect" ('' echo "This will delete all unused paths in the nix store and delete any files in the gtrash folder."
#!/run/current-system/sw/bin/bash echo -e "\033[1;4;38;2;243;139;168mThis process is irreversible.\033[0m Are you sure?"
select yn in "Yes" "No"; do
echo "This will delete all unused paths in the nix store and delete any files in the gtrash folder."
echo -e "\033[1;4;38;2;243;139;168mThis process is irreversible.\033[0m Are you sure?"
select yn in "Yes" "No"; do
case $yn in case $yn in
Yes ) echo "Sweeping system...";scheck && runbg aplay "$HOME/media/sound/sys/collectgarbage.wav";break;; Yes ) echo "Sweeping system...";scheck && runbg aplay "$HOME/media/sound/sys/collectgarbage.wav";break;;
No ) echo "Canceling garbage collection."; return;; No ) echo "Canceling garbage collection."; return;;
esac esac
done done
output=$(nix-collect-garbage | tee /dev/tty) output=$(nix-collect-garbage | tee /dev/tty)
nix_freed=$(echo "$output" | grep -oP '\d+(\.\d+)? MiB freed' | cut -d' ' -f1) nix_freed=$(echo "$output" | grep -oP '\d+(\.\d+)? MiB freed' | cut -d' ' -f1)
if [ "$(ls -A ~/.local/share/Trash/files/ 2>/dev/null)" ]; then if [ "$(ls -A ~/.local/share/Trash/files/ 2>/dev/null)" ]; then
rm_freed=$(du ~/.local/share/Trash/files 2> /dev/null | awk '{print $1}') rm_freed=$(du ~/.local/share/Trash/files 2> /dev/null | awk '{print $1}')
rm_freed=$(echo "scale=2; $rm_freed / 1000" | bc) rm_freed=$(echo "scale=2; $rm_freed / 1000" | bc)
/run/current-system/sw/bin/rm -rfv ~/.local/share/Trash/files /run/current-system/sw/bin/rm -rfv ~/.local/share/Trash/files
mkdir ~/.local/share/Trash/files mkdir ~/.local/share/Trash/files
else else
rm_freed="0" rm_freed="0"
fi fi
total_freed=$(echo "$nix_freed + $rm_freed" | bc) 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" 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" scheck && runbg aplay "$HOME/media/sound/sys/rm.wav"
'') ''

View File

@@ -1,20 +1,21 @@
{ self, pkgs }: {
self,
pkgs,
}:
pkgs.writeShellScriptBin "homep" ''
#!/run/current-system/sw/bin/bash
# Ensure the package manifest is generated or updated
pkgs.writeShellScriptBin "homep" ('' if [ ! -f "/tmp/nixpkgs_manifest.txt" ]; then
#!/run/current-system/sw/bin/bash
# Ensure the package manifest is generated or updated
if [ ! -f "/tmp/nixpkgs_manifest.txt" ]; then
echo "Generating Nixpkgs manifest..." echo "Generating Nixpkgs manifest..."
nix-env -qaP 2>/dev/null | awk '{print $1}' | sed 's/nixos\.//' > /tmp/nixpkgs_manifest.txt nix-env -qaP 2>/dev/null | awk '{print $1}' | sed 's/nixos\.//' > /tmp/nixpkgs_manifest.txt
fi fi
# Select packages using fzf with multi-select enabled # Select packages using fzf with multi-select enabled
selected_packages=$(cat /tmp/nixpkgs_manifest.txt | fzf -m) selected_packages=$(cat /tmp/nixpkgs_manifest.txt | fzf -m)
# Check if any packages were selected # Check if any packages were selected
if [ -n "$selected_packages" ]; then if [ -n "$selected_packages" ]; then
echo "$selected_packages" | while read -r package; do echo "$selected_packages" | while read -r package; do
# Append each selected package to the Nix config file # Append each selected package to the Nix config file
sed -i "/^\t]/i \ \t\t$package" "$HOME/sysflakes/glasshouse-desktop/home/userpkgs.nix" sed -i "/^\t]/i \ \t\t$package" "$HOME/sysflakes/glasshouse-desktop/home/userpkgs.nix"
@@ -29,7 +30,7 @@ if [ -n "$selected_packages" ]; then
esac esac
done done
else else
echo "No packages selected." echo "No packages selected."
fi fi
'') ''

View File

@@ -1,12 +1,13 @@
{ self, pkgs }: {
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)
pkgs.writeShellScriptBin "homer" ('' if [ -n "$selected_packages" ]; then
#!/run/current-system/sw/bin/bash
selected_packages=$(sed -n '/\[/,/\]/p' "$HOME/sysflakes/glasshouse-desktop/home/userpkgs.nix" | sed '1d;$d' | fzf -m)
if [ -n "$selected_packages" ]; then
echo "$selected_packages" | while read -r package; do echo "$selected_packages" | while read -r package; do
sed -i "/\b$package\b/d" "$HOME/sysflakes/glasshouse-desktop/home/userpkgs.nix" sed -i "/\b$package\b/d" "$HOME/sysflakes/glasshouse-desktop/home/userpkgs.nix"
echo "Removed $package from the Home Manager configuration." echo "Removed $package from the Home Manager configuration."
@@ -20,10 +21,10 @@ if [ -n "$selected_packages" ]; then
esac esac
done done
else else
echo "No packages removed." echo "No packages removed."
fi fi
'') ''

View File

@@ -1,29 +1,32 @@
{ self, pkgs, host}: {
self,
pkgs,
host,
}:
pkgs.writeShellScriptBin "nixcommit" ''
#!/run/current-system/sw/bin/bash
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
builtin cd "$HOME/sysflakes" || exit
nix flake update
pkgs.writeShellScriptBin "nixcommit" ('' if [ -n "$2" ]; then
#!/run/current-system/sw/bin/bash
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
builtin cd "$HOME/sysflakes" || exit
nix flake update
if [ -n "$2" ]; then
echo "too many arguments" echo "too many arguments"
exit exit
fi fi
diffcheck=$(git status | grep "working tree clean") diffcheck=$(git status | grep "working tree clean")
if [ -n "$diffcheck" ]; then if [ -n "$diffcheck" ]; then
scheck && runbg aplay ${self}/media/sound/warning.wav scheck && runbg aplay ${self}/media/sound/warning.wav
echo "Nothing to commit" echo "Nothing to commit"
exit exit
fi fi
git add . alejandra . &> /dev/null
git add .
# Automatic fixup commit to the most recent commit (HEAD~1) # Automatic fixup commit to the most recent commit (HEAD~1)
if [ -z "$1" ]; then if [ -z "$1" ]; then
commits=$(git log origin/$(git rev-parse --abbrev-ref HEAD)..HEAD --oneline) commits=$(git log origin/$(git rev-parse --abbrev-ref HEAD)..HEAD --oneline)
if [ -n "$commits" ]; then if [ -n "$commits" ]; then
git commit --fixup HEAD git commit --fixup HEAD
@@ -34,13 +37,13 @@ if [ -z "$1" ]; then
echo "No prior local commits to squash into, please provide a commit message" echo "No prior local commits to squash into, please provide a commit message"
exit exit
fi fi
else else
# Generate the system generation number # Generate the system generation number
gen=$(readlink /nix/var/nix/profiles/system | sed 's/.*system-\([0-9]*\)-link/\1/') gen=$(readlink /nix/var/nix/profiles/system | sed 's/.*system-\([0-9]*\)-link/\1/')
gen=$((gen + 1)) gen=$((gen + 1))
git commit -m "(${host}) Gen $gen: $1" git commit -m "(${host}) Gen $gen: $1"
fi fi
scheck && runbg aplay ${self}/media/sound/gitcommit.wav scheck && runbg aplay ${self}/media/sound/gitcommit.wav
builtin cd - || exit builtin cd - || exit
'') ''

View File

@@ -1,20 +1,21 @@
{ self, pkgs }: {
self,
pkgs,
}:
pkgs.writeShellScriptBin "nixp" ''
#!/run/current-system/sw/bin/bash
# Ensure the package manifest is generated or updated
pkgs.writeShellScriptBin "nixp" ('' if [ ! -f "/tmp/nixpkgs_manifest.txt" ]; then
#!/run/current-system/sw/bin/bash
# Ensure the package manifest is generated or updated
if [ ! -f "/tmp/nixpkgs_manifest.txt" ]; then
echo "Generating Nixpkgs manifest..." echo "Generating Nixpkgs manifest..."
nix-env -qaP 2>/dev/null | awk '{print $1}' | sed 's/nixos\.//' > /tmp/nixpkgs_manifest.txt nix-env -qaP 2>/dev/null | awk '{print $1}' | sed 's/nixos\.//' > /tmp/nixpkgs_manifest.txt
fi fi
# Select packages using fzf with multi-select enabled # Select packages using fzf with multi-select enabled
selected_packages=$(cat /tmp/nixpkgs_manifest.txt | fzf -m) selected_packages=$(cat /tmp/nixpkgs_manifest.txt | fzf -m)
# Check if any packages were selected # Check if any packages were selected
if [ -n "$selected_packages" ]; then if [ -n "$selected_packages" ]; then
echo "$selected_packages" | while read -r package; do echo "$selected_packages" | while read -r package; do
# Append each selected package to the Nix config file # Append each selected package to the Nix config file
sed -i "/^\t]/i \ \t\t$package" "$HOME/sysflakes/glasshouse-desktop/sys/packages.nix" sed -i "/^\t]/i \ \t\t$package" "$HOME/sysflakes/glasshouse-desktop/sys/packages.nix"
@@ -29,7 +30,7 @@ if [ -n "$selected_packages" ]; then
esac esac
done done
else else
echo "No packages selected." echo "No packages selected."
fi fi
'') ''

View File

@@ -1,24 +1,25 @@
{ self, pkgs }: {
self,
pkgs,
}:
pkgs.writeShellScriptBin "nixpush" ''
#!/run/current-system/sw/bin/bash
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
set -e
pushd "$HOME/sysflakes"
pkgs.writeShellScriptBin "nixpush" ('' commits=$(git log origin/$(git rev-parse --abbrev-ref HEAD)..HEAD --oneline)
#!/run/current-system/sw/bin/bash if [ -z "$commits" ]; then
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
set -e
pushd "$HOME/sysflakes"
commits=$(git log origin/$(git rev-parse --abbrev-ref HEAD)..HEAD --oneline)
if [ -z "$commits" ]; then
scheck && runbg aplay ${self}/media/sound/warning.wav scheck && runbg aplay ${self}/media/sound/warning.wav
echo "Nothing to push" echo "Nothing to push"
exit exit
fi fi
echo "Pushing the following commits upstream on branch '$(git branch | rg "\*" | awk '{print $2}')'" echo "Pushing the following commits upstream on branch '$(git branch | rg "\*" | awk '{print $2}')'"
echo "$commits" echo "$commits"
git push git push
scheck && runbg aplay ${self}/media/sound/gitpush.wav scheck && runbg aplay ${self}/media/sound/gitpush.wav
popd popd
'') ''

View File

@@ -1,12 +1,13 @@
{ self, pkgs }: {
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)
pkgs.writeShellScriptBin "nixr" ('' if [ -n "$selected_packages" ]; then
#!/run/current-system/sw/bin/bash
selected_packages=$(sed -n '/\[/,/\]/p' "$HOME/sysflakes/glasshouse-desktop/sys/packages.nix" | sed '1d;$d' | fzf -m)
if [ -n "$selected_packages" ]; then
echo "$selected_packages" | while read -r package; do echo "$selected_packages" | while read -r package; do
sed -i "/\b$package\b/d" "$HOME/sysflakes/glasshouse-desktop/sys/packages.nix" sed -i "/\b$package\b/d" "$HOME/sysflakes/glasshouse-desktop/sys/packages.nix"
echo "Removed $package from the Nix configuration." echo "Removed $package from the Nix configuration."
@@ -20,10 +21,10 @@ if [ -n "$selected_packages" ]; then
esac esac
done done
else else
echo "No packages removed." echo "No packages removed."
fi fi
'') ''

View File

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

View File

@@ -1,20 +1,21 @@
{ host, self, pkgs }: {
host,
self,
pkgs,
}:
pkgs.writeShellScriptBin "rebuild" ''
#!/run/current-system/sw/bin/bash
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
set -e
pushd "$HOME/sysflakes"
pkgs.writeShellScriptBin "rebuild" ('' nix flake update
#!/run/current-system/sw/bin/bash sudo nixos-rebuild switch --flake "$HOME/sysflakes#${host}"
if [ $? -eq 0 ]; then
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
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 scheck && runbg aplay ${self}/media/sound/update.wav
else else
scheck && runbg aplay ${self}/media/sound/error.wav scheck && runbg aplay ${self}/media/sound/error.wav
fi fi
popd popd
'') ''

View File

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

View File

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

View File

@@ -1,15 +1,16 @@
{ self, pkgs }: {
self,
pkgs,
}:
pkgs.writeShellScriptBin "music" ''
#!/usr/bin/env bash
if (ps aux | grep audacious | grep -v grep > /dev/null) then
pkgs.writeShellScriptBin "music" (''
#!/usr/bin/env bash
if (ps aux | grep audacious | grep -v grep > /dev/null) then
pkill audacious pkill audacious
else else
hyprctl dispatch exec "[workspace 5 silent] audacious -t ~/Music/playlist" hyprctl dispatch exec "[workspace 5 silent] audacious -t ~/Music/playlist"
sleep 0.5 sleep 0.5
audtool playlist-repeat-status |grep "on" || audtool playlist-repeat-toggle audtool playlist-repeat-status |grep "on" || audtool playlist-repeat-toggle
audtool playlist-shuffle-status|grep "on" || audtool playlist-shuffle-toggle audtool playlist-shuffle-status|grep "on" || audtool playlist-shuffle-toggle
fi fi
'') ''

View File

@@ -1,20 +1,23 @@
{ self, pkgs, ... }: {
self,
pkgs.writeShellScriptBin "passhelper" ('' pkgs,
#!/run/current-system/sw/bin/bash ...
}:
pkgs.writeShellScriptBin "passhelper" ''
#!/run/current-system/sw/bin/bash
# prevent multiple instances, conditional check happens in the hyprland bind # prevent multiple instances, conditional check happens in the hyprland bind
touch /tmp/passhelperfile touch /tmp/passhelperfile
trap "[ -f /tmp/passhelperfile ] && /run/current-system/sw/bin/rm /tmp/passhelperfile" EXIT SIGHUP SIGINT trap "[ -f /tmp/passhelperfile ] && /run/current-system/sw/bin/rm /tmp/passhelperfile" EXIT SIGHUP SIGINT
# get passwords from password store, remove .password store/ prefix and .gpg suffix, exlude .gpg-id file, open results in fzf # get passwords from password store, remove .password store/ prefix and .gpg suffix, exlude .gpg-id file, open results in fzf
pass_string=$(find $HOME/.password-store -type f | sed 's|.*/.password-store/||; s|\.gpg$||' | sed 's|^\([^/]*\)|\x1b[32m\1\x1b[0m|' | rg -v "\.git|.gpg-id" | sort -r | fzf --border --border-label="$(whoami)'s keyring" --ansi --layout=reverse) pass_string=$(find $HOME/.password-store -type f | sed 's|.*/.password-store/||; s|\.gpg$||' | sed 's|^\([^/]*\)|\x1b[32m\1\x1b[0m|' | rg -v "\.git|.gpg-id" | sort -r | fzf --border --border-label="$(whoami)'s keyring" --ansi --layout=reverse)
[ $? = 0 ] || { [ -f /tmp/passhelperfile ] && /run/current-system/sw/bin/rm /tmp/passhelperfile; exit 1; } [ $? = 0 ] || { [ -f /tmp/passhelperfile ] && /run/current-system/sw/bin/rm /tmp/passhelperfile; exit 1; }
# pass it through fmt for soft word wrapping # pass it through fmt for soft word wrapping
pass -c "$pass_string" | fmt -w 45 pass -c "$pass_string" | fmt -w 45
/run/current-system/sw/bin/rm /tmp/passhelperfile /run/current-system/sw/bin/rm /tmp/passhelperfile
sleep 0.5 sleep 0.5
exit 0 exit 0
'') ''

View File

@@ -1,8 +1,9 @@
{ self, pkgs }: {
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;}'
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,20 +1,21 @@
{ self, pkgs }: {
self,
pkgs,
}:
pkgs.writeShellScriptBin "shutdown-script" ''
#!/usr/bin/env zsh
respond="$(echo " Shutdown\n Restart\n Cancel" | rofi -dmenu)"
pkgs.writeShellScriptBin "shutdown-script" ('' if [ $respond = ' Shutdown' ]
#!/usr/bin/env zsh then
respond="$(echo " Shutdown\n Restart\n Cancel" | rofi -dmenu)"
if [ $respond = ' Shutdown' ]
then
echo "shutdown" echo "shutdown"
shutdown now shutdown now
elif [ $respond = ' Restart' ] elif [ $respond = ' Restart' ]
then then
echo "restart" echo "restart"
reboot reboot
else else
notify-send "cancel shutdown" notify-send "cancel shutdown"
fi fi
'') ''

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,15 +1,16 @@
{ self, pkgs }: {
self,
pkgs,
}:
pkgs.writeShellScriptBin "toggle_waybar" ''
#!/usr/bin/env bash
SERVICE=".waybar-wrapped"
pkgs.writeShellScriptBin "toggle_waybar" ('' if pgrep -x "$SERVICE" >/dev/null
#!/usr/bin/env bash then
SERVICE=".waybar-wrapped"
if pgrep -x "$SERVICE" >/dev/null
then
pkill -9 waybar pkill -9 waybar
else else
runbg waybar runbg waybar
fi fi
'') ''

View File

@@ -1,7 +1,5 @@
{ pkgs, ... }: {pkgs, ...}: {
home.packages = with pkgs; [swaynotificationcenter];
{
home.packages = (with pkgs; [ swaynotificationcenter ]);
xdg.configFile."swaync/style.css".source = ./style.css; xdg.configFile."swaync/style.css".source = ./style.css;
xdg.configFile."swaync/config.json".source = ./config.json; 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 ./settings.nix) ] ++ [(import ./style.nix)];
++ [ (import ./style.nix) ];
} }

View File

@@ -1,23 +1,21 @@
{ ... }: {...}: {
{
programs.waybar.settings.mainBar = { programs.waybar.settings.mainBar = {
position= "top"; position = "top";
layer= "top"; layer = "top";
height= 5; height = 5;
margin-top= 0; margin-top = 0;
margin-bottom= 0; margin-bottom = 0;
margin-left= 0; margin-left = 0;
margin-right= 0; margin-right = 0;
modules-left= [ modules-left = [
"custom/launcher" "custom/launcher"
"custom/separator" "custom/separator"
"hyprland/workspaces" "hyprland/workspaces"
]; ];
modules-center= [ modules-center = [
"clock" "clock"
]; ];
modules-right= [ modules-right = [
"tray" "tray"
"custom/separator" "custom/separator"
"cpu" "cpu"
@@ -30,54 +28,54 @@
"custom/separator" "custom/separator"
"custom/notification" "custom/notification"
]; ];
clock= { clock = {
calendar = { calendar = {
format = { today = "<span color='#b4befe'><b><u>{}</u></b></span>"; }; format = {today = "<span color='#b4befe'><b><u>{}</u></b></span>";};
}; };
format = " {:%H:%M}"; format = " {:%H:%M}";
tooltip= "true"; tooltip = "true";
tooltip-format= "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt= " {:%d/%m}"; format-alt = " {:%d/%m}";
}; };
"hyprland/workspaces"= { "hyprland/workspaces" = {
active-only= false; active-only = false;
disable-scroll= true; disable-scroll = true;
format = "{icon}"; format = "{icon}";
on-click= "activate"; on-click = "activate";
format-icons= { format-icons = {
"1"= ""; "1" = "";
"2"= ""; "2" = "";
"3"= ""; "3" = "";
"4"= ""; "4" = "";
"5"= ""; "5" = "";
"6"= ""; "6" = "";
urgent= ""; urgent = "";
default = ""; default = "";
sort-by-number= true; sort-by-number = true;
}; };
persistent-workspaces = { persistent-workspaces = {
"1"= []; "1" = [];
"2"= []; "2" = [];
"3"= []; "3" = [];
"4"= []; "4" = [];
"5"= []; "5" = [];
"6"= []; "6" = [];
}; };
}; };
memory= { memory = {
format= "󰟜 {}%"; format = "󰟜 {}%";
format-alt= "󰟜 {used} GiB"; #  format-alt = "󰟜 {used} GiB"; # 
interval= 2; interval = 2;
}; };
cpu= { cpu = {
format= " {usage}%"; format = " {usage}%";
format-alt= " {avg_frequency} GHz"; format-alt = " {avg_frequency} GHz";
interval= 2; interval = 2;
}; };
disk = { disk = {
# path = "/"; # path = "/";
format = "󰋊 {percentage_used}%"; format = "󰋊 {percentage_used}%";
interval= 60; interval = 60;
}; };
network = { network = {
format-wifi = " {signalStrength}%"; format-wifi = " {signalStrength}%";
@@ -86,19 +84,19 @@
format-linked = "{ifname} (No IP)"; format-linked = "{ifname} (No IP)";
format-disconnected = "󰖪 "; format-disconnected = "󰖪 ";
}; };
tray= { tray = {
icon-size= 20; icon-size = 20;
spacing= 8; spacing = 8;
}; };
pulseaudio= { pulseaudio = {
format= "{icon} {volume}%"; format = "{icon} {volume}%";
format-muted= " {volume}%"; format-muted = " {volume}%";
format-icons= { format-icons = {
default= [" "]; default = [" "];
}; };
scroll-step= 5; scroll-step = 5;
on-click= "pamixer -t"; on-click = "pamixer -t";
on-click-right= "pavucontrol"; on-click-right = "pavucontrol";
}; };
battery = { battery = {
format = "{icon} {capacity}%"; format = "{icon} {capacity}%";
@@ -114,11 +112,11 @@
tooltip = true; tooltip = true;
tooltip-format = "{time}"; tooltip-format = "{time}";
}; };
"custom/launcher"= { "custom/launcher" = {
format= ""; format = "";
on-click= "fuzzel"; on-click = "fuzzel";
on-click-right= "wallpaper-picker"; on-click-right = "wallpaper-picker";
tooltip= "false"; tooltip = "false";
}; };
"custom/notification" = { "custom/notification" = {
tooltip = false; tooltip = false;

View File

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

View File

@@ -1,10 +1,8 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.waybar = { programs.waybar = {
enable = true; enable = true;
}; };
programs.waybar.package = pkgs.waybar.overrideAttrs (oa: { programs.waybar.package = pkgs.waybar.overrideAttrs (oa: {
mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ]; mesonFlags = (oa.mesonFlags or []) ++ ["-Dexperimental=true"];
}); });
} }

View File

@@ -1,13 +1,19 @@
{ inputs, nixpkgs, config, self, username, host, ... }:
{ {
inputs,
nixpkgs,
config,
self,
username,
host,
...
}: {
imports = imports =
[ (import ./hardware/bootloader.nix) ] [(import ./hardware/bootloader.nix)]
++ [ (import ./hardware/network.nix) ] ++ [(import ./hardware/network.nix)]
++ [ (import ./software/fonts.nix) ] ++ [(import ./software/fonts.nix)]
++ [ (import ./software/sddm.nix) ] ++ [(import ./software/sddm.nix)]
++ [ (import ./software/packages.nix) ] ++ [(import ./software/packages.nix)]
++ [ (import ./software/programs.nix) ] ++ [(import ./software/programs.nix)]
++ [ (import ./software/services.nix) ] ++ [(import ./software/services.nix)]
++ [ (import ./software/users.nix) ]; ++ [(import ./software/users.nix)];
} }

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs = { programs = {
hyprland.enable = true; hyprland.enable = true;
zsh.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 { pkgs.catppuccin-sddm.override {
flavor="mocha"; flavor = "mocha";
font="JetBrains Mono"; font = "JetBrains Mono";
fontSize="9"; fontSize = "9";
background="${self}/media/wallpapers/catppuccin/nixos-catppuccin.png"; background = "${self}/media/wallpapers/catppuccin/nixos-catppuccin.png";
} }
)]; )
];
services.displayManager.sddm = { services.displayManager.sddm = {
enable = true; enable = true;
wayland.enable = true; wayland.enable = true;

View File

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

View File

@@ -1,18 +1,23 @@
{ config, inputs, pkgs, username, self, host, ... }:
let
nur = config.nur;
in
{ {
imports = [ inputs.home-manager.nixosModules.home-manager ]; config,
inputs,
pkgs,
username,
self,
host,
...
}: let
nur = config.nur;
in {
imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
backupFileExtension = "backup"; backupFileExtension = "backup";
extraSpecialArgs = { inherit self inputs host username nur; }; extraSpecialArgs = {inherit self inputs host username nur;};
users.${username} = { users.${username} = {
programs.home-manager.enable = true; programs.home-manager.enable = true;
imports = [ ./../../home ]; imports = [./../../home];
home = { home = {
username = "${username}"; username = "${username}";
homeDirectory = "/home/${username}"; homeDirectory = "/home/${username}";
@@ -28,10 +33,10 @@ in
users.users.${username} = { users.users.${username} = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ "wheel" ]; extraGroups = ["wheel"];
}; };
security.sudo.extraConfig = '' security.sudo.extraConfig = ''
${username} ALL=(ALL) NOPASSWD: /run/current-system/sw/bin/nixos-rebuild ${username} ALL=(ALL) NOPASSWD: /run/current-system/sw/bin/nixos-rebuild
''; '';
nix.settings.allowed-users = [ "${username}" ]; nix.settings.allowed-users = ["${username}"];
} }

View File

@@ -2,23 +2,23 @@
autoCmd = [ autoCmd = [
{ {
command = "FloatermNew --wintype=float --name=shadeterm --position=topright --autoclose=0 --silent --cwd=<buffer> --titleposition=left zsh"; command = "FloatermNew --wintype=float --name=shadeterm --position=topright --autoclose=0 --silent --cwd=<buffer> --titleposition=left zsh";
event = [ "VimEnter" ]; event = ["VimEnter"];
pattern = [ "*" ]; pattern = ["*"];
} }
{ {
command = "silent! mkview"; command = "silent! mkview";
event = [ "BufWinLeave" ]; event = ["BufWinLeave"];
pattern = [ "*" ]; pattern = ["*"];
} }
{ {
command = "silent! !aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &"; command = "silent! !aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &";
event = [ "BufWinLeave" ]; event = ["BufWinLeave"];
pattern = [ "*" ]; pattern = ["*"];
} }
{ {
command = "silent! loadview"; command = "silent! loadview";
event = [ "BufWinEnter" ]; event = ["BufWinEnter"];
pattern = [ "*" ]; pattern = ["*"];
} }
]; ];
} }

View File

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

View File

@@ -2,9 +2,9 @@
plugins.cmp = { plugins.cmp = {
autoEnableSources = true; autoEnableSources = true;
settings.sources = [ settings.sources = [
{ name = "nvim_lsp"; } {name = "nvim_lsp";}
{ name = "path"; } {name = "path";}
{ name = "buffer"; } {name = "buffer";}
]; ];
}; };
} }

View File

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

View File

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

View File

@@ -3,9 +3,10 @@
enable = true; enable = true;
hijackUnnamedBufferWhenOpening = false; hijackUnnamedBufferWhenOpening = false;
openOnSetup = false; openOnSetup = false;
onAttach = { __raw = '' onAttach = {
__raw = ''
function(bufnr) function(bufnr)
local api = require('nvim-tree.api') 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 }
@@ -72,7 +73,8 @@ local api = require('nvim-tree.api')
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; centralizeSelection = true;

View File

@@ -14,14 +14,13 @@
}; };
}; };
outputs = outputs = {
{
nixvim, nixvim,
flake-parts, flake-parts,
pre-commit-hooks, pre-commit-hooks,
... ...
}@inputs: } @ inputs:
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake {inherit inputs;} {
systems = [ systems = [
"aarch64-linux" "aarch64-linux"
"x86_64-linux" "x86_64-linux"
@@ -29,21 +28,18 @@
"x86_64-darwin" "x86_64-darwin"
]; ];
perSystem = perSystem = {
{
system, system,
pkgs, pkgs,
self', self',
... ...
}: }: let
let
nixvim' = nixvim.legacyPackages.${system}; nixvim' = nixvim.legacyPackages.${system};
nvim = nixvim'.makeNixvimWithModule { nvim = nixvim'.makeNixvimWithModule {
inherit pkgs; inherit pkgs;
module = ./config; module = ./config;
}; };
in in {
{
checks = { checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run { pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.; src = ./.;
@@ -65,7 +61,7 @@
packages.default = nvim; packages.default = nvim;
devShells = { devShells = {
default = with pkgs; mkShell { inherit (self'.checks.pre-commit-check) shellHook; }; default = with pkgs; mkShell {inherit (self'.checks.pre-commit-check) shellHook;};
}; };
}; };
}; };

View File

@@ -5,8 +5,11 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
}; };
outputs = { self, nixpkgs, ... }@inputs: outputs = {
let self,
nixpkgs,
...
} @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
@@ -20,7 +23,7 @@
in { in {
packages.${system} = { packages.${system} = {
default = pkgs.toilet.overrideAttrs (oldAttrs: rec { default = pkgs.toilet.overrideAttrs (oldAttrs: rec {
buildInputs = oldAttrs.buildInputs or [] ++ [ extraFonts ]; buildInputs = oldAttrs.buildInputs or [] ++ [extraFonts];
installPhase = '' installPhase = ''
make install PREFIX=$out make install PREFIX=$out