diff --git a/README.md b/README.md index 1f68d3a..a0c1be7 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,6 @@ This folder is for general assets e.g. wallpapers or stuff I want to show in thi ### Things I need to figure out - [ ] Manage shell via home-manager so standalone configs will have hm-managed stuff in the path - [ ] Move Syncthing config to home-manager so it's across all hosts -- [ ] Find a way to only declare username once in home.nix so changing username is only one line +- [x] Find a way to only declare username once in home.nix so changing username is only one line - [ ] MAYBE tune sway + waybar configs for touchscreen use (like Sxmo on postmarketOS) - [ ] Move stuff like git email and other personally identifiable information to a secret managing system diff --git a/base/overrides.nix b/base/overrides.nix index 214bf97..d61d2f0 100644 --- a/base/overrides.nix +++ b/base/overrides.nix @@ -17,6 +17,17 @@ libssh2 libpsl brotli + pkgsi686Linux.expat + pkgsi686Linux.openal + pkgsi686Linux.nvidia_cg_toolkit + pkgsi686Linux.tcp_wrappers + pkgsi686Linux.libasyncns + pkgsi686Linux.libapparmor + pkgsi686Linux.xorg.libXrandr + pkgsi686Linux.xorg.libxcb + pkgsi686Linux.xorg.libXi + pkgsi686Linux.libsndfile + pkgsi686Linux.libmpg123 ]; }) ]; diff --git a/flake.nix b/flake.nix index f549e79..f667203 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ vars = { isNixOS = true; class = "desktop"; + user = "maya"; #cursed way of setting username }; }; home-manager.useGlobalPkgs = true; @@ -41,6 +42,7 @@ vars = { isNixOS = false; class = "laptop"; + user = "maya"; }; }; }; diff --git a/home/default.nix b/home/default.nix index 2251232..0bc9d0b 100644 --- a/home/default.nix +++ b/home/default.nix @@ -10,7 +10,7 @@ ./packages.nix #general user packages not managed by home-manager but i want to install via hm anyways ]; home = rec { - username = "maya"; + username = vars.user; #this is set in flake.nix homeDirectory = "/home/${username}"; #change this if you use a non-standard home dir stateVersion = "23.11"; file = { @@ -18,11 +18,11 @@ ".config/waybar/style.css".source = config.lib.file.mkOutOfStoreSymlink "${homeDirectory}/.config/nixos/home/waybar/style.css"; }; }; - programs.home-manager.enable = (if vars.isNixOS then false else true); #value is set in flake.nix + programs.home-manager.enable = (!vars.isNixOS); #value is set in flake.nix programs.foot = { enable = true; settings.main.font = "monospace:size=10"; - settings.colors.alpha = "0.8"; + #settings.colors.alpha = "0.8"; }; programs.ncmpcpp = { enable = true; @@ -32,7 +32,7 @@ }; services.mpd = { enable = true; - musicDirectory = "/home/maya/Music"; #TODO: figure out not hardcoding this + musicDirectory = "/home/${vars.user}/Music"; extraConfig = '' audio_output { type "pipewire" diff --git a/home/packages.nix b/home/packages.nix index 6f4b48e..7c17526 100644 --- a/home/packages.nix +++ b/home/packages.nix @@ -1,4 +1,4 @@ -{pkgs, ...}:{ +{pkgs, vars, ...}:{ home.packages = with pkgs; [ prismlauncher libgpod @@ -11,7 +11,6 @@ emacs comma openscad - nixgl.nixGLIntel openutau wlr-randr grim @@ -40,5 +39,5 @@ firefox v4l-utils libreoffice - ]; + ] ++ (if !vars.isNixOS then [nixgl.nixGLIntel] else []); } diff --git a/home/sway.nix b/home/sway.nix index a0cb824..c54765f 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -50,8 +50,8 @@ workspaceLayout = "default"; keybindings = lib.mkOptionDefault { "Print" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshots/screenshot-`date +%F-%T`.png"; - "Mod4+d" = "exec foot --title launch --app-id fzf-launcher bash -c 'compgen -c | sort -u | fzf | xargs swaymsg exec --'"; - "Mod4+t" = "exec foot --title music --app-id mpd-control ncmpcpp"; + "Mod4+d" = "exec foot --title launch --app-id fzf-launcher-foot bash -c 'compgen -c | sort -u | fzf | xargs swaymsg exec --'"; + "Mod4+t" = "exec foot --title music --app-id mpd-control-foot ncmpcpp"; "XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.0"; "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"; "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; @@ -68,8 +68,8 @@ "Shift_L+Control_L+F" = "exec playerctl position 10+"; }; floating.criteria = [ - { app_id = "^fzf-launcher$";} - { app_id = "^mpd-control$";} + { app_id = "^fzf-launcher-foot$";} + { app_id = "^mpd-control-foot$";} { con_mark = "DELTARUNE Chapter 1&2";} ]; # colors = { diff --git a/home/swayfx b/home/swayfx index bb55304..1566fac 100644 --- a/home/swayfx +++ b/home/swayfx @@ -8,4 +8,5 @@ for_window [title=\"Picture-in-Picture\"] dim_inactive 0.0 for_window [title=\"Picture-in-Picture\"] sticky enable client.focused_inactive 000000 440C88 000000 440C88 client.unfocused 000000 440C88 000000 440C88 +for_window [app_id=\"foot\"] opacity 0.8 "