From 905745e6f8bc953ced21f4cf2cc2918d9553a410 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 22 Aug 2024 08:58:00 -0400 Subject: [PATCH] slateport: use aly-nox hm cfg (#96) * slateport: remove stylix * slateport: override aly hm config * slateport: override hm config with aly-nox * aly: link nox and gui home configs --- flake.nix | 3 +- homes/aly/common.nix | 62 ++++++++++++++++++++++++++++++ homes/aly/{default.nix => gui.nix} | 43 ++------------------- homes/aly/nox.nix | 10 +++++ hosts/slateport/default.nix | 3 -- hosts/slateport/home.nix | 12 +++--- hosts/slateport/stylix.nix | 54 -------------------------- 7 files changed, 83 insertions(+), 104 deletions(-) create mode 100644 homes/aly/common.nix rename homes/aly/{default.nix => gui.nix} (55%) create mode 100644 homes/aly/nox.nix delete mode 100644 hosts/slateport/stylix.nix diff --git a/flake.nix b/flake.nix index 60e48b33..b7cbc75a 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,8 @@ homeManagerModules = { default = import ./homeManagerModules self; - aly = import ./homes/aly self; + aly = import ./homes/aly/gui.nix self; + aly-nox = import ./homes/aly/nox.nix self; dustin = import ./homes/dustin self; morgan = import ./homes/morgan self; }; diff --git a/homes/aly/common.nix b/homes/aly/common.nix new file mode 100644 index 00000000..426d9075 --- /dev/null +++ b/homes/aly/common.nix @@ -0,0 +1,62 @@ +{ + config, + pkgs, + ... +}: { + home = { + homeDirectory = "/home/aly"; + + packages = with pkgs; [ + browsh + curl + ]; + + stateVersion = "24.05"; + username = "aly"; + }; + + programs = { + git = { + enable = true; + lfs.enable = true; + userName = "Aly Raffauf"; + userEmail = "aly@raffauflabs.com"; + + extraConfig = { + color.ui = true; + github.user = "alyraffauf"; + push.autoSetupRemote = true; + }; + }; + + gitui.enable = true; + home-manager.enable = true; + + rbw = { + enable = true; + + settings = { + email = "alyraffauf@fastmail.com"; + lock_timeout = 14400; + }; + }; + }; + + systemd.user.startServices = "legacy"; # Needed for auto-mounting agenix secrets. + + ar.home = { + apps = { + backblaze = { + enable = true; + keyIdFile = config.age.secrets.backblazeKeyId.path; + keyFile = config.age.secrets.backblazeKey.path; + }; + + fastfetch.enable = true; + helix.enable = true; + shell.enable = true; + tmux.enable = true; + yazi.enable = true; + }; + }; +} diff --git a/homes/aly/default.nix b/homes/aly/gui.nix similarity index 55% rename from homes/aly/default.nix rename to homes/aly/gui.nix index 50284532..91ee5761 100644 --- a/homes/aly/default.nix +++ b/homes/aly/gui.nix @@ -5,6 +5,7 @@ self: { ... }: { imports = [ + ./common.nix ./firefox ./mail ./secrets.nix @@ -19,8 +20,6 @@ self: { packages = with pkgs; [ bitwarden-desktop - browsh - curl fractal nicotine-plus obsidian @@ -36,54 +35,20 @@ self: { }; programs = { - git = { - enable = true; - lfs.enable = true; - userName = "Aly Raffauf"; - userEmail = "aly@raffauflabs.com"; - - extraConfig = { - color.ui = true; - core.editor = "${lib.getExe config.ar.home.apps.zed.package} --wait"; - github.user = "alyraffauf"; - push.autoSetupRemote = true; - }; - }; - - gitui.enable = true; - home-manager.enable = true; - - rbw = { - enable = true; - - settings = { - email = "alyraffauf@fastmail.com"; - lock_timeout = 14400; - pinentry = pkgs.pinentry-gnome3; - }; - }; + git.extraConfig.core.editor = "${lib.getExe config.ar.home.apps.zed.package} --wait"; + rbw.settings.pinentry = pkgs.pinentry-gnome3; }; systemd.user.startServices = "legacy"; # Needed for auto-mounting agenix secrets. ar.home = { apps = { - backblaze = { - enable = true; - keyIdFile = config.age.secrets.backblazeKeyId.path; - keyFile = config.age.secrets.backblazeKey.path; - }; - chromium.enable = true; - fastfetch.enable = true; firefox.enable = true; - helix.enable = true; kitty.enable = true; - shell.enable = true; tmux.enable = true; vsCodium.enable = true; - yazi.enable = true; - zed. enable = true; + zed.enable = true; }; defaultApps = { diff --git a/homes/aly/nox.nix b/homes/aly/nox.nix new file mode 100644 index 00000000..0482cd29 --- /dev/null +++ b/homes/aly/nox.nix @@ -0,0 +1,10 @@ +self: { + imports = [ + ./common.nix + ./secrets.nix + self.homeManagerModules.default + self.inputs.agenix.homeManagerModules.default + ]; + + programs.helix.defaultEditor = true; +} diff --git a/hosts/slateport/default.nix b/hosts/slateport/default.nix index d0ed022c..21ed3ad6 100644 --- a/hosts/slateport/default.nix +++ b/hosts/slateport/default.nix @@ -1,7 +1,5 @@ { config, - lib, - pkgs, self, ... }: let @@ -11,7 +9,6 @@ in { ./disko.nix ./home.nix ./secrets.nix - ./stylix.nix self.inputs.nixhw.nixosModules.common-intel-cpu self.inputs.nixhw.nixosModules.common-intel-gpu self.inputs.nixhw.nixosModules.common-bluetooth diff --git a/hosts/slateport/home.nix b/hosts/slateport/home.nix index 1331eaa5..e8b35fb6 100644 --- a/hosts/slateport/home.nix +++ b/hosts/slateport/home.nix @@ -1,9 +1,7 @@ { - home-manager = { - sharedModules = [ - { - xdg.userDirs.music = "/mnt/Media/Music"; - } - ]; - }; + lib, + self, + ... +}: { + home-manager.users.aly = lib.mkForce self.homeManagerModules.aly-nox; } diff --git a/hosts/slateport/stylix.nix b/hosts/slateport/stylix.nix deleted file mode 100644 index f76dbe12..00000000 --- a/hosts/slateport/stylix.nix +++ /dev/null @@ -1,54 +0,0 @@ -{pkgs, ...}: { - stylix = { - enable = true; - base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml"; - - image = let - wallpapers = builtins.fetchGit { - url = "https://github.com/alyraffauf/wallpapers.git"; - rev = "ff956327520f2ecdd0f8b1cdab4420bef4095d38"; - ref = "master"; - }; - in "${wallpapers}/wallhaven-mp886k.jpg"; - - imageScalingMode = "fill"; - polarity = "dark"; - - cursor = { - name = "Bibata-Modern-Classic"; - package = pkgs.bibata-cursors; - size = 24; - }; - - fonts = { - monospace = { - name = "UbuntuSansMono Nerd Font"; - package = pkgs.nerdfonts.override {fonts = ["UbuntuSans"];}; - }; - - sansSerif = { - name = "UbuntuSans Nerd Font"; - package = pkgs.nerdfonts.override {fonts = ["UbuntuSans"];}; - }; - - serif = { - name = "Vegur"; - package = pkgs.vegur; - }; - - sizes = { - applications = 12; - desktop = 11; - popups = 12; - terminal = 13; - }; - }; - - opacity = { - applications = 1.0; - desktop = 0.8; - terminal = 0.8; - popups = 0.8; - }; - }; -}