diff --git a/boilerplate.nix b/boilerplate.nix new file mode 100644 index 0000000..dc2884a --- /dev/null +++ b/boilerplate.nix @@ -0,0 +1,18 @@ +{ inputs, ... }: + +let + #foo = bar +in + +{ + + flake = { + + nixosConfigurations.main = inputs.nixpkgs.lib.nixosSystem { + modules = [ + ./configuration.nix + ]; + }; + + }; +} diff --git a/flake.nix b/flake.nix index 3d1d01a..cf8b381 100755 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,7 @@ import-tree = { url = "github:vic/import-tree"; }; wrapper-modules = { url = "github:BirdeeHub/nix-wrapper-modules";}; # Secrets management - https://github.com/Mic92/sops-nix - sops-nix = { url = "github:Mic92/sops-nix"; }; + #sops-nix = { url = "github:Mic92/sops-nix"; }; # Sound driver optimisations - https://github.com/musnix/musnix musnix = { url = "github:musnix/musnix"; }; # Programmatic music language - https://github.com/mitchmindtree/tidalcycles.nix diff --git a/home/default.nix b/home/default.nix new file mode 100644 index 0000000..36c81b1 --- /dev/null +++ b/home/default.nix @@ -0,0 +1,28 @@ +{ + self, + inputs, + ... +}: +{ + imports = [ + ./terminal + self.modules.theme + ]; + + home = { + username = "serenity"; + homeDirectory = "/home/serenity"; + stateVersion = "23.11"; + #extraOutputsToInstall = [ ]; + }; + + # disable manuals as nmd fails to build often + manual = { + html.enable = false; + json.enable = false; + manpages.enable = false; + }; + + # let HM manage itself when in standalone mode + programs.home-manager.enable = true; +} diff --git a/home/terminal/default.nix b/home/terminal/default.nix new file mode 100644 index 0000000..3d3477f --- /dev/null +++ b/home/terminal/default.nix @@ -0,0 +1,29 @@ +{ config, ... }: +let + data = config.xdg.dataHome; + conf = config.xdg.configHome; + cache = config.xdg.cacheHome; +in +{ + imports = [ + ./programs + ./kitty.nix + ./fish.nix + ]; + + # add environment variables + home.sessionVariables = { + # clean up ~ + LESSHISTFILE = "${cache}/less/history"; + LESSKEY = "${conf}/less/lesskey"; + + WINEPREFIX = "${data}/wine"; + XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority"; + + EDITOR = "nvim"; + DIRENV_LOG_FORMAT = ""; + + # auto-run programs using nix-index-database + NIX_AUTO_RUN = "1"; + }; +} diff --git a/home/terminal/fish.nix b/home/terminal/fish.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/terminal/kitty.nix b/home/terminal/kitty.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/terminal/programs/default.nix b/home/terminal/programs/default.nix new file mode 100644 index 0000000..96c46c5 --- /dev/null +++ b/home/terminal/programs/default.nix @@ -0,0 +1,11 @@ +{ + imports = [ + ./btop.nix + ./cli.nix + ./git.nix + ./nix.nix + ./xdg.nix + ./yazi + ./nvim + ]; +} diff --git a/hosts/default.nix b/hosts/default.nix new file mode 100644 index 0000000..33ae410 --- /dev/null +++ b/hosts/default.nix @@ -0,0 +1,94 @@ +{ + self, + inputs, + ... +}: +{ + flake.nixosConfigurations = + let + # shorten paths + inherit (inputs.nixpkgs.lib) nixosSystem; + + homeImports = import "${self}/home/profiles"; + + mod = "${self}/system"; + # get the basic config to build on top of + inherit (import mod) base; + + # get these into the module system + specialArgs = { inherit inputs self; }; + in + { + persephone = nixosSystem { + inherit specialArgs; + modules = base ++ [ + ./persephone + "${mod}/core/lanzaboote.nix" + + "${mod}/programs/gamemode.nix" + "${mod}/programs/hyprland" + "${mod}/programs/games.nix" + + "${mod}/network/syncthing.nix" + + "${mod}/services/kanata" + "${mod}/services/gnome-services.nix" + "${mod}/services/location.nix" + + { + home-manager = { + users.mihai.imports = homeImports."mihai@io"; + extraSpecialArgs = specialArgs; + backupFileExtension = ".hm-backup"; + }; + } + + inputs.agenix.nixosModules.default + ]; + }; + + hades = nixosSystem { + inherit specialArgs; + modules = base ++ [ + ./hades + "${mod}/hardware/ddcci.nix" + + "${mod}/programs/gamemode.nix" + "${mod}/programs/hyprland" + "${mod}/programs/games.nix" + + "${mod}/network/syncthing.nix" + + "${mod}/services/kanata" + "${mod}/services/gnome-services.nix" + "${mod}/services/location.nix" + + { + home-manager = { + users.mihai.imports = homeImports."mihai@io"; + extraSpecialArgs = specialArgs; + backupFileExtension = ".hm-backup"; + }; + } + ]; + }; + + nixos = nixosSystem { + inherit specialArgs; + modules = [ + ./wsl + "${mod}/core/users.nix" + "${mod}/nix" + "${mod}/programs/zsh.nix" + "${mod}/programs/home-manager.nix" + { + home-manager = { + users.mihai.imports = homeImports.server; + extraSpecialArgs = specialArgs; + backupFileExtension = ".hm-backup"; + }; + } + ]; + }; + }; +} diff --git a/hosts/hades/default.nix b/hosts/hades/default.nix new file mode 100644 index 0000000..05719d1 --- /dev/null +++ b/hosts/hades/default.nix @@ -0,0 +1,23 @@ +{ + pkgs, + lib, + self, + ... +}: +{ + imports = [ + ./hardware + ./network + ./radeon + ]; + + boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest; + + networking.hostName = "hades"; + + security.tpm2.enable = true; + + # for SSD/NVME + services.fstrim.enable = true; + +} diff --git a/hosts/hades/hardware.nix b/hosts/hades/hardware.nix new file mode 100644 index 0000000..e69de29 diff --git a/hosts/hades/network.nix b/hosts/hades/network.nix new file mode 100644 index 0000000..e69de29 diff --git a/hosts/hades/radeon.nix b/hosts/hades/radeon.nix new file mode 100644 index 0000000..e69de29 diff --git a/old/core/audio.nix b/old/core/audio.nix deleted file mode 100755 index ced94b8..0000000 --- a/old/core/audio.nix +++ /dev/null @@ -1,109 +0,0 @@ -# https://nixos.wiki/wiki/Category:Audio -## https://nixos.wiki/PipeWire -## https://github.com/musnix/musnix -## https://nixos.wiki/wiki/Audio_production - -{ pkgs, user, ... }: - -{ - - # Permissions & Security - security.rtkit.enable = true; - users.users.${user}.extraGroups = [ "audio" ]; # adds user to audio group - services.udev = { # needed for security - extraRules = '' - KERNEL=="rtc0", GROUP="audio" - KERNEL=="hpet", GROUP="audio" - ''; - }; - - # Available kernel modules - boot = { - kernelModules = [ "snd-seq" "snd-rawmidi" ]; - kernelParams = [ "preempt=full" ]; - }; - - # realtime audio priority (initially for JACK2) - security.pam.loginLimits = [ - { - domain = "@audio"; - item = "memlock"; - type = "-"; - value = "unlimited"; - } - { - domain = "@audio"; - item = "rtprio"; - type = "-"; - value = "99"; - } - { - domain = "@audio"; - item = "nofile"; - type = "soft"; - value = "99999"; - } - { - domain = "@audio"; - item = "nofile"; - type = "hard"; - value = "99999"; - } - ]; - - # Musnix for audio production - musnix = { - enable = true; - rtcqs.enable = true; - rtirq.enable = true; - kernel.realtime = true; - }; - - # Pipewire baybee - services = { - pulseaudio = { enable = false; }; # not directly using pulse - pipewire = { - enable = true; # enables pipewire - alsa = { - enable = true; # enables alsa through pipewire - support32Bit = true; # enables 32bit application support - }; - jack.enable = true; # enables jack through pipewire - pulse.enable = true; # enables pulse through pipewire - wireplumber.enable = true; # enables wireplumber - extraConfig = { - # Low latency optimisations - pipewire."92-low-latency" = { # for pipewire - "context.properties" = { - "default.clock.rate" = 48000; - "default.clock.allowed-rates" = [ 44100 48000 96000 192000 ]; - "default.clock.quantum" = 256; - "default.clock.min-quantum" = 256; - "default.clock.max-quantum" = 384; - }; - }; - pipewire-pulse."92-low-latency" = { # for pulseaudio - stream.properties = { - node.latency = "256/48000"; - resample.quality = 1; - }; - context.modules = [{ - name = "libpipewire-module-protocol-pulse"; - ## Apparently I need to have the full key 'pulse.foo.bar = "foobar/foo";' declared, - ## rather than declaring 'foo.bar = "foorbar/foo";' inside a nested 'pulse = { };' set. - ## See: https://discourse.nixos.org/t/setting-up-pipewire-to-get-rid-of-cracks-noises - args = { - pulse.min.req = "256/48000"; - pulse.max.req = "256/48000"; - pulse.default.req = "256/48000"; - pulse.min.quantum = "256/48000"; - pulse.max.quantum = "384/48000"; - }; - }]; - }; - }; - }; - - }; - -} diff --git a/old/core/bufferBuff.nix b/old/core/bufferBuff.nix deleted file mode 100644 index 9dde062..0000000 --- a/old/core/bufferBuff.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ ... }: - -{ - - # Increased download buffer as it caused issues previously - nix.settings.download-buffer-size = [ "268435456" ]; - - # Temporarily increasing max open files for my bloated flake - systemd.settings.Manager = { DefaultLimitNOFILE = "8192:524288"; }; - sercurity.pam.loginLimits = [{ - domain = "*"; - type = "soft"; - item = "nofile"; - value = "8192"; - }]; - -} diff --git a/old/core/default.nix b/old/core/default.nix deleted file mode 100755 index 230e33f..0000000 --- a/old/core/default.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ lib, inputs, pkgs, user, ... }: - -{ - - imports = [ - # Not sure we need the home-manager import here - inputs.home-manager.nixosModules.home-manager - # Semi-modularised config - ../home # user-level/additional packages - # Shared modules to import - ./audio.nix # musnix and audio options - ./display.nix # base display and output options - ./regreet.nix # login manager - ./packages.nix # core/essential packages - ]; - - # Make sure this is set ! - system = { stateVersion = "24.11"; }; - - # Core security options - security = { - sudo.execWheelOnly = true; # sets sudo auth to @wheel only - polkit.enable = true; # enables system polkit ??? - }; - - # Settings for the nix package manager and daemon - nix = { - settings = { - cores = 12; # sets nix to use most available cores during rebuild - max-jobs = "auto"; # automatically determines max job count - allow-dirty = false; # refuses to allow rebuilds when git tree is dirty - auto-optimise-store = true; # automatically optimised nix store on rebuild - allowed-users = [ "@wheel" ]; # restricts `nix` command to @wheel - trusted-users = [ # adds root, @wheel, and ${primaryUser} to trusted users - "root" - "@wheel" - "${user}" - ]; - experimental-features = [ # enable flakes uwu,,, and some other junk idek - "pipe-operators" # who tf knows - "recursive-nix" # honestly I cannot rember - "nix-command" # useful nya - "flakes" # flakes are vv important nya - ]; - }; - # Garbage collection - gc = { - automatic = true; # do garbage collection automagically - dates = "daily"; # every day - options = "--delete-older-than 3d"; # and clear junk older than x days - #persistent = true; # https://mynixos.com/nixpkgs/option/nix.gc.persistent - }; - }; - - # Hardware settings - hardware = { - enableAllHardware = true; # enables all hardware modules - enableAllFirmware = true; # enables all firmware modules - enableRedistributableFirmware = true; # enables redistributables - usbStorage.manageShutdown = true; # graceful usb storage shutdown - sensor.hddtemp = { - enable = true; # enables temperature readings for mechanical drives - drives = [ "/dev/disk/by-uuid/*" ]; # tries to find drives with sensors by uuid - }; - }; - - # Manual pages and caching - environment.systemPackages = with pkgs; [ man-pages ]; # adds manual to system packages - documentation = { - dev.enable = true; # enables development documentation - man.cache.enable = true; # generates manual caches to save rebuild time - nixos.includeAllModules = true; # unsure lol - }; - - # Locale settings - time.timeZone = "Australia/Brisbane"; - i18n = { - defaultLocale = "en_AU.UTF-8"; - extraLocaleSettings = { - LC_NAME = "en_AU.UTF-8"; - LC_TIME = "en_AU.UTF-8"; - LC_PAPER = "en_AU.UTF-8"; - LC_ADDRESS = "en_AU.UTF-8"; - LC_MONETARY = "en_AU.UTF-8"; - LC_TELEPHONE = "en_AU.UTF-8"; - LC_MEASUREMENT = "en_AU.UTF-8"; - LC_IDENTIFICATION = "en_AU.UTF-8"; - }; - }; - -} diff --git a/old/core/display.nix b/old/core/display.nix deleted file mode 100755 index ddc442f..0000000 --- a/old/core/display.nix +++ /dev/null @@ -1,157 +0,0 @@ -{ inputs, pkgs, label, lib, niri, ... }: - -let - - # sygil-plymouth = import ../home/resources/theme/sygil-plymouth.nix { inherit lib pkgs; }; - -in - -{ - - system = { - nixos = { - variantName = "${label}"; - }; - }; - - # Boot/GRUB options - boot = { - #bootspec.enable = true; - consoleLogLevel = 3; - initrd = { - verbose = false; - systemd = { - enable = true; - }; - }; - kernelParams = - [ # grub kernel parameters, set to prevent excessive output on boot - #"vga=current" # use current video adapater - #"splash" # unsure ? - "quiet" # quiet log level - "loglevel=3" # minimal output on boot - #"udev.log_priority=3" # more minimising of output on boot - #"rd.systemd.show_status=false" # unsure ? - #"rd.udev.log_level=0" # more minimising of output on boot - #"boot.shell_on_fail" # reboots to basic uefi shell on boot failure - #"i915.fastboot=1" # unsure ? - #"plymouth.debug" # I NEED ANSWERS - #"plymouth.use-simpledrm" # tweak to allow plymouth animations to run smoother - #"plymouth.ignore-serial-consoles" # unsure ? - ]; - loader = { - timeout = 5; # 5 second timeout to default selection - #grub = { - #splashImage = null; # hides splashimage - #timeoutStyle = "hidden"; # hides timeout - #}; - }; - plymouth = { # enables plymouth boot animations - enable = false; - extraConfig = "ShowDelay=0"; - #theme = "sygil-plymouth"; - #themePackages = sygil-plymouth; - #themePackages = with pkgs; [ - #(adi1090x-plymouth-themes.override { - #selected_themes = [ "circle" ]; - #}) - #]; - }; - }; - - # Display related options - xdg.mime.enable = - true; # may be unneeded here as already declared in `home/desktop/xdg-mime.nix` - services.xserver.enable = true; # xserver still needed for xwayland stuff - systemd.user.targets.sway = { # To start sway related services - description = "to start sway related services"; - wants = [ "graphical-session.target" ]; - after = [ "graphical-session.target" ]; - }; - environment = { - variables = { # environment variables, duh - XDG_SESSION_TYPE = "wayland"; - XDG_CURRENT_DESKTOP = "sway"; - }; - systemPackages = with pkgs; [ # theme packages - #xorg.xhost # i actually dont remember what this does - xhost - ## Themes - #minimal-grub-theme - #colloid-kde - colloid-gtk-theme - adapta-gtk-theme - adapta-kde-theme - materia-theme - materia-theme-transparent - xwayland-satellite - xwayland-satellite-unstable - ]; - }; - programs = { # xwayland and sway variables - xwayland = { # Standard(?) xwayland implementation - enable = true; - #package = [ ]; - #defaultFontPath = "/run/current-system/sw/share/X11/fonts"; - }; - niri = { - enable = true; - package = with pkgs; niri-unstable; - }; - sway = { # enable sway window manager - enable = true; - package = pkgs.swayfx; - extraPackages = [ ]; - wrapperFeatures = { - gtk = true; - base = true; - }; - extraSessionCommands = '' - export SDL_VIDEODRIVER=wayland,windows - export QT_QPA_PLATFORM=wayland - export QT_WAYLAND_DISABLE_WINDOWDECORATION="1" - export XDG_CURRENT_DESKTOP=sway - export XDG_SESSION_TYPE=wayland - ''; - }; - }; - - # Utter junk from here on out, pls fix - # - - - - - - - - - - - - - - - - - - - - - # I put fonts here because i didn't know where tf else to put them lol - # duplicate to home-manager config ? - fonts = { - packages = with pkgs; - [ spleen terminus_font terminus_font_ttf nerd-fonts.symbols-only ] - ++ builtins.filter lib.attrsets.isDerivation - (builtins.attrValues pkgs.nerd-fonts); - fontDir.enable = true; - fontconfig = { - defaultFonts = { - serif = [ "spleen-32x64" ]; - sansSerif = [ "spleen-32x64" ]; - monospace = [ "TerminusTTF" ]; - }; - }; - }; - - #Dunno if i did this right, but possible needed for keyring/polkit stuff ? - security.pam.services.serenity.enableGnomeKeyring = true; - - # Move this - programs = { - gnome-disks.enable = true; # For when bimbo needs to manage disks - seahorse.enable = true; # GTK secrets management - }; - - # Move these - services = { - libinput.enable = true; # don't think we NEED this tbh - unsure - dbus.enable = true; # dbus is for ... unsure - upower.enable = true; # no clue - udisks2.enable = true; # disk management service - gnome.gnome-keyring.enable = true; # for sudo prompts and stuff - }; - -} diff --git a/old/core/gaming.nix b/old/core/gaming.nix deleted file mode 100755 index d541ae7..0000000 --- a/old/core/gaming.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ pkgs, inputs, user, ... }: - -{ - - environment = { - - # These are important apparently :uh: - sessionVariables = { - XDG_CACHE_HOME = "$HOME/.cache"; - XDG_CONFIG_HOME = "$HOME/.config"; - XDG_BIN_HOME = "$HOME/.local/bin"; - XDG_DATA_HOME = "$HOME/.local/share"; - # Steam needs this to find Proton-GE - STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d"; - # Note: this doesn't replace PATH, it just adds this to it - PATH = [ "\${XDG_BIN_HOME}" ]; - NIXOS_OZONE_WL = "1"; - SDL_VIDEODRIVER = "x11,wayland,windows"; - }; - - # Games and misc. - systemPackages = with pkgs; [ - piper # Open mouse config - vassal # FOSSy board game sim - cockatrice # Magical the gathering, but free - prismlauncher # Modded Minecraft client - osu-lazer-bin # Rhythm is just a click away! - inputs.nix-gaming.packages.${pkgs.system}.osu-mime - #inputs.nix-gaming.packages.${pkgs.system}.osu-lazer-bin - ]; - }; - - # Adding primary user to gamemode group - users.users.${user}.extraGroups = [ "gamemode" ]; - # Gaming mouse config - services.ratbagd.enable = true; - # Enable 32bit graphics support - hardware.graphics.enable32Bit = true; - # Open tablet driver, for Osu!, mainly. - hardware.opentabletdriver = { - enable = true; # Enables the driver lol - daemon.enable = true; # Enables the daemon via systemd - blacklistedKernelModules = [ # Disable conflicting drivers - "hid-uclogic" - "wacom" - ]; - }; - - programs = { - - java.enable = true; # just in case - gamescope = { - enable = true; # compositor for games - capSysNice = true; # should make games run better - }; - - # Steam - steam = { - enable = true; # enables steam itself - protontricks.enable = true; # enables protontricks - gamescopeSession.enable = true; # compositor for games - extraCompatPackages = with pkgs; [ proton-ge-bin ]; # glorious eggroll - package = pkgs.steam.override { # no clue lol - extraLibraries = pkgs: [ pkgs.libxcb ]; # what - extraPkgs = pkgs: with pkgs; [ # absolutely clueless lol - libpng - libpulseaudio - libvorbis - stdenv.cc.cc.lib - libkrb5 - keyutils - gamemode - libxi - libxcursor - libxinerama - libxscrnsaver - ]; - }; - }; - - # "GameMode" - https://nixos.wiki/wiki/Gamemode - gamemode = { - enable = false; - settings = { - general.renice = 10; - # Warning: GPU optimisations have the potential to damage hardware - gpu = { - apply_gpu_optimisations = "accept-responsibility"; - gpu_device = 0; - amd_performance_level = "high"; - }; - custom = { - start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; - end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; - }; - }; - }; - - }; - -} diff --git a/old/core/hosts/hades/bluetooth.nix b/old/core/hosts/hades/bluetooth.nix deleted file mode 100755 index 2fb29ba..0000000 --- a/old/core/hosts/hades/bluetooth.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ pkgs, config, ... }: - -{ - imports = [ ]; - - #services.blueman.enable = true; # enables blueman - - hardware.bluetooth = { - enable = true; # Enables bluetooth - powerOnBoot = true; # Turns the bluetooth adapter on at boot - input.General = { UserspaceHID = true; }; # fix bluetooth keyboard input - settings.General = { - Experimental = true; # Displays battery charge of connected devices - FastConnectable = true; # Uses more power, but hades is a desktop - }; - }; - -} diff --git a/old/core/hosts/hades/default.nix b/old/core/hosts/hades/default.nix deleted file mode 100755 index e3200e5..0000000 --- a/old/core/hosts/hades/default.nix +++ /dev/null @@ -1,97 +0,0 @@ -{ pkgs, user, ... }: - -{ - - imports = [ - # Host-specific config files - ./network.nix - ./hardware.nix - ./bluetooth.nix - # Shared 'core' config options - ../../../core - # Host-specific core modules - ../../../core/zfs.nix - ../../../core/gaming.nix - ../../../core/virtualisation.nix - ]; - - # Name of this computer ? - networking.hostName = "hades"; - - # Boot options - boot = { - # Linux kernel version selection - kernelPackages = pkgs.linuxPackages_latest; # latest compatible - # Bootloader settings - loader = { - systemd-boot.enable = true; # better than grub - efi.canTouchEfiVariables = true; # needed for stuff:tm: - }; - # Filesystem support at boot - supportedFilesystems = [ - "vfat" # fat32 - "ext4" # ext4 - #"ntfs" # windows lol - ]; - # Decryption via LUKS - initrd.luks = { - # Primary boot drive - devices."luks-55f7d546-fac9-4ea0-a21e-4c50ecc0d67d" = { - device = "/dev/disk/by-uuid/55f7d546-fac9-4ea0-a21e-4c50ecc0d67d"; - }; - # Secondary storage drive - #devices.Asphodel = { # secondary partition on Tartarus drive - #device = "/dev/disk/by-uuid/45f5f6ad-a676-4bc1-ad4b-e3e26b5697f4"; - #preLVM = false; - #}; - }; - }; - - # Hardware - services.xserver.videoDrivers = [ "amdgpu" ]; # makes x use amd - hardware = { - # GPU and graphics - graphics = { - enable = true; - enable32Bit = true; - }; - # Driver packages for the dGPU inside Hades - amdgpu = { - overdrive.enable = true; # overclocking lol - initrd.enable = true; # for video at boot - opencl.enable = true; # gpu tech idk lol - }; - }; - - # Peripherals - hardware.openrazer = { - enable = true; # enables openrazer daemon - users = [ "${user}" ]; # giving primary user permissions (again) - }; - users.users.${user} = { # giving primary user permissions (again) - extraGroups = [ "openrazer" ]; - }; - services = { - hardware.openrgb.enable = true; # rgb control - input-remapper = { - enable = true; # needed to remap some stuff - enableUdevRules = true; # hotplug support - }; - }; - - # Packages - environment.systemPackages = with pkgs; [ - - # Hardware & Firmware - radeontop # monitoring - nvtopPackages.amd # monitoring - - # peripherals & Input - input-remapper # Input control - razergenie # Razer frontend - openrazer-daemon # Razer daemon - openrgb-with-all-plugins # RGB control - - ]; - -} diff --git a/old/core/hosts/hades/hardware.nix b/old/core/hosts/hades/hardware.nix deleted file mode 100644 index ac9402d..0000000 --- a/old/core/hosts/hades/hardware.nix +++ /dev/null @@ -1,36 +0,0 @@ -# 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") - ]; - - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - boot.blacklistedKernelModules = [ "ntfs3" ]; - - fileSystems."/" = - { device = "/dev/mapper/luks-35440a88-293e-455b-a018-ee1086b07321"; - fsType = "ext4"; - }; - - boot.initrd.luks.devices."luks-35440a88-293e-455b-a018-ee1086b07321".device = "/dev/disk/by-uuid/35440a88-293e-455b-a018-ee1086b07321"; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/2C83-7F40"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/mapper/luks-55f7d546-fac9-4ea0-a21e-4c50ecc0d67d"; } - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/old/core/hosts/hades/network.nix b/old/core/hosts/hades/network.nix deleted file mode 100755 index ca4932d..0000000 --- a/old/core/hosts/hades/network.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ ... }: - -{ - - networking = { - #wireless.enable = false; - #nameservers = [ "127.0.0.1" "::1" ]; - networkmanager = { - enable = true; - #dns = "none"; # handled by dnscrypt - }; - }; - - ## Rudimentary firewall config - networking.firewall = { - enable = true; - - ## Specific TCP ports to be opened - allowedTCPPorts = [ - 2234 # soulseek/nicotine-plus - 33929 # minecraft LAN - #8384 # syncthing - #8096 # jellyfin http - #8920 # jellyfin https - ]; - - ## Specific UDP ports to be opened - allowedUDPPorts = [ - 2234 # soulseek/nicotine-plus - 33929 # minecraft LAN - #8834 # syncthing - #7359 # jellyfin - client discovery - ]; - - ## Ranges for TCP and UDP ports to be opened - ## - disabled for now, network infrastructure is minimal - #allowedTCPPortRanges = [ { from = 1720; to = 1770; } ]; - #allowedUDPPortRanges = allowedTCPPortRanges; - - }; - - ## Systemd service for the dnscrypt config declared below - #systemd.services.dnscrypt-proxy2.serviceConfig = { - #StateDirectory = "dnscrypt-proxy"; - #}; - - services.dnscrypt-proxy = { - enable = true; - settings = { - ipv6_servers = true; - require_dnssec = true; - sources.public-resolvers = { - ## Where to get list of server addresses - urls = [ - "https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md" - "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" - ]; - ## key and cachefile to verify servers and authenticity - minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; - cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; - }; - - ## Select a specific server, or a set of servers from the link below - ## - https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md - server_names = [ - "cs-sydney" - "cs-singapore" - "mullvad-doh" - "mullvad-adblock-doh" - "adfilter-syd" - "adfilter-syd-ipv6" - "userspace-australia" - "userspace-australia-ipv6" - ]; - }; - }; - -} diff --git a/old/core/packages.nix b/old/core/packages.nix deleted file mode 100755 index eb7a1f5..0000000 --- a/old/core/packages.nix +++ /dev/null @@ -1,130 +0,0 @@ -{ inputs, outputs, pkgs, flakePath, niri, ... }: - -{ - - # Activation Scripts - runs after using `sudo nixos-rebuild switch` - system.activationScripts.diff = { - supportsDryActivation = true; - # Prints diff of the nix store and a cute message if rebuild successful - text = '' - ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff \ - /run/current-system "$systemConfig" - - echo "Rebuild completed successfully <3" - ''; - }; - - # Nixpkgs Settings - nixpkgs = { - config = { - allowUnfree = true; # not doing full foss lol - allowBroken = true; # I like 'em broken - #permittedInsecurePackages = [ ]; # insert obvious joke here - #packageOverrides = pkgs: { # package overrides here - #sygil-plymouth = pkgs.callPackage /home/serenity/repos/sygil-plymouth/package.nix { }; - #}; - }; - # Place package overlays here - overlays = [ - # Enabled overlays - niri.overlays.niri # latest niri - # Disabled overlays - #inputs.tidalcycles.overlays.default # programmatic music - #inputs.mac-style-plymouth.overlays.default # for theme - #inputs.sygil-plymouth.overlays.default # indev theme - ]; - }; - nix = { - settings = { - substituters = [ # for pkgs not in or out of date in nixpkgs - "https://cache.iog.io" - ]; - trusted-public-keys = [ # keys to sign the packages - "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" - ]; - }; - }; - - # System-level Programs - programs = { - # Core terminal suite - git = { enable = true; }; # Mandatory version control - fish = { enable = true; }; # A catgirls favourite shell - neovim = { enable = true; }; # Neovim declared here too, just in case - nh = { - enable = true; # nixos cli helper - flake = "${flakePath}"; # Declared in flake.nix - }; - gnupg.agent = { - enable = true; # handles encryption keys - enableSSHSupport = true; # ssh good, lol - #pinentryPackage = [ ]; - }; - nix-ld = { - enable = true; # runs unpackaged binaries - #libraries = with pkgs; [ ]; - }; - appimage = { - enable = true; # runs "normal" linux applications - binfmt = true; - }; - }; - services.flatpak.enable = true; # flatpak just in case - environment = { - # Environment Variables - variables = { # sets neovim to default editor in other apps - EDITOR = "nvim"; - VISUAL = "nvim"; - SYSTEMD_EDITOR = "nvim"; - }; - # System-level Packages - systemPackages = with pkgs; [ - # Nix specific tools - #cabal2nix - nix-tree # Dependency tree viewer for nix store - nix-init # Generate nix packages from URLs - nix-index # Database for nixpkgs - nix-prefetch # provides info on a url - nix-output-monitor # Shows extra information on nix commands - # Filsesystem utilities - ddrutility # Set of tools for HDD rescure - exfatprogs # ExFAT filesystem - btrfs-progs # BTRFS filesystem - ntfs3g # NTFS filesystem - # CLI tools & utilities - fd # Find, but faster - bc # Calculator - zip # What it says on the tin - doas # alternative to sudo - btop # System metrics and process viewer - tldr # Simpler manual pages - wget # Retrieves files over HTTP, HTTPS, and FTP - curl # Pulls data from a URL - bash # Terminal shell - file # Shows type of files - tree # Tree view of directory structure - unzip # What it says on the tin - gnupg # Create encryption keys - s-tui # Metrics and stress testing - udiskie # Disk automount - busybox # Utilities - ripgrep # Searches files for a given input - killall # Kills all - usbutils # USB utils - pciutils # PCI utils - moreutils # Woah, even more utils - libsecret # Library for storing and retrieving secrets - git-crypt # Transparent file encryption in git - undervolt # Utility to change CPU settings - steam-run # Used for running funky binaries and executables - android-tools # Commands for interfacing with android devices - smartmontools # Tools for monitoring HDD health - magic-wormhole # Direct file sharing - ]; - # Install a stub ELF loader to print an informative - # error message in the event that a user attempts - # to run an ELF binary not compiled for NixOS. - stub-ld.enable = true; - }; - -} diff --git a/old/core/regreet.nix b/old/core/regreet.nix deleted file mode 100755 index ddb6f1b..0000000 --- a/old/core/regreet.nix +++ /dev/null @@ -1,95 +0,0 @@ -{ pkgs, primaryUser, homeDirectory, flakePath, ... }: - -# Allows regreet to be bootstrapped by sway -let - swayConfig = pkgs.writeText "greetd-sway-config" '' - exec "${pkgs.regreet}/bin/regreet; swaymsg exit" - ''; -in { - - services = { - greetd = { # enables greetd native wayland display manager - enable = true; - #package = [ ]; - restart = true; - settings = { - default_session = { - command = - "${pkgs.sway}/bin/sway --config ${swayConfig}"; # lets regreet(greetd) be bootstrapped by sway - user = "greeter"; # sets user to run under as "greeter" - }; - }; - }; - }; - - environment = { # adds sway and fish environments to launch from regreet - etc."greetd/environments".text = '' - niri - sway - fish - ''; - }; - - # ReGreet specific configuration and theme - programs.regreet = { - enable = true; - #package = [ ]; - - # Appearance - font = { - name = "Spleen-32x64"; - size = 16; - package = pkgs.spleen; - }; - iconTheme = { - name = "Flat-Remix-Grey-Darkest"; - package = pkgs.flat-remix-icon-theme; - }; - cursorTheme = { - name = "Bibata-Modern-Classic"; - package = pkgs.bibata-cursors; - }; - theme = { - name = "Colloid-Dark"; - package = pkgs.colloid-gtk-theme; - }; - #extraCss = ''''; - settings = { - # Supposed to be toml, but idk how that works, apparently this is fine ? - # https://github.com/rharish101/ReGreet/blob/main/regreet.sample.toml - # https://github.com/NixOS/nixpkgs/issues/335082#issuecomment-2293304283 - appearance = { # ... this is ALL appearance ? tf bruh - greeting_msg = "Welcome !"; - }; - background = { - path = - "${flakePath}/home/resources/wallpapers/attunement-HelveticaBlanc.png"; - fit = "Cover"; - }; - GTK = { # why this shit needs to be declared twice i do not know - application_prefer_dark_theme = true; - cursor_theme_name = "Bibata-Modern-Classic"; - font_name = "Spleen-32x64 16"; - icon_theme_name = "Flat-Remix-Grey-Darkest"; - theme_name = "Colloid-Dark"; - }; - widget.clock = { - format = "%a, %D %H:%M"; # Thursday 13/02/24, 01:36 - resolution = "500ms"; - timezone = "Australia/Brisbane"; - label_width = 150; # will need adjustment - }; - - # Other - commands = { - reboot = [ "systemctl" "reboot" ]; - poweroff = [ "systemctl" "poweroff" ]; - }; - env = { GTK_USE_PORTAL = "0"; }; - }; - cageArgs = - [ "-s" ]; # https://github.com/cage-kiosk/cage/blob/master/cage.1.scd - - }; - -} diff --git a/old/core/virtualisation.nix b/old/core/virtualisation.nix deleted file mode 100644 index 86af64f..0000000 --- a/old/core/virtualisation.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ user, pkgs, ... }: - -let - - #sharePublicSourceDirectory = "/home/${user}/Public/"; # it's named public right - #sharePublicTargetDirectory = "F:"; # for windows - -in { - - # Security - #users.groups = { # creates grouped virtualisation permissions - #kvm.members = [ "${user}" "${anotherUser}" ]; - #libvirtd.members = [ "${user}" "${anotherUser}" ]; - #}; - users.users."${user}" = { # Gives primary user virtualisation permissions - extraGroups = [ "libvirtd" "kvm" ]; - }; - networking.firewall.trustedInterfaces = [ "virbr0" ]; # network bridge to VM - # https://wiki.nixos.org/wiki/Virt-manager#Networking - # Inactive by default, enable in host by running: - # `sudo virsh net-start default` - # Enable it automatically it at boot by running: - # `sudo virsh net-autostart default` - - # virtualisation - programs.virt-manager.enable = true; # simple vm frontend - environment.systemPackages = with pkgs; [ - dnsmasq # for vm networking - #phodav # for vm fileshare - ]; - virtualisation = { - spiceUSBRedirection.enable = true; # for USB passthrough - libvirtd = { - enable = true; - qemu = { - vhostUserPackages = with pkgs; [ virtiofsd ]; # host fileshare - swtpm.enable = true; # tpm emulation for windows 11 - runAsRoot = true; # for `passthrough` security on fileshare - }; - }; - }; - -} diff --git a/old/core/zfs.nix b/old/core/zfs.nix deleted file mode 100755 index f5b8557..0000000 --- a/old/core/zfs.nix +++ /dev/null @@ -1,39 +0,0 @@ -# ZFS Support NixOS module -{ config, lib, pkgs, ... }: - -let - - # Black magic wizardry from https://wiki.nixos.org/wiki/ZFS - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - zfsCompatibleKernelPackages = lib.filterAttrs (name: kernelPackages: - (builtins.match "linux_[0-9]+_[0-9]+" name) != null - && (builtins.tryEval kernelPackages).success - && (!kernelPackages.${config.boot.zfs.package.kernelModuleAttribute}.meta.broken)) - pkgs.linuxKernel.packages; - latestKernelPackage = lib.last - (lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)) - (builtins.attrValues zfsCompatibleKernelPackages)); - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -in { - - # Enable zfs in kernel and boot - boot = { - # Sets system to use the kernel specified in the let binding above - kernelPackages = lib.mkForce latestKernelPackage; - supportedFilesystems = [ "zfs" ]; - zfs = { - #extraPools = [ "orcus" ]; - #forceImportRoot = false; - }; - }; - environment.systemPackages = with pkgs; [ zfs ]; - networking = { hostId = "603b0c8b"; }; # Unsure why this is here actually ? - services = { - zfs = { - #trim.enable = true; # zfs trim service for SSDS - autoScrub = { enable = true; }; # autoscrub data integrity ZFS service, - }; - }; - -} diff --git a/old/home/default.nix b/old/home/default.nix deleted file mode 100755 index 130babf..0000000 --- a/old/home/default.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ - inputs, outputs, config, pkgs, lib, - label, flakePath, - user, userDescription, - homeDirectory, - wallpapersPath, wallpaper, - avatarsPath, avatar, - ... -}: - -let hostname = "${config.networking.hostName}"; - -in { - - imports = [ ]; - - # Primary user configuration - - # to create additional users, copy all options - # below to a new file akin to `u-username.nix`, - # or `u-username/default.nix` with more modules, - # making sure to replace all instances of - # `${primaryUser}` with the new username. - - # Needed for sops-nix to handle loginPassword - #sops.secrets.loginPassword.neededForUsers = true; - #users.mutableUsers = false; - - # System-level user declarations - users.users = { - ${user} = { - description = "${userDescription}"; - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; - #hashedPasswordFile = config.sops.secrets.loginPassword.path; - shell = pkgs.fish; # catgirls favourite shell - }; - }; - - # home-manager configuration - home-manager = { - verbose = true; # enables verbose output on activation - extraSpecialArgs = { # passes in specialArgs from flake.nix - inherit inputs outputs; - inherit hostname; - inherit label flakePath; - inherit user userDescription; - inherit homeDirectory; - inherit wallpapersPath wallpaper; - inherit avatarsPath avatar; - }; - users = { - ${user} = { - imports = [ - # Home configuration - - # currently all users share the same home - # configuration, though each has separate - # home directories. Additional modules - # can be declared alongside `u-username/default.nix` - # and then imported in this section. - #./resources/theme - ./desktop - ./terminal - ./multimedia - ]; - home = { - stateVersion = "24.11"; # IMPORTANT - #programs.home-manager.enable = true; - #systemd.user.startServices = "sd-switch"; - username = "${user}"; # passes username from `flake.nix` - homeDirectory = "${homeDirectory}"; # passes homedir from `flake.nix` - file."avatars" = { - source = ./resources/avatars; - target = "${avatarsPath}"; - recursive = true; - }; - file."wallpapers" = { # copies wallpapers - source = ./resources/wallpapers; # from flake directory - target = "${wallpapersPath}"; # to home directory - recursive = true; # think this is important, icr - }; - }; - nix.gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 1d"; - }; - }; - }; - }; - -} diff --git a/old/home/desktop/default.nix b/old/home/desktop/default.nix deleted file mode 100755 index be91381..0000000 --- a/old/home/desktop/default.nix +++ /dev/null @@ -1,207 +0,0 @@ -{ inputs, config, pkgs, lib, flakePath, homeDirectory, ... }: - -let - - # Base desktop theme - #serenityos-base = import ./serenityos-base.nix { inherit pkgs; }; - #line-icons = import ./line-icons.nix { inherit pkgs; }; - -in { - - imports = [ - # Import common desktop configs - ./xdg-mime.nix # file associations - ./wofi.nix # launcher - ./niri # WM - # Import user theme(s) - ../resources/theme - ../resources/theme/SerenityOS.nix - ]; - - # Services - systemd.user.startServices = "sd-switch"; # cant remember - services = { - # GTK keyring for password prompts - gnome-keyring = { - enable = true; # enables gnome-keyring - }; - # Phone <-> Desktop integration - kdeconnect = { - enable = false; # enables kdeconnect - indicator = false; # enables tray applet - }; - # Disk automount service - udiskie = { - enable = true; # enables udiskie - tray = "always"; # enables tray applet - notify = true; # sends notification on disk mount - automount = true; # automatically mount new disk - }; - }; - - xdg = { - # Creates user directory variables - userDirs = { - enable = true; - createDirectories = true; - extraConfig = { - FLAKE = "${flakePath}"; - SYNC = "${homeDirectory}/Sync"; - }; - }; - # Enables portals - portal = { - enable = true; - xdgOpenUsePortal = false; - # Extra portal config - config = { - common."org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ]; - common.default = [ "gtk" "wlr" "gnome" ]; - sway.default = [ "gtk" "wlr" "gnome" ]; - }; - # Packages to use for config - configPackages = with pkgs; [ - xdg-desktop-portal-gtk - xdg-desktop-portal-wlr - xdg-desktop-portal-gnome - ]; - # Extra portals to enable - extraPortals = with pkgs; [ - xdg-desktop-portal-gtk - xdg-desktop-portal-wlr - xdg-desktop-portal-gnome - ]; - }; - }; - - qt = { - # Enables QT - enable = true; - # Specifies the base theme to use - #platformTheme.name = "Colloid-dark"; - #style = { - #name = "Colloid-dark"; - #package = pkgs.colloid-kde; - #}; - }; - - gtk = { - # Enables GTK - enable = true; - # Specifies the font to use - font = { - name = "${config.theme.font}"; - size = 10; - }; - # Specifies the icon theme to use - iconTheme = { - name = "Flat-Remix-Grey-Darkest"; - package = pkgs.flat-remix-icon-theme; - }; - # Specifies the base theme to use - theme = lib.mkForce { - name = "Colloid-Dark"; - package = pkgs.colloid-gtk-theme; - }; - # Tries to force a dark theme globally - gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; - gtk4.extraConfig.gtk-application-prefer-dark-theme = 1; - }; - - # Fonts - # surely there is a better way to do fonts ? - fonts = { fontconfig = { enable = true; }; }; - - home = { - # Sets user session variables - sessionVariables = { - GTK_THEME = "Colloid-Teal-Dark-Dracula"; # i haev no idea what im doing - BROWSER = "firefox"; # furry browser - TERMINAL = "kitty"; # furry terminal - NIXPKGS_ALLOW_UNFREE = 1; # unfortunately - }; - # Copies cursor theme files to the relevant location - file.".icons/bibata".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic"; - # Specifies pointer theme and size - pointerCursor = { - gtk.enable = true; # GTK cursor - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Classic"; - size = 12; - }; - # Base package set to include in home/desktop configuration - packages = with pkgs; [ - # Networking - #networkmanagerapplet # Tray applet for networkmanager - #networkmanager # Network manager ... - # Security - gnome-keyring # Keyring for login prompts - gnome-secrets # GTK password manager - keepass-diff # CLI-tool to diff kbdx files - keepassxc # Feature rich password manager - seahorse # GTK secrets managment - soteria # GTK/rust desktop-agnostic polkit agent - # Desktop Features - brightnessctl # Display brightness control - wdisplays # Display configuration - wlr-randr # Display modesetting - wlsunset # Bluelight filter - wl-clipboard # Clipboard service - # Desktop App Suite - gnome-calculator # Simple calculator - appimage-run # Runs appimages - file-roller # Simple archive manager - themix-gui # GTK theme creation tool - nautilus # Simple file manager - swayimg # Terminal based image viewer - zathura # Simple PDF viewer - gparted # GUI partition editor - # Wayland - wayland-protocols - wayland-utils - xwayland - wlroots - # QT - libsForQt5.qt5.qtwayland - libsForQt5.qt5ct - # Misc. - libnotify # Notifier library - libva # Library for ??? - meson # Package builder - ]; - }; - - ## ORGANISE THIS MESS - # https://mynixos.com/home-manager/options/home.file.%3Cname%3E - # https://nix-community.github.io/home-manager/options.xhtml#opt-home.file - # https://nix-community.github.io/home-manager/options.xhtml#opt-home.activation - # need option for `zfs set mountpoint=/myspecialfolder mypool` - # need to set up auto luks unlock with sops-nix - - ## Provides LUKS key for Asphodel - #environment.etc."crypttab".text = '' - #Asphodel /dev/disk/by-uuid/45f5f6ad-a676-4bc1-ad4b-e3e26b5697f4 ${config.sops.secrets.asphodelLuksPassword} - #''; - - ## Mounts Asphodel to typical media location - #fileSystems."/run/media/${user}/Asphodel".device = - #"/dev/mapper/Asphodel"; - - #home.file = { # Files and directories to copy to ${homeDirectory} - - ## Example format for home.file - #"Foo" = { # Name for the copied file - #source = ./Foo; # Source is relative to this file - #target = "Desired/Path/To/Foo"; # Target path for Foo within ${homeDirectory} - #recursive = true; # Unsure if necessary for most things - #}; - - #}; - # Syncthing program service - #syncthing = { - #enable = false; # enables syncthing - #tray.enable = true; # enables tray applet - #guiAddress = "home.syncthing:8384"; # local addess to use - #}; - -} diff --git a/old/home/desktop/niri/binds.nix b/old/home/desktop/niri/binds.nix deleted file mode 100755 index cc0251e..0000000 --- a/old/home/desktop/niri/binds.nix +++ /dev/null @@ -1,135 +0,0 @@ -{ config, pkgs, lib, ... }: - -let - widthDivisions = [ 1.0 2.0 3.0 4.0 ]; - heightDivisions = [ 1.0 2.0 3.0 4.0 ]; - - # black magic, expected output: - # [ { proportion = 1.0 / 1.0 } - # { proportion = 1.0 / 2.0 } - # ... - # { proportion = 2.0 / 1.0 } - # { proportion = 2.0 / 3.0 } - # ... - # { proportion = 4.0 / 4.0 } ] - getProportions = divisions: lib.lists.unique(lib.lists.flatten( # TODO: make this a callable function - map(x: map(y: - { proportion = x / y; } - ) divisions) divisions - )); - - - # then get all the unique outputs (removing double ups of 0.5 or others) - columnWidths = getProportions widthDivisions; - columnWidthsFiltered = builtins.filter(x: builtins.lessThan x.proportion 1.0) columnWidths; # just get the values that are below 1 - - windowHeights = getProportions heightDivisions; - windowHeightsFiltered = builtins.filter(x: builtins.lessThan x.proportion 1.0) windowHeights; - -in { - - ## Goals: - ## - Way to open new windows in specific areas of the creen - ## - Way to spawn terminals floating - ## - Interact with Noctalia shell more with binds - # credit sodiboo for this one in particular - programs.niri.settings.layout = { - preset-column-widths = builtins.sort( # sort list for predictable behaviour - a: b: builtins.lessThan a.proportion b.proportion - ) columnWidthsFiltered; - default-column-width.proportion = 1.0 / 3.0; - - preset-window-heights = builtins.sort( - a: b: builtins.lessThan a.proportion b.proportion - ) windowHeightsFiltered; - }; - programs.niri.settings.binds = with config.lib.niri.actions; { - - ## Window manager controls - - - - - # Debug & Utility - "Mod+Shift+Slash".action = show-hotkey-overlay; # I am forgetful - "Mod+Shift+Escape" = { # Ensures niri keybinds are read - action = toggle-keyboard-shortcuts-inhibit; - allow-inhibiting = false; - }; - - # Session management - "Ctrl+Alt+Delete".action = quit; # Log out - #"Mod+Escape".action.spawn = ""; # Screen lock - "Mod+Shift+P".action = power-off-monitors; # Power saving - - # Task management - "Mod+Q".action = close-window; - "Mod+Q".repeat = false; # No window decorations lol - "Mod+O".action = toggle-overview; - "Mod+O".repeat = false; # Multi-tasking - "Mod+Tab".action = spawn "${pkgs.wofi}/bin/wofi"; - "Mod+Tab".repeat = false; # App launcher - - # Terminal - "Mod+Return".action = spawn "${pkgs.kitty}/bin/kitty"; - "Mod+Return".repeat = false; - #"Mod+Shift+Return".action = spawn floating "${pkgs.kitty}/bin/kitty"; - #"Mod+Shift+Return".repeat = false; - - # Keyboard focus controls - "Mod+H".action = focus-column-left; - "Mod+L".action = focus-column-right; # VIM binds - "Mod+J".action = focus-window-or-workspace-down; - "Mod+K".action = focus-window-or-workspace-up; - "Mod+Left".action = focus-column-left; - "Mod+Right".action = focus-column-right; # Regular binds - "Mod+Down".action = focus-workspace-down; - "Mod+Up".action = focus-workspace-up; - - # Mouse focus controls - "Mod+WheelScrollLeft".action = focus-column-left; - "Mod+WheelScrollLeft".cooldown-ms = 200; - "Mod+WheelScrollRight".action = focus-column-right; - "Mod+WheelScrollRight".cooldown-ms = 200; - "Mod+WheelScrollDown".action = focus-workspace-down; - "Mod+WheelScrollDown".cooldown-ms = 200; - "Mod+WheelScrollUp".action = focus-workspace-up; - "Mod+WheelScrollUp".cooldown-ms = 200; - - # Movement controls - "Mod+Shift+H".action = move-column-left; - "Mod+Shift+L".action = move-column-right; # VIM binds - "Mod+Shift+J".action = move-column-to-workspace-down; - "Mod+Shift+K".action = move-column-to-workspace-up; - "Mod+Shift+Left".action = move-column-left; - "Mod+Shift+Right".action = move-column-right; # Regular binds - "Mod+Shift+Down".action = move-column-to-workspace-down; - "Mod+Shift+Up".action = move-column-to-workspace-up; - - # Size controls - #"Mod+1".action = set-column-width "25%"; - #"Mod+2".action = set-column-width "50%"; - #"Mod+3".action = set-column-width "75%"; - #"Mod+4".action = set-column-width "100%"; - "Mod+Minus".action = switch-preset-column-width-back; - "Mod+Equal".action = switch-preset-column-width; - "Mod+Shift+Minus".action = switch-preset-window-height-back; - "Mod+Shift+Equal".action = switch-preset-window-height; - "Mod+C".action = center-visible-columns; - "Mod+F".action = maximize-column; - "Mod+Shift+F".action = fullscreen-window; - "Mod+Ctrl+F".action = expand-column-to-available-width; - "Mod+Space".action = toggle-window-floating; - "Mod+Shift+Space".action = switch-focus-between-floating-and-tiling; - - # Screen capture - "Mod+S".action.screenshot = {show-pointer = false;}; - "Mod+Shift+S".action.screenshot-window = []; # Screenshot - "Mod+Shift+Alt+S".action.screenshot-screen = {show-pointer = true;}; - #"Mod+hypothetical+bind".action.screenshot-all-screens = {show-pointer = true;}; - #"Mod+hypothetical+bind".action.record-area = {show-pointer = true;}; - #"Mod+hypothetical+bind".action.record-window = {show-pointer = true;}; - #"Mod+hypothetical+bind".action.record-entire-screen = {show-pointer = true;}; - #"Mod+hypothetical+bind".action.record-all-screens = {show-pointer = true;}; - }; -} diff --git a/old/home/desktop/niri/default.nix b/old/home/desktop/niri/default.nix deleted file mode 100755 index d1198c0..0000000 --- a/old/home/desktop/niri/default.nix +++ /dev/null @@ -1,145 +0,0 @@ -{ inputs, config, pkgs, lib, ... }: -let - -in { - - imports = [ - inputs.niri.homeModules.niri - #inputs.noctalia.homeModules.default - ./noctalia.nix - ./window-rules.nix - #./visual.nix - ./binds.nix - ]; - - #xdg.configFile."niri/config.kdl".source = ./niri.kdl; - - home.packages = with pkgs; [ jq xwayland-satellite-unstable ]; - - programs = { - - niri = { - enable = true; - package = pkgs.niri-unstable; - - settings = { - - environment = { - MOZ_ENABLE_WAYLAND = "1"; - NIXOS_OZONE_WL = "1"; - XDG_SESSION_TYPE = "wayland"; - XDG_CURRENT_DESKTOP = "niri"; - QT_QPA_PLATFORM = "wayland;xcb"; - QT_QPA_PLATFORMTHEME = "qt5ct"; - QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - SDL_VIDEODRIVER = "wayland"; - WLR_RENDERER = "vulkan"; - DISPLAY = ":0"; - }; - - xwayland-satellite = { - enable = true; - path = lib.getExe pkgs.xwayland-satellite-unstable; - }; - - outputs."DP-4" = { - mode = { - width = 3440; - height = 1440; - refresh = 74.924; - }; - position = { - x = 1920; - y = 0; - }; - scale = 1.0; - variable-refresh-rate = "on-demand"; - focus-at-startup = true; - }; - outputs."HDMI-A-2" = { - mode = { - width = 1920; - height = 1080; - refresh = 60.0; - }; - position = { - x = 0; - y = 360; - }; - scale = 1.0; - }; - - input = { - focus-follows-mouse = { - enable = true; - max-scroll-amount = "0%"; - }; - keyboard = { numlock = true; }; - mouse = { - enable = true; - natural-scroll = false; - }; - touchpad = { - enable = true; - natural-scroll = true; - }; - trackpoint = { enable = true; }; - }; - - prefer-no-csd = true; - layout = { - gaps = 8; - struts = { - left = 2; - right = 2; - top = 2; - bottom = 4; - }; - center-focused-column = "never"; - preset-column-widths = [ - #{proportion = 0.25;} - { proportion = 0.33333; } - { proportion = 0.5; } - { - proportion = 0.66667; - } - #{proportion = 0.75;} - { proportion = 1.0; } - ]; - border = { enable = false; }; - focus-ring = { - enable = true; - width = 2; - active.gradient = { - from = "#00cdff"; - to = "#80c8ff"; - angle = 45; - }; - inactive.gradient = { - from = "#705050"; - to = "#505070"; - angle = 45; - }; - }; - }; - animations = { - enable = true; - slowdown = 1.25; - }; - - spawn-at-startup = [ - { argv = [ "xwayland-satellite" ]; } - { argv = [ "noctalia-shell" ]; } - { argv = [ "kitty" "btop" ]; } - ]; - - hotkey-overlay = { - skip-at-startup = true; - hide-not-bound = false; - }; - - }; - }; - - }; -} diff --git a/old/home/desktop/niri/noctalia.nix b/old/home/desktop/niri/noctalia.nix deleted file mode 100755 index 0c0bf91..0000000 --- a/old/home/desktop/niri/noctalia.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ - inputs, outputs, config, pkgs, lib, - user, userDescription, - homeDirectory, - wallpapersPath, wallpaper, - avatarsPath, avatar, - ... -}: - -{ - #home-manager.users.${user} = { - # import the home manager module - imports = [ inputs.noctalia.homeModules.default ]; - - # configure options - # https://docs.noctalia.dev/getting-started/nixos/ - programs.noctalia-shell = { - enable = true; - settings = { - # configure noctalia here - - general = { - avatarImage = "${avatar}"; - radiusRatio = 0.2; - showSessionButtonOnLockScreen = false; - showHibernateOnLockScreen = true; - }; - - location = { - monthBeforeDay = true; - name = "Brisbane, Australia"; - }; - - colorSchemes = { predefinedScheme = "Monochrome"; }; - - wallpaper = { - directory = "${wallpapersPath}"; - hideWallpaperFilenames = true; - - }; - - appLauncher = { - terminalCommand = "kitty -e"; - showCategories = false; - }; - - bar = { - density = "comfortable"; - position = "top"; - showCapsule = false; - monitors = [ "DP-4" ]; - floating = true; - marginVertical = 0.25; - marginHorizontal = 0.5; - widgets = { - - left = [{ - icon = "rocket"; - id = "CustomButton"; - leftClickExec = "wofi"; - }]; - - center = [{ - hideUnoccupied = false; - id = "Workspace"; - labelMode = "none"; - }]; - - right = [ - { id = "Tray"; } - { id = "WiFi"; } - { id = "Bluetooth"; } - { - alwaysShowPercentage = false; - id = "Battery"; - warningThreshold = 30; - } - { - formatHorizontal = "HH:mm"; - formatVertical = "HH mm"; - id = "Clock"; - useMonospacedFont = true; - usePrimaryColor = true; - } - { - id = "ControlCenter"; - useDistroLogo = true; - } - ]; - - }; - }; - #ControlCenter = { }; - }; - # this may also be a string or a path to a JSON file, - # but in this case must include *all* settings. - }; - #}; -} diff --git a/old/home/desktop/niri/window-rules.nix b/old/home/desktop/niri/window-rules.nix deleted file mode 100755 index 7236d12..0000000 --- a/old/home/desktop/niri/window-rules.nix +++ /dev/null @@ -1,51 +0,0 @@ -_: -let - windowRules = [ - { - geometry-corner-radius = let radius = 16.0; - in { - bottom-left = radius; - bottom-right = radius; - top-left = radius; - top-right = radius; - }; - clip-to-geometry = true; - draw-border-with-background = false; - } - { - matches = [{ app-id = "kitty"; }]; - opacity = 0.95; - } - { - matches = [{ is-floating = true; }]; - default-floating-position = { - relative-to = "top-left"; - x = 1720; - y = 720; - }; - max-height = 720; - max-width = 1720; - opacity = 0.95; - shadow.enable = true; - } - { - matches = [{title = "python\s[A-Za-z]+\.py";}]; - open-floating = true; - open-focused = true; - } - { - matches = [{title = "Python Turtle Graphics";}]; - open-floating = true; - open-focused = true; - } - ]; -in { - programs.niri.settings = { - window-rules = windowRules; - layout = { background-color = "transparent"; }; - layer-rules = [{ - matches = [{ namespace = "^noctalia-wallpaper*"; }]; - place-within-backdrop = true; - }]; - }; -} diff --git a/old/home/desktop/wofi.nix b/old/home/desktop/wofi.nix deleted file mode 100755 index dca27f6..0000000 --- a/old/home/desktop/wofi.nix +++ /dev/null @@ -1,100 +0,0 @@ -{ config, ... }: { - - programs.wofi = { - enable = true; - - settings = { - term = "kitty"; - show = "drun"; - width = 500; - height = 300; - prompt = "Programs"; - normal_window = true; - key_exit = "Escape"; - key_expand = "Tab"; - layer = "top"; - gtk_dark = true; - orientation = "vertical"; - halign = "fill"; - line_wrap = "off"; - dynamic_lines = false; - allow_markup = true; - allow_images = true; - image_size = 24; - hide_scroll = true; - hide_search = false; - exec_search = false; - parse_search = false; - insensitive = true; - no_actions = true; - sort_order = "default"; - filter_rate = 100; - ## Steam not launching from wofi, but will launch in terminal - ## See: core/modules/gaming.nix - ## https://github.com/ValveSoftware/steam-for-linux/issues/9940 - disable_prime = false; - }; - - style = '' - /** ********** Fonts ********** **/ - - * { - font-family: "${config.theme.font}"; - font-weight: 500; - font-size: 12px; - } - - #window { - background-color: #${config.theme.colors.alt-bg}; - color: #${config.theme.colors.alt-fg}; - border-radius: ${toString config.theme.rounding}px; - } - - #outer-box { - padding: 20px; - } - - #input { - background-color: #${config.theme.colors.bg}; - border: 0px solid #${config.theme.colors.primary-bg}; - padding: 8px 12px; - } - - #scroll { - margin-top: 20px; - } - - #inner-box {} - - #img { - padding-right: 8px; - } - - #text { - color: #${config.theme.colors.color7}; - } - - #text:selected { - color: #${config.theme.colors.fg}; - } - - #entry { - padding: 6px; - } - - #entry:selected { - background-color: #${config.theme.colors.primary-bg}; - color: #${config.theme.colors.primary-fg}; - } - - #unselected {} - - #selected {} - - #input, - #entry:selected { - border-radius: ${toString (config.theme.rounding - 10)}px; - } - ''; - }; -} diff --git a/old/home/desktop/xdg-mime.nix b/old/home/desktop/xdg-mime.nix deleted file mode 100755 index e6f313d..0000000 --- a/old/home/desktop/xdg-mime.nix +++ /dev/null @@ -1,84 +0,0 @@ -# Mime allows us to configure the default applications for each file type -{ - xdg = { - mime.enable = true; - configFile."mimeapps.list" = { - #enable = true; # enables ? following declarations - force = true; # forces the following declarations - }; - #desktopEntries = { }; - mimeApps = { - enable = true; - associations = { - added = { - ## General Desktop - #"text/plain" = [ "nvim.desktop" ]; - "text/markdown" = [ "obsidian.desktop" ]; - "inode/directory" = [ "nautilus.desktop" ]; - ## Multimedia - "image/gif" = [ "gimp.desktop" ]; - "image/png" = [ "gimp.desktop" ]; - "image/jpg" = [ "gimp.desktop" ]; - "image/jpeg" = [ "gimp.desktop" ]; - "image/webp" = [ "gimp.desktop" ]; - "audio/aac" = [ "vlc.desktop" ]; - "audio/mp4" = [ "vlc.desktop" ]; - "audio/ogg" = [ "vlc.desktop" ]; - "audio/opus" = [ "vlc.desktop" ]; - "audio/mpeg" = [ "vlc.desktop" ]; - "audio/aiff" = [ "vlc.desktop" ]; - "audio/flac" = [ "vlc.desktop" ]; - - ## Web - "text/css" = [ "firefox.desktop" ]; - "text/html" = [ "firefox.desktop" ]; - "application/json" = [ "nvim.desktop" ]; - }; - }; - defaultApplications = { - ## General Desktop - "text/plain" = [ "nvim.desktop" ]; - "text/markdown" = [ "nvim.desktop" ]; - "inode/directory" = [ "yazi.desktop" ]; - "application/pdf" = [ "zathura.desktop" ]; - "application/zip" = [ "org.gnome.FileRoller.desktop" ]; - ## Multimedia - "image/gif" = [ "swayimg.desktop" ]; - "image/png" = [ "swayimg.desktop" ]; - "image/jpg" = [ "swayimg.desktop" ]; - "image/jpeg" = [ "swayimg.desktop" ]; - "image/webp" = [ "swayimg.desktop" ]; - "audio/aac" = [ "strawberry.desktop" ]; - "audio/mp4" = [ "strawberry.desktop" ]; - "audio/ogg" = [ "strawberry.desktop" ]; - "audio/opus" = [ "strawberry.desktop" ]; - "audio/mpeg" = [ "strawberry.desktop" ]; - "audio/aiff" = [ "strawberry.desktop" ]; - "audio/flac" = [ "strawberry.desktop" ]; - "audio/vnd.wav" = [ "strawberry.desktop" ]; - "video/mp4" = [ "vlc.desktop" ]; - "video/mpeg" = [ "vlc.desktop" ]; - "video/webm" = [ "vlc.desktop" ]; - "video/x-m4v" = [ "vlc.desktop" ]; - "video/x-msvideo" = [ "vlc.desktop" ]; - "video/quicktime" = [ "vlc.desktop" ]; - "video/x-matroska" = [ "vlc.desktop" ]; - ## Web - "text/css" = [ "nvim.desktop" ]; - "text/html" = [ "nvim.desktop" ]; - "application/json" = [ "firefox.desktop" ]; - "x-scheme-handler/ftp" = [ "firefox.desktop" ]; - "x-scheme-handler/http" = [ "firefox.desktop" ]; - "x-scheme-handler/https" = [ "firefox.desktop" ]; - ## Code - "text/x-shellscript" = [ "nvim.desktop" ]; - "text/x-xml" = [ "nvim.desktop" ]; - "text/x-yaml" = [ "nvim.desktop" ]; - "text/x-toml" = [ "nvim.desktop" ]; - "text/x-nix" = [ "nvim.desktop" ]; - "text/x-rust" = [ "nvim.desktop" ]; - "text/x-python" = [ "nvim.desktop" ]; - }; - }; - }; -} diff --git a/old/home/multimedia/default.nix b/old/home/multimedia/default.nix deleted file mode 100755 index 5cec779..0000000 --- a/old/home/multimedia/default.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ pkgs, ... }: - -{ - - imports = [ - ./music.nix - ]; - - ## Easy effects daemon - services.easyeffects.enable = true; - - home.packages = with pkgs; [ - - # Browsing & Filesharing - transmission_4-gtk # Torrent client - nicotine-plus # P2P Media sharing - carburetor # GUI settings for tractor - syncplay # Synchronise media playback - #lagrange # GUI Gemini browser - tractor # TOR network routing - tor # The Onion Router - - # Messaging & Social - #telegram-desktop - #fractal-next - #fractal - vesktop - - # Image - gimp # General image editing - #inkscape # Vector image editing - - # Video - vlc # Video playback - #shotcut # Video editing - - # 3D Creative - blender # 3D modelling software - orca-slicer # 3D print slicing - - # Miscellaneous - themix-gui # for creating gtk themes - obsidian # note taking - ]; - - programs = { - - # Web browser - firefox = { enable = true; }; - - # Note taking - obsidian = { - enable = true; - }; - - # Screenshare & recording - obs-studio = { - enable = true; - plugins = with pkgs.obs-studio-plugins; [ - wlrobs - #droidcam-obs - ]; - }; - }; - -} diff --git a/old/home/multimedia/music.nix b/old/home/multimedia/music.nix deleted file mode 100755 index f5d6291..0000000 --- a/old/home/multimedia/music.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: - -{ - - home = { - packages = with pkgs; [ - - ## Chore: pick an offline music player already lol - ## Requirements: - ## - have last.fm support - ## - match other UI styles - ## - handle large amounts of FLAC/HiRes audio - ## - optionally support metadata editing - - # Music players - spotify # corpo trash - strawberry # QT music player - #lollypop # GTK/Gnome native music player - #pragha # Music player - #tauon # Music player - - # Music Production - easyeffects # Effects and DSP - pavucontrol # Precise volume control - crosspipe # patchbay and routing - #neural-amp-modeler-lv2 # Guitar amp emulator - metronome # GTK metronome - bespokesynth # DAW/Synth - audacity # Audio editing and DAW - cardinal # Synth/VST - reaper # DAW - ardour # DAW - vital # Synth/VST - helm # Synth/VST - - # Misc. Tools - puddletag # Music metadata editor - libjack2 # unsure - zenity # unsure - glfw # unsure - - # Tidal/Supercollider - #supercollider-with-plugins - #tidal # vers. from flake input - #vim-tidal - #superdirt-start - #superdirt-install - ]; # ++ (with pkgs.haskellPackages; [ - #tidal # Pattern language for improvised music - #tidal # Pattern language for improvised music - #tidal-core # Core pattern library for Tidal - #tidal-vis # Visual rendering for Tidal patterns - #]); - }; - - ## Neovim plugins for Supercollider & Tidal Cycles - ## - full nvim environment for supercollider is WIP - ## - same goes for Tidal Cycles - #programs.nixvim.extraPlugins = with pkgs.vimPlugins; [ - #nvim-treesitter-parsers.supercollider # as below for SC - #vim-tidal # tidal cycles LSP for neovim - #]; - -} diff --git a/old/home/resources/avatars/avatar.jpg b/old/home/resources/avatars/avatar.jpg deleted file mode 100755 index b70ee3a..0000000 Binary files a/old/home/resources/avatars/avatar.jpg and /dev/null differ diff --git a/old/home/resources/btop.png b/old/home/resources/btop.png deleted file mode 100644 index aaacd60..0000000 Binary files a/old/home/resources/btop.png and /dev/null differ diff --git a/old/home/resources/desktop.png b/old/home/resources/desktop.png deleted file mode 100644 index a423e53..0000000 Binary files a/old/home/resources/desktop.png and /dev/null differ diff --git a/old/home/resources/theme/SerenityOS-GTK.nix b/old/home/resources/theme/SerenityOS-GTK.nix deleted file mode 100755 index 111f16e..0000000 --- a/old/home/resources/theme/SerenityOS-GTK.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs }: - -pkgs.stdenv.mkDerivation { - name = "$name"; - src = pkgs.fetchurl { - url = ""; - sha256 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; - }; - - dontUnpack = true; - - installPhase = '' - mkdir -p $out - ${pkgs.unzip}/bin/unzip $src -d $out/ - ''; -} diff --git a/old/home/resources/theme/SerenityOS.nix b/old/home/resources/theme/SerenityOS.nix deleted file mode 100755 index f04178e..0000000 --- a/old/home/resources/theme/SerenityOS.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ config, wallpapersPath, wallpaper, ... }: - -{ - imports = [ - #./template.nix - ]; - - theme = { - wallpaper = "${wallpaper}"; - lockscreenWallpaper = "${wallpapersPath}/attunement-HelveticaBlanc.png"; - waybar-transparent = true; - font-mono = "spleen 32x64"; - font = "spleen 32x64"; - rounding = 18; - gaps-in = 4; - gaps-out = 8; - border-size = 1; - - colors = { - bg = "000000"; - fg = "FCFCFC"; - alt-bg = "101012"; - alt-fg = "ECECEC"; - primary-ansi-16 = "cyan"; - primary-bg = "00cdff"; - primary-fg = "000000"; - secondary-bg = "11222e"; - secondary-fg = "000000"; - color0 = "000000"; - color1 = "f7768e"; - color2 = "73daca"; - color3 = "cfb264"; - color4 = "7a82f7"; - color5 = "a778F8"; - color6 = "7dd8ff"; - color7 = "E4E5E7"; - color8 = "515878"; - color9 = "f7869e"; - color10 = "83eada"; - color11 = "f0bf78"; - color12 = "8ab2f7"; - color13 = "A988F8"; - color14 = "8ddfff"; - color15 = "f4f5f7"; - }; - }; - -} diff --git a/old/home/resources/theme/default.nix b/old/home/resources/theme/default.nix deleted file mode 100755 index 7a8dc71..0000000 --- a/old/home/resources/theme/default.nix +++ /dev/null @@ -1,143 +0,0 @@ -{ lib, config, ... }: - -with lib; - -{ - - imports = [ - ./themepkgs.nix # imports declared theme packages - ]; - - ## Configurable options for themes - options.theme = { - - waybar-transparent = mkOption { - type = types.bool; - description = "Does waybar have a transparent background?"; - }; - - wallpaper = mkOption { - type = types.str; - description = "Name of the wallpaper (from the wallpapers directory)"; - }; - - lockscreenWallpaper = mkOption { - type = types.str; - description = "Name of the lockscreen wallpaper (from the wallpapers directory)"; - }; - - font = mkOption { - type = types.str; - description = "Default font"; - }; - - font-mono = mkOption { - type = types.str; - description = "Default mono font"; - }; - - rounding = mkOption { - type = types.int; - description = "Borders rounding"; - }; - - gaps-in = mkOption { - type = types.int; - description = "Gaps in"; - }; - - gaps-out = mkOption { - type = types.int; - description = "Gaps out"; - }; - - border-size = mkOption { - type = types.int; - description = "Border size"; - }; - - colors = let - mkColorOption = name: { - inherit name; - value = mkOption { - type = types.strMatching "[a-fA-F0-9]{6}"; - description = "Color ${name}."; - }; - }; - in listToAttrs (map mkColorOption [ - "bg" - "fg" - "alt-bg" - "alt-fg" - "primary-bg" - "primary-fg" - "secondary-bg" - "secondary-fg" - "color0" - "color1" - "color2" - "color3" - "color4" - "color5" - "color6" - "color7" - "color8" - "color9" - "color10" - "color11" - "color12" - "color13" - "color14" - "color15" - ]) // { - primary-ansi-16 = mkOption { - type = types.str; - description = - "Name of the primary color - ansi 16 colors (black, red, green, yellow, blue, magenta, cyan, white, bright-black, bright-red, bright-green, bright-yellow, bright-blue, bright-magenta, bright-cyan, bright-white)"; - }; - - primary-ansi-16-number = mkOption { - type = types.int; - description = "Set the primary color - ansi 16 colors (0-15)"; - }; - - }; - }; - - config.theme.colors.primary-ansi-16-number = - if config.theme.colors.primary-ansi-16 == "black" then - 0 - else if config.theme.colors.primary-ansi-16 == "red" then - 1 - else if config.theme.colors.primary-ansi-16 == "green" then - 2 - else if config.theme.colors.primary-ansi-16 == "yellow" then - 3 - else if config.theme.colors.primary-ansi-16 == "blue" then - 4 - else if config.theme.colors.primary-ansi-16 == "magenta" then - 5 - else if config.theme.colors.primary-ansi-16 == "cyan" then - 6 - else if config.theme.colors.primary-ansi-16 == "white" then - 7 - else if config.theme.colors.primary-ansi-16 == "bright-white" then - 8 - else if config.theme.colors.primary-ansi-16 == "bright-black" then - 9 - else if config.theme.colors.primary-ansi-16 == "bright-red" then - 10 - else if config.theme.colors.primary-ansi-16 == "bright-green" then - 11 - else if config.theme.colors.primary-ansi-16 == "bright-yellow" then - 12 - else if config.theme.colors.primary-ansi-16 == "bright-blue" then - 13 - else if config.theme.colors.primary-ansi-16 == "bright-magenta" then - 14 - else if config.theme.colors.primary-ansi-16 == "bright-cyan" then - 15 - else - 0; - -} diff --git a/old/home/resources/theme/serenityos-base.nix b/old/home/resources/theme/serenityos-base.nix deleted file mode 100755 index b816845..0000000 --- a/old/home/resources/theme/serenityos-base.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs }: - -pkgs.stdenv.mkDerivation { - name = "serenityos-base"; - - src = pkgs.fetchurl { - url = ""; - hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; - }; - - dontUnpack = true; - installPhase = '' - mkdir -p $out - ${pkgs.unzip}/bin/unzip $src -d $out/ - ''; -} diff --git a/old/home/resources/theme/stylix.nix b/old/home/resources/theme/stylix.nix deleted file mode 100755 index 69a78cf..0000000 --- a/old/home/resources/theme/stylix.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ lib, pkgs, ... }: -{ - stylix = { - - # global cursor - cursor = { - - }; - - # global fonts - fonts = { - - }; - - # global opacity - opacity = { - applications = 1.0; - terminal = 0.98; - desktop = 1.0; - popups = 0.98; - }; - - - # 'light' or 'dark' or 'either' - polarity = "dark"; - - # image to generate scheme from - image = path/to/wallpaper.img; - - # defined colour scheme - base16Scheme = { - base 00 = " "; - base 01 = " "; - base 02 = " "; - base 03 = " "; - base 04 = " "; - base 05 = " "; - base 06 = " "; - base 07 = " "; - base 08 = " "; - base 09 = " "; - base 0A = " "; - base 0B = " "; - base 0C = " "; - base 0D = " "; - base 0E = " "; - base 0f = " "; - }; - - }; -} diff --git a/old/home/resources/theme/sygil-plymouth.nix b/old/home/resources/theme/sygil-plymouth.nix deleted file mode 100644 index 3038b3b..0000000 --- a/old/home/resources/theme/sygil-plymouth.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - stdenvNoCC, - fetchFromGitea, - lib, - unstableGitUpdater, -}: - -stdenvNoCC.mkDerivation { - name = "plymouth-sygil-theme"; - version = "0.2.0"; - - src = fetchFromGitea { - domain = "codeberg.org"; - owner = "Serenity-F"; - repo = "sygil-plymouth"; - rev = "0.2.0"; - hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; - }; - - dontBuild = true; - - installPhase = '' - runHook preInstall - mkdir -p $out/share/plymouth/themes/sygil - cp sygil/* $out/share/plymouth/themes/sygil - chmod +x $out/share/plymouth/themes/sygil/sygil.plymouth - substituteInPlace $out/share/plymouth/themes/sygil/sygil.plymouth \ - --replace-fail "/usr/" "$out/" - runHook postInstall - ''; - - passthru.updateScript = unstableGitUpdater { }; - - meta = { - description = "Animated sygil Plymouth theme."; - homepage = "https://codeberg.org/Serenity-F/sygil-plymouth"; - license = with lib.licenses; [ gpl3Only ]; - platforms = lib.platforms.linux; - maintainers = with lib.maintainers; [ Serenity-F ]; - }; - -} diff --git a/old/home/resources/theme/template.nix b/old/home/resources/theme/template.nix deleted file mode 100755 index 64a40c3..0000000 --- a/old/home/resources/theme/template.nix +++ /dev/null @@ -1,95 +0,0 @@ -{ lib, ... }: - -with lib; - -{ - options.theme = { - - waybar-transparent = mkOption { - type = types.bool; - description = "Does waybar have a transparent background?"; - }; - - wallpaper = mkOption { - type = types.str; - description = "Name of the wallpaper (from the wallpapers directory)"; - }; - - font = mkOption { - type = types.str; - description = "Default font"; - }; - - font-mono = mkOption { - type = types.str; - description = "Default mono font"; - }; - - rounding = mkOption { - type = types.int; - description = "Borders rounding"; - }; - - gaps-in = mkOption { - type = types.int; - description = "Gaps in"; - }; - - gaps-out = mkOption { - type = types.int; - description = "Gaps out"; - }; - - border-size = mkOption { - type = types.int; - description = "Border size"; - }; - - colors = let - mkColorOption = name: { - inherit name; - value = mkOption { - type = types.strMatching "[a-fA-F0-9]{6}"; - description = "Color ${name}."; - }; - }; - in listToAttrs (map mkColorOption [ - "bg" - "fg" - "alt-bg" - "alt-fg" - "primary-bg" - "primary-fg" - "secondary-bg" - "secondary-fg" - "color0" - "color1" - "color2" - "color3" - "color4" - "color5" - "color6" - "color7" - "color8" - "color9" - "color10" - "color11" - "color12" - "color13" - "color14" - "color15" - ]) // { - primary-ansi-16 = mkOption { - type = types.str; - description = - "Name of the primary color - ansi 16 colors (black, red, green, yellow, blue, magenta, cyan, white, bright-black, bright-red, bright-green, bright-yellow, bright-blue, bright-magenta, bright-cyan, bright-white)"; - }; - - primary-ansi-16-number = mkOption { - type = types.int; - description = "Set the primary color - ansi 16 colors (0-15)"; - }; - - }; - }; -} diff --git a/old/home/resources/theme/themepkgs.nix b/old/home/resources/theme/themepkgs.nix deleted file mode 100755 index a5c7503..0000000 --- a/old/home/resources/theme/themepkgs.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, ... }: - -{ - - home.packages = with pkgs; [ - materia-theme-transparent - materia-theme - colloid-gtk-theme - #colloid-kde - adapta-gtk-theme - adapta-kde-theme - gnome-themes-extra - materia-theme - ]; - -} diff --git a/old/home/resources/wallpapers/almondBlossoms-VanGogh.jpg b/old/home/resources/wallpapers/almondBlossoms-VanGogh.jpg deleted file mode 100755 index 0ebb907..0000000 Binary files a/old/home/resources/wallpapers/almondBlossoms-VanGogh.jpg and /dev/null differ diff --git a/old/home/resources/wallpapers/attunement-HelveticaBlanc.png b/old/home/resources/wallpapers/attunement-HelveticaBlanc.png deleted file mode 100755 index 82c8dc2..0000000 Binary files a/old/home/resources/wallpapers/attunement-HelveticaBlanc.png and /dev/null differ diff --git a/old/home/terminal/btop.nix b/old/home/terminal/btop.nix deleted file mode 100755 index 9a52bd1..0000000 --- a/old/home/terminal/btop.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - - programs = { - - btop = { - enable = true; - settings = { - color_theme = "adapta"; - theme_background = false; - }; - #package = with pkgs; [ - #btop - #]; - }; - - }; - -} diff --git a/old/home/terminal/default.nix b/old/home/terminal/default.nix deleted file mode 100755 index 4a763a7..0000000 --- a/old/home/terminal/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ ... }: - -{ - imports = [ - - ./git.nix # Version control - ./yazi.nix # File browser - ./fish.nix # Shell prompt - ./btop.nix # Task manager - ./kitty.nix # Catgirl terminal - - #./fetch # CHOOSE FETCH PROVIDER - #./neofetch.nix # OG fetch - ./fastfetch.nix # New fetch - - ./nvim # Neovim config, stolen - ]; -} diff --git a/old/home/terminal/fastfetch.nix b/old/home/terminal/fastfetch.nix deleted file mode 100755 index b45678a..0000000 --- a/old/home/terminal/fastfetch.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, pkgs, ... }: - -{ - - home = { - packages = with pkgs; [ - peaclock # neat terminal clock applet - cmatrix # funky terminal matrix rain - ]; - }; - - programs.fastfetch = { - enable = true; - #package = with pkgs; [ - #fastfetch - #fastfetchMinimal - #]; - - #settings = { - #"$schema" = "https://github.com/fastfetch=cli/fastfetch/raw/dev/doc/json_schema.json"; - - #logo = { - - #}; - - #display = { - - #}; - - #}; - - }; - -} diff --git a/old/home/terminal/fish.nix b/old/home/terminal/fish.nix deleted file mode 100755 index 8b94fc5..0000000 --- a/old/home/terminal/fish.nix +++ /dev/null @@ -1,245 +0,0 @@ -{ pkgs, flakePath, ... }: - -{ - - programs = { - - starship = { enable = true; }; - - fish = { - - enable = true; - - loginShellInit = ""; - - interactiveShellInit = ""; - - plugins = [ - { - name = "done"; - src = pkgs.fishPlugins.done.src; - } - { - name = "puffer"; - src = pkgs.fishPlugins.puffer.src; - } - { - name = "autopair"; - src = pkgs.fishPlugins.autopair.src; - } - ]; - - shellAbbrs = { - - ## Nonspecific abbreviations - reload = "exec fish"; - nv = "nvim"; - sc = "sudo systemctl"; - trc = "tree -C"; - rbu = "sudo systemctl reboot --firmware-setup"; - - ## Nix abbreviations - nd = "cd ${flakePath}"; - nxp = "nix-shell --command fish -p"; - - ## Git abbreviations - g = "git"; - ga = "git add"; - gaa = "git add --all"; - gau = "git add -u"; - gb = "git branch"; - gco = "git checkout"; - gc = "git commit"; - gcl = "git clone"; - gd = "git diff"; - gf = "git fetch"; - gl = "git log"; - gm = "git merge"; - gp = "git push"; - gpl = "git pull"; - gsw = "git switch"; - }; - - shellAliases = { - git-master-to-main = - "git branch -m master main && git push origin :master main:main"; - }; - - functions = { - - fish_greeting = '' - if type -q kitty-img - printf '๐Ÿ’– hiya serenity ' - echo ' 'welcome to $hostname "~" ๐Ÿณ๏ธโ€โšง๏ธ - else - echo ๐Ÿ’– hiya serenity welcome to $hostname "~" ๐Ÿณ๏ธโ€โšง๏ธ - end - ''; - - gethost = '' - if test -f /run/.containerenv - function gethost - grep -F name= /run/.containerenv | cut -d '"' -f2; - end - else if command -v hostnamectl &> /dev/null - function gethost --wraps=hostnamectl --description 'alias gethost hostnamectl' - hostnamectl --pretty; - end - else if command -v hostname &> /dev/null - function gethost --wraps=hostname --description 'alias gethost hostname -s' - hostname -s; - end - else - function gethost --wraps=hostname --description 'alias gethost hostname' - echo host_error; - end - end - ''; - - mommy = '' - set -g prev_status $status - - # SHELL_MOMMYS_LITTLE - what to call you~ (default: "girl") - # SHELL_MOMMYS_PRONOUNS - what pronouns mommy will use for themself~ (default: "her") - # SHELL_MOMMYS_ROLES - what role mommy will have~ (default "mommy") - - set -g COLORS_LIGHT_PINK '\e[38;5;217m' - set -g COLORS_LIGHT_BLUE '\e[38;5;117m' - set -g COLORS_FAINT '\e[2m' - set -g COLORS_RESET '\e[0m' - - set -g DEF_WORDS_LITTLE "girl" - set -g DEF_WORDS_PRONOUNS "her" - set -g DEF_WORDS_ROLES "mommy" - set -g DEF_MOMMY_COLOR "$COLORS_LIGHT_PINK" - set -g DEF_ONLY_NEGATIVE "false" - - set -g NEGATIVE_RESPONSES \ - "do you need MOMMYS_ROLE's help~? โค๏ธ" \ - "Don't give up, my love~ โค๏ธ" \ - "Don't worry, MOMMYS_ROLE is here to help you~ โค๏ธ" \ - "I believe in you, my sweet AFFECTIONATE_TERM~ โค๏ธ" \ - "It's okay to make mistakes, my dear~ โค๏ธ" \ - "just a little further, sweetie~ โค๏ธ" \ - "Let's try again together, okay~? โค๏ธ" \ - "MOMMYS_ROLE believes in you, and knows you can overcome this~ โค๏ธ" \ - "MOMMYS_ROLE believes in you~ โค๏ธ" \ - "MOMMYS_ROLE is always here for you, no matter what~ โค๏ธ" \ - "MOMMYS_ROLE is here to help you through it~ โค๏ธ" \ - "MOMMYS_ROLE is proud of you for trying, no matter what the outcome~ โค๏ธ" \ - "MOMMYS_ROLE knows it's tough, but you can do it~ โค๏ธ" \ - "MOMMYS_ROLE knows MOMMYS_PRONOUN little AFFECTIONATE_TERM can do better~ โค๏ธ" \ - "MOMMYS_ROLE knows you can do it, even if it's tough~ โค๏ธ" \ - "MOMMYS_ROLE knows you're feeling down, but you'll get through it~ โค๏ธ" \ - "MOMMYS_ROLE knows you're trying your best~ โค๏ธ" \ - "MOMMYS_ROLE loves you, and is here to support you~ โค๏ธ" \ - "MOMMYS_ROLE still loves you no matter what~ โค๏ธ" \ - "You're doing your best, and that's all that matters to MOMMYS_ROLE~ โค๏ธ" \ - "MOMMYS_ROLE is always here to encourage you~ โค๏ธ" - - set -g POSITIVE_RESPONSES \ - "*pets your head*" \ - "awe, what a good AFFECTIONATE_TERM~\nMOMMYS_ROLE knew you could do it~ โค๏ธ" \ - "good AFFECTIONATE_TERM~\nMOMMYS_ROLE's so proud of you~ โค๏ธ" \ - "Keep up the good work, my love~ โค๏ธ" \ - "MOMMYS_ROLE is proud of the progress you've made~ โค๏ธ" \ - "MOMMYS_ROLE is so grateful to have you as MOMMYS_PRONOUN little AFFECTIONATE_TERM~ โค๏ธ" \ - "I'm so proud of you, my love~ โค๏ธ" \ - "MOMMYS_ROLE is so proud of you~ โค๏ธ" \ - "MOMMYS_ROLE loves seeing MOMMYS_PRONOUN little AFFECTIONATE_TERM succeed~ โค๏ธ" \ - "MOMMYS_ROLE thinks MOMMYS_PRONOUN little AFFECTIONATE_TERM earned a big hug~ โค๏ธ" \ - "that's a good AFFECTIONATE_TERM~ โค๏ธ" \ - "you did an amazing job, my dear~ โค๏ธ" \ - "you're such a smart cookie~ โค๏ธ" - - # allow for overriding of default words (IF ANY SET) - - if test -n "$SHELL_MOMMYS_LITTLE" - set DEF_WORDS_LITTLE "$SHELL_MOMMYS_LITTLE" - end - if test -n "$SHELL_MOMMYS_PRONOUNS" - set DEF_WORDS_PRONOUNS "$SHELL_MOMMYS_PRONOUNS" - end - if test -n "$SHELL_MOMMYS_ROLES" - set DEF_WORDS_ROLES "$SHELL_MOMMYS_ROLES" - end - if test -n "$SHELL_MOMMYS_COLOR" - set DEF_MOMMY_COLOR "$SHELL_MOMMYS_COLOR" - end - # allow overriding to true - if test "$SHELL_MOMMYS_ONLY_NEGATIVE" = "true" - set DEF_ONLY_NEGATIVE "true" - end - # if the array is set for positive/negative responses, overwrite it - if test -n "$SHELL_MOMMYS_POSITIVE_RESPONSES" - set POSITIVE_RESPONSES "$SHELL_MOMMYS_POSITIVE_RESPONSES" - end - if test -n "$SHELL_MOMMYS_NEGATIVE_RESPONSES" - set NEGATIVE_RESPONSES "$SHELL_MOMMYS_NEGATIVE_RESPONSES" - end - - # split a string on forward slashes and return a random element - function pick_word - random choice (string split -n / $argv) - end - - function pick_response # given a response type, pick an entry from the array - - if test $argv[1] = "positive" - set element (random choice $POSITIVE_RESPONSES) - else if test $argv[1] = "negative" - set element (random choice $NEGATIVE_RESPONSES) - else - echo "Invalid response type: $argv[1]" - exit 1 - end - - # Return the selected response - echo "$element" - - end - - function sub_terms # given a response, sub in the appropriate terms - set -l response $argv - # pick_word for each term - set -l affectionate_term (pick_word $DEF_WORDS_LITTLE) - set -l pronoun (pick_word $DEF_WORDS_PRONOUNS) - set -l role (pick_word $DEF_WORDS_ROLES) - # sub in the terms, store in variable - set -l response (echo "$response" | string replace "AFFECTIONATE_TERM" "$affectionate_term") - set -l response (echo "$response" | string replace "MOMMYS_PRONOUN" "$pronoun") - set -l response (echo "$response" | string replace "MOMMYS_ROLE" "$role") - # we have string literal newlines in the response, so we need to printf it out - # print faint and colorcode - echo -e "$DEF_MOMMY_COLOR$response$COLORS_RESET" - end - - function success - if test "$DEF_ONLY_NEGATIVE" = "true" - return 0 - end - # pick_response for the response type - set -l response (pick_response "positive") - sub_terms "$response" >&2 - return 0 - end - - function failure - set -l response (pick_response "negative") - sub_terms "$response" >&2 - return $prev_status - end - - if test $prev_status -eq 0 - success - else - failure - end - ''; - }; - - }; - - }; - -} diff --git a/old/home/terminal/git.nix b/old/home/terminal/git.nix deleted file mode 100755 index e96cb2b..0000000 --- a/old/home/terminal/git.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ pkgs, config, ... }: - -{ - programs.git = { - # Enable git with home-manager - enable = true; - settings = { - user = { - # User details - name = "serenity-F"; - email = "serenity-F@noreply.codeberg.org"; - # Path to user signing key - signingKey = "/home/serenity/.ssh/id_ed25519.pub"; - }; - - # Use SSH keys for auth - gpg.format = "ssh"; - commit.gpgSign = true; - - # Use "main" as default branch - init.defaultBranch = "main"; - # Automatically track remote branch - push.autoSetupRemote = true; - - }; - - ## OLD SETTINGS - #userName = "serenity-F"; - #userEmail = "serenity-F@noreply.codeberg.org"; - #extraConfig = { - #init.defaultBranch = "main"; - #gpg.format = "ssh"; - #commit.gpgSign = true; - #user.signingKey = "/home/serenity/.ssh/id_ed25519.pub"; - #push.autoSetupRemote = true; - #}; - }; -} diff --git a/old/home/terminal/kitty.nix b/old/home/terminal/kitty.nix deleted file mode 100755 index 178bde4..0000000 --- a/old/home/terminal/kitty.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ config, pkgs, ... }: - -{ - - home = { packages = with pkgs; [ kitty ]; }; - - #programs.alacritty.enable = true; - - programs.fzf = { - # CLI fuzzy find - enable = true; - enableFishIntegration = true; - }; - - ## Enables kitty via home-manager - programs.kitty = { - enable = true; - - ## Declares "spleen" as the font - font = { - name = "spleen 32x64"; - size = 12; - }; - - ## Unsure if this is needed, but it should enhance fish integration ? - shellIntegration.enableFishIntegration = true; - - settings = { - - ## This enables fish as the default shell - shell = "${pkgs.fish}/bin/fish"; - - ## Misc. - url_style = "curly"; - scrollback_lines = 10000; - disable_ligatures = "never"; - enable_audio_bell = false; - update_check_interval = 0; - confirm_os_window_close = "0"; - - ## Cursor - cursor_shape = "Underline"; - cursor_underline_thickness = 1; - cursor_shape_unfocused = "unchanged"; - - ## Window - window_padding_width = 5; - initial_window_width = 1200; - initial_window_height = 600; - remember_window_size = "no"; - - ## Colours - cursor = "#" + config.theme.colors.fg; - cursor_text_color = "#" + config.theme.colors.bg; - background = "#" + config.theme.colors.bg; - background_blur = 2; - background_opacity = "0.82"; - selection_foreground = "#" + config.theme.colors.primary-fg; - selection_background = "#" + config.theme.colors.primary-bg; - url_color = "#" + config.theme.colors.primary-fg; - - ## Declared in home/resources/themes/${themeName} - color0 = "#" + config.theme.colors.color0; - color8 = "#" + config.theme.colors.color8; - color1 = "#" + config.theme.colors.color1; - color9 = "#" + config.theme.colors.color9; - color2 = "#" + config.theme.colors.color2; - color10 = "#" + config.theme.colors.color10; - color3 = "#" + config.theme.colors.color3; - color11 = "#" + config.theme.colors.color11; - color4 = "#" + config.theme.colors.color4; - color12 = "#" + config.theme.colors.color12; - color5 = "#" + config.theme.colors.color5; - color13 = "#" + config.theme.colors.color13; - color6 = "#" + config.theme.colors.color6; - color14 = "#" + config.theme.colors.color14; - color7 = "#" + config.theme.colors.color7; - color15 = "#" + config.theme.colors.color15; - - }; - }; -} diff --git a/old/home/terminal/neofetch.nix b/old/home/terminal/neofetch.nix deleted file mode 100755 index 010bd3a..0000000 --- a/old/home/terminal/neofetch.nix +++ /dev/null @@ -1,143 +0,0 @@ -{ options, lib, pkgs, config, ... }: - -{ - - home.packages = with pkgs; [ hyfetch neofetch ]; - - xdg.configFile."neofetch/ascii.txt".text = '' - ''${c6} - - @@ - @@@ - @@@ - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - - - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - @@@ - @@@ - @@ - - ''; - - xdg.configFile."neofetch/config.conf".text = '' - - print_info() { - prin "\n" - prin "\n \n OS" "SerenityOS" - info "\n \n Distro" distro - info "\n \n Kernel" kernel - info "\n \n Packages" packages - info "\n \n Desktop" de - #prin "\n \n Desktop" "Hyprland (wayland)" - info "\n \n Shell" shell - #prin "\n \n Shell" "Fish" - info "\n \n Editor" editor - #prin "\n \n Editor" "Neovim" - info "\n \n Terminal" term - #prin "\n \n Terminal" "Kitty" - info "\n \n Terminal Font" term_font - #prin "\n \n Terminal Font" "Spleen" - #info "\n \n Model" model - #prin "\n \n Motherboard" "MSI Z97 G3" - prin "\n \n Device" "Hades" - info "\n \n Processor" cpu - info "\n \n Memory" memory - info "\n \n GPU" gpu - #prin "\n \n Graphics" "Radeon RX 5700XT" - #info "\n \n Resolution" resolution - #info "\n \n Uptime" uptime - prin "\n" - #prin "\n" - - } - - reset="\033[0m" - gray="\033[1;90m" - red="\033[1;31m" - green="\033[1;32m" - yellow="\033[1;33m" - blue="\033[1;34m" - magenta="\033[1;35m" - cyan="\033[1;36m" - white="\033[1;37m" - - cl0="''${gray}" - cl1="''${red}" - cl2="''${green}" - cl3="''${yellow}" - cl4="''${blue}" - cl5="''${magenta}" - cl6="''${cyan}" - cl7="''${white}" - - title_fqdn="off" - kernel_shorthand="on" - distro_shorthand="on" - os_arch="off" - uptime_shorthand="on" - memory_percent="off" - memory_unit="mib" - mem_precision=0 - package_managers="on" - shell_path="off" - shell_version="on" - speed_type="bios_limit" - speed_shorthand="on" - cpu_brand="off" - cpu_speed="on" - cpu_cores="off" - cpu_temp="off" - gpu_brand="off" - gpu_type="dedicated" - refresh_rate="off" - gtk_shorthand="on" - gtk2="on" - gtk3="on" - de_version="on" - disk_show=('/storage/emulated' '/' '/server') - disk_subtitle="none" - disk_percent="on" - music_player="auto" - song_format="%artist% - %album% - %title%" - song_shorthand="off" - mpc_args=() - colors=(${toString config.theme.colors.primary-ansi-16-number} 1 ${ - toString config.theme.colors.primary-ansi-16-number - } ${toString config.theme.colors.primary-ansi-16-number} 7) - bold="on" - underline_enabled="on" - underline_char="-" - separator=":" - block_range=(0 15) - color_blocks="on" - block_width=3 - block_height=1 - col_offset="auto" - bar_char_elapsed="-" - bar_char_total="=" - bar_border="on" - bar_length=15 - bar_color_elapsed="distro" - bar_color_total="distro" - cpu_display="off" - memory_display="on" - battery_display="off" - disk_display="off" - image_backend="ascii" - image_source="$HOME/.config/neofetch/ascii.txt" - ascii_distro="auto" - ascii_colors=(distro) - ascii_bold="on" - image_loop="off" - thumbnail_dir="''${XDG_CACHE_HOME:-''${HOME}/.cache}/thumbnails/neofetch" - crop_mode="normal" - crop_offset="center" - image_size="auto" - gap=2 - yoffset=0 - xoffset=0 - background_color= - stdout="off" - ''; -} diff --git a/old/home/terminal/nvim/default.nix b/old/home/terminal/nvim/default.nix deleted file mode 100755 index 7ef6c9f..0000000 --- a/old/home/terminal/nvim/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ inputs, ... }: { - - imports = [ - - inputs.nixvim.homeModules.nixvim # uses the module channel from `flake.nix` - ./keymaps.nix # keybinds - - ## Neovim plugins - ./plugins/utils.nix - ./plugins/ui.nix - ./plugins/lsp.nix - ./plugins/markdown.nix - ./plugins/telescope.nix - ]; - - ## Enables nixvim - programs = { - - nixvim = { - enable = true; - globals = { mapleader = " "; }; - - opts = { - updatetime = 50; # Faster completion - number = true; - relativenumber = true; - autoindent = true; - clipboard = "unnamed,unnamedplus"; - expandtab = true; - tabstop = 2; - softtabstop = 2; - shiftwidth = 2; - smartindent = true; - breakindent = true; - ignorecase = true; - incsearch = true; - hlsearch = true; - smartcase = true; - wildmode = "list:longest"; - completeopt = [ "menuone" "noselect" "noinsert" ]; - signcolumn = "yes"; - cursorline = false; - scrolloff = 8; - mouse = "a"; - termguicolors = true; - showmode = false; - wrap = false; - swapfile = false; - undofile = true; - conceallevel = 3; - - }; - }; - - }; - -} diff --git a/old/home/terminal/nvim/keymaps.nix b/old/home/terminal/nvim/keymaps.nix deleted file mode 100755 index e4deb24..0000000 --- a/old/home/terminal/nvim/keymaps.nix +++ /dev/null @@ -1,310 +0,0 @@ -{ - programs.nixvim = { - plugins.which-key = { - enable = true; - settings = { - delay = 600; - icons = { - breadcrumb = "ยป"; - group = "+"; - separator = "๎ฎŠ"; # โžœ - mappings = false; - }; - spec = [ - # General Mappings - { - __unkeyed-1 = "c"; - mode = [ "n" "v" ]; - group = "+code"; - } - { - __unkeyed-1 = "d"; - mode = [ "n" "v" ]; - group = "+debug"; - } - { - __unkeyed-1 = "s"; - mode = "n"; - group = "+search"; - } - { - __unkeyed-1 = "m"; - mode = "n"; - group = "+markdown"; - } - { - __unkeyed-1 = "t"; - mode = "n"; - group = "+trouble"; - } - { - __unkeyed-1 = "u"; - mode = "n"; - group = "+ui"; - } - { - __unkeyed-1 = "w"; - mode = "n"; - group = "+windows"; - } - { - __unkeyed-1 = "h"; - mode = "n"; - group = "+harpoon"; - } - ]; - win = { - border = "rounded"; - wo.winblend = 0; - }; - }; - }; - - keymaps = [ - # General Mappings - { - key = "e"; - action = "Oil --float"; - options.desc = "Oil"; - } - { - key = "-"; - action = "Oil"; - options.desc = "Oil"; - } - { - key = "E"; - action = "Neotree toggle"; - options.desc = "Neotree"; - } - - { - key = "s"; - action = "lua require('flash').jump()"; - options.desc = "Flash"; - } - { - key = "K"; - action = "lua vim.lsp.buf.hover()"; - options.desc = "LSP Hover"; - } - - { - key = ""; - action = "TmuxNavigateLeft"; - } - { - key = ""; - action = "TmuxNavigateDown"; - } - { - key = ""; - action = "TmuxNavigateUp"; - } - { - key = ""; - action = "TmuxNavigateRight"; - } - - # UI - { - key = "uz"; - action = "ZenMode"; - options.desc = "Toggle ZenMode"; - } - { - key = "uw"; - action = "set wrap!"; - options.desc = "Toggle word wrapping"; - } - { - key = "ul"; - action = "set linebreak!"; - options.desc = "Toggle linebreak"; - } - { - key = "us"; - action = "set spell!"; - options.desc = "Toggle spellcheck"; - } - { - key = "uc"; - action = "set cursorline!"; - options.desc = "Toggle cursorline"; - } - { - key = "un"; - action = "set number!"; - options.desc = "Toggle line numbers"; - } - { - key = "ur"; - action = "set relativenumber!"; - options.desc = "Toggle relative line numbers"; - } - { - key = "ut"; - action = "set showtabline=2"; - options.desc = "Show tabline"; - } - { - key = "uT"; - action = "set showtabline=0"; - options.desc = "Hide tabline"; - } - - # Search - { - key = " "; - action = "lua require('telescope.builtin').find_files()"; - options.desc = "Telescope"; - } - { - key = "sg"; - action = "lua require('telescope.builtin').live_grep()"; - options.desc = "Livegrep"; - } - { - key = "sf"; - action = "lua require('telescope.builtin').find_files()"; - options.desc = "Find Files"; - } - { - key = "sb"; - action = "lua require('telescope.builtin').buffers()"; - options.desc = "Buffers"; - } - { - key = "sh"; - action = "lua require('telescope.builtin').help_tags()"; - options.desc = "Help Tags"; - } - { - key = "sc"; - action = "lua require('telescope.builtin').commands()"; - options.desc = "Commands"; - } - { - key = "sm"; - action = "lua require('telescope.builtin').marks()"; - options.desc = "Marks"; - } - { - key = "so"; - action = "lua require('telescope.builtin').oldfiles()"; - options.desc = "Oldfiles"; - } - { - key = "ss"; - action = "lua require('telescope.builtin').spell_suggest()"; - options.desc = "Spell Suggest"; - } - { - key = "sr"; - action = ":noh"; - options.desc = "Reset search"; - } - { - key = "st"; - action = "TodoTelescope"; - options.desc = "Todos"; - } - - # Trouble - { - key = "tx"; - action = "Trouble diagnostics toggle"; - options.desc = "Diagnostics (Trouble)"; - } - { - key = "tX"; - action = "Trouble diagnostics toggle filter.buf=0"; - options.desc = "Buffer Diagnostics (Trouble)"; - } - { - key = "ts"; - action = "Trouble symbols toggle focus=false"; - options.desc = "Symbols (Trouble)"; - } - { - key = "tl"; - action = "Trouble lsp toggle focus=false win.position=right"; - options.desc = "LSP Definitions / references / ... (Trouble)"; - } - { - key = "tL"; - action = "Trouble loclist toggle"; - options.desc = "Location List (Trouble)"; - } - { - key = "tQ"; - action = "Trouble qflist toggle"; - options.desc = "Quickfix List (Trouble)"; - } - - # Windows - { - key = "ws"; - action = "split"; - options.desc = "Split"; - } - { - key = "wv"; - action = "vsplit"; - options.desc = "VSplit"; - } - { - key = "wd"; - action = "close"; - options.desc = "Close"; - } - - # Code - { - key = "cd"; - action = "lua vim.lsp.buf.definition()"; - options.desc = "LSP Definition"; - } - { - key = "cr"; - action = "lua vim.lsp.buf.references()"; - options.desc = "LSP References"; - } - { - key = "ct"; - action = "lua vim.lsp.buf.type_definition()"; - options.desc = "LSP Type Definition"; - } - { - key = "ca"; - action = "lua vim.lsp.buf.code_action()"; - options.desc = "LSP Code Action"; - } - { - key = "cf"; - action = "lua vim.lsp.buf.formatting()"; - options.desc = "LSP Formatting"; - } - { - key = "cn"; - action = "lua vim.lsp.diagnostic.goto_next()"; - options.desc = "LSP Next Diagnostic"; - } - { - key = "cp"; - action = "lua vim.lsp.diagnostic.goto_prev()"; - options.desc = "LSP Previous Diagnostic"; - } - { - key = "cu"; - action = "lua require('dapui').toggle()"; - options.desc = "Toggle Dapui"; - } - { - key = "cb"; - action = "lua require('dap').toggle_breakpoint()"; - options.desc = "Toggle breakpoint"; - } - ]; - }; -} diff --git a/old/home/terminal/nvim/plugins/lsp.nix b/old/home/terminal/nvim/plugins/lsp.nix deleted file mode 100755 index 6a5ab51..0000000 --- a/old/home/terminal/nvim/plugins/lsp.nix +++ /dev/null @@ -1,169 +0,0 @@ -{ - programs.nixvim.plugins = { - - ## Misc. LSP related plugins - web-devicons.enable = true; - bufferline.enable = true; - - ## Language syntax processing - lsp-format.enable = true; - lsp = { - enable = true; - servers = { - html.enable = true; # HTML - cssls.enable = true; # CSS - marksman.enable = true; # Markdown - bashls.enable = true; # Bash - fish_lsp.enable = true; # Fish - pyright.enable = true; # Python - rls.enable = true; # Rust - hls = { - enable = true; # Haskell - installGhc = true; # GHC - }; - nixd = { - enable = true; # Nix - extraOptions = { expr = "import {}"; }; # uhhh - }; - }; - keymaps.lspBuf = { - "gd" = "definition"; - "gD" = "references"; - "gt" = "type_definition"; - "gi" = "implementation"; - "K" = "hover"; - }; - }; - none-ls = { - enable = true; - sources = { - diagnostics = { - golangci_lint.enable = true; - statix.enable = true; - }; - formatting = { - tidy.enable = true; - markdownlint.enable = true; - shfmt.enable = true; - shellharden.enable = true; - nixfmt.enable = true; - }; - }; - }; - - ## Completion - luasnip.enable = true; - cmp-buffer = { enable = true; }; - cmp-emoji = { enable = true; }; - cmp-nvim-lsp = { enable = true; }; - cmp-path = { enable = true; }; - cmp_luasnip = { enable = true; }; - - cmp = { - enable = true; - settings = { - snippet.expand = - "function(args) require('luasnip').lsp_expand(args.body) end"; - sources = [ - { name = "nvim_lsp"; } - { name = "luasnip"; } - { - name = "buffer"; - option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; - } - { name = "nvim_lua"; } - { name = "mkdnflow"; } - { name = "path"; } - ]; - - formatting = { - fields = [ "abbr" "kind" "menu" ]; - format = - # lua - '' - function(_, item) - local icons = { - Namespace = "๓ฐŒ—", - Text = "๓ฐ‰ฟ", - Method = "๓ฐ†ง", - Function = "๓ฐ†ง", - Constructor = "๏ฃ", - Field = "๓ฐœข", - Variable = "๓ฐ€ซ", - Class = "๓ฐ ฑ", - Interface = "๏ƒจ", - Module = "๏’‡", - Property = "๓ฐœข", - Unit = "๓ฐ‘ญ", - Value = "๓ฐŽ ", - Enum = "๏…", - Keyword = "๓ฐŒ‹", - Snippet = "๏‘", - Color = "๓ฐ˜", - File = "๓ฐˆš", - Reference = "๓ฐˆ‡", - Folder = "๓ฐ‰‹", - EnumMember = "๏…", - Constant = "๓ฐฟ", - Struct = "๓ฐ™…", - Event = "๏ƒง", - Operator = "๓ฐ†•", - TypeParameter = "๓ฐŠ„", - Table = "๏ƒŽ", - Object = "๓ฐ…ฉ", - Tag = "๏€ซ", - Array = "[]", - Boolean = "๏‚", - Number = "๏Š’", - Null = "๓ฐŸข", - String = "๓ฐ‰ฟ", - Calendar = "๏ณ", - Watch = "๓ฐฅ”", - Package = "๎˜ค", - Copilot = "๏„“", - Codeium = "๏ƒ", - TabNine = "๏ƒง", - } - - local icon = icons[item.kind] or "" - item.kind = string.format("%s %s", icon, item.kind or "") - return item - end - ''; - }; - - window = { - completion = { - winhighlight = - "FloatBorder:CmpBorder,Normal:CmpPmenu,Search:PmenuSel"; - scrollbar = false; - sidePadding = 0; - border = [ "โ•ญ" "โ”€" "โ•ฎ" "โ”‚" "โ•ฏ" "โ”€" "โ•ฐ" "โ”‚" ]; - }; - - documentation = { - border = [ "โ•ญ" "โ”€" "โ•ฎ" "โ”‚" "โ•ฏ" "โ”€" "โ•ฐ" "โ”‚" ]; - winhighlight = - "FloatBorder:CmpBorder,Normal:CmpPmenu,Search:PmenuSel"; - }; - }; - - mapping = { - "" = "cmp.mapping.select_next_item()"; - "" = "cmp.mapping.select_prev_item()"; - "" = "cmp.mapping.select_next_item()"; - "" = "cmp.mapping.select_prev_item()"; - "" = "cmp.mapping.select_next_item()"; - "" = "cmp.mapping.select_prev_item()"; - "" = "cmp.mapping.scroll_docs(-4)"; - "" = "cmp.mapping.scroll_docs(4)"; - "" = "cmp.mapping.complete()"; - "" = "cmp.mapping.close()"; - "" = - "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })"; - }; - }; - }; - - }; -} diff --git a/old/home/terminal/nvim/plugins/markdown.nix b/old/home/terminal/nvim/plugins/markdown.nix deleted file mode 100755 index 06e7e17..0000000 --- a/old/home/terminal/nvim/plugins/markdown.nix +++ /dev/null @@ -1,190 +0,0 @@ -# The render-markdown.nvim plugin is a plugin that renders markdown files in a neovim in a more readable way. -{ config, ... }: -let - accent = "#${config.theme.colors.color15}"; - accent-alt = "#${config.theme.colors.color6}"; - muted = "#${config.theme.colors.secondary-bg}"; - background = "#${config.theme.colors.primary-bg}"; -in { - - programs.nixvim = { - plugins.mkdnflow = { - enable = true; - settings = { - modules = { conceal = false; }; - to_do.symbols = [ " " "-" "x" "!" "/" ]; - mappings = { - MkdnCreateLink = false; - MkdnCreateLinkFromClipboard = { - key = "ml"; - modes = [ "n" "v" ]; - }; - MkdnDecreaseHeading = { - key = "m-"; - modes = "n"; - }; - MkdnDestroyLink = false; - MkdnEnter = { - key = ""; - modes = [ "v" ]; - }; - MkdnExtendList = false; - MkdnFoldSection = { - key = "mf"; - modes = "n"; - }; - MkdnUnfoldSection = { - key = "mF"; - modes = "n"; - }; - MkdnFollowLink = { - key = "gd"; - modes = "n"; - }; - MkdnGoBack = false; - MkdnGoForward = false; - MkdnIncreaseHeading = { - key = "m+"; - modes = "n"; - }; - MkdnMoveSource = false; - MkdnNewListItem = false; - MkdnNewListItemAboveInsert = { - key = "O"; - modes = "n"; - }; - MkdnNewListItemBelowInsert = { - key = "o"; - modes = "n"; - }; - MkdnNextHeading = { - key = "m#"; - modes = "n"; - }; - MkdnNextLink = false; - MkdnPrevLink = false; - MkdnPrevHeading = { - key = "m*"; - modes = "n"; - }; - MkdnSTab = false; - MkdnTab = false; - MkdnTableNewColAfter = { - key = "mc"; - modes = "n"; - }; - MkdnTableNewColBefore = { - key = "mC"; - modes = "n"; - }; - MkdnTableNewRowAbove = { - key = "mR"; - modes = "n"; - }; - MkdnTableNewRowBelow = { - key = "mr"; - modes = "n"; - }; - MkdnTableNextCell = { - key = ""; - modes = "n"; - }; - MkdnTableNextRow = false; - MkdnTablePrevCell = { - key = ""; - modes = "n"; - }; - MkdnTablePrevRow = false; - MkdnToggleToDo = { - key = ""; - modes = [ "n" "v" ]; - }; - MkdnUpdateNumbering = { - key = "mn"; - modes = "n"; - }; - MkdnYankAnchorLink = { - key = "ya"; - modes = "n"; - }; - MkdnYankFileAnchorLink = { - key = "yfa"; - modes = "n"; - }; - }; - }; - }; - extraFiles = { - "after/ftplugin/markdown.lua".text = '' - vim.bo.tabstop = 2 - vim.bo.shiftwidth = 2 - vim.bo.expandtab = true - ''; - }; - highlight = { - RenderMarkdownBg.bg = background; - RenderMarkdownH1.fg = accent; - RenderMarkdownH2.fg = accent; - RenderMarkdownH3.fg = accent-alt; - RenderMarkdownH4.fg = accent-alt; - RenderMarkdownH5.fg = accent-alt; - RenderMarkdownH6.fg = accent-alt; - RenderMarkdownTodo.fg = muted; - RenderMarkdownWarning.fg = accent; - }; - plugins.headlines = { - enable = true; - settings = { - markdown = { - headline_highlights = [ - "RenderMarkdownH1" - "RenderMarkdownH2" - "RenderMarkdownH3" - "RenderMarkdownH4" - "RenderMarkdownH5" - "RenderMarkdownH6" - ]; - fat_headlines = false; - }; - }; - }; - plugins.render-markdown = { - enable = true; - settings = { - heading = { - icons = [ "# " "๓ฐฒฃ " "๓ฐฒฅ " "๓ฐฒง " "๓ฐฒฉ " "๓ฐฒซ " ]; - backgrounds = [ "RenderMarkdownBg" ]; - foregrounds = [ - "RenderMarkdownH1" - "RenderMarkdownH2" - "RenderMarkdownH3" - "RenderMarkdownH4" - "RenderMarkdownH5" - "RenderMarkdownH6" - ]; - }; - checkbox = { - unchecked = { highlight = "RenderMarkdownTodo"; }; - checked = { highlight = "RenderMarkdownTodo"; }; - custom = { - pending = { - raw = "[-]"; - rendered = "๓ฐฅ” "; - highlight = "RenderMarkdownTodo"; - }; - important = { - raw = "[!]"; - rendered = "๏ก "; - highlight = "RenderMarkdownWarning"; - }; - cancel = { - raw = "[/]"; - rendered = "๓ฑ‹ฌ "; - highlight = "RenderMarkdownTodo"; - }; - }; - }; - }; - }; - }; -} diff --git a/old/home/terminal/nvim/plugins/telescope.nix b/old/home/terminal/nvim/plugins/telescope.nix deleted file mode 100755 index 87ae0de..0000000 --- a/old/home/terminal/nvim/plugins/telescope.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ config, ... }: -let - accent = "#${config.theme.colors.color15}"; - background = "#${config.theme.colors.primary-bg}"; - background-alt = "#${config.theme.colors.secondary-bg}"; -in { - programs.nixvim = { - highlight = { - TelescopePromptPrefix.fg = accent; - TelescopeSelectionCaret = { - fg = accent; - bg = background-alt; - }; - TelescopeSelection.bg = background-alt; - TelescopePromptTitle = { - bg = background; - fg = accent; - }; - TelescopePromptNormal.bg = background; - TelescopePromptBorder = { - bg = background; - fg = accent; - }; - }; - plugins = { - telescope = { - enable = true; - extensions.fzf-native = { enable = true; }; - settings.defaults = { selection_caret = "โš "; }; - }; - - ## Tree - treesitter-context.enable = true; - neo-tree.enable = true; - oil = { - enable = true; - settings = { - default_file_explorer = false; - skip_confirm_for_simple_edits = true; - win_options = { - concealcursor = "ncv"; - conceallevel = 3; - cursorcolumn = false; - foldcolumn = "0"; - list = false; - signcolumn = "no"; - spell = false; - wrap = false; - }; - float = { padding = 5; }; - keymaps = { - "-" = "actions.parent"; - "b" = "actions.parent"; - "" = "actions.close"; - "" = "actions.select_split"; - "" = "actions.refresh"; - "" = "actions.preview"; - "" = "actions.select_vsplit"; - "" = "actions.select_tab"; - "" = "actions.select"; - _ = "actions.open_cwd"; - "`" = "actions.cd"; - "g." = "actions.toggle_hidden"; - "g?" = "actions.show_help"; - "g\\" = "actions.toggle_trash"; - gs = "actions.change_sort"; - gx = "actions.open_external"; - "~" = "actions.tcd"; - }; - }; - }; - - }; - }; -} diff --git a/old/home/terminal/nvim/plugins/ui.nix b/old/home/terminal/nvim/plugins/ui.nix deleted file mode 100755 index 28c1175..0000000 --- a/old/home/terminal/nvim/plugins/ui.nix +++ /dev/null @@ -1,253 +0,0 @@ -{ config, pkgs, ... }: - -let - - accent = "#${config.theme.colors.color14}"; - muted = "#${config.theme.colors.secondary-bg}"; - foreground = "#${config.theme.colors.primary-fg}"; - -in { - - home.packages = with pkgs; [ ctags ]; - - programs = { - nixvim = { - - dependencies.ctags = { - enable = true; - #package = with pkgs; [ universal-ctags ]; - }; - - highlight = { - AlphaHeaderColor.fg = accent; - AlphaTextColor.fg = foreground; - AlphaShortcutColor.fg = muted; - }; - - colorschemes = { - modus = { - enable = true; - settings = { - transparent = true; - style = "modus_vivendi"; - styles = { - comments = { - italic = true; - #bg = ""; - fg = "#cccccc"; - }; - variables = { - #bg = ""; - fg = "#00c0ff"; - }; - functions = { - #bg = ""; - fg = "#d0fffe"; - }; - keywords = { - bold = true; - #bg = ""; - fg = "#00dfff"; - }; - }; - }; - }; - }; - - plugins = { - #transparent.enable = true; - - lualine = { - enable = true; - settings = { - options.disabled_filetypes.statusline = - [ "dashboard" "alpha" "neo-tree" ]; - - alwaysDivideMiddle = true; - globalstatus = true; - ignoreFocus = [ "neo-tree" ]; - extensions = [ "fzf" ]; - theme = "auto"; - componentSeparators = { - left = "|"; - right = "|"; - }; - sectionSeparators = { - left = "โ–ˆ"; # ๎‚ด - right = "โ–ˆ"; # ๎‚ถ - }; - sections = { - lualine_a = [ "mode" ]; - lualine_b = [ "branch" "diff" "diagnostics" ]; - lualine_c = [ "filename" ]; - lualine_x = [ "filetype" ]; - lualine_y = [ "progress" ]; - lualine_z = [ ''"๏บ " .. os.date("%R")'' ]; - }; - }; - }; - - web-devicons.enable = true; - noice.enable = true; - notify = { - enable = true; - settings = { level = "warn"; }; - }; - gitsigns = { - enable = true; - settings.current_line_blame = false; - }; - - trouble.enable = true; - indent-blankline.enable = true; - colorizer.enable = true; - tagbar = { - enable = true; - #tagsPackage = pkgs.universal-ctags; - }; - - alpha = { - enable = true; - settings.layout = [ - { - type = "padding"; - val = 4; - } - { - type = "text"; - opts = { - position = "center"; - hl = "AlphaHeaderColor"; - }; - val = [ - " ๎‚บ๎‚ธ " - " ๎‚บโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธ ๎‚บโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ผ ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธ ๎‚พโ–ˆโ–ˆ๎‚ผ " - " ๎‚บโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ผ ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธ ๎‚ธ " - " ๎‚บโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธ๎‚พโ–ˆโ–ˆ๎‚ผ ๎‚บโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ผ๎‚บโ–ˆโ–ˆโ–ˆ๎‚ธ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆ๎‚ธ ๎‚บโ–ˆโ–ˆโ–ˆ๎‚ธโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธ " - " ๎‚บโ–ˆ๎‚ธ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ผ ๎‚บโ–ˆโ–ˆโ–ˆ๎‚ผ ๎‚บโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ " - " ๎‚บโ–ˆโ–ˆโ–ˆ๎‚ธ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ผ ๎‚บโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ผ๎‚บโ–ˆโ–ˆ๎‚ผ ๎‚พโ–ˆโ–ˆ๎‚ธ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ " - " ๎‚บโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ผ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ผ ๎‚บโ–ˆโ–ˆโ–ˆ๎‚ผ ๎‚บโ–ˆโ–ˆโ–ˆ๎‚ธ ๎‚บโ–ˆโ–ˆโ–ˆ๎‚ธ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธ " - " ๎‚บโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ผ ๎‚พโ–ˆโ–ˆโ–ˆ๎‚ผ๎‚บโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ผ ๎‚พโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ผ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ๎‚ธ " - " " - ]; - } - { - type = "padding"; - val = 4; - } - { - type = "group"; - val = [ - { - type = "button"; - val = "๓ฐญŽ Find file"; - on_press.__raw = - "function() vim.cmd[[Telescope find_files]] end"; - opts = { - shortcut = "nf"; - position = "center"; - cursor = 3; - width = 50; - align_shortcut = "right"; - hl_shortcut = "AlphaShortcutColor"; - hl = "AlphaTextColor"; - }; - } - { - type = "button"; - val = "๏…› New file"; - on_press.__raw = "function() vim.cmd[[ene]] end"; - opts = { - shortcut = "nn"; - position = "center"; - cursor = 3; - width = 50; - align_shortcut = "right"; - hl_shortcut = "AlphaShortcutColor"; - hl = "AlphaTextColor"; - }; - } - { - type = "button"; - val = "๏Œ“ NixOs Config"; - on_press.__raw = - "function() vim.cmd[[Neotree /home/serenity/flakes/nixdots/home/common/dotconfig/nvim]] end"; - opts = { - shortcut = "nc"; - position = "center"; - cursor = 3; - width = 50; - align_shortcut = "right"; - hl_shortcut = "AlphaShortcutColor"; - hl = "AlphaTextColor"; - }; - } - { - type = "button"; - val = "๏„œ Keybindings"; - on_press.__raw = - "function() vim.cmd[[e /home/serenity/flakes/nixdots/home/common/dotconfig/nvim/docs/KEYBINDINGS.md]] end"; - opts = { - shortcut = "nc"; - position = "center"; - cursor = 3; - width = 50; - align_shortcut = "right"; - hl_shortcut = "AlphaShortcutColor"; - hl = "AlphaTextColor"; - }; - } - { - type = "button"; - val = "๎ช‚ Recently used"; - on_press.__raw = - "function() vim.cmd[[Telescope oldfiles]] end"; - opts = { - shortcut = "no"; - position = "center"; - cursor = 3; - width = 50; - align_shortcut = "right"; - hl_shortcut = "AlphaShortcutColor"; - hl = "AlphaTextColor"; - }; - } - { - type = "button"; - val = "๓ฐฑฝ Find text"; - on_press.__raw = - "function() vim.cmd[[Telescope live_grep]] end"; - opts = { - shortcut = "nt"; - position = "center"; - cursor = 3; - width = 50; - align_shortcut = "right"; - hl_shortcut = "AlphaShortcutColor"; - hl = "AlphaTextColor"; - }; - } - { - type = "button"; - val = "๓ฐฉˆ Quit Neovim"; - on_press.__raw = "function() vim.cmd[[qa]] end"; - opts = { - shortcut = "nq"; - position = "center"; - cursor = 3; - width = 50; - align_shortcut = "right"; - hl_shortcut = "AlphaShortcutColor"; - hl = "AlphaTextColor"; - }; - } - ]; - - } - ]; - }; - }; - }; - }; - -} diff --git a/old/home/terminal/nvim/plugins/utils.nix b/old/home/terminal/nvim/plugins/utils.nix deleted file mode 100755 index b5a067b..0000000 --- a/old/home/terminal/nvim/plugins/utils.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ config, pkgs, ... }: { - programs.nixvim = { - highlightOverride = { FloatBorder.fg = "#${config.theme.colors.color15}"; }; - - plugins = { - - comment.enable = true; - todo-comments.enable = true; - tmux-navigator.enable = true; - nvim-autopairs.enable = true; - friendly-snippets.enable = true; - - flash.enable = true; - image = { - enable = true; - settings.integrations.markdown = { - clearInInsertMode = true; - onlyRenderImageAtCursor = true; - }; - }; - - treesitter = { - enable = true; - nixGrammars = true; - settings = { - indent.enable = true; - highlight.enable = true; - }; - }; - - harpoon = { - enable = true; - enableTelescope = true; - #keymapsSilent = true; - #keymaps = { - #addFile = "ha"; - #toggleQuickMenu = "hu"; - #navNext = "hl"; - #navPrev = "hh"; - #navFile = { - #"1" = "h1"; - #"2" = "h2"; - #"3" = "h3"; - #"4" = "h4"; - #}; - #}; - }; - - dap = { - enable = true; - adapters = { }; - signs = { - dapBreakpoint = { - text = "โ—"; - texthl = "DapBreakpoint"; - }; - dapBreakpointCondition = { - text = "โ—"; - texthl = "DapBreakpointCondition"; - }; - dapLogPoint = { - text = "โ—†"; - texthl = "DapLogPoint"; - }; - }; - }; - - dap-ui = { enable = true; }; - dap-virtual-text = { enable = true; }; - dap-go = { - enable = true; - settings = { delve.path = "${pkgs.delve}/bin/dlv"; }; - }; - - }; - }; -} diff --git a/old/home/terminal/yazi.nix b/old/home/terminal/yazi.nix deleted file mode 100755 index 0fac9ab..0000000 --- a/old/home/terminal/yazi.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - - programs.yazi = { - enable = true; - enableFishIntegration = true; - settings = { - log = { enabled = false; }; - manager = { - show_hidden = true; - #linemode = "none" - sort_by = "mtime"; - sort_dir_first = true; - sort_reverse = false; - }; - }; - #plugins = { }; - }; - -} diff --git a/system/core/default.nix b/system/core/default.nix new file mode 100644 index 0000000..7fcb6dc --- /dev/null +++ b/system/core/default.nix @@ -0,0 +1,29 @@ +{ lib, ... }: +# default configuration shared by all hosts +{ + imports = [ + ./security.nix + ./users.nix + ../nix + ]; + + documentation.dev.enable = true; + + i18n = { + defaultLocale = "en_US.UTF-8"; + # saves space + supportedLocales = [ + "en_US.UTF-8/UTF-8" + "ja_JP.UTF-8/UTF-8" + "ro_RO.UTF-8/UTF-8" + ]; + }; + + # don't touch this + system.stateVersion = lib.mkDefault "23.11"; + + time.timeZone = lib.mkDefault "Europe/Bucharest"; + + # compresses half the ram for use as swap + zramSwap.enable = true; +} diff --git a/system/core/users.nix b/system/core/users.nix new file mode 100644 index 0000000..3c096e4 --- /dev/null +++ b/system/core/users.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: +{ + users.users.serenity = { + isNormalUser = true; + shell = pkgs.fish; + extraGroups = [ + "i2c" + "input" + "libvirtd" + "networkmanager" + "plugdev" + "transmission" + "video" + "wheel" + ]; + }; +} diff --git a/system/default.nix b/system/default.nix new file mode 100644 index 0000000..efe2f34 --- /dev/null +++ b/system/default.nix @@ -0,0 +1,23 @@ +let + desktop = [ + + ./core + ./core/boot.nix + ./network + ./hardware/brightness.nix + ./hardware/graphics.nix + ./hardware/bluetooth.nix + ./programs + ./services + ./services/greetd.nix + ./services/pipewire.nix + ]; + + laptop = desktop ++ [ + ./services/backlight.nix + ./services/power.nix + ]; +in +{ + inherit desktop laptop; +}