From 9b3f6449f4e1fc0fe68528fea01f0a1b016e9f38 Mon Sep 17 00:00:00 2001 From: wayne <...> Date: Fri, 11 Apr 2025 15:43:57 -0700 Subject: [PATCH] Modularized ghostty --- configuration.nix | 41 ++++++++- flake.lock | 163 +--------------------------------- flake.nix | 6 +- hm/home.nix | 52 +++++------ hm/pkgs/default.nix | 5 +- hm/pkgs/inet-packages.nix | 1 + hm/pkgs/utilities.nix | 5 ++ modules/nix.nix | 2 +- pkgs/app/terminal/ghostty.nix | 16 ++++ pkgs/app/utilities/bacula.nix | 30 +++++++ pkgs/wm/hyprland/hyprland.nix | 12 +-- 11 files changed, 132 insertions(+), 201 deletions(-) create mode 100644 hm/pkgs/utilities.nix create mode 100644 pkgs/app/terminal/ghostty.nix create mode 100644 pkgs/app/utilities/bacula.nix diff --git a/configuration.nix b/configuration.nix index d84cbc0..d22fff5 100644 --- a/configuration.nix +++ b/configuration.nix @@ -9,7 +9,7 @@ agenix, pkgs-unstable, pia, - ghostty, + # ghostty, ... }: let @@ -37,6 +37,10 @@ in ./modules/wm.nix ./modules/xdg.nix + # ./pkgs/app/utilities/bacula.nix + ./pkgs/virtualisation/docker.nix + ./pkgs/virtualisation/vbox.nix + # ./flakes/scribeVault.nix ]; @@ -84,6 +88,7 @@ in # ]; services = { + blueman.enable = true; printing.enable = true; ollama = { enable = true; @@ -136,7 +141,11 @@ in serviceWantedBy = [ "graphical.target" ]; }; # dbus.implementation = "dbus"; # The option `services.dbus.implementation' has conflicting definition values: - In `/nix/store/60sn02zhawl3kwn0r515zff3h6hg6ydz-source/nixos/modules/programs/wayland/uwsm.nix': "broker" - udisks2.enable = true; + udisks2 = { + enable = true; + package = pkgs.udisks2; + mountOnMedia = true; + }; logrotate.enable = true; openssh = { enable = true; @@ -186,14 +195,28 @@ in authUserPassFile = config.age.secrets.pia.path; }; home-assistant = { + enable = true; extraPackages = python3Packages: with python3Packages; [ pip pynvim # mopidy-tidal # Mopidy-WebSettings virtualenv setuptools wheel ]; + config = { + homeassistant = { + unit_system = "imperial"; + temperature_unit = "F"; + name = "launchpad"; + configDir = "/var/lib/hass"; + configWritable = true; + http = { + server_host = "127.0.0.1"; + server_port = 8123; + }; + }; + }; }; samba = { - enable = true; + enable = false; openFirewall = true; package = pkgs.samba4Full; settings = { @@ -206,6 +229,15 @@ in }; }; }; + keybase.enable = true; + kbfs = { + enable = true; + mountPoint = "keybase"; + extraFlags = [ + "-label: kbfs" + "-mount-type: normal" + ]; + }; }; # List packages installed in system profile. To search, run: @@ -222,7 +254,7 @@ in vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget git sshfs pciutils usbutils - zsh ghostty.packages.x86_64-linux.default + zsh ghostty # ghostty.packages.x86_64-linux.default cryptsetup agenix.packages.x86_64-linux.default home-manager @@ -265,6 +297,7 @@ in tailscale logiops + bacula ]; system.stateVersion = "24.11"; # Did you read the comment? } diff --git a/flake.lock b/flake.lock index fe4f7fa..7414b4c 100644 --- a/flake.lock +++ b/flake.lock @@ -109,22 +109,6 @@ "type": "github" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -147,24 +131,6 @@ "inputs": { "systems": "systems_3" }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_4" - }, "locked": { "lastModified": 1726560853, "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", @@ -195,29 +161,6 @@ "type": "github" } }, - "ghostty": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_2", - "nixpkgs-stable": "nixpkgs-stable", - "nixpkgs-unstable": "nixpkgs-unstable", - "zig": "zig", - "zon2nix": "zon2nix" - }, - "locked": { - "lastModified": 1744158770, - "narHash": "sha256-2APOaRQd3ppQRgDPJAKluSu83XA78/b+0qghQp95kXU=", - "owner": "ghostty-org", - "repo": "ghostty", - "rev": "046e92865b4f2863815b7f7af52aab75d4bac63a", - "type": "github" - }, - "original": { - "owner": "ghostty-org", - "repo": "ghostty", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -343,39 +286,7 @@ "type": "github" } }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1741992157, - "narHash": "sha256-nlIfTsTrMSksEJc1f7YexXiPVuzD1gOfeN1ggwZyUoc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "da4b122f63095ca1199bd4d526f9e26426697689", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-unstable": { - "locked": { - "lastModified": 1741865919, - "narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_2": { "locked": { "lastModified": 1744098102, "narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=", @@ -425,7 +336,7 @@ }, "pia": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] @@ -451,13 +362,12 @@ "base16-vim": "base16-vim", "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "ghostty": "ghostty", "home-manager": "home-manager_2", "legacy": "legacy", "musnix": "musnix", "nix-colors": "nix-colors", "nixpkgs": "nixpkgs_3", - "nixpkgs-unstable": "nixpkgs-unstable_2", + "nixpkgs-unstable": "nixpkgs-unstable", "pia": "pia", "tt-schemes": "tt-schemes", "zen-browser": "zen-browser" @@ -508,21 +418,6 @@ "type": "github" } }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tt-schemes": { "flake": false, "locked": { @@ -558,60 +453,6 @@ "repo": "zen-browser-flake", "type": "github" } - }, - "zig": { - "inputs": { - "flake-compat": [ - "ghostty" - ], - "flake-utils": [ - "ghostty", - "flake-utils" - ], - "nixpkgs": [ - "ghostty", - "nixpkgs-stable" - ] - }, - "locked": { - "lastModified": 1741825901, - "narHash": "sha256-aeopo+aXg5I2IksOPFN79usw7AeimH1+tjfuMzJHFdk=", - "owner": "mitchellh", - "repo": "zig-overlay", - "rev": "0b14285e283f5a747f372fb2931835dd937c4383", - "type": "github" - }, - "original": { - "owner": "mitchellh", - "repo": "zig-overlay", - "type": "github" - } - }, - "zon2nix": { - "inputs": { - "flake-utils": [ - "ghostty", - "flake-utils" - ], - "nixpkgs": [ - "ghostty", - "nixpkgs-unstable" - ] - }, - "locked": { - "lastModified": 1742104771, - "narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=", - "owner": "jcollie", - "repo": "zon2nix", - "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", - "type": "github" - }, - "original": { - "owner": "jcollie", - "ref": "56c159be489cc6c0e73c3930bd908ddc6fe89613", - "repo": "zon2nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c5d3184..59b7dd9 100644 --- a/flake.nix +++ b/flake.nix @@ -37,7 +37,7 @@ zen-browser.url = "github:youwen5/zen-browser-flake"; zen-browser.inputs.nixpkgs.follows = "nixpkgs"; - ghostty.url = "github:ghostty-org/ghostty"; + # ghostty.url = "github:ghostty-org/ghostty"; # hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; # hyprland.url = "github:hyprwm/Hyprland"; @@ -74,7 +74,7 @@ # nix-ld, musnix, pia, - ghostty, + # ghostty, # compose2nix, ... } @ inputs: @@ -115,7 +115,7 @@ nixosConfigurations = { launchpad = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs systemSettings userSettings lib agenix pia ghostty ;}; + specialArgs = {inherit inputs outputs systemSettings userSettings lib agenix pia ;}; modules = [ # kmonad.nixosModules.default musnix.nixosModules.musnix diff --git a/hm/home.nix b/hm/home.nix index 092200b..2b5082b 100644 --- a/hm/home.nix +++ b/hm/home.nix @@ -101,7 +101,7 @@ let unstablePkgs = import ( fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"; - sha256 = "0328lh3ghdbglwd69774sx3an9ym7193xwvypa1gzbnw11a8frjq"; + sha256 = "146hn6w57hr341k5y003668gzh5l7shbikidn3r0ix33hb49sc5p"; }) { # config = config.nixpkgs.config; @@ -115,25 +115,25 @@ in ./modules/wayland.nix ./modules/xdg.nix - (import ../pkgs/shell/stow.nix { inherit pkgs lib config; }) - (import ../pkgs/shell/cli-collection.nix { inherit pkgs; }) - (import ../pkgs/shell/bash.nix { inherit pkgs config myAliases; }) - (import ../pkgs/shell/sh.nix { inherit myAliases pkgs;}) - (import ../pkgs/shell/zsh.nix { inherit myAliases pkgs;}) + # (import ../pkgs/app/audio/mopidy.nix { inherit pkgs; }) + # (import ../pkgs/app/editor/nvim.nix { pkgs = pkgs; }) (import ../pkgs/git/git.nix { inherit userSettings pkgs; }) - (import ../pkgs/app/terminal/tmux.nix { inherit pkgs lib config; }) - (import ../pkgs/app/terminal/kitty.nix { inherit pkgs lib nix-colors config; }) - # (import ../pkgs/app/terminal/starship.nix { pkgs = pkgs; }) - (import ../pkgs/app/terminal/parrot-starship.nix { inherit pkgs; }) - (import ../pkgs/app/terminal/yazi.nix { inherit pkgs; }) (import ../pkgs/lang/cc/cc.nix { inherit pkgs; }) # (import ../pkgs/lang/python/python.nix { pkgs = pkgs; }) # (import ../pkgs/lang/python/python-packages.nix { pkgs = pkgs; }) - # (import ../pkgs/app/editor/nvim.nix { pkgs = pkgs; }) # (import ../pkgs/app/terminal/alacritty.nix { pkgs = pkgs; }) - # (import ../pkgs/app/audio/mopidy.nix { inherit pkgs; }) - (import ../pkgs/virtualisation/docker.nix { inherit pkgs; }) # This may have to go in config - (import ../pkgs/virtualisation/vbox.nix { inherit pkgs; }) + (import ../pkgs/app/terminal/ghostty.nix { inherit pkgs; }) + (import ../pkgs/app/terminal/kitty.nix { inherit pkgs lib nix-colors config; }) + (import ../pkgs/app/terminal/parrot-starship.nix { inherit pkgs; }) + # (import ../pkgs/app/terminal/starship.nix { pkgs = pkgs; }) + (import ../pkgs/app/terminal/tmux.nix { inherit pkgs lib config; }) + (import ../pkgs/app/terminal/yazi.nix { inherit pkgs; }) + + (import ../pkgs/shell/bash.nix { inherit pkgs config myAliases; }) + (import ../pkgs/shell/cli-collection.nix { inherit pkgs; }) + (import ../pkgs/shell/sh.nix { inherit myAliases pkgs;}) + (import ../pkgs/shell/stow.nix { inherit pkgs lib config; }) + (import ../pkgs/shell/zsh.nix { inherit myAliases pkgs;}) ]; nixpkgs = { @@ -169,6 +169,8 @@ in doublecmd filezilla libreoffice bottles winePackages.wayland + + mpv ] ++ (import ./pkgs { inherit unstablePkgs pkgs system zen-browser; }); @@ -200,21 +202,21 @@ in services = { blueman-applet.enable = true; - keybase.enable = true; - kbfs = { - enable = true; - mountPoint = "keybase"; - extraFlags = [ - "-label: kbfs" - "-mount-type: normal" - ]; - }; + # keybase.enable = true; + # kbfs = { + # enable = true; + # mountPoint = "keybase"; + # extraFlags = [ + # "-label: kbfs" + # "-mount-type: normal" + # ]; + # }; nextcloud-client = { enable = false; startInBackground = false; }; udiskie = { - enable = true; + enable = false; settings = { program_options = { tray = "auto"; diff --git a/hm/pkgs/default.nix b/hm/pkgs/default.nix index 303f643..5cfee45 100644 --- a/hm/pkgs/default.nix +++ b/hm/pkgs/default.nix @@ -5,7 +5,8 @@ builtins.concatLists (import ./gramming-packages.nix { inherit pkgs; }) (import ./inet-packages.nix { inherit pkgs system zen-browser; }) (import ./llm-packages.nix { inherit pkgs; }) - (import ./theme-packages.nix { inherit pkgs unstablePkgs; }) - (import ./wm-packages.nix { inherit pkgs; }) (import ./rescue-packages.nix { inherit pkgs; }) + (import ./theme-packages.nix { inherit pkgs unstablePkgs; }) + # (import ./utilities.nix { inherit pkgs; }) + (import ./wm-packages.nix { inherit pkgs; }) ] \ No newline at end of file diff --git a/hm/pkgs/inet-packages.nix b/hm/pkgs/inet-packages.nix index d55eee2..d0176a3 100644 --- a/hm/pkgs/inet-packages.nix +++ b/hm/pkgs/inet-packages.nix @@ -21,6 +21,7 @@ with pkgs; # Mail mailspring # betterbird + protonmail-desktop # Expires 4-25-25 # Cloud/Remote restic diff --git a/hm/pkgs/utilities.nix b/hm/pkgs/utilities.nix new file mode 100644 index 0000000..fedf589 --- /dev/null +++ b/hm/pkgs/utilities.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: +with pkgs; +[ + bacula +] \ No newline at end of file diff --git a/modules/nix.nix b/modules/nix.nix index 9197cf5..689947e 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -16,7 +16,7 @@ "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; - allowed-users = *; + # allowed-users = *; trusted-users = [ "root" "wayne" ]; cores = 12; max-jobs = 4; # Adjust this to your CPU core count or slightly below diff --git a/pkgs/app/terminal/ghostty.nix b/pkgs/app/terminal/ghostty.nix new file mode 100644 index 0000000..6b3e9af --- /dev/null +++ b/pkgs/app/terminal/ghostty.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: + +{ + programs.ghostty = { + enable = true; + package = pkgs.ghostty; + settings = { + theme = "nord"; + font-size = 15; + }; + installBatSyntax = true; + installVimSyntax = true; + enableZshIntegration = true; + enableBashIntegration = true; + }; +} \ No newline at end of file diff --git a/pkgs/app/utilities/bacula.nix b/pkgs/app/utilities/bacula.nix new file mode 100644 index 0000000..03f62d4 --- /dev/null +++ b/pkgs/app/utilities/bacula.nix @@ -0,0 +1,30 @@ +{ pkgs, systemSettings, ...}: +{ + services = { + # Brain + bacula-dir = { + enable = false; + port = 9101; + name = "${systemSettings.hostname}-dir"; + password = "password"; + }; + # Client + bacula-fd = { + enable = false; + port = 9102; + name = "${systemSettings.hostname}-fd"; + director = {}; + }; + # Storage + bacula-sd = { + enable = false; + port = 9103; + name = "${systemSettings.hostname}-sd"; + device = { + Name = "localStorage"; + + }; + director = {}; + }; + }; +} \ No newline at end of file diff --git a/pkgs/wm/hyprland/hyprland.nix b/pkgs/wm/hyprland/hyprland.nix index eef3a0f..9df240b 100644 --- a/pkgs/wm/hyprland/hyprland.nix +++ b/pkgs/wm/hyprland/hyprland.nix @@ -227,24 +227,26 @@ "dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus" "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" "systemctl --user start plasma-polkit-agent" - "/nix/store/vgj704dz4i60cj70cvq988g1c6yg33l9-kwallet-pam-6.2.5/libexec/pam_kwallet_init --no-startup-id" # Find a better path, changes on garbage collection + "/nix/store/jzak3afif9w9hf0xhqx3mdyayngz9iwa-kwallet-pam-6.2.5/libexec/pam_kwallet_init --no-startup-id" # Find a better path, changes on garbage collection "waybar &" # "hyprpaper &" "hypridle &" "swayosd &" "udiskie &" + "blueman-manager && blueman-applet & blueman-applet &" "wl-paste --type text --watch cliphist store" "wl-paste --type image --watch cliphist store" - "${config.home.homeDirectory}/.config/hypr/scripts/start-in-tray.sh &" + # "${config.home.homeDirectory}/.config/hypr/scripts/start-in-tray.sh &" "${config.home.homeDirectory}/.config/hypr/scripts/start-keybase-gui.sh &" "input-remapper-control --command autoload &" - "[workspace 4 silent] remmina -c rdp://wayne@xeon.local" + "[workspace 4 silent] remmina --enable-fullscreen -c /home/wayne/.local/share/remmina/group_rdp_xeon_xeon-local.remmina" + # rdp://wayne@xeon.local" "[workspace 7 silent] sublime3" "[workspace 9 silent] keepassxc" - "[workspace 9 silent] /home/wayne/.nix-profile/bin/nextcloud --background" - "[workspace 9 silent] /home/wayne/.nix-profile/bin/keybase-gui %u" + "[workspace 9 silent] nextcloud --background" + "[workspace 9 silent] keybase-gui %u" # "/nix/store/r3fdp5rlxcihmqhpcgy91sj918wnrmrc-pyprland-2.3.4/bin/pypr --debug ~/tmp/pypr.log" ];