diff --git a/flake.nix b/flake.nix index d22d171..25a3a90 100644 --- a/flake.nix +++ b/flake.nix @@ -103,10 +103,10 @@ inputs.disko.nixosModules.disko ]; }; - AZ-LPT-100 = inputs.nixpkgs-unstable.lib.nixosSystem { + AZLT124-L = inputs.nixpkgs-unstable.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ - ./hosts/AZ-LPT-100 + ./hosts/AZLT124-L agenix.nixosModules.default inputs.home-manager-unstable.nixosModules.home-manager ]; diff --git a/home/features/desktop/default.nix b/home/features/desktop/default.nix index f19a1ee..8f929ff 100644 --- a/home/features/desktop/default.nix +++ b/home/features/desktop/default.nix @@ -27,8 +27,10 @@ "application/pdf" = ["okularApplication_pdf.desktop"]; "application/md" = ["nvim.desktop"]; "application/text" = ["nvim.desktop"]; - "x-scheme-handler/http" = ["io.github.zen_browser.zen"]; - "x-scheme-handler/https" = ["io.github.zen_browser.zen"]; + "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; + "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + "text/html" = ["vivaldi-stable.desktop"]; + "application/xhtml+xml" = ["vivaldi-stable.desktop"]; }; }; userDirs = { @@ -67,6 +69,11 @@ name = "Bibata-Modern-Ice"; size = 20; }; + services = { + cliphist = { + enable = true; + }; + }; home.packages = with pkgs; [ appimage-run @@ -79,8 +86,10 @@ # eww # firefox-devedition file-roller + ksnip hyprpaper-random hyprpanel + launch-webapp seahorse sushi # glib diff --git a/home/features/desktop/hyprland.nix b/home/features/desktop/hyprland.nix index 6187731..24e039c 100644 --- a/home/features/desktop/hyprland.nix +++ b/home/features/desktop/hyprland.nix @@ -1,4 +1,31 @@ { + home.file.".config/hypr/colors.conf".text = '' + $background = rgb(282A36) + $backgroundRaw = 282A36 + $foreground = rgb(F8F8F2) + $foregroundRaw = F8F8F2 + $selection = rgb(44475A) + $selectionRaw = 44475A + $comment = rgb(6272A4) + $commentRaw = 6272A4 + $red = rgb(FF5555) + $redRaw = FF5555 + $orange = rgb(FFB86C) + $orangeRaw = FFB86C + $yellow = rgb(F1FA8C) + $yellowRaw = F1FA8C + $green = rgb(50FA7B) + $greenRaw = 50FA7B + $purple = rgb(BD93F9) + $purpleRaw = BD93F9 + $cyan = rgb(8BE9FD) + $cyanRaw = 8BE9FD + $pink = rgb(FF79C6) + $pinkRaw = FF79C6 + $accent = $purple + $accentRaw = $purpleRaw + ''; + wayland.windowManager.hyprland = { settings = { xwayland = { @@ -8,8 +35,8 @@ exec-once = [ "hyprpanel" "hyprpaper" - "hyprpaper-random" "hypridle" + "hyprpaper-random" "wl-paste --type text --watch cliphist store" # Stores only text data "wl-paste --type image --watch cliphist store" # Stores only image data "wl-paste -p -t text --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\"" ]; @@ -39,7 +66,10 @@ gaps_out = 5; border_size = 1; "col.active_border" = "rgba(9742b5ee) rgba(9742b5ee) 45deg"; - "col.inactive_border" = "rgba(595959aa)"; + "col.inactive_border" = "rgba(44475aaa)"; + "col.nogroup_border" = "rgba(282a36dd)"; + "col.nogroup_border_active" = "rgb(bd93f9) rgb(44475a) 90deg"; + no_border_on_floating = false; layout = "dwindle"; }; @@ -139,6 +169,7 @@ "noborder, initialTitle:.*streamlabs.com.*" "noshadow, initialTitle:.*streamlabs.com.*" "noblur, initialTitle:.*streamlabs.com.*" + "bordercolor rgb(ffffff),xwayland:1" ]; "$mainMod" = "SUPER"; @@ -160,6 +191,7 @@ "$mainMod, F, fullscreen" "$mainMod SHIFT, V, togglefloating" "$mainMod, D, exec, rofi -show" + "$mainMod, C, exec, bash -c 'FILE=/tmp/screenshot_$(date +%s).png; grim -g \"$(slurp)\" \"$FILE\" && ksnip \"$FILE\"'" "$mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy" "$mainMod SHIFT, S, exec, bemoji" "$mainMod, P, exec, rofi-pass" @@ -199,4 +231,98 @@ ]; }; }; + + services.hypridle = { + enable = true; + settings = { + general = { + before_sleep_cmd = "loginctl lock-session"; + after_sleep_cmd = "hyprctl dispatch dpms on"; + inhibit_sleep = 3; + }; + + listener = [ + { + timeout = 300; # 5 min + on-timeout = "loginctl lock-session"; + } + { + timeout = 330; # 5.5 min + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; + + programs.hyprlock = { + enable = true; + settings = { + source = "$HOME/.config/hypr/colors.conf"; + + "$font" = "JetBrainsMono Nerd Font"; + "$base" = "$background"; + "$text" = "$foreground"; + "$textAlpha" = "$foregroundRaw"; + "$accentAlpha" = "$accentRaw"; + + general = { + hide_cursor = true; + }; + + background = { + monitor = ""; + path = "~/.hypr/wallpapers/wallhaven-lmmo8r_2560x1600.png"; + blur_passes = 0; + color = "$base"; + }; + + label = [ + { + monitor = ""; + text = "$TIME"; + color = "$text"; + font_size = 90; + font_family = "$font"; + position = "30, 0"; + halign = "left"; + valign = "top"; + } + { + monitor = ""; + text = ''cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"''; + color = "$text"; + font_size = 25; + font_family = "$font"; + position = "30, -150"; + halign = "left"; + valign = "top"; + } + ]; + + input-field = [ + { + monitor = ""; + size = "300, 60"; + outline_thickness = 4; + dots_size = 0.2; + dots_spacing = 0.2; + dots_center = true; + outer_color = "$accent"; + inner_color = "$background"; + font_color = "$text"; + fade_on_empty = false; + placeholder_text = ''󰌾 Logged in as $USER''; + hide_input = false; + check_color = "$accent"; + fail_color = "$red"; + fail_text = ''$FAIL ($ATTEMPTS)''; + capslock_color = "$yellow"; + position = "0, -35"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; } diff --git a/home/features/desktop/webapps.nix b/home/features/desktop/webapps.nix index 6331ea7..6d9acfa 100644 --- a/home/features/desktop/webapps.nix +++ b/home/features/desktop/webapps.nix @@ -17,19 +17,27 @@ in { xdg.desktopEntries = { teams = { name = "Microsoft Teams"; - exec = "vivaldi --app=https://teams.microsoft.com"; + exec = "launch-webapp https://teams.microsoft.com"; comment = "Open Microsoft Teams as a Desktop App"; categories = ["Application" "Network" "Chat"]; terminal = false; icon = icons.teams; }; - Outlook = { + outlook = { name = "Microsoft Outlook"; - exec = "vivaldi --app=https://outlook.office.com/mail/"; + exec = "launch-webapp https://outlook.office.com/mail/"; comment = "Open Microsoft Outlook as a Desktop App"; categories = ["Application" "Network"]; terminal = false; icon = icons.outlook; }; + basecamp = { + name = "Basecamp"; + exec = "launch-webapp https://3.basecamp.com/5996442/"; + comment = "Open Basecamp as a Desktop App"; + categories = ["Application" "Network"]; + terminal = false; + icon = "/home/sascha.koenig/.local/share/icons/basecamp-logo.png"; + }; }; } diff --git a/home/sascha.koenig/AZ-LPT-100.nix b/home/sascha.koenig/AZLT124-L.nix similarity index 91% rename from home/sascha.koenig/AZ-LPT-100.nix rename to home/sascha.koenig/AZLT124-L.nix index de18580..fee71a5 100644 --- a/home/sascha.koenig/AZ-LPT-100.nix +++ b/home/sascha.koenig/AZLT124-L.nix @@ -81,8 +81,12 @@ in { "workspace 1,class:(com.obsproject.Studio)" "workspace 3,class:dev.zed.Zed" "workspace 5,opacity 1.0, class:(vivaldi-stable)" + "workspace 5,opacity 1.0, initialTitle:(3.basecamp.com_/5996442/)" + "tile, initialTitle:(3.basecamp.com_/5996442/)" "workspace 6,opacity 1.0, initialTitle:(teams.microsoft.com_/)" + "tile, initialTitle:(teams.microsoft.com_/)" "workspace 6,opacity 1.0, initialTitle:(outlook.office.com_/mail/)" + "tile, initialTitle:(outlook.office.com_/mail/)" ]; }; }; diff --git a/hosts/AZ-LPT-100/configuration.nix b/hosts/AZLT124-L/configuration.nix similarity index 96% rename from hosts/AZ-LPT-100/configuration.nix rename to hosts/AZLT124-L/configuration.nix index 2bbf9fa..dba7567 100644 --- a/hosts/AZ-LPT-100/configuration.nix +++ b/hosts/AZLT124-L/configuration.nix @@ -21,7 +21,10 @@ services.xserver.videoDrivers = ["amdgpu"]; security.polkit.enable = true; security.pam.services.gdm.enableGnomeKeyring = true; - networking.hostName = "AZ-LPT-100"; + networking = { + networkmanager.enable = true; + hostName = "AZLT124-L"; + }; # Define your hostname. # warp-terminal update fix @@ -31,8 +34,6 @@ # ''; # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - networking.networkmanager.enable = - true; # Easiest to use and most distros use this by default. # Set your time zone. time.timeZone = "Europe/Berlin"; diff --git a/hosts/AZ-LPT-100/default.nix b/hosts/AZLT124-L/default.nix similarity index 97% rename from hosts/AZ-LPT-100/default.nix rename to hosts/AZLT124-L/default.nix index e5bdeba..f0ee1b7 100644 --- a/hosts/AZ-LPT-100/default.nix +++ b/hosts/AZLT124-L/default.nix @@ -44,7 +44,7 @@ home-manager = { useUserPackages = true; extraSpecialArgs = {inherit inputs outputs;}; - users."sascha.koenig" = import ../../home/sascha.koenig/AZ-LPT-100.nix; + users."sascha.koenig" = import ../../home/sascha.koenig/AZLT124-L.nix; }; # Configure nixpkgs to use unstable diff --git a/hosts/AZ-LPT-100/hardware-configuration.nix b/hosts/AZLT124-L/hardware-configuration.nix similarity index 100% rename from hosts/AZ-LPT-100/hardware-configuration.nix rename to hosts/AZLT124-L/hardware-configuration.nix diff --git a/hosts/AZ-LPT-100/hardware.nix b/hosts/AZLT124-L/hardware.nix similarity index 100% rename from hosts/AZ-LPT-100/hardware.nix rename to hosts/AZLT124-L/hardware.nix diff --git a/hosts/AZ-LPT-100/programs.nix b/hosts/AZLT124-L/programs.nix similarity index 100% rename from hosts/AZ-LPT-100/programs.nix rename to hosts/AZLT124-L/programs.nix diff --git a/hosts/AZ-LPT-100/secrets.nix b/hosts/AZLT124-L/secrets.nix similarity index 100% rename from hosts/AZ-LPT-100/secrets.nix rename to hosts/AZLT124-L/secrets.nix diff --git a/hosts/AZ-LPT-100/services/ad.nix b/hosts/AZLT124-L/services/ad.nix similarity index 73% rename from hosts/AZ-LPT-100/services/ad.nix rename to hosts/AZLT124-L/services/ad.nix index c11b55b..a4470e2 100644 --- a/hosts/AZ-LPT-100/services/ad.nix +++ b/hosts/AZLT124-L/services/ad.nix @@ -5,8 +5,11 @@ }: { environment.systemPackages = with pkgs; [ adcli # Helper library and tools for Active Directory client operations - realmd # Diagnostic command; Does not configure AD client on NixOS - samba # Standard Windows interoperability suite of programs for Linux and Unix + oddjob # Odd Job Daemon + samba4Full # Standard Windows interoperability suite of programs for Linux and Unix + sssd # System Security Services Daemon + krb5 # MIT Kerberos 5 + realmd # DBus service for configuring Kerberos and other ]; # @@ -72,20 +75,15 @@ config_file_version = 2 services = nss, pam - [pam] - offline_credentials_expiration = 365 - [domain/az-group] override_shell = /run/current-system/sw/bin/zsh - krb5_store_password_if_offline = true - cache_credentials = true - account_cache_expiration = 365 - entry_cache_timeout = 14400 + krb5_store_password_if_offline = True + cache_credentials = True krb5_realm = AZ-GROUP realmd_tags = manages-system joined-with-samba id_provider = ad fallback_homedir = /home/%u - ad_domain = az-group + ad_domain = your_domain_lowercase use_fully_qualified_names = false ldap_id_mapping = false auth_provider = ad @@ -96,4 +94,21 @@ ''; }; }; + + # + # Systemd + # + systemd = { + services.realmd = { + description = "Realm Discovery Service"; + wantedBy = ["multi-user.target"]; + after = ["network.target"]; + serviceConfig = { + Type = "dbus"; + BusName = "org.freedesktop.realmd"; + ExecStart = "${pkgs.realmd}/libexec/realmd"; + User = "root"; + }; + }; + }; } diff --git a/hosts/AZ-LPT-100/services/default.nix b/hosts/AZLT124-L/services/default.nix similarity index 100% rename from hosts/AZ-LPT-100/services/default.nix rename to hosts/AZLT124-L/services/default.nix diff --git a/hosts/AZ-LPT-100/services/sound.nix b/hosts/AZLT124-L/services/sound.nix similarity index 100% rename from hosts/AZ-LPT-100/services/sound.nix rename to hosts/AZLT124-L/services/sound.nix diff --git a/hosts/AZ-LPT-100/services/udev.nix b/hosts/AZLT124-L/services/udev.nix similarity index 100% rename from hosts/AZ-LPT-100/services/udev.nix rename to hosts/AZLT124-L/services/udev.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 0ce81b7..c1471f1 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,6 +1,7 @@ {pkgs, ...}: { # Define your custom packages here hyprpaper-random = pkgs.callPackage ./hyprpaper-random {}; + launch-webapp = pkgs.callPackage ./launch-webapp {}; msty = pkgs.callPackage ./msty {}; msty-sidecar = pkgs.callPackage ./msty-sidecar {}; zellij-ps = pkgs.callPackage ./zellij-ps {}; diff --git a/pkgs/launch-webapp/default.nix b/pkgs/launch-webapp/default.nix new file mode 100644 index 0000000..c2ec236 --- /dev/null +++ b/pkgs/launch-webapp/default.nix @@ -0,0 +1,41 @@ +{ + lib, + stdenv, + writeShellScriptBin, +}: let + launcher = writeShellScriptBin "launch-webapp" '' + #!/usr/bin/env bash + + browser=$(xdg-settings get default-web-browser) + + case "$browser" in + google-chrome*) browser_bin="google-chrome" ;; + brave-browser*) browser_bin="brave-browser" ;; + microsoft-edge*) browser_bin="microsoft-edge" ;; + opera*) browser_bin="opera" ;; + vivaldi*) browser_bin="vivaldi" ;; + *) browser_bin="chromium" ;; + esac + + exec_cmd="/etc/profiles/per-user/$USER/bin/$browser_bin" + exec setsid uwsm app -- "$exec_cmd" --app="$1" ''${@:2} + ''; +in + stdenv.mkDerivation { + pname = "launch-webapp"; + version = "0.1.0"; + + dontUnpack = true; + + installPhase = '' + mkdir -p $out/bin + ln -s ${launcher}/bin/launch-webapp $out/bin/launch-webapp + ''; + + meta = with lib; { + description = "Launches a web app using your default browser in app mode."; + license = licenses.mit; + platforms = platforms.linux; + maintainers = []; + }; + } diff --git a/pkgs/my-package/default.nix b/pkgs/my-package/default.nix deleted file mode 100644 index fe6ef0f..0000000 --- a/pkgs/my-package/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -# Your custom nix-package -# ...