diff --git a/flake.lock b/flake.lock index e434794..18938ee 100644 --- a/flake.lock +++ b/flake.lock @@ -129,6 +129,22 @@ "type": "github" } }, + "nix-flatpak": { + "locked": { + "lastModified": 1739444422, + "narHash": "sha256-iAVVHi7X3kWORftY+LVbRiStRnQEob2TULWyjMS6dWg=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "5e54c3ca05a7c7d968ae1ddeabe01d2a9bc1e177", + "type": "github" + }, + "original": { + "owner": "gmodena", + "ref": "v0.6.0", + "repo": "nix-flatpak", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1743891346, @@ -188,6 +204,7 @@ "agenix": "agenix", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", + "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur", diff --git a/flake.nix b/flake.nix index 2bc24ca..6bbb6d9 100644 --- a/flake.nix +++ b/flake.nix @@ -25,10 +25,11 @@ url = "github:nix-community/NUR"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-flatpak.url = "github:gmodena/nix-flatpak?ref=v0.6.0"; }; outputs = { self, nix-darwin, nixpkgs, nixpkgs-unstable, home-manager, agenix - , rycee-nurpkgs, nur, ... }: + , rycee-nurpkgs, nur, nix-flatpak, ... }: let mkHomeConfiguration = { hostname, arch ? "x86_64", os ? "linux" , desktop ? false, extraModules ? [ ] }: @@ -53,7 +54,11 @@ ./homes/${hostname}.nix agenix.homeManagerModules.default ] ++ (if desktop then [ ./homes/desktop.nix ] else [ ]) - ++ extraModules; + ++ (if (desktop && os == "linux") then [ + ./homes/linux-desktop.nix + nix-flatpak.homeManagerModules.nix-flatpak + ] else + [ ]) ++ extraModules; extraSpecialArgs = { inherit pkgs-unstable; inherit firefox-addons; @@ -74,6 +79,12 @@ "millironx@bosephus" = mkHomeConfiguration { hostname = "bosephus"; }; "tchristensen@beocat" = mkHomeConfiguration { hostname = "beocat"; }; + + "millironx@harmony" = mkHomeConfiguration { + hostname = "harmony"; + arch = "aarch64"; + desktop = true; + }; }; darwinConfigurations."corianne" = nix-darwin.lib.darwinSystem { diff --git a/homes/desktop.nix b/homes/desktop.nix index 9a70e05..e686125 100644 --- a/homes/desktop.nix +++ b/homes/desktop.nix @@ -16,6 +16,7 @@ in { inherit firefox-addons; inherit buildFirefoxXpiAddon; inherit lib; + inherit pkgs; }; zed-editor = zed-config; }; diff --git a/homes/harmony.nix b/homes/harmony.nix new file mode 100644 index 0000000..9e89f87 --- /dev/null +++ b/homes/harmony.nix @@ -0,0 +1,43 @@ +{ config, lib, pkgs, pkgs-unstable, ... }: { + # harmony is an Asahi Fedora box + # I don't use NixOS, so there are some programs that don't interact well with + # the base system (or won't even install) when installed from Nix. + # There is no uniform way to trigger dnf package installs from Nix, so I'm + # just going to list my packages here. I hope to create a custom script that + # mimics the ideas of a Brewfile someday + # TODO: Create a Brewfile equivalent for dnf + + # dnf repos: + # https://github.com/terrapkg/packages?tab=readme-ov-file + # https://pkgs.tailscale.com/stable/fedora/tailscale.repo + + # dnf packages: + # kate + # nextcloud-client + # nextcloud-client-dolphin + # steam + # tailscale + # thunderbird + # vlc + # yakuake + # zed + # zsh + home = { + username = "millironx"; + homeDirectory = "/home/millironx"; + }; + programs = { + git = { + signing = { + key = "0x37A3041D1C8C4524!"; + signByDefault = true; + }; + }; + }; + services = { + gpg-agent = { + sshKeys = [ "207D13371E19752A67AA2686C16354D9963821DB" ]; + pinentryPackage = pkgs.pinentry-qt; + }; + }; +} diff --git a/homes/linux-desktop.nix b/homes/linux-desktop.nix new file mode 100644 index 0000000..87f9af0 --- /dev/null +++ b/homes/linux-desktop.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, pkgs-unstable, ... }: { + home = { + packages = with pkgs; [ + inkscape-with-extensions + musescore + obs-studio + ollama + qownnotes + trayscale + veracrypt + vorta + ]; + }; + programs = { }; + services = { + flatpak = { + enable = true; + # Note: Right now, this does not actually install flatpaks correctly on + # harmony. + # It will however, alert me that certain packages are not installed, and + # serves as a place for me to write down the flatpaks I want to install + # anyway + packages = [ + "com.bitwarden.desktop" + "com.github.tchx84.Flatseal" + "com.logseq.Logseq" + "io.freetubeapp.FreeTube" + "io.github.alainm23.planify" + "io.openrct2.OpenRCT2" + "net.ankiweb.Anki" + ]; + }; + }; +} diff --git a/pkgs.nix b/pkgs.nix index 90cab6b..21be20d 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -43,9 +43,23 @@ sqlitebrowser woodpecker-cli (pkgs.nerdfonts.override { - fonts = [ "FiraCode" "Hack" "Meslo" "NerdFontsSymbolsOnly" ]; + fonts = [ "FiraCode" "Meslo" "NerdFontsSymbolsOnly" ]; }) ]; - linux = with pkgs; [ ]; + linux = with pkgs; [ firefoxpwa ]; + + linux-desktop = with pkgs; [ + anki + bitwarden-desktop + inkscape-with-extensions + musescore + obs-studio + ollama + openrct2 + qownnotes + trayscale + veracrypt + vorta + ]; } diff --git a/programs/firefox.nix b/programs/firefox.nix index 6fda45e..5ba3394 100644 --- a/programs/firefox.nix +++ b/programs/firefox.nix @@ -1,7 +1,9 @@ -{ firefox-addons, buildFirefoxXpiAddon, lib }: { +{ firefox-addons, buildFirefoxXpiAddon, lib, pkgs }: { enable = true; package = null; # Use native package manager/Homebrew b/c there are fewer breakages + nativeMessagingHosts = [ pkgs.firefoxpwa ]; + profileVersion = null; profiles = { "millironx-default" = { id = 0;