From a1f90b75204831e1a12eed81769e6d7db50c4eb1 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 14 Sep 2023 10:04:07 -0500 Subject: [PATCH 1/2] Changes for work --- home.nix | 25 ++++++++++---- daniel.nix => home/daniel.nix | 64 +++-------------------------------- home/linux.nix | 61 +++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 66 deletions(-) rename daniel.nix => home/daniel.nix (81%) create mode 100644 home/linux.nix diff --git a/home.nix b/home.nix index a24a94b..1d8e779 100644 --- a/home.nix +++ b/home.nix @@ -1,15 +1,28 @@ inputs: -let - system = "x86_64-linux"; - pkgs = inputs.nixpkgs.legacyPackages.${system}; -in { # TODO: per arch? - daniel = inputs.home-manager.lib.homeManagerConfiguration { + daniel = let + system = "x86_64-linux"; + pkgs = inputs.nixpkgs.legacyPackages.${system}; + in inputs.home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ (import - ./daniel.nix + ./home/daniel.nix + ./home/linux.nix + + pkgs) + ]; + }; + + daniel-work = let + system = "aarch64-darwin"; + pkgs = inputs.nixpkgs.legacyPackages.${system}; + in inputs.home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ + (import + ./home/daniel.nix pkgs) ]; diff --git a/daniel.nix b/home/daniel.nix similarity index 81% rename from daniel.nix rename to home/daniel.nix index 2e303c1..8dfeb9e 100644 --- a/daniel.nix +++ b/home/daniel.nix @@ -16,7 +16,7 @@ # kubectl, aws # TODO: os-specific scripts? macOS versus Linux (arch or nixos? do I need to distinguish at that point?) - (pkgs.buildEnv { name = "my-scripts"; paths = [ ./scripts ]; }) + (pkgs.buildEnv { name = "my-scripts"; paths = [ ../scripts ]; }) ]; programs.password-store = { @@ -144,9 +144,9 @@ programs.fish = { enable = true; - # I load long scripts from files for a better editing experience - shellInit = builtins.readFile ./fish/shellInit.fish; - interactiveShellInit = builtins.readFile ./fish/interactiveShellInit.fish; + # load long scripts from files for better editing experience + shellInit = builtins.readFile ../fish/shellInit.fish; + interactiveShellInit = builtins.readFile ../fish/interactiveShellInit.fish; loginShellInit = ""; functions = { # I think these should be loaded from fish files too for better editor experience @@ -240,62 +240,6 @@ enableFishIntegration = true; }; - home.pointerCursor = { - name = "Catppuccin-Mocha-Sapphire-Cursors"; - package = pkgs.catppuccin-cursors.mochaSapphire; - size = 64; # TODO: this doesn't seem to work -- at least in Sway - }; - - programs.firefox = { - # TODO: enable dark theme by default - enable = true; - - package = (pkgs.firefox.override { extraNativeMessagingHosts = [ pkgs.passff-host ]; }); - - # extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - # ublock-origin - # ]; # TODO: would be nice to have _all_ my firefox stuff managed here instead of Firefox Sync maybe? - - profiles = { - daniel = { - id = 0; - settings = { - "general.smoothScroll" = true; - }; - - extraConfig = '' - user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); - // user_pref("full-screen-api.ignore-widgets", true); - user_pref("media.ffmpeg.vaapi.enabled", true); - user_pref("media.rdd-vpx.enabled", true); - ''; - - userChrome = '' - #TabsToolbar { - visibility: collapse; - } - - #webrtcIndicator { - display: none; - } - - #main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar>.toolbar-items { - opacity: 0; - pointer-events: none; - } - - #main-window:not([tabsintitlebar="true"]) #TabsToolbar { - visibility: collapse !important; - } - ''; - - # userContent = '' - # ''; - }; - - }; - }; - # wayland.windowManager.sway = { # enable = true; # }; # TODO: would be nice to have my sway config declared here instead of symlinked in by dotfiles scripts? diff --git a/home/linux.nix b/home/linux.nix new file mode 100644 index 0000000..3721774 --- /dev/null +++ b/home/linux.nix @@ -0,0 +1,61 @@ +{ pkgs, ... }: { + home.pointerCursor = { + name = "Catppuccin-Mocha-Sapphire-Cursors"; + package = pkgs.catppuccin-cursors.mochaSapphire; + size = 64; # TODO: this doesn't seem to work -- at least in Sway + }; + + home.packages = [ + (pkgs.buildEnv { name = "my-linux-scripts"; paths = [ ./scripts/linux ]; }) + ]; + + programs.firefox = { + # TODO: enable dark theme by default + enable = true; + + package = (pkgs.firefox.override { extraNativeMessagingHosts = [ pkgs.passff-host ]; }); + + # extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + # ublock-origin + # ]; # TODO: would be nice to have _all_ my firefox stuff managed here instead of Firefox Sync maybe? + + profiles = { + daniel = { + id = 0; + settings = { + "general.smoothScroll" = true; + }; + + extraConfig = '' + user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); + // user_pref("full-screen-api.ignore-widgets", true); + user_pref("media.ffmpeg.vaapi.enabled", true); + user_pref("media.rdd-vpx.enabled", true); + ''; + + userChrome = '' + #TabsToolbar { + visibility: collapse; + } + + #webrtcIndicator { + display: none; + } + + #main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar>.toolbar-items { + opacity: 0; + pointer-events: none; + } + + #main-window:not([tabsintitlebar="true"]) #TabsToolbar { + visibility: collapse !important; + } + ''; + + # userContent = '' + # ''; + }; + + }; + }; +} -- 2.44.1 From c37252222847ee23e525e7a7e15d8955d98bb7e6 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 14 Sep 2023 10:16:52 -0500 Subject: [PATCH 2/2] More fixes for work --- home.nix | 13 ++++--------- home/{daniel.nix => user.nix} | 11 ++++++++++- home/work.nix | 6 ++++++ 3 files changed, 20 insertions(+), 10 deletions(-) rename home/{daniel.nix => user.nix} (98%) create mode 100644 home/work.nix diff --git a/home.nix b/home.nix index 1d8e779..c2027bb 100644 --- a/home.nix +++ b/home.nix @@ -7,11 +7,8 @@ inputs: in inputs.home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ - (import - ./home/daniel.nix - ./home/linux.nix - - pkgs) + (import ./home/user.nix pkgs) + (import ./home/linux.nix pkgs) ]; }; @@ -21,10 +18,8 @@ inputs: in inputs.home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ - (import - ./home/daniel.nix - - pkgs) + (import ./home/user.nix pkgs) + (import ./home/work.nix pkgs) ]; }; } diff --git a/home/daniel.nix b/home/user.nix similarity index 98% rename from home/daniel.nix rename to home/user.nix index 8dfeb9e..d74f921 100644 --- a/home/daniel.nix +++ b/home/user.nix @@ -6,7 +6,7 @@ # }; # }; - home.username = "daniel"; + home.username = lib.mkDefault "daniel"; home.homeDirectory = lib.mkDefault "/home/daniel/.home"; home.stateVersion = "23.05"; @@ -15,6 +15,15 @@ # I use this for managing the following programs' versions instead of nix: # kubectl, aws + # text editor + pkgs.helix + + # I need gawk for my fish prompt + pkgs.gawk + + pkgs.nil + pkgs.nixpkgs-fmt + # TODO: os-specific scripts? macOS versus Linux (arch or nixos? do I need to distinguish at that point?) (pkgs.buildEnv { name = "my-scripts"; paths = [ ../scripts ]; }) ]; diff --git a/home/work.nix b/home/work.nix new file mode 100644 index 0000000..c41f5c9 --- /dev/null +++ b/home/work.nix @@ -0,0 +1,6 @@ +{ lib, ... }: let + username = "daniel.flanagan@divvypay.com"; +in { + home.username = username; + home.homeDirectory = "/Users/${username}"; +} -- 2.44.1