From f16cd8ccd7c389efe5975e07a66e8de790b0ce61 Mon Sep 17 00:00:00 2001 From: autumn Date: Mon, 29 Sep 2025 14:22:57 -0600 Subject: [PATCH] adding automatic flatpak management --- home/autumn/home.nix | 4 +- home/autumn/sysconfs/yukigekko.nix | 2 +- home/packages/starship/starship.toml | 9 ++- home/packages/waybar/waybar.nix | 61 ++++++++------------- home/packages/zsh/zsh.nix | 8 +-- system/extras/flatpak.nix | 33 +++++++++++ system/wsl-hive/configuration.nix | 1 + system/yukigekko/configuration.nix | 5 ++ system/yukigekko/hardware-configuration.nix | 2 +- 9 files changed, 74 insertions(+), 51 deletions(-) create mode 100644 system/extras/flatpak.nix diff --git a/home/autumn/home.nix b/home/autumn/home.nix index 2b28466..035b40c 100644 --- a/home/autumn/home.nix +++ b/home/autumn/home.nix @@ -6,7 +6,6 @@ homeDirectory = "/home/autumn"; stateVersion = "25.11"; packages = with pkgs; [ - eza fm felix gnumake @@ -26,14 +25,13 @@ htop.enable = true; pls = { enable = true; - enableFishIntegration = true; + enableZshIntegration = true; }; }; nixpkgs.config = { alowUnfree = true; allowUnfreePredicate = (_: true); }; - # wayland.windowManager.river.enable = true; imports = [ ## Themeing diff --git a/home/autumn/sysconfs/yukigekko.nix b/home/autumn/sysconfs/yukigekko.nix index 19a7c61..61eb39f 100644 --- a/home/autumn/sysconfs/yukigekko.nix +++ b/home/autumn/sysconfs/yukigekko.nix @@ -15,7 +15,7 @@ }; }; imports = [ - ../../packages/fish/fish.nix + # ../../packages/fish/fish.nix ../../packages/river/river.nix ../../packages/waybar/waybar.nix ../../packages/twmn/twmn.nix diff --git a/home/packages/starship/starship.toml b/home/packages/starship/starship.toml index c638a87..0e576d6 100644 --- a/home/packages/starship/starship.toml +++ b/home/packages/starship/starship.toml @@ -30,9 +30,9 @@ $docker_context\ [](fg:#83c092 bg:#7fbbb3)\ $time\ [](fg:#7fbbb3 bg:#d699B6)\ +$direnv\ [ ](fg:#d699B6)\ \n\ -$direnv\ $status\ $cmd_duration\ [ ](fg:#E67380) @@ -134,8 +134,7 @@ format = '[[ $symbol ($version) ](fg:#434f55 bg:#a7c080 )]($style)' [rust] symbol = " " -style = "fg:#434f55 bg:#a7c080 " -format = '[[ $symbol ($version) ](fg:#434f55 bg:#a7c080 )]($style)' +format = '[ $symbol ($version) ](fg:#434f55 bg:#a7c080 )' [ruby] symbol = " " @@ -163,8 +162,8 @@ loaded_msg = "󱥾 " unloaded_msg = "󱧴 " allowed_msg = "󱥾 " not_allowed_msg = "󱧴 " -style = "fg:#434f55 bg:#E67380" -format = '[$loaded_msg$not_loaded_msg$allowed_msg$not_allowed_msg]($style)' +style = "fg:#434f55 bg:#d699B6" +format = '[ $loaded]($style)' [time] disabled = false diff --git a/home/packages/waybar/waybar.nix b/home/packages/waybar/waybar.nix index bfadaea..adadb29 100644 --- a/home/packages/waybar/waybar.nix +++ b/home/packages/waybar/waybar.nix @@ -17,8 +17,6 @@ "river/tags" ]; modules-center = [ - #"river/mode" - # "river/layout" "river/window" ]; modules-right = [ @@ -145,20 +143,19 @@ format-source = "{volume}% "; format-source-muted = ""; format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = ["" "" ""]; - on-click = "pavucontrol"; + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = ["" "" ""]; + on-click = "pavucontrol"; + }; }; }; }; - }; - # Waybar styling inspired by the referenced swayhome configuration style = '' * { font-family: "Hack Nerd Font Mono"; @@ -234,22 +231,22 @@ #backlight { background-color: transparent; - border-bottom: 3px solid #cba6f7; + border-bottom: 3px solid #7fbbb3; } #battery { background-color: transparent; - border-bottom: 3px solid #a6e3a1; + border-bottom: 3px solid #a7c080; } #battery.critical.discharging { - background-color: #f38ba8; - animation: blink 1s infinite; + background-color: #e67e80; + animation: blink 5s infinite; } #battery.warning.discharging { - background-color: #f9e2af; - animation: blink 1s infinite; + background-color: #dbbc7f; + animation: blink 10s infinite; } @keyframes blink { @@ -260,28 +257,22 @@ #clock { background-color: transparent; - border-bottom: 3px solid #a6e3a1; + border-bottom: 3px solid #a7c080; } #cpu { background-color: transparent; - border-bottom: 3px solid #cba6f7; + border-bottom: 3px solid #7fbbb3; } #memory { background-color: transparent; - border-bottom: 3px solid #f9e2af; - } - - #mode { - color: #ffffff; - background-color: #6e3a6d; - border-bottom: 3px solid #ffffff; + border-bottom: 3px solid #dbbc7f; } #network { background-color: transparent; - border-bottom: 3px solid #a6e3a1; + border-bottom: 3px solid #a7c080; } #network.disconnected { @@ -291,31 +282,27 @@ #pulseaudio { background-color: transparent; - border-bottom: 3px solid #a6e3a1; + border-bottom: 3px solid #7fbbb3; } #pulseaudio.muted { background-color: transparent; - border-bottom: 3px solid #f38ba8; + border-bottom: 3px solid #e67e80; } #temperature { background-color: transparent; - border-bottom: 3px solid #a6e3a1; + border-bottom: 3px solid #a7c080; } #temperature.critical { background-color: transparent; - border-bottom: 3px solid #f38ba8; + border-bottom: 3px solid #e67e80; } #tray { background-color: transparent; - border-bottom: 3px solid #6e3a6d; - } - #power-profiles-daemon { - background-color: transparent; - border-bottom: 3px solid #94e2d5; + border-bottom: 3px solid #7fbbb3; } ''; }; diff --git a/home/packages/zsh/zsh.nix b/home/packages/zsh/zsh.nix index 1d32c03..450249a 100644 --- a/home/packages/zsh/zsh.nix +++ b/home/packages/zsh/zsh.nix @@ -9,10 +9,10 @@ programs ={ zsh = { enable = true; - initContent = lib.mkOrder 1200 '' - eval "$(ssh-agent -s)" - ssh-add ~/.ssh/id_ed25519 - ''; + # initContent = lib.mkOrder 1200 '' + # eval "$(ssh-agent -s)" + # ssh-add ~/.ssh/id_ed25519 + # ''; antidote = { enable = true; plugins = [ diff --git a/system/extras/flatpak.nix b/system/extras/flatpak.nix new file mode 100644 index 0000000..3cafb2f --- /dev/null +++ b/system/extras/flatpak.nix @@ -0,0 +1,33 @@ +{ config, pkgs, ... }: +let + grep = pkgs.gnugrep; + desiredFlatpaks = [ + "com.spotify.Client" + "io.github.huderlem.porymap" + ]; +in { + system.userActivationScripts.flatpakManagement = { + text = '' + ${pkgs.flatpak}/bin/flatpak remote-add --if-not-exists flathub \ + https://flathub.org/repo/flathub.flatpakrepo + + installedFlatpaks=$(${pkgs.flatpak}/bin/flatpak list --app --columns=application) + + for installed in $installedFlatpaks; do + if ! echo ${toString desiredFlatpaks} | ${grep}/bin/grep -q $installed; then + echo "Removing $installed because it's not in the desiredFlatpaks list." + ${pkgs.flatpak}/bin/flatpak uninstall -y --noninteractive $installed + fi + done + + for app in ${toString desiredFlatpaks}; do + echo "Ensuring $app is installed." + ${pkgs.flatpak}/bin/flatpak install -y flathub $app + done + + ${pkgs.flatpak}/bin/flatpak uninstall --unused -y + + ${pkgs.flatpak}/bin/flatpak update -y + ''; + }; +} diff --git a/system/wsl-hive/configuration.nix b/system/wsl-hive/configuration.nix index f344f8b..b163ae0 100644 --- a/system/wsl-hive/configuration.nix +++ b/system/wsl-hive/configuration.nix @@ -17,6 +17,7 @@ wsl.enable = true; wsl.defaultUser = "autumn"; networking.hostName = "wsl-hive"; + networking.extraHosts = "10.0.0.217 hoardfrost"; environment.systemPackages = [pkgs.git]; programs.zsh.enable = true; nix.settings.experimental-features = ["nix-command" "flakes"]; diff --git a/system/yukigekko/configuration.nix b/system/yukigekko/configuration.nix index a61f54b..5aa412d 100644 --- a/system/yukigekko/configuration.nix +++ b/system/yukigekko/configuration.nix @@ -18,12 +18,17 @@ #system packages ../packages/sddm/sddm.nix + + #flatpaks + ../extras/flatpak.nix ]; networking.hostName = "yukigekko"; # Define your hostname. networking.networkmanager.enable = true; + networking.extraHosts = "10.0.0.217 hoardfrost"; services.logind.lidSwitchExternalPower = "ignore"; + services.blueman.enable = true; time.timeZone = "${timezone}"; diff --git a/system/yukigekko/hardware-configuration.nix b/system/yukigekko/hardware-configuration.nix index da37d70..dbf7f31 100644 --- a/system/yukigekko/hardware-configuration.nix +++ b/system/yukigekko/hardware-configuration.nix @@ -33,7 +33,7 @@ networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp3s0f1.useDHCP = lib.mkDefault true; # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; - + hardware.bluetooth.enable = true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }