diff --git a/flake.lock b/flake.lock index 60fa004..584666f 100644 --- a/flake.lock +++ b/flake.lock @@ -53,11 +53,11 @@ "yafas": "yafas" }, "locked": { - "lastModified": 1723131830, - "narHash": "sha256-H9Q2y1RJ1ixXvyK6clZ84QXHhLvGzMPOPyBg30sqhmE=", + "lastModified": 1723531925, + "narHash": "sha256-QPETOkVNZwm3Zx0FRfkrPWScbc46I5QwIOdBmByYtKg=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "c662fc42ab949b183c166d49efc7823509b20c75", + "rev": "b8b1c616f8b869af7bce3179ad423e3d45b0d079", "type": "github" }, "original": { @@ -89,11 +89,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1723080973, - "narHash": "sha256-p7kQ4yxruANLz0FLnqYdSvqyYGwBaT9nWs2J/nrVKA4=", + "lastModified": 1723685697, + "narHash": "sha256-Fp0MmV8FWrWFzYkLzPhkrc7Lj3NhMThCceDiETqEp9k=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "d8b2b9aee034c10ca67848653171f576f87434a8", + "rev": "4e1950ec1b6ff25a0f20ff590bf22a3065b62022", "type": "github" }, "original": { @@ -173,11 +173,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1723098624, - "narHash": "sha256-TFg+lq7pHgCnsB4nRmMeTxSnZXHvzYJ2IHyEiw8zEF8=", + "lastModified": 1723444276, + "narHash": "sha256-ErWXmB84hedrDmeaHOaFFfNShC21AopTfM4x4rlvk3c=", "owner": "nix-community", "repo": "fenix", - "rev": "d6022ac563f2f48d8eeff89ca3589c8adc5235f6", + "rev": "70c22198ab822aa93c92a7ec0933908b17131edd", "type": "github" }, "original": { @@ -368,11 +368,11 @@ ] }, "locked": { - "lastModified": 1723015306, - "narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=", + "lastModified": 1723399884, + "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", "owner": "nix-community", "repo": "home-manager", - "rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e", + "rev": "086f619dd991a4d355c07837448244029fc2d9ab", "type": "github" }, "original": { @@ -409,11 +409,11 @@ ] }, "locked": { - "lastModified": 1723015306, - "narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=", + "lastModified": 1723399884, + "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", "owner": "nix-community", "repo": "home-manager", - "rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e", + "rev": "086f619dd991a4d355c07837448244029fc2d9ab", "type": "github" }, "original": { @@ -446,11 +446,11 @@ ] }, "locked": { - "lastModified": 1723016361, - "narHash": "sha256-iEVCAOn7WUdJGrK2EW5hkfl4gBmYl5gVck+MSn6ba44=", + "lastModified": 1723367191, + "narHash": "sha256-noi5tre7BLtxImN38jEHeVOtOG1Xu37sJFwHKSAPHjo=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "fc3d12deef508a73c7beef4cd9bebe03acde4ed7", + "rev": "91178062f365b64eece94c5dff93e09b07e87d9d", "type": "github" }, "original": { @@ -659,11 +659,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1722332872, - "narHash": "sha256-2xLM4sc5QBfi0U/AANJAW21Bj4ZX479MHPMPkB+eKBU=", + "lastModified": 1723310128, + "narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "14c333162ba53c02853add87a0000cbd7aa230c2", + "rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf", "type": "github" }, "original": { @@ -703,11 +703,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1722869614, - "narHash": "sha256-7ojM1KSk3mzutD7SkrdSflHXEujPvW1u7QuqWoTLXQU=", + "lastModified": 1723556749, + "narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "883180e6550c1723395a3a342f830bfc5c371f6b", + "rev": "4a92571f9207810b559c9eac203d1f4d79830073", "type": "github" }, "original": { @@ -735,11 +735,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1722869614, - "narHash": "sha256-7ojM1KSk3mzutD7SkrdSflHXEujPvW1u7QuqWoTLXQU=", + "lastModified": 1723556749, + "narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "883180e6550c1723395a3a342f830bfc5c371f6b", + "rev": "4a92571f9207810b559c9eac203d1f4d79830073", "type": "github" }, "original": { @@ -767,11 +767,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1722813957, - "narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=", + "lastModified": 1723637854, + "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa", + "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", "type": "github" }, "original": { @@ -783,11 +783,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1722813957, - "narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=", + "lastModified": 1723362943, + "narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa", + "rev": "a58bc8ad779655e790115244571758e8de055e3d", "type": "github" }, "original": { @@ -799,11 +799,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1722813957, - "narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=", + "lastModified": 1723362943, + "narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa", + "rev": "a58bc8ad779655e790115244571758e8de055e3d", "type": "github" }, "original": { @@ -1035,11 +1035,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1723042912, - "narHash": "sha256-Ff4nCgmlSWVOMvRVVf6gTYgmZjGw9EjIFHG0aUFg+D8=", + "lastModified": 1723304838, + "narHash": "sha256-xAxVDxuvCs8WWkrxVWjCiqxTkHhGj7sSppr1YMuEdT8=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "935883fd826c46e7e7e6de19cf24377c21f1b2ba", + "rev": "0daeb5c0b05cfdf2101b0f078c27539099bf38e6", "type": "github" }, "original": { @@ -1057,11 +1057,11 @@ ] }, "locked": { - "lastModified": 1722997267, - "narHash": "sha256-8Pncp8IKd0f0N711CRrCGTC4iLfBE+/5kaMqyWxnYic=", + "lastModified": 1723602049, + "narHash": "sha256-Z/noCSn9WPkv7O77dWKLcBxe4Ub4bWyNzsL5JhjaQfw=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "d720bf3cebac38c2426d77ee2e59943012854cb8", + "rev": "ea0bf33a11a26a62c60123c49d96011da396602c", "type": "github" }, "original": { @@ -1157,11 +1157,11 @@ "nixpkgs-stable": "nixpkgs-stable_4" }, "locked": { - "lastModified": 1722897572, - "narHash": "sha256-3m/iyyjCdRBF8xyehf59QlckIcmShyTesymSb+N4Ap4=", + "lastModified": 1723501126, + "narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=", "owner": "Mic92", "repo": "sops-nix", - "rev": "8ae477955dfd9cbf5fa4eb82a8db8ddbb94e79d9", + "rev": "be0eec2d27563590194a9206f551a6f73d52fa34", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c297adf..bfe8870 100644 --- a/flake.nix +++ b/flake.nix @@ -86,6 +86,14 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.matt = import ./hosts/desktop/home.nix; + home-manager.backupFileExtension = "bakup"; + specialisation.hyprland.configuration = { + home-manager.users.matt = { + home.sessionVariables = { + DUMBTEST="yaaaaaaas"; + }; + }; + }; } nixos-hardware.nixosModules.common-cpu-amd diff --git a/hosts/default.nix b/hosts/default.nix index 61b475a..34b7b94 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -17,10 +17,13 @@ in # Enable nix flakes and nix-command tools nix = { - settings.experimental-features = [ - "nix-command" - "flakes" - ]; + settings = { + warn-dirty = false; + experimental-features = [ + "nix-command" + "flakes" + ]; + }; # Garbage collect automatically every week gc.automatic = lib.mkDefault true; diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 338c95c..cd5ea11 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -11,7 +11,7 @@ }: let user = "matt"; - password = "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06"; + passwordFile = config.sops.secrets."desktop/matt_password".path; hostname = "matt-nixos"; resetNetworkScript = pkgs.writeScriptBin "reset-network" '' @@ -33,47 +33,15 @@ in ./hardware-configuration.nix ./boot.nix ./filesystems.nix - # ../../cachix/cachix.nix - ../default.nix + ./sops.nix + ../default.nix + + ./hyprland + ./gnome ]; specialisation = { - gnome.configuration = { - services = { - xserver = { - desktopManager.gnome.enable = true; - - # Enable Desktop Environment. - displayManager = { - gdm.enable = true; - gdm.wayland = true; - }; - }; - - displayManager.defaultSession = "gnome"; - - # Enable Flatpak - flatpak.enable = true; - - # disable plasma - displayManager.sddm.enable = false; - desktopManager.plasma6.enable = false; - }; - - environment = { - systemPackages = with pkgs; [ - gnome-tweaks - gnomeExtensions.appindicator - gnomeExtensions.arcmenu - gnomeExtensions.dash-to-panel - gnomeExtensions.tiling-assistant - ]; - }; - - # xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; - }; - cosmic.configuration = { services = { desktopManager.cosmic.enable = true; @@ -84,67 +52,6 @@ in desktopManager.plasma6.enable = false; }; }; - - hyprland.configuration = { - services = { - displayManager.sddm.enable = true; - displayManager.defaultSession = "hyprland"; - # disable plasma - desktopManager.plasma6.enable = false; - }; - - programs.hyprland = { - enable = true; - xwayland.enable = true; - }; - - # Hint Electon apps to use wayland - environment.sessionVariables = { - NIXOS_OZONE_WL = "1"; - }; - - environment.systemPackages = with pkgs; [ - hyprland - swww # for wallpapers - xdg-desktop-portal-gtk - xdg-desktop-portal-hyprland - xwayland - meson - wayland-protocols - wayland-utils - wl-clipboard - wlroots - networkmanagerapplet - kitty - rofi-wayland - wofi - dunst - libnotify - waybar - ]; - - services.dbus.enable = true; - xdg.portal = { - enable = true; - wlr.enable = true; - extraPortals = [ - pkgs.xdg-desktop-portal-gtk - ]; - }; - - fonts.fonts = with pkgs; [ - nerdfonts - meslo-lgs-nf - ]; - - nixpkgs.overlays = [ - (self: super: { - waybar = super.waybar.overrideAttrs (oldAttrs: { - mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; - }); - }) - ]; - }; }; apps.discover-wrapped.enable = false; @@ -295,6 +202,8 @@ in nil papirus-icon-theme pciutils + # python3 + # python3Packages.requests rclone rclone-browser rsync @@ -311,6 +220,7 @@ in sessionVariables = { STEAM_FORCE_DESKTOPUI_SCALING = "1"; }; + }; # Configure nixpkgs @@ -327,6 +237,7 @@ in "ratbagd" "input" ]; # Enable ‘sudo’ for the user. + hashedPasswordFile = passwordFile; shell = pkgs.zsh; }; diff --git a/hosts/desktop/gnome/default.nix b/hosts/desktop/gnome/default.nix new file mode 100644 index 0000000..9a56f08 --- /dev/null +++ b/hosts/desktop/gnome/default.nix @@ -0,0 +1,40 @@ +{ pkgs, ... }: +{ + specialisation.gnome.configuration = { + + home-manager.users.matt = import ./home.nix; + + services = { + xserver = { + desktopManager.gnome.enable = true; + + # Enable Desktop Environment. + displayManager = { + gdm.enable = true; + gdm.wayland = true; + }; + }; + + displayManager.defaultSession = "gnome"; + + # Enable Flatpak + flatpak.enable = true; + + # disable plasma + displayManager.sddm.enable = false; + desktopManager.plasma6.enable = false; + }; + + environment = { + systemPackages = with pkgs; [ + gnome-tweaks + gnomeExtensions.appindicator + gnomeExtensions.arcmenu + gnomeExtensions.dash-to-panel + gnomeExtensions.tiling-assistant + ]; + }; + + # xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + }; +} \ No newline at end of file diff --git a/hosts/desktop/gnome/home.nix b/hosts/desktop/gnome/home.nix new file mode 100644 index 0000000..eec24ba --- /dev/null +++ b/hosts/desktop/gnome/home.nix @@ -0,0 +1,32 @@ +{ lib, ... }: +{ + dconf = { + enable = true; + settings = { + "org/gnome/desktop/interface".clock-format = "12h"; + "org/gnome/desktop/interface".color-scheme = "prefer-dark"; + "org/gnome/desktop/interface".enable-hot-corners = false; + "org/gnome/desktop/interface".font-antialiasing = "grayscale"; + "org/gnome/desktop/interface".font-hinting = "slight"; + "org/gnome/desktop/interface".icon-theme = lib.mkDefault "Papirus-Dark"; + "org/gnome/desktop/peripherals/mouse".accel-profile = "flat"; + "org/gnome/desktop/peripherals/touchpad".two-finger-scrolling-enabled = true; + "org/gnome/desktop/peripherals/touchpad".tap-to-click = true; + "org/gnome/mutter".experimental-features = [ + "scale-monitor-framebuffer" + "variable-refresh-rate" + ]; + "org/gnome/tweaks".show-extensions-notice = false; + "org/gnome/shell".enabled-extensions = [ + "appindicatorsupport@rgcjonas.gmail.com" + "arcmenu@arcmenu.com" + "user-theme@gnome-shell-extensions.gcampax.github.com" + "dash-to-panel@jderose9.github.com" + "tiling-assistant@leleat-on-github" + ]; + "org/gnome/shell/extensions/dash-to-panel".primary-monitor = 1; + "org/gnome/shell/extensions/dash-to-panel".multi-monitors = false; + "org/gtk/settings/file-chooser".clock-format = "12h"; + }; + }; +} \ No newline at end of file diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index 05c62ed..22a331d 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -1,4 +1,25 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: +let + shellAliases = { + ll = "ls -alh"; + update = "sudo nixos-rebuild switch --max-jobs 10"; + update-flake = "sudo nix flake update ~/nix-config"; + update-specialisation = "sudo nixos-rebuild switch --specialisation --max-jobs 10"; + nas-update = "nixos-rebuild switch --use-remote-sudo --target-host admin@10.0.1.18 --build-host localhost --flake ~/nix-config#jallen-nas"; + nas-ssh = "ssh admin@10.0.1.18"; + }; + + gitAliases = { + co = "checkout"; + ci = "commit"; + cia = "commit --amend"; + s = "status"; + st = "status"; + b = "branch"; + # p = "pull --rebase"; + pu = "push"; + }; +in { home.username = "matt"; @@ -17,14 +38,7 @@ autosuggestion.enable = true; syntaxHighlighting.enable = true; - shellAliases = { - ll = "ls -alh"; - update = "sudo nixos-rebuild switch --max-jobs 10"; - update-flake = "sudo nix flake update ~/nix-config"; - update-specialisation = "sudo nixos-rebuild switch --specialisation --max-jobs 10"; - nas-update = "nixos-rebuild switch --use-remote-sudo --target-host admin@jallen-nas.local --build-host localhost --flake ~/nix-config#jallen-nas"; - nas-ssh = "ssh admin@jallen-nas.local"; - }; + shellAliases = shellAliases; oh-my-zsh = { enable = true; @@ -38,16 +52,7 @@ enable = true; userName = "mjallen18"; userEmail = "matt.l.jallen@gmail.com"; - aliases = { - co = "checkout"; - ci = "commit"; - cia = "commit --amend"; - s = "status"; - st = "status"; - b = "branch"; - # p = "pull --rebase"; - pu = "push"; - }; + aliases = gitAliases; }; programs.command-not-found.enable = true; @@ -100,65 +105,4 @@ vorta vscode ]; - - specialisation.gnome.configuration = { - dconf = { - enable = true; - settings = { - "org/gnome/desktop/interface".clock-format = "12h"; - "org/gnome/desktop/interface".color-scheme = "prefer-dark"; - "org/gnome/desktop/interface".enable-hot-corners = false; - "org/gnome/desktop/interface".font-antialiasing = "grayscale"; - "org/gnome/desktop/interface".font-hinting = "slight"; - "org/gnome/desktop/interface".icon-theme = "Papirus-Dark"; - "org/gnome/desktop/peripherals/mouse".accel-profile = "flat"; - "org/gnome/desktop/peripherals/touchpad".two-finger-scrolling-enabled = true; - "org/gnome/desktop/peripherals/touchpad".tap-to-click = true; - "org/gnome/mutter".experimental-features = [ - "scale-monitor-framebuffer" - "variable-refresh-rate" - ]; - "org/gnome/tweaks".show-extensions-notice = false; - "org/gnome/shell".enabled-extensions = [ - "appindicatorsupport@rgcjonas.gmail.com" - "arcmenu@arcmenu.com" - "user-theme@gnome-shell-extensions.gcampax.github.com" - "dash-to-panel@jderose9.github.com" - "tiling-assistant@leleat-on-github" - ]; - "org/gnome/shell/extensions/dash-to-panel".primary-monitor = 1; - "org/gnome/shell/extensions/dash-to-panel".multi-monitors = false; - "org/gtk/settings/file-chooser".clock-format = "12h"; - }; - }; - }; - - specialisation.hyprland.configuration = { - wayland.windowManager.hyprland.enable = true; - wayland.windowManager.hyprland.settings = { - "$mod" = "SUPER"; - bind = - [ - "$mod, F, exec, firefox" - ", Print, exec, grimblast copy area" - ] - ++ ( - # workspaces - # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} - builtins.concatLists (builtins.genList ( - x: let - ws = let - c = (x + 1) / 10; - in - builtins.toString (x + 1 - (c * 10)); - in [ - "$mod, ${ws}, workspace, ${toString (x + 1)}" - "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" - ] - ) - 10) - ); - }; - }; - } diff --git a/hosts/desktop/hyprland/config.nix b/hosts/desktop/hyprland/config.nix new file mode 100644 index 0000000..b82c19f --- /dev/null +++ b/hosts/desktop/hyprland/config.nix @@ -0,0 +1,11 @@ +let configDir = ./config; +in +{ + home.file = { + ".config/wallpapers".source = "${configDir}/wallpapers"; + ".config/kitty/macchiato.conf".source = "${configDir}/kitty/macchiato.conf"; + ".config/wlogout".source = "${configDir}/wlogout"; # + ".config/waybar/scripts".source = "${configDir}/waybar/scripts"; + ".config/btop/themes/catppuccin_macchiato.theme".source = "${configDir}/btop/themes/catppuccin_macchiato.theme"; + }; +} diff --git a/hosts/desktop/hyprland/config/btop/default.nix b/hosts/desktop/hyprland/config/btop/default.nix new file mode 100644 index 0000000..d98e384 --- /dev/null +++ b/hosts/desktop/hyprland/config/btop/default.nix @@ -0,0 +1,71 @@ +{ + programs.btop = { + enable = true; + settings = { + color_theme = "~/.config/btop/themes/catppuccin_macchiato.theme"; + theme_background = true; + truecolor = true; + force_tty = false; + presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"; + vim_keys = true; + rounded_corners = true; + graph_symbol = "braille"; + graph_symbol_cpu = "default"; + graph_symbol_mem = "default"; + graph_symbol_net = "default"; + graph_symbol_proc = "default"; + shown_boxes = "cpu mem net proc"; + update_ms = 2000; + proc_sorting = "cpu lazy"; + proc_reversed = false; + proc_tree = false; + proc_colors = true; + proc_gradient = true; + proc_per_core = false; + proc_mem_bytes = true; + proc_cpu_graphs = true; + proc_info_smaps = false; + proc_left = false; + proc_filter_kernel = false; + cpu_graph_upper = "total"; + cpu_graph_lower = "total"; + cpu_invert_lower = true; + cpu_single_graph = false; + cpu_bottom = false; + show_uptime = true; + check_temp = true; + cpu_sensor = "Auto"; + show_coretemp = true; + cpu_core_map = ""; + temp_scale = "celsius"; + base_10_sizes = false; + show_cpu_freq = true; + clock_format = "%X"; + background_update = true; + custom_cpu_name = ""; + disks_filter = ""; + mem_graphs = true; + mem_below_net = false; + zfs_arc_cached = true; + show_swap = true; + swap_disk = true; + show_disks = true; + only_physical = true; + use_fstab = true; + zfs_hide_datasets = false; + disk_free_priv = false; + show_io_stat = true; + io_mode = false; + io_graph_combined = false; + io_graph_speeds = ""; + net_download = 100; + net_upload = 100; + net_auto = true; + net_sync = true; + net_iface = ""; + show_battery = true; + selected_battery = "Auto"; + log_level = "WARNING"; + }; + }; +} \ No newline at end of file diff --git a/hosts/desktop/hyprland/config/btop/themes/catppuccin_macchiato.theme b/hosts/desktop/hyprland/config/btop/themes/catppuccin_macchiato.theme new file mode 100644 index 0000000..7abd0bf --- /dev/null +++ b/hosts/desktop/hyprland/config/btop/themes/catppuccin_macchiato.theme @@ -0,0 +1,42 @@ +theme[main_bg]="#24273A" +theme[main_fg]="#CAD3F5" +theme[title]="#CAD3F5" +theme[hi_fg]="#8AADF4" +theme[selected_bg]="#494D64" +theme[selected_fg]="#8AADF4" +theme[inactive_fg]="#8087A2" +theme[graph_text]="#F4DBD6" +theme[meter_bg]="#494D64" +theme[proc_misc]="#F4DBD6" +theme[cpu_box]="#7DC4E4" +theme[mem_box]="#A6DA95" +theme[net_box]="#C6A0F6" +theme[proc_box]="#F0C6C6" +theme[div_line]="#6E738D" +theme[temp_start]="#EED49F" +theme[temp_mid]="#F5A97F" +theme[temp_end]="#ED8796" +theme[cpu_start]="#7DC4E4" +theme[cpu_mid]="#91D7E3" +theme[cpu_end]="#8BD5CA" +theme[free_start]="#8BD5CA" +theme[free_mid]="#8BD5CA" +theme[free_end]="#A6DA95" +theme[cached_start]="#F5BDE6" +theme[cached_mid]="#F5BDE6" +theme[cached_end]="#C6A0F6" +theme[available_start]="#F4DBD6" +theme[available_mid]="#F0C6C6" +theme[available_end]="#F0C6C6" +theme[used_start]="#F5A97F" +theme[used_mid]="#F5A97F" +theme[used_end]="#ED8796" +theme[download_start]="#B7BDF8" +theme[download_mid]="#B7BDF8" +theme[download_end]="#C6A0F6" +theme[upload_start]="#B7BDF8" +theme[upload_mid]="#B7BDF8" +theme[upload_end]="#C6A0F6" +theme[process_start]="#7DC4E4" +theme[process_mid]="#91D7E3" +theme[process_end]="#8BD5CA" diff --git a/hosts/desktop/hyprland/config/hypr/default.nix b/hosts/desktop/hyprland/config/hypr/default.nix new file mode 100644 index 0000000..a1cf8c8 --- /dev/null +++ b/hosts/desktop/hyprland/config/hypr/default.nix @@ -0,0 +1,216 @@ +{ + wayland.windowManager.hyprland = { + enable = true; + xwayland.enable = true; + systemd.enable = true; + + settings = { + "$mainMod" = "SUPER"; + + # l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active. + # r -> release, will trigger on release of a key. + # e -> repeat, will repeat when held. + # n -> non-consuming, key/mouse events will be passed to the active window in addition to triggering the dispatcher. + # m -> mouse, see below. + # t -> transparent, cannot be shadowed by other binds. + # i -> ignore mods, will ignore modifiers. + # s -> separate, will arbitrarily combine keys between each mod/key, see [Keysym combos](#keysym-combos) above. + # d -> has description, will allow you to write a description for your bind. + # p -> bypasses the app's requests to inhibit keybinds. + + bind = [ + "$mainMod, Return, exec, kitty" + "$mainMod, Q, killactive, " + "$mainMod, M, exec, wlogout --protocol layer-shell" + "$mainMod, E, exec, nautilus" + "$mainMod, V, togglefloating, " + "$mainMod, D, exec, wofi --show drun" + "$mainMod, P, pseudo, "# dwindle + "$mainMod, S, togglesplit, "# dwindle + "$mainMod SHIFT, Q, exec, hyprlock" + ", PRINT, exec, hyprshot -m region --clipboard-only" + + "$mainMod, h, movefocus, l" + "$mainMod, l, movefocus, r" + "$mainMod, k, movefocus, u" + "$mainMod, j, movefocus, d" + + "$mainMod, 1, workspace, 1" + "$mainMod, 2, workspace, 2" + "$mainMod, 3, workspace, 3" + "$mainMod, 4, workspace, 4" + "$mainMod, 5, workspace, 5" + "$mainMod, 6, workspace, 6" + "$mainMod, 7, workspace, 7" + "$mainMod, 8, workspace, 8" + "$mainMod, 9, workspace, 9" + "$mainMod, 0, workspace, 10" + + "$mainMod SHIFT, 1, movetoworkspace, 1" + "$mainMod SHIFT, 2, movetoworkspace, 2" + "$mainMod SHIFT, 3, movetoworkspace, 3" + "$mainMod SHIFT, 4, movetoworkspace, 4" + "$mainMod SHIFT, 5, movetoworkspace, 5" + "$mainMod SHIFT, 6, movetoworkspace, 6" + "$mainMod SHIFT, 7, movetoworkspace, 7" + "$mainMod SHIFT, 8, movetoworkspace, 8" + "$mainMod SHIFT, 9, movetoworkspace, 9" + "$mainMod SHIFT, 0, movetoworkspace, 10" + + "$mainMod CTRL, l, resizeactive, 10 0" + "$mainMod CTRL, h, resizeactive, -10 0" + "$mainMod CTRL, k, resizeactive, 0 -10" + "$mainMod CTRL, j, resizeactive, 0 10" + + "$mainMod SHIFT, l, movewindow, r" + "$mainMod SHIFT, h, movewindow, l" + "$mainMod SHIFT, k, movewindow, u" + "$mainMod SHIFT, j, movewindow, d" + + "$mainMod, b, exec, firefox" + ]; + + bindm = [ + # Move/resize windows with mainMod + LMB/RMB and dragging + "$mainMod, mouse:272, movewindow" + "$mainMod, mouse:273, resizewindow" + ]; + + bindel =[ + ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ]; + + bindl = [ + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioPlay, exec, playerctl play-pause" + ", XF86AudioPrev, exec, playerctl previous" + ", XF86AudioNext, exec, playerctl next" + ]; + + monitor = [ + "DP-1,3840x2160@240.00000,0x0,1" + "DP-2,3840x2160@59.99700,3840x0,1" + ]; + + general = { + gaps_in = 5; + gaps_out = 10; + border_size = 1; + "col.active_border" = "rgb(8aadf4) rgb(24273A) rgb(24273A) rgb(8aadf4) 45deg"; + "col.inactive_border" = "rgb(24273A) rgb(24273A) rgb(24273A) rgb(24273A) 45deg"; + layout = "dwindle"; + allow_tearing = false; + }; + + decoration = { + rounding = 10; + blur = { + enabled = true; + size = 2; + passes = 2; + new_optimizations = true; + xray = false; + }; + drop_shadow = "yes"; + shadow_range = 4; + shadow_render_power = "3"; + "col.shadow" = "rgba(1a1a1aee)"; + }; + + animations = { + enabled = "yes"; + bezier = [ + "overshot, 0.05, 0.9, 0.1, 1.05" + "smoothOut, 0.36, 0, 0.66, -0.56" + "smoothIn, 0.25, 1, 0.5, 1" + ]; + animation = [ + "windows, 1, 5, overshot, slide" + "windowsOut, 1, 4, smoothOut, slide" + "windowsMove, 1, 4, default" + "border, 1, 10, default" + "fade, 1, 10, smoothIn" + "fadeDim, 1, 10, smoothIn" + "workspaces, 1, 6, default" + ]; + }; + + dwindle = { + pseudotile = "yes"; + preserve_split = "yes"; + }; + + gestures = { + workspace_swipe = "off"; + }; + + misc = { + force_default_wallpaper = 0; + }; + + windowrule = [ + "float, file_progress" + "float, confirm" + "float, dialog" + "float, download" + "float, notification" + "float, error" + "float, splash" + "float, confirmreset" + "float, title:Open File" + "float, title:branchdialog" + "float,viewnior" + "float, pavucontrol-qt" + "float, pavucontrol" + "float, file-roller" + "fullscreen, wlogout" + "float, title:wlogout" + "fullscreen, title:wlogout" + "idleinhibit stayfocused, mpv" + ]; + windowrulev2 = [ + "float, title:^(Media viewer)$" + # Picture in picture windows + "float, title:^(Picture-in-Picture)$" + "pin, title:^(Picture-in-Picture)$" + "float, class:^(vesktop)$,title:^(Discord Popout)$" + "pin, class:^(vesktop)$,title:^(Discord Popout)$" + "float, class:^(steam)$,title:^(Friends List)$" + # Workspace assign + "workspace: 1, class:^(kitty)$" + "workspace: 2, class:^(firefox)$" + "workspace: 5, class:^(steam)$" + "workspace: 10, class:^(vesktop)$" + ]; + + + input = { + kb_layout = "us"; + + kb_variant = ""; + kb_model = ""; + kb_options = ""; + kb_rules = ""; + + follow_mouse = 1; + + touchpad = { + natural_scroll = "no"; + }; + + sensitivity = 0; # -1.0 - 1.0, 0 means no modification. + }; + }; + + extraConfig = '' + exec-once = dbus-update-activation-environment --systemd --all + exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP + exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + exec-once = nwg-look -a + exec-once = [workspace 2 silent] firefox + exec-once = [workspace 10 silent] vesktop + exec-once = [workspace 5 silent] steam + ''; + }; +} \ No newline at end of file diff --git a/hosts/desktop/hyprland/config/kitty/default.nix b/hosts/desktop/hyprland/config/kitty/default.nix new file mode 100644 index 0000000..8d0b81c --- /dev/null +++ b/hosts/desktop/hyprland/config/kitty/default.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: +{ + programs.kitty = { + enable = true; + shellIntegration.enableZshIntegration = true; + + font = { + name = "jetbrains mono nerd font"; + package = pkgs.nerdfonts; + size = 12; + }; + + settings = { + include = "~/.config/kitty/macchiato.conf"; + bold_font = "auto"; + italic_font = "auto"; + bold_italic_font = "auto"; + mouse_hide_wait = "2.0"; + cursor_shape = "block"; + url_color = "#0087bd"; + url_style = "dotted"; + confirm_os_window_close = "0"; + background_opacity = "0.8"; + }; + }; +} diff --git a/hosts/desktop/hyprland/config/kitty/macchiato.conf b/hosts/desktop/hyprland/config/kitty/macchiato.conf new file mode 100644 index 0000000..d50dbe6 --- /dev/null +++ b/hosts/desktop/hyprland/config/kitty/macchiato.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin Kitty Macchiato +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/macchiato.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #CAD3F5 +background #24273A +selection_foreground #24273A +selection_background #F4DBD6 + +# Cursor colors +cursor #F4DBD6 +cursor_text_color #24273A + +# URL underline color when hovering with mouse +url_color #F4DBD6 + +# Kitty window border colors +active_border_color #B7BDF8 +inactive_border_color #6E738D +bell_border_color #EED49F + +# OS Window titlebar colors +wayland_titlebar_color #24273A +macos_titlebar_color #24273A + +# Tab bar colors +active_tab_foreground #181926 +active_tab_background #C6A0F6 +inactive_tab_foreground #CAD3F5 +inactive_tab_background #1E2030 +tab_bar_background #181926 + +# Colors for marks (marked text in the terminal) +mark1_foreground #24273A +mark1_background #B7BDF8 +mark2_foreground #24273A +mark2_background #C6A0F6 +mark3_foreground #24273A +mark3_background #7DC4E4 + +# The 16 terminal colors + +# black +color0 #494D64 +color8 #5B6078 + +# red +color1 #ED8796 +color9 #ED8796 + +# green +color2 #A6DA95 +color10 #A6DA95 + +# yellow +color3 #EED49F +color11 #EED49F + +# blue +color4 #8AADF4 +color12 #8AADF4 + +# magenta +color5 #F5BDE6 +color13 #F5BDE6 + +# cyan +color6 #8BD5CA +color14 #8BD5CA + +# white +color7 #B8C0E0 +color15 #A5ADCB diff --git a/hosts/desktop/hyprland/config/mako/default.nix b/hosts/desktop/hyprland/config/mako/default.nix new file mode 100644 index 0000000..1c91120 --- /dev/null +++ b/hosts/desktop/hyprland/config/mako/default.nix @@ -0,0 +1,21 @@ +{ + services.mako = { + enable = true; + font = "monospace 12"; + icons = false; + width = 500; + height = 110; + layer = "overlay"; + borderRadius = 15; + borderSize = 2; + maxIconSize = 64; + defaultTimeout = 5000; + sort = "-time"; + ignoreTimeout = true; + + backgroundColor = "#24273a"; + textColor = "#cad3f5"; + borderColor = "#8aadf4"; + progressColor = "over #363a4f"; + }; +} \ No newline at end of file diff --git a/hosts/desktop/hyprland/config/wallpapers/wall.png b/hosts/desktop/hyprland/config/wallpapers/wall.png new file mode 100644 index 0000000..a7f07a9 Binary files /dev/null and b/hosts/desktop/hyprland/config/wallpapers/wall.png differ diff --git a/hosts/desktop/hyprland/config/waybar/default.nix b/hosts/desktop/hyprland/config/waybar/default.nix new file mode 100644 index 0000000..8fb8a53 --- /dev/null +++ b/hosts/desktop/hyprland/config/waybar/default.nix @@ -0,0 +1,251 @@ +{ + programs.waybar = { + enable = true; + systemd.enable = true; + settings = { + mainBar = { + layer = "top"; + position = "top"; + mod = "dock"; + exclusive = true; + passthrough = false; + gtk-layer-shell = true; + height = 0; + modules-left = [ + "hyprland/workspaces" + ]; + + modules-center = [ + "hyprland/window" + ]; + + modules-right = [ + "tray" + "custom/updates" + "hyprland/language" + "pulseaudio" + "pulseaudio#microphone" + "clock" + "custom/weather" + ]; + + "hyprland/window" = { + format = {}; + }; + + "hyprland/workspaces" = { + disable-scroll = true; + all-outputs = true; + on-click = "activate"; + persistent_workspaces = { + "1" = []; + }; + }; + + "hyprland/language" = { + format = {}; + format-en = "US"; + }; + + "custom/weather" = { + tooltip = true; + format = {}; + interval = 30; + exec = "sudo waybar-weather"; + return-type = "json"; + }; + + tray = { + icon-size = 16; + spacing = 10; + }; + + clock = { + format = "{:%I:%M %p}"; + tooltip-format = "{ =%Y %B}\n{calendar}"; + }; + + pulseaudio = { + format = "{icon} {volume}%"; + tooltip = false; + format-muted = " Muted"; + on-click = "pamixer -t"; + on-scroll-up = "pamixer -i 5"; + on-scroll-down = "pamixer -d 5"; + scroll-step = 5; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = ["" "" ""]; + }; + }; + + "pulseaudio#microphone" = { + format = "{format_source}"; + format-source = "🎙{volume}%"; + format-source-muted = "🎙Muted"; + on-click = "pamixer --default-source -t"; + on-scroll-up = "pamixer --default-source -i 5"; + on-scroll-down = "pamixer --default-source -d 5"; + scroll-step = 5; + }; + }; + }; + + style = '' + * { + border: none; + border-radius: 0; + font-family: + Jetbrains Mono Nerd Font, + monospace; + font-weight: bold; + font-size: 14px; + min-height: 0; + } + + window#waybar { + background: rgba(21, 18, 27, 0); + color: #cdd6f4; + } + + tooltip { + background: #1e1e2e; + border-radius: 10px; + border-width: 2px; + border-style: solid; + border-color: #11111b; + } + + #workspaces button { + padding: 5px; + color: #313244; + margin-right: 5px; + } + + #workspaces button.active { + color: #a6adc8; + } + + #workspaces button.focused { + color: #a6adc8; + background: #eba0ac; + border-radius: 10px; + } + + #workspaces button.urgent { + color: #11111b; + background: #a6e3a1; + border-radius: 10px; + } + + #workspaces button:hover { + background: #11111b; + color: #cdd6f4; + border-radius: 10px; + } + + #language, + #custom-updates, + #custom-caffeine, + #custom-weather, + #window, + #clock, + #battery, + #pulseaudio, + #network, + #workspaces, + #tray, + #backlight { + background: #1e1e2e; + padding: 0px 10px; + margin: 3px 0px; + margin-top: 10px; + border: 1px solid #181825; + } + + #tray { + border-radius: 10px; + margin-right: 10px; + } + + #workspaces { + background: #1e1e2e; + border-radius: 10px; + margin-left: 10px; + padding-right: 0px; + padding-left: 5px; + } + + #custom-caffeine { + color: #89dceb; + border-radius: 10px 0px 0px 10px; + border-right: 0px; + margin-left: 10px; + } + + #custom-language { + color: #f38ba8; + border-left: 0px; + border-right: 0px; + } + + #custom-updates { + color: #f5c2e7; + border-radius: 10px 0px 0px 10px; + border-left: 0px; + border-right: 0px; + } + + #window { + border-radius: 10px; + margin-left: 60px; + margin-right: 60px; + } + + #clock { + color: #fab387; + border-radius: 10px 0px 0px 10px; + margin-left: 5px; + border-right: 0px; + } + + #network { + color: #f9e2af; + border-left: 0px; + border-right: 0px; + } + + #pulseaudio { + color: #89b4fa; + border-left: 0px; + border-right: 0px; + } + + #pulseaudio.microphone { + color: #cba6f7; + border-radius: 0px 10px 10px 0px; + border-left: 0px; + border-right: 0px; + margin-right: 5px; + } + + #battery { + color: #a6e3a1; + border-radius: 0 10px 10px 0; + margin-right: 10px; + border-left: 0px; + } + + #custom-weather { + border-radius: 0px 10px 10px 0px; + border-right: 0px; + margin-left: 0px; + } + ''; + }; +} \ No newline at end of file diff --git a/hosts/desktop/hyprland/config/waybar/scripts/waybar-wttr.py b/hosts/desktop/hyprland/config/waybar/scripts/waybar-wttr.py new file mode 100755 index 0000000..e23f357 --- /dev/null +++ b/hosts/desktop/hyprland/config/waybar/scripts/waybar-wttr.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python + +import json +from datetime import datetime + +import requests + +WEATHER_CODES = { + "113": "☀️ ", + "116": "⛅ ", + "119": "☁️ ", + "122": "☁️ ", + "143": "☁️ ", + "176": "🌧️", + "179": "🌧️", + "182": "🌧️", + "185": "🌧️", + "200": "⛈️ ", + "227": "🌨️", + "230": "🌨️", + "248": "☁️ ", + "260": "☁️ ", + "263": "🌧️", + "266": "🌧️", + "281": "🌧️", + "284": "🌧️", + "293": "🌧️", + "296": "🌧️", + "299": "🌧️", + "302": "🌧️", + "305": "🌧️", + "308": "🌧️", + "311": "🌧️", + "314": "🌧️", + "317": "🌧️", + "320": "🌨️", + "323": "🌨️", + "326": "🌨️", + "329": "❄️ ", + "332": "❄️ ", + "335": "❄️ ", + "338": "❄️ ", + "350": "🌧️", + "353": "🌧️", + "356": "🌧️", + "359": "🌧️", + "362": "🌧️", + "365": "🌧️", + "368": "🌧️", + "371": "❄️", + "374": "🌨️", + "377": "🌨️", + "386": "🌨️", + "389": "🌨️", + "392": "🌧️", + "395": "❄️ ", +} + +data = {} + + +weather = requests.get("https://wttr.in/?format=j1").json() + + +def format_time(time): + return time.replace("00", "").zfill(2) + + +def format_temp(temp): + return (hour["FeelsLikeF"] + "°").ljust(3) + + +def format_chances(hour): + chances = { + "chanceoffog": "Fog", + "chanceoffrost": "Frost", + "chanceofovercast": "Overcast", + "chanceofrain": "Rain", + "chanceofsnow": "Snow", + "chanceofsunshine": "Sunshine", + "chanceofthunder": "Thunder", + "chanceofwindy": "Wind", + } + + conditions = [] + for event in chances.keys(): + if int(hour[event]) > 0: + conditions.append(chances[event] + " " + hour[event] + "%") + return ", ".join(conditions) + + +tempint = int(weather["current_condition"][0]["FeelsLikeF"]) +extrachar = "" +if tempint > 0 and tempint < 10: + extrachar = "+" + + +data["text"] = ( + " " + + WEATHER_CODES[weather["current_condition"][0]["weatherCode"]] + + " " + + extrachar + + weather["current_condition"][0]["FeelsLikeF"] + + "°" +) + +data["tooltip"] = ( + f"{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_C']}°\n" +) +data["tooltip"] += f"Feels like: {weather['current_condition'][0]['FeelsLikeF']}°\n" +data["tooltip"] += f"Wind: {weather['current_condition'][0]['windspeedKmph']}Km/h\n" +data["tooltip"] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n" +for i, day in enumerate(weather["weather"]): + data["tooltip"] += f"\n" + if i == 0: + data["tooltip"] += "Today, " + if i == 1: + data["tooltip"] += "Tomorrow, " + data["tooltip"] += f"{day['date']}\n" + data["tooltip"] += f"⬆️ {day['maxtempF']}° ⬇️ {day['mintempF']}° " + data[ + "tooltip" + ] += f"🌅 {day['astronomy'][0]['sunrise']} 🌇 {day['astronomy'][0]['sunset']}\n" + for hour in day["hourly"]: + if i == 0: + if int(format_time(hour["time"])) < datetime.now().hour - 2: + continue + data[ + "tooltip" + ] += f"{format_time(hour['time'])} {WEATHER_CODES[hour['weatherCode']]} {format_temp(hour['FeelsLikeF'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n" + + +print(json.dumps(data)) diff --git a/hosts/desktop/hyprland/config/wlogout/icons/hibernate.png b/hosts/desktop/hyprland/config/wlogout/icons/hibernate.png new file mode 100644 index 0000000..1aa6730 Binary files /dev/null and b/hosts/desktop/hyprland/config/wlogout/icons/hibernate.png differ diff --git a/hosts/desktop/hyprland/config/wlogout/icons/lock.png b/hosts/desktop/hyprland/config/wlogout/icons/lock.png new file mode 100644 index 0000000..2fdf2de Binary files /dev/null and b/hosts/desktop/hyprland/config/wlogout/icons/lock.png differ diff --git a/hosts/desktop/hyprland/config/wlogout/icons/logout.png b/hosts/desktop/hyprland/config/wlogout/icons/logout.png new file mode 100644 index 0000000..c398d22 Binary files /dev/null and b/hosts/desktop/hyprland/config/wlogout/icons/logout.png differ diff --git a/hosts/desktop/hyprland/config/wlogout/icons/reboot.png b/hosts/desktop/hyprland/config/wlogout/icons/reboot.png new file mode 100644 index 0000000..6db3aaa Binary files /dev/null and b/hosts/desktop/hyprland/config/wlogout/icons/reboot.png differ diff --git a/hosts/desktop/hyprland/config/wlogout/icons/shutdown.png b/hosts/desktop/hyprland/config/wlogout/icons/shutdown.png new file mode 100644 index 0000000..3025cd0 Binary files /dev/null and b/hosts/desktop/hyprland/config/wlogout/icons/shutdown.png differ diff --git a/hosts/desktop/hyprland/config/wlogout/icons/suspend.png b/hosts/desktop/hyprland/config/wlogout/icons/suspend.png new file mode 100644 index 0000000..124a58e Binary files /dev/null and b/hosts/desktop/hyprland/config/wlogout/icons/suspend.png differ diff --git a/hosts/desktop/hyprland/config/wlogout/layout b/hosts/desktop/hyprland/config/wlogout/layout new file mode 100644 index 0000000..6e546a1 --- /dev/null +++ b/hosts/desktop/hyprland/config/wlogout/layout @@ -0,0 +1,36 @@ +{ + "label" : "lock", + "action" : "swaylock", + "text" : "Lock", + "keybind" : "l" +} +{ + "label" : "hibernate", + "action" : "systemctl hibernate", + "text" : "Hibernate", + "keybind" : "h" +} +{ + "label" : "logout", + "action" : "sleep 1; hyprctl dispatch exit", + "text" : "Logout", + "keybind" : "e" +} +{ + "label" : "shutdown", + "action" : "systemctl poweroff", + "text" : "Shutdown", + "keybind" : "s" +} +{ + "label" : "suspend", + "action" : "systemctl suspend", + "text" : "Suspend", + "keybind" : "u" +} +{ + "label" : "reboot", + "action" : "systemctl reboot", + "text" : "Reboot", + "keybind" : "r" +} diff --git a/hosts/desktop/hyprland/config/wlogout/style.css b/hosts/desktop/hyprland/config/wlogout/style.css new file mode 100644 index 0000000..5ba48fe --- /dev/null +++ b/hosts/desktop/hyprland/config/wlogout/style.css @@ -0,0 +1,50 @@ +* { + background-image: none; +} + +window { + background-color: rgba(36, 39, 58, 0.9); +} + +button { + margin: 8px; + color: #cad3f5; + background-color: #363a4f; + border-style: solid; + border-width: 2px; + background-repeat: no-repeat; + background-position: center; + background-size: 25%; +} + +button:active, +button:focus, +button:hover { + color: #8bd5ca; + background-color: #24273a; + outline-style: none; +} + +#lock { + background-image: image(url("icons/lock.png")); +} + +#logout { + background-image: image(url("icons/logout.png")); +} + +#suspend { + background-image: image(url("icons/suspend.png")); +} + +#hibernate { + background-image: image(url("icons/hibernate.png")); +} + +#shutdown { + background-image: image(url("icons/shutdown.png")); +} + +#reboot { + background-image: image(url("icons/reboot.png")); +} diff --git a/hosts/desktop/hyprland/config/wofi/default.nix b/hosts/desktop/hyprland/config/wofi/default.nix new file mode 100644 index 0000000..aca11bb --- /dev/null +++ b/hosts/desktop/hyprland/config/wofi/default.nix @@ -0,0 +1,145 @@ +{ + programs.wofi = { + enable = true; + style = '' + @define-color rosewater #f4dbd6; + @define-color rosewater-rgb rgb(244, 219, 214); + @define-color flamingo #f0c6c6; + @define-color flamingo-rgb rgb(240, 198, 198); + @define-color pink #f5bde6; + @define-color pink-rgb rgb(245, 189, 230); + @define-color mauve #c6a0f6; + @define-color mauve-rgb rgb(198, 160, 246); + @define-color red #ed8796; + @define-color red-rgb rgb(237, 135, 150); + @define-color maroon #ee99a0; + @define-color maroon-rgb rgb(238, 153, 160); + @define-color peach #f5a97f; + @define-color peach-rgb rgb(245, 169, 127); + @define-color yellow #eed49f; + @define-color yellow-rgb rgb(238, 212, 159); + @define-color green #a6da95; + @define-color green-rgb rgb(166, 218, 149); + @define-color teal #8bd5ca; + @define-color teal-rgb rgb(139, 213, 202); + @define-color sky #91d7e3; + @define-color sky-rgb rgb(145, 215, 227); + @define-color sapphire #7dc4e4; + @define-color sapphire-rgb rgb(125, 196, 228); + @define-color blue #8aadf4; + @define-color blue-rgb rgb(138, 173, 244); + @define-color lavender #b7bdf8; + @define-color lavender-rgb rgb(183, 189, 248); + @define-color text #cad3f5; + @define-color text-rgb rgb(202, 211, 245); + @define-color subtext1 #b8c0e0; + @define-color subtext1-rgb rgb(184, 192, 224); + @define-color subtext0 #a5adcb; + @define-color subtext0-rgb rgb(165, 173, 203); + @define-color overlay2 #939ab7; + @define-color overlay2-rgb rgb(147, 154, 183); + @define-color overlay1 #8087a2; + @define-color overlay1-rgb rgb(128, 135, 162); + @define-color overlay0 #6e738d; + @define-color overlay0-rgb rgb(110, 115, 141); + @define-color surface2 #5b6078; + @define-color surface2-rgb rgb(91, 96, 120); + @define-color surface1 #494d64; + @define-color surface1-rgb rgb(73, 77, 100); + @define-color surface0 #363a4f; + @define-color surface0-rgb rgb(54, 58, 79); + @define-color base #24273a; + @define-color base-rgb rgb(36, 39, 58); + @define-color mantle #1e2030; + @define-color mantle-rgb rgb(30, 32, 48); + @define-color crust #181926; + @define-color crust-rgb rgb(24, 25, 38); + + * { + font-family: "Inconsolata Nerd Font", monospace; + font-size: 14px; + } + + /* Window */ + window { + margin: 0px; + padding: 10px; + border: 0.16em solid @lavender; + border-radius: 0.1em; + background-color: @base; + } + + /* Inner Box */ + #inner-box { + margin: 5px; + padding: 10px; + border: none; + background-color: @base; + } + + /* Outer Box */ + #outer-box { + margin: 5px; + padding: 10px; + border: none; + background-color: @base; + } + + /* Scroll */ + #scroll { + margin: 0px; + padding: 10px; + border: none; + background-color: @base; + } + + /* Input */ + #input { + margin: 5px 20px; + padding: 10px; + border: none; + border-radius: 0.1em; + color: @text; + background-color: @base; + } + + #input image { + border: none; + color: @red; + } + + #input * { + outline: 4px solid @red!important; + } + + /* Text */ + #text { + margin: 5px; + border: none; + color: @text; + } + + #entry { + background-color: @base; + } + + #entry arrow { + border: none; + color: @lavender; + } + + /* Selected Entry */ + #entry:selected { + border: 0.11em solid @lavender; + } + + #entry:selected #text { + color: @mauve; + } + + #entry:drop(active) { + background-color: @lavender!important; + } + ''; + }; +} \ No newline at end of file diff --git a/hosts/desktop/hyprland/default.nix b/hosts/desktop/hyprland/default.nix new file mode 100644 index 0000000..b27ab5d --- /dev/null +++ b/hosts/desktop/hyprland/default.nix @@ -0,0 +1,86 @@ +{ pkgs, ... }: +{ + specialisation.hyprland.configuration = { + imports = [ + ./environment.nix + ]; + + home-manager.users.matt = import ./home.nix; + + services = { + displayManager.sddm.enable = true; + displayManager.sddm.package = pkgs.kdePackages.sddm; + displayManager.sddm.theme = "catppuccin-mocha"; + displayManager.defaultSession = "hyprland"; + # disable plasma + desktopManager.plasma6.enable = false; + + dbus.enable = true; + }; + + programs.hyprland = { + enable = true; + xwayland.enable = true; + portalPackage = pkgs.xdg-desktop-portal-hyprland; + }; + + systemd = { + user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + wantedBy = [ "graphical-session.target" ]; + wants = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + extraConfig = '' + DefaultTimeoutStopSec=10s + ''; + }; + + security = { + polkit.enable = true; + + # configure sudo + sudo.extraRules = [ + { + commands = [ + { + command = "/run/current-system/sw/bin/waybar-weather"; + options = [ "NOPASSWD" ]; + } + ]; + groups = [ "wheel" ]; + } + ]; + }; + + xdg.portal = { + enable = true; + wlr.enable = false; + xdgOpenUsePortal = false; + extraPortals = [ + pkgs.xdg-desktop-portal-hyprland + pkgs.xdg-desktop-portal-gtk + ]; + }; + + fonts.packages = with pkgs; [ + nerdfonts + meslo-lgs-nf + ]; + + nixpkgs.overlays = [ + (self: super: { + waybar = super.waybar.overrideAttrs (oldAttrs: { + mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; + }); + }) + ]; + }; +} diff --git a/hosts/desktop/hyprland/environment.nix b/hosts/desktop/hyprland/environment.nix new file mode 100644 index 0000000..a0eae42 --- /dev/null +++ b/hosts/desktop/hyprland/environment.nix @@ -0,0 +1,53 @@ +{ pkgs, ... }: +let + + waybarWeatherScript = pkgs.writeScriptBin "waybar-weather" '' + #!/usr/bin/env nix-shell + #! nix-shell -i bash --packages python3 python3Packages.requests + python /home/matt/.config/waybar/scripts/waybar-wttr.py + ''; +in +{ + environment.systemPackages = with pkgs; [ + adwaita-icon-theme + apple-cursor + catppuccin + catppuccin-gtk + catppuccin-qt5ct + catppuccin-sddm + colloid-gtk-theme + colloid-icon-theme + dunst + glib + gnome-disk-utility + gsettings-desktop-schemas + hyprland + hyprshot + libnotify + mako + meson + nautilus + networkmanagerapplet + nwg-look + pamixer + papirus-folders + playerctl + polkit + polkit_gnome + qt5.qtwayland + qt6.qtwayland + rofi-wayland + waybar + waybarWeatherScript + wayland-protocols + wayland-utils + wl-clipboard + wlogout + wlroots + wofi + xdg-desktop-portal-hyprland + xdg-desktop-portal-gtk + xdg-desktop-portal-wlr + xwayland + ]; +} diff --git a/hosts/desktop/hyprland/home.nix b/hosts/desktop/hyprland/home.nix new file mode 100644 index 0000000..23eb35b --- /dev/null +++ b/hosts/desktop/hyprland/home.nix @@ -0,0 +1,151 @@ +{ pkgs, ... }: +{ + imports = [ + ./config.nix + ./config/btop + ./config/hypr + ./config/kitty + ./config/mako + ./config/waybar + ./config/wofi + ]; + + services = { + hyprpaper = { + enable = true; + settings = { + preload = [ "~/.config/wallpapers/wall.png" ]; + wallpaper = [ + "DP-1, ~/.config/wallpapers/wall.png" + "DP-2, ~/.config/wallpapers/wall.png" + ]; + splash = false; + }; + }; + + hypridle = { + enable = true; + settings = { + general = { + after_sleep_cmd = "hyprctl dispatch dpms on"; + ignore_dbus_inhibit = false; + lock_cmd = "hyprlock"; + }; + listener = [ + { + timeout = 3600; + } + ]; + }; + }; + }; + + programs.hyprlock = { + enable = true; + settings = { + background = [ + { + monitor = ""; + path = "/home/matt/.config/wallpapers/wall.png"; # supports png, jpg, webp (no animations, though) + color = "rgba(25, 20, 20, 1.0)"; + + # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations + blur_passes = "3"; # 0 disables blurring + blur_size = "7"; + noise = "0.0117"; + contrast = "0.8916"; + brightness = "0.8172"; + vibrancy = "0.1696"; + vibrancy_darkness = "0.0"; + } + ]; + input-field = [ + { + size = "200, 50"; + position = "0, -80"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_color = "rgb(202, 211, 245)"; + inner_color = "rgb(91, 96, 120)"; + outer_color = "rgb(24, 25, 38)"; + outline_thickness = 5; + placeholder_text = ''Password...''; + shadow_passes = 2; + } + ]; + }; + }; + + home.sessionVariables = { + BROWSER = "firefox"; + EDITOR = "nano"; + TERMINAL = "kitty"; + NIXOS_OZONE_WL = "1"; + QT_QPA_PLATFORMTHEME = "gtk3"; + QT_SCALE_FACTOR = "1"; + MOZ_ENABLE_WAYLAND = "1"; + SDL_VIDEODRIVER = "wayland"; + QT_QPA_PLATFORM = "wayland-egl"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + QT_AUTO_SCREEN_SCALE_FACTOR = "1"; + GTK_CSD = "0"; +# WLR_DRM_DEVICES = "/dev/dri/card0"; +# WLR_NO_HARDWARE_CURSORS = "1"; + CLUTTER_BACKEND = "wayland"; + # WLR_RENDERER = "vulkan"; + XCURSOR_THEME = "macOS-Monterey"; + XCURSOR_SIZE = "24"; + GTK_THEME="catppuccin-macchiato-blue-compact"; + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_DESKTOP = "Hyprland"; + XDG_SESSION_TYPE = "wayland"; + GTK_USE_PORTAL = "1"; + NIXOS_XDG_OPEN_USE_PORTAL = "1"; + XDG_CACHE_HOME = "\${HOME}/.cache"; + XDG_CONFIG_HOME = "\${HOME}/.config"; + #XDG_BIN_HOME = "\${HOME}/.local/bin"; + XDG_DATA_HOME = "\${HOME}/.local/share"; + }; + + home.pointerCursor = { + gtk.enable = true; + package = pkgs.apple-cursor; + name = "macOS-Monterey"; + size = 24; + }; + + gtk = { + enable = true; + + cursorTheme = { + name = "macOS-Monterey"; # macOS-[BigSur, Monterey]-[ , White, White-Windows, Windows] + package = pkgs.apple-cursor; + }; + + theme = { + name = "catppuccin-macchiato-blue-compact"; + package = pkgs.catppuccin-gtk.override { + size = "compact"; + accents = ["blue"]; + variant = "macchiato"; + }; + }; + + iconTheme = { + name = "Colloid-dark"; # Colloid, Colloid-light, Colloid-dark + package = pkgs.colloid-icon-theme; + }; + + gtk3.extraConfig = { + # gtk-application-prefer-dark-theme = true; + "AdwStyleManager:color-scheme" = "ADW_COLOR_SCHEME_PREFER_DARK"; + }; + + gtk4.extraConfig = { + # gtk-application-prefer-dark-theme = true; + "AdwStyleManager:color-scheme" = "ADW_COLOR_SCHEME_PREFER_DARK"; + }; + + }; +} \ No newline at end of file diff --git a/hosts/desktop/sops.nix b/hosts/desktop/sops.nix new file mode 100644 index 0000000..f8d3e86 --- /dev/null +++ b/hosts/desktop/sops.nix @@ -0,0 +1,12 @@ +{ + ... +}: +{ + sops.defaultSopsFile = ../../secrets/secrets.yaml; + sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + + sops.secrets."desktop/matt_password" = {}; + sops.secrets."desktop/matt_password".neededForUsers = true; + + sops.secrets."wifi" = {}; +} \ No newline at end of file diff --git a/hosts/nas/apps.nix b/hosts/nas/apps.nix index 7bb5984..b40045d 100644 --- a/hosts/nas/apps.nix +++ b/hosts/nas/apps.nix @@ -46,7 +46,7 @@ enable = true; httpPort = "9981"; httpsPort = "9943"; - redisSock = "/var/run/redis-nextcloud/redis.sock"; + redisSock = "/run/redis-nextcloud/redis.sock"; }; ollama.enable = true; diff --git a/hosts/nas/configuration.nix b/hosts/nas/configuration.nix index 9558014..c93dfc3 100755 --- a/hosts/nas/configuration.nix +++ b/hosts/nas/configuration.nix @@ -194,6 +194,7 @@ in "jallen-nas" "docker" "podman" + config.services.redis.servers.nextcloud.user ]; # Enable ‘sudo’ for the user. hashedPasswordFile = passwordFile; }; @@ -207,6 +208,15 @@ in home = "/var/lib/nut"; hashedPasswordFile = passwordFile; }; + + users.nextcloud = { + isNormalUser = true; + extraGroups = [ + "jallen-nas" + "nix-apps" + ]; + hashedPasswordFile = passwordFile; + }; }; # Virtualisation diff --git a/hosts/nas/networking.nix b/hosts/nas/networking.nix index f5a1f4c..f65294d 100644 --- a/hosts/nas/networking.nix +++ b/hosts/nas/networking.nix @@ -31,14 +31,33 @@ in networkmanager.enable = false; interfaces = { - wlp6s0.ipv4.addresses = [ - { - address = ipAddress; - prefixLength = 24; - } - ]; + wlp6s0 = { + useDHCP = false; + ipv4.addresses = [ + { + address = ipAddress; + prefixLength = 24; + } + ]; + }; + + # br0 = { + # useDHCP = false; + # ipv4.addresses = [ + # { + # address = ipAddress; + # prefixLength = 24; + # } + # ]; + # }; }; + # bridges = { + # br0 = { + # interfaces = [ "wlp6s0" ]; + # }; + # }; + defaultGateway.address = gateway; nameservers = [ gateway ]; @@ -62,5 +81,13 @@ in # always allow traffic from your Tailscale network trustedInterfaces = [ "tailscale0" ]; }; + + # nat = { + # enable = true; + # internalInterfaces = ["ve-+"]; + # externalInterface = "wlp9s0"; + # # Lazy IPv6 connectivity for the container + # enableIPv6 = true; + # }; }; } diff --git a/hosts/nas/services.nix b/hosts/nas/services.nix index 3fb2c69..43c1153 100644 --- a/hosts/nas/services.nix +++ b/hosts/nas/services.nix @@ -184,6 +184,7 @@ in nextcloud = { enable = true; port = 6380; + # user = "911";#"${config.users.users.nix-apps.name}:${config.users.groups.jallen-nas.name}"; }; }; }; diff --git a/hosts/nas/sops.nix b/hosts/nas/sops.nix index 8caa3f9..6a0668f 100644 --- a/hosts/nas/sops.nix +++ b/hosts/nas/sops.nix @@ -1,5 +1,5 @@ { - ... + config, ... }: { sops.defaultSopsFile = ../../secrets/secrets.yaml; @@ -22,12 +22,42 @@ }; sops.secrets."jallen-nas/nextcloud/dbpassword" = { - # restartUnits = [ "podman-nextcloud.service" ]; + restartUnits = [ "container@nextcloud.service" ]; }; sops.secrets."jallen-nas/nextcloud/adminpassword" = { - # restartUnits = [ "podman-nextcloud.service" ]; + restartUnits = [ "container@nextcloud.service" ]; }; sops.secrets."jallen-nas/nextcloud/smtppassword" = { - # restartUnits = [ "nextcloud.service" ]; + restartUnits = [ "container@nextcloud.service" ]; }; + + sops.templates."nextcloud-smtp".content = '' + "${config.sops.placeholder."jallen-nas/nextcloud/smtppassword"}" + ''; + + # Permission modes are in octal representation (same as chmod), + # the digits represent: user|group|others + # 7 - full (rwx) + # 6 - read and write (rw-) + # 5 - read and execute (r-x) + # 4 - read only (r--) + # 3 - write and execute (-wx) + # 2 - write only (-w-) + # 1 - execute only (--x) + # 0 - none (---) + sops.secrets."jallen-nas/nextcloud/dbpassword".mode = "0777"; + # Either a user id or group name representation of the secret owner + # It is recommended to get the user name from `config.users.users..name` to avoid misconfiguration + # sops.secrets."jallen-nas/nextcloud/dbpassword".owner = config.users.users.nix-apps.name; + # # Either the group id or group name representation of the secret group + # # It is recommended to get the group name from `config.users.users..group` to avoid misconfiguration + # sops.secrets."jallen-nas/nextcloud/dbpassword".group = config.users.users.jallen-nas.group; + + sops.secrets."jallen-nas/nextcloud/adminpassword".mode = "0777"; + # sops.secrets."jallen-nas/nextcloud/adminpassword".owner = config.users.users.nix-apps.name; + # sops.secrets."jallen-nas/nextcloud/adminpassword".group = config.users.users.jallen-nas.group; + + sops.secrets."jallen-nas/nextcloud/smtppassword".mode = "0777"; + # sops.secrets."jallen-nas/nextcloud/smtppassword".owner = config.users.users.nix-apps.name; + # sops.secrets."jallen-nas/nextcloud/smtppassword".group = config.users.users.jallen-nas.group; } \ No newline at end of file diff --git a/modules/apps/nextcloud/default-nix.nix b/modules/apps/nextcloud/default-nix.nix new file mode 100644 index 0000000..a11ad5e --- /dev/null +++ b/modules/apps/nextcloud/default-nix.nix @@ -0,0 +1,123 @@ +{ config, ... }: +let + adminpass = config.sops.secrets."jallen-nas/nextcloud/adminpassword".path; + dbpass = config.sops.secrets."jallen-nas/nextcloud/dbpassword".path; + smtppassword = config.sops.templates."nextcloud-smtp".content; +in +{ + containers.nextcloud = { + autoStart = true; + privateNetwork = true; + # hostAddress = "127.0.0.1"; + # localAddress = "10.233.0.2"; + # hostAddress6 = "fc00::1"; + # localAddress6 = "fc00::2"; + # hostForward = [ + # { + # hostPort = 9943; + # containerPort = 80; + # } + # ]; + + hostBridge = "br0"; + + bindMounts = { + secrets = { + hostPath = "/run/secrets/jallen-nas/nextcloud"; + isReadOnly = true; + mountPoint = "/run/secrets/jallen-nas/nextcloud"; + }; + + data = { + hostPath = "/media/nas/main/nextcloud"; + isReadOnly = false; + mountPoint = "/data"; + }; + }; + + config = { config, pkgs, lib, ... }: { + services = { + nextcloud = { + enable = true; + package = pkgs.nextcloud29; + datadir = "/data"; + hostName = "localhost"; + appstoreEnable = true; + caching.redis = true; + configureRedis = true; + config = { + adminuser = "mjallen"; + adminpassFile = adminpass; + dbhost = "10.0.1.18:3306"; + dbtype = "mysql"; + dbname = "jallen_nextcloud"; + dbuser = "nextcloud"; + dbpassFile = dbpass; + }; + settings = { + trusted_domains = [ + "10.0.1.18:9980" + "10.0.1.18:9943" + "cloud.mjallen.dev" + ]; + trusted_proxies = [ + "10.0.1.18" + ]; + maintenance_window_start = 6; + default_phone_region = "US"; + mail_from_address = "matt.l.jallen"; + mail_smtpmode = "smtp"; + mail_sendmailmode = "smtp"; + mail_domain = "gmail.com"; + mail_smtpauth = 1; + mail_smtpname = "matt.l.jallen"; + mail_smtppassword = smtppassword; + mail_smtpsecure = "ssl"; + mail_smtphost = "smtp.gmail.com"; + mail_smtpport = 465; + enable_previews = true; + enabledPreviewProviders = [ + "OC\\\\Preview\\\\PNG" + "OC\\\\Preview\\\\JPEG" + "OC\\\\Preview\\\\GIF" + "OC\\\\Preview\\\\BMP" + "OC\\\\Preview\\\\XBitmap" + "OC\\\\Preview\\\\MP3" + "OC\\\\Preview\\\\TXT" + "OC\\\\Preview\\\\MarkDown" + "OC\\\\Preview\\\\OpenDocument" + "OC\\\\Preview\\\\Krita" + "OC\\\\Preview\\\\HEIC" + ]; + }; + }; + + nginx = { + enable = true; + virtualHosts = { + "nextcloud-container.local" = { + # Change this to the desired port number + listen = [{ addr = "0.0.0.0"; port = 9943; }]; + + root = "/var/www/nextcloud"; + + # You may need to adjust other options for your specific setup + }; + }; + }; + }; + system.stateVersion = "23.11"; + networking = { + firewall = { + enable = true; + allowedTCPPorts = [ 9943 ]; + }; + # Use systemd-resolved inside the container + # Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686 + useHostResolvConf = lib.mkForce false; + }; + services.resolved.enable = true; + + }; + }; +} \ No newline at end of file diff --git a/modules/apps/nextcloud/default2.nix b/modules/apps/nextcloud/default2.nix deleted file mode 100644 index cad30d7..0000000 --- a/modules/apps/nextcloud/default2.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ - config, - ... -}: -{ - services.nextcloud = { - enable = true; - homeDir = "/media/nas/ssd/nix-app-data/nextcloud"; # ??? - dataDir = "/media/nas/main/nextcloud"; # ??? - caching.redis = true; - configureRedis = true; - appstore.enable = true; - - config = { - adminuser = "mjallen"; - adminpassFile = config.sops.secrets."jallen-nas/nextcloud/adminpassword".path; - dbhost = "10.0.1.18:3306"; - dbtype = "mysql"; - dbname = "jallen_nextcloud"; - dbuser = "nextcloud"; - dbpassFile = config.sops.secrets."jallen-nas/nextcloud/dbpassword".path; - }; - - settings = { - trusted_domains = [ - "10.0.1.18:9943" - "cloud.mjallen.dev" - ]; - trusted_proxies = [ - "10.0.1.18" - ]; - maintenance_window_start = 6; - default_phone_region = "US"; - mail_from_address = "matt.l.jallen"; - mail_smtpmode = "smtp"; - mail_sendmailmode = "smtp"; - mail_domain = "gmail.com"; - mail_smtpauth = 1; - mail_smtpname = "matt.l.jallen"; - mail_smtppassword = builtins.readFile config.sops.secrets."jallen-nas/nextcloud/dbpassword".path;# ??? - mail_smtpsecure = "ssl"; - mail_smtphost = "smtp.gmail.com"; - mail_smtpport = 465; - enable_previews = true; - enabledPreviewProviders = [ - "OC\\Preview\\PNG" - "OC\\Preview\\JPEG" - "OC\\Preview\\GIF" - "OC\\Preview\\BMP" - "OC\\Preview\\XBitmap" - "OC\\Preview\\MP3" - "OC\\Preview\\TXT" - "OC\\Preview\\MarkDown" - "OC\\Preview\\OpenDocument" - "OC\\Preview\\Krita" - "OC\\Preview\\HEIC" - ]; - }; - }; -} \ No newline at end of file diff --git a/secrets.nix b/secrets.nix deleted file mode 100644 index f4c4bfb..0000000 --- a/secrets.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, pkgs, ... }: -let - # creds - password1 = "BogieDudie1" -in -{ - -}