diff --git a/flake.nix b/flake.nix index 389e019..38dc687 100644 --- a/flake.nix +++ b/flake.nix @@ -109,13 +109,14 @@ username, system ? "x86_64-linux", monitorSetup ? "single", + containerization ? "none", extraModules ? [ ], }: nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit inputs; - inherit username monitorSetup; + inherit username monitorSetup containerization; }; modules = commonModules @@ -124,6 +125,7 @@ ./users/${username}/nixos.nix home-manager.nixosModules.home-manager (commonHomeManagerConfig { inherit username monitorSetup; }) + ./modules/containerization ] ++ extraModules; @@ -163,20 +165,29 @@ hostname = "qemu"; username = "phil"; monitorSetup = "single"; + containerization = "none"; }; m920q = mkSystem { hostname = "m920q"; username = "phil"; monitorSetup = "dual"; + containerization = "podman"; }; hp15-n028sg = mkSystem { hostname = "hp15-n028sg"; username = "phil"; monitorSetup = "single"; + containerization = "docker"; }; + cloud = mkSystem { + hostname = "cluster.cyperpunk.de"; + username = "phil"; + monitorSetup = "none"; + containerization = "podman"; + }; }; }; diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index cacc809..727bde8 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -9,9 +9,9 @@ #./wpaperd.nix ./swww.nix ./rofi # App Launcher - #./mako.nix # Notifyer + ./mako.nix # Notifyer ./cava.nix # Music Visualizer - ./swaync.nix + #./swaync.nix ]; programs.waybar = diff --git a/home/hyprland/hyprland.nix b/home/hyprland/hyprland.nix index 6975822..8bdefcd 100644 --- a/home/hyprland/hyprland.nix +++ b/home/hyprland/hyprland.nix @@ -88,6 +88,7 @@ in input = { kb_layout = "de"; + kb_variant = "mac"; repeat_rate = 50; repeat_delay = 300; @@ -216,6 +217,9 @@ in # Lock Screen "${super}, M, exit, " + # swaync + "${super}, Y, exec, swaync-client -t -sw" + # Rofi bindings "${super}, F, exec, ${filebrowser}" "${super}, A, exec, ${apps}" diff --git a/home/hyprland/hyprlock.nix b/home/hyprland/hyprlock.nix index 9ec805e..0815447 100644 --- a/home/hyprland/hyprlock.nix +++ b/home/hyprland/hyprlock.nix @@ -27,8 +27,8 @@ background = [ { path = "~/Pictures/Wallpapers/lucy_with_cat.png"; - blur_passes = 0; - blur_size = 0; + blur_passes = 1; + blur_size = 5; } ]; @@ -37,24 +37,48 @@ { monitor = ""; text = "$TIME"; - color = "$text"; + color = "$peach"; font_size = 90; font_family = "$font"; - position = "-30, 0"; - halign = "right"; + position = "0, -100"; + halign = "center"; valign = "top"; } # DATE { monitor = ""; - text = ''cmd[update:43200000] date +"%A, %d %B %Y"''; - color = "$text"; + text = ''cmd[update:43200000] date +"%A, %d %B %Y"''; + color = "$peach"; font_size = 25; font_family = "$font"; - position = "-30, -150"; - halign = "right"; - valign = "top"; + position = "0, 100"; + halign = "center"; + valign = "bottom"; + } + + # Message + { + monitor = ""; + text = "Waiting for you..."; + color = "$peach"; + font_size = 20; + font_family = "$font"; + position = "0, 200"; + halign = "center"; + valign = "bottom"; + } + + # Weather + { + monitor = ""; + text = ''cmd[update:60000] curl -s "wttr.in/52.281311,10.527029?format=1"''; + color = "$peach"; + font_size = 20; + font_family = "$font"; + position = "0, 50"; + halign = "center"; + valign = "bottom"; } ]; diff --git a/home/hyprland/kitty.nix b/home/hyprland/kitty.nix index 43db8c6..d1a504c 100644 --- a/home/hyprland/kitty.nix +++ b/home/hyprland/kitty.nix @@ -42,4 +42,71 @@ (builtins.concatStringsSep "," mappings) + " Symbols Nerd Font"; }; }; + + programs.starship = { + enable = true; + settings = { + add_newline = true; + command_timeout = 500; + + format = "$username$hostname $directory $git_branch$git_status\n$character "; + right_format = "$cmd_duration"; + + username = { + style_user = "bold #cba6f7"; + style_root = "bold #f38ba8"; + format = "[┌](bold #a6e3a1)[$user]($style)"; + show_always = true; + }; + + hostname = { + style = "bold #74c7ec"; + format = "[@](bold #fab387)[$hostname]($style)"; + ssh_only = false; + }; + + directory = { + style = "bold #a6e3a1"; + truncation_length = 0; + truncation_symbol = ""; + format = "[⤇ ](bold #f38ba8)[《$path》]($style)"; + }; + + git_branch = { + format = "[⟦$branch⟧]($style)"; + style = "bold #f9e2af"; + }; + + # Git status module settings + git_status = { + format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](red) ($ahead_behind$stashed)]($style)"; + style = "bold #a6e3a1"; + conflicted = ""; + untracked = ""; + modified = ""; + staged = ""; + renamed = ""; + deleted = ""; + }; + + # Command duration module + cmd_duration = { + format = "[$duration]($style)"; + style = "bold #cdd6f4"; + min_time = 5000; # Only show if command takes longer than 5 seconds + }; + + # Character module (prompt symbol) + character = { + success_symbol = "[└──────⇴ ](bold #a6e3a1)"; + error_symbol = "[└──────⇴ ](bold #f38ba8)"; + }; + + nix_shell = { + format = "[$symbol$state( \($name\))]($style)"; + symbol = "U+02744"; + style = "bold #89dceb"; + }; + }; + }; } diff --git a/home/hyprland/mako.nix b/home/hyprland/mako.nix index 1883468..4899b7f 100644 --- a/home/hyprland/mako.nix +++ b/home/hyprland/mako.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ ... }: { services.mako = { enable = true; @@ -8,8 +8,11 @@ defaultTimeout = 5000; extraConfig = '' - [app-name=Spotify] - border-color=#a6e3a1 + [app-name=Spotify] + border-color=#a6e3a1 + + [app-name=Thunderbird] + border-color=#94e2d5 ''; }; diff --git a/home/hyprland/rofi/configs/power.rasi b/home/hyprland/rofi/configs/power.rasi index 05d6bb6..0b62cd4 100644 --- a/home/hyprland/rofi/configs/power.rasi +++ b/home/hyprland/rofi/configs/power.rasi @@ -28,7 +28,7 @@ } configuration { - font: "Icomoon-Feather 12"; + font: "Fira Code Bold 20px"; show-icons: true; } @@ -85,11 +85,11 @@ dummy { textbox-prompt-colon { enabled: true; expand: false; - str: " System"; + str: " System"; padding: 15px; border: 0px 0px 0px 10px; border-radius: 100% 100% 0px 100%; - border-color: @peach; + border-color: @blue; background-color: @crust; text-color: @text; } @@ -117,7 +117,7 @@ listview { fixed-columns: true; spacing: 30px; - margin: 30px; + margin: 10px; background-color: transparent; cursor: "default"; } @@ -125,11 +125,12 @@ listview { /*****----- Elements -----*****/ element { enabled: true; - padding: 35px 10px; - border-radius: 5%; + padding: 10px; + border-radius: 1%; background-color: @crust; text-color: @text; cursor: pointer; + children: [ element-text ]; } element-text { background-color: transparent; @@ -140,7 +141,7 @@ element-text { } element selected.normal { background-color: @crust; - text-color: @sapphire; + text-color: @yellow; } /*****----- Message -----*****/ diff --git a/home/hyprland/swaync.nix b/home/hyprland/swaync.nix index a5cde49..0f95483 100644 --- a/home/hyprland/swaync.nix +++ b/home/hyprland/swaync.nix @@ -1,4 +1,110 @@ -{ pkgs, ... }: +{ ... }: { - home.packages = [ pkgs.swaynotificationcenter ]; + services.swaync = { + enable = true; + settings = { + positionX = "center"; + positionY = "center"; + layer = "overlay"; + control-center-layer = "top"; + layer-shell = true; + cssPriority = "user"; + control-center-margin-top = 100; + control-center-margin-bottom = 200; + control-center-margin-right = 0; + control-center-margin-left = 0; + notification-2fa-action = true; + notification-inline-replies = false; + notification-icon-size = 64; + notification-body-image-height = 100; + notification-body-image-width = 200; + widgets = [ + "mpris" + "volume" + "inhibitors" + "title" + "dnd" + "notifications" + ]; + widget-config = { + + mpris = { + blacklist = [ ]; + autohide = false; + show-album-art = "always"; + loop-carousel = false; + image-size = 96; + image-radius = 12; + }; + + volume = { + label = "gain"; + show-per-app = false; + empty-list-label = "Nothin' is playin'"; + expand-button-label = "⤢"; + collaps-button-label = "⤡"; + }; + + title = { + text = "Hollerin'"; + clear-all-button = true; + button-text = "Sheriff's Pardon"; + }; + + dnd = { + text = "Let'er rest"; + }; + + menubar = { + "menu#power" = { + label = "Power"; + position = "right"; + animation-type = "slide_down"; + animation-duration = 250; + actions = [ + { + label = "Bolt It"; + command = "hyprlock"; + } + { + label = "Ride Out"; + command = "hyprctl dispatch exit"; + } + { + label = "Circle Back"; + command = "systemctl reboot"; + } + { + label = "Bet Down the Horses"; + command = "systemctl poweroff"; + } + ]; + }; + + "buttons#media" = { + position = "left"; + actions = [ + { + label = "Play/Pause"; + command = "playerctl play-pause"; + } + { + label = "Next"; + command = "playerctl next"; + } + { + label = "Previous"; + command = "playerctl previous"; + } + ]; + }; + }; + + notifications = { + vexpand = true; + }; + + }; + }; + }; } diff --git a/home/hyprland/waybar/common.nix b/home/hyprland/waybar/common.nix index d67cdf4..0bc5a19 100644 --- a/home/hyprland/waybar/common.nix +++ b/home/hyprland/waybar/common.nix @@ -159,6 +159,27 @@ interval = 60; tooltip = false; }; + + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = " "; + dnd-notification = ""; + dnd-none = " "; + inhibited-notification = ""; + inhibited-none = " "; + dnd-inhibited-notification = ""; + dnd-inhibited-none = " "; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; }; } diff --git a/home/hyprland/waybar/configs/style.css b/home/hyprland/waybar/configs/style.css index 8e7e5fd..70a65ce 100644 --- a/home/hyprland/waybar/configs/style.css +++ b/home/hyprland/waybar/configs/style.css @@ -149,3 +149,12 @@ window#waybar.hidden { margin: 5px 20px; padding: 0px 10px; } + +/* SwayNC */ +#custom-notification { + font-family: "NotoSansMono Nerd Font"; + background: @green; + border-radius: 10px; + padding-left: 10px; + padding-right: 5px; +} diff --git a/home/hyprland/waybar/dual.nix b/home/hyprland/waybar/dual.nix index c19778d..8e8e3f9 100644 --- a/home/hyprland/waybar/dual.nix +++ b/home/hyprland/waybar/dual.nix @@ -18,6 +18,7 @@ in modules-center = [ "hyprland/workspaces" "niri/workspaces" + "custom/notification" ]; modules-right = [ "group/hardware" diff --git a/home/programs/dev/default.nix b/home/programs/dev/default.nix index 09f1695..aecb4ef 100644 --- a/home/programs/dev/default.nix +++ b/home/programs/dev/default.nix @@ -7,5 +7,6 @@ ./sqllite_browser.nix ./compilers.nix ./beekeeper-studio.nix + #./newelle.nix ]; } diff --git a/home/programs/dev/newelle.nix b/home/programs/dev/newelle.nix new file mode 100644 index 0000000..f7a4ad6 --- /dev/null +++ b/home/programs/dev/newelle.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + # Install fstl + home.packages = with pkgs; [ + newelle + ]; +} diff --git a/hosts/hp15-n028sg/default.nix b/hosts/hp15-n028sg/default.nix index 5ef6ad1..f562cac 100644 --- a/hosts/hp15-n028sg/default.nix +++ b/hosts/hp15-n028sg/default.nix @@ -14,11 +14,9 @@ ../../modules/localisation.nix ../../modules/openssh.nix ../../modules/pipewire.nix - ../../modules/podman.nix ../../modules/services.nix ../../modules/regreet/regreet.nix ../../modules/plymouth.nix - ../../modules/file_managers/spacefm.nix # Include the results of the hardware scan. ./hardware-configuration.nix ]; diff --git a/hosts/m920q/default.nix b/hosts/m920q/default.nix index 34d8b20..51dfac3 100644 --- a/hosts/m920q/default.nix +++ b/hosts/m920q/default.nix @@ -16,8 +16,6 @@ ../../modules/localisation.nix ../../modules/openssh.nix ../../modules/pipewire.nix - #../../modules/podman.nix - ../../modules/docker.nix ../../modules/services.nix ../../modules/regreet/regreet.nix ../../modules/plymouth.nix diff --git a/hosts/m920q/hardware-configuration.nix b/hosts/m920q/hardware-configuration.nix index 0908a59..7449b5e 100644 --- a/hosts/m920q/hardware-configuration.nix +++ b/hosts/m920q/hardware-configuration.nix @@ -4,7 +4,6 @@ { config, lib, - pkgs, modulesPath, ... }: diff --git a/hosts/qemu/default.nix b/hosts/qemu/default.nix index 29a9358..b3e8093 100644 --- a/hosts/qemu/default.nix +++ b/hosts/qemu/default.nix @@ -14,11 +14,9 @@ ../../modules/localisation.nix ../../modules/openssh.nix ../../modules/pipewire.nix - ../../modules/podman.nix ../../modules/services.nix ../../modules/regreet/regreet.nix ../../modules/plymouth.nix - ../../modules/file_managers/spacefm.nix # Include the results of the hardware scan. ./hardware-configuration.nix diff --git a/modules/containerization/default.nix b/modules/containerization/default.nix new file mode 100644 index 0000000..7bc6661 --- /dev/null +++ b/modules/containerization/default.nix @@ -0,0 +1,41 @@ +{ + lib, + pkgs, + containerization ? "none", + ... +}: + +let + # Import the appropriate containerization module based on the parameter + containerModule = + if containerization == "podman" then + import ./podman.nix + else if containerization == "docker" then + import ./docker.nix + else if containerization == "none" then + { } + else + throw "Unknown containerization type: ${containerization}. Valid options are: podman, docker, none"; +in + +{ + imports = [ containerModule ]; + + # Common packages and configuration for all systems + environment.systemPackages = with pkgs; [ + # Remove the curly braces {} + dive # docker layer viewer + tailscale # VPN + ]; + + virtualisation.containers.enable = true; + virtualisation.oci-containers.containers = { + /* + container-name = { + image = "image"; + autoStart = true; + ports = [ "127.0.0.1:1234:1234" ]; + }; + */ + }; +} diff --git a/modules/containerization/docker.nix b/modules/containerization/docker.nix new file mode 100644 index 0000000..62ab143 --- /dev/null +++ b/modules/containerization/docker.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + docker-compose + lazydocker + ]; + + virtualisation.docker = { + enable = true; + rootless = { + enable = true; + setSocketVariable = true; + }; + }; + + virtualisation.oci-containers.backend = "docker"; +} diff --git a/modules/containerization/podman.nix b/modules/containerization/podman.nix new file mode 100644 index 0000000..9012f97 --- /dev/null +++ b/modules/containerization/podman.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + podman-compose # docker-compose alternative + podman-tui # status of containers in terminal + podman-desktop # Desktop client + ]; + + virtualisation.podman = { + enable = true; + dockerCompat = true; + defaultNetwork.settings.dns_enabled = true; + }; + + virtualisation.oci-containers.backend = "podman"; +} diff --git a/modules/docker.nix b/modules/docker.nix deleted file mode 100644 index 20d7645..0000000 --- a/modules/docker.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ pkgs, ... }: -{ - - environment.systemPackages = with pkgs; [ - # Virtualisation - docker-compose # docker-compose alternative - dive # docker layer viewer - tailscale # Vpn - ]; - # Virtualisation - virtualisation = { - containers.enable = true; - - docker = { - enable = true; - rootless = { - enable = true; - setSocketVariable = true; - }; - }; - - oci-containers = { - backend = "docker"; - containers = { - /* - container-name = { - image = "image"; - autoStart = true; - ports = [ "127.0.0.1:1234:1234" ]; - }; - */ - }; - }; - }; - -} diff --git a/modules/localisation.nix b/modules/localisation.nix index cfeab77..f2231ee 100644 --- a/modules/localisation.nix +++ b/modules/localisation.nix @@ -4,7 +4,7 @@ time.timeZone = "Europe/Berlin"; # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; + i18n.defaultLocale = "de_DE.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "de_DE.UTF-8"; diff --git a/modules/podman.nix b/modules/podman.nix deleted file mode 100644 index 9f08658..0000000 --- a/modules/podman.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ pkgs, ... }: -{ - - environment.systemPackages = with pkgs; [ - # Virtualisation - podman-compose # docker-compose alternative - dive # docker layer viewer - podman-tui # status of containers in terminal - podman-desktop # Desktop client - tailscale # Vpn - ]; - # Virtualisation - virtualisation = { - containers.enable = true; - - podman = { - enable = true; - dockerCompat = true; - defaultNetwork.settings.dns_enabled = true; - }; - - oci-containers = { - backend = "podman"; - containers = { - /* - container-name = { - image = "image"; - autoStart = true; - ports = [ "127.0.0.1:1234:1234" ]; - }; - */ - }; - }; - }; - -} diff --git a/users/phil/nixos.nix b/users/phil/nixos.nix index e435f5d..8341500 100644 --- a/users/phil/nixos.nix +++ b/users/phil/nixos.nix @@ -30,9 +30,10 @@ programs.fish = { enable = true; interactiveShellInit = '' - fish_config prompt choose disco + fish_config prompt choose disco + starship init fish | source function fish_greeting - fastfetch + fastfetch end ''; };