nix-home/home/macbook-nixos.nix

151 lines
4 KiB
Nix
Raw Normal View History

2022-10-16 21:55:37 +00:00
{ pkgs, config, lib, ... }:
2022-10-19 14:27:22 +00:00
let
discord = pkgs.armcord.overrideAttrs (attrs: {
postInstall = ''
# Wrap the startup command
makeWrapper $out/opt/ArmCord/armcord $out/bin/armcord \
"''${gappsWrapperArgs[@]}" \
--prefix XDG_DATA_DIRS : "${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}/" \
--add-flags "--ozone-platform=wayland --enable-features=UseOzonePlatform --enable-features=WebRTCPipeWireCapturer" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath attrs.buildInputs}" \
--suffix PATH : ${lib.makeBinPath [ pkgs.xdg-utils ]}
'';
});
2022-10-19 14:27:22 +00:00
in
2022-10-16 21:55:37 +00:00
{
imports = [
# Common configuration
./common.nix
# We use our own firefox
# ./firefox.nix
# osu!
# ./osu.nix
];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "nki";
home.homeDirectory = "/home/nki";
2023-02-26 01:23:48 +00:00
nki.programs.kitty.enable = true;
2023-04-08 05:54:26 +00:00
nki.programs.kitty.fontSize = 18;
2023-02-26 01:23:48 +00:00
programs.fish.shellInit = lib.mkAfter ''
set -eg MESA_GL_VERSION_OVERRIDE
set -eg MESA_GLSL_VERSION_OVERRIDE
2023-06-06 17:52:33 +00:00
export GNOME_KEYRING_CONTROL=/run/user/1001/keyring
export SSH_AUTH_SOCK=/run/user/1001/keyring/ssh
2023-02-26 01:23:48 +00:00
'';
2022-10-21 11:17:07 +00:00
2022-10-16 21:55:37 +00:00
# More packages
home.packages = (with pkgs; [
# CLI stuff
python3
2022-10-16 21:55:37 +00:00
zip
# TeX
texlive.combined.scheme-full
2022-10-21 11:17:07 +00:00
mate.mate-terminal
2022-10-16 21:55:37 +00:00
2022-10-17 15:32:12 +00:00
firefox-wayland
2022-10-17 10:58:57 +00:00
2022-10-19 14:27:22 +00:00
discord
2023-02-27 17:31:50 +00:00
typora
2022-10-16 21:55:37 +00:00
# Java & sbt
openjdk11
sbt
]);
# Graphical set up
2022-10-17 15:32:12 +00:00
linux.graphical.type = "wayland";
2022-11-08 14:03:23 +00:00
linux.graphical.wallpaper = ./images/wallpaper-macbook.jpg;
2022-10-16 21:55:37 +00:00
# Enable sway
2022-10-17 15:32:12 +00:00
programs.my-sway.enable = true;
2023-04-08 05:54:26 +00:00
programs.my-sway.fontSize = 12.0;
2022-10-17 15:32:12 +00:00
programs.my-sway.enableLaptopBars = true;
programs.my-sway.enableMpd = false;
2023-04-11 09:54:24 +00:00
programs.my-sway.discord = "${discord}/bin/armcord";
2022-10-17 15:32:12 +00:00
# Keyboard options
wayland.windowManager.sway.config.input."type:keyboard".xkb_layout = "jp";
2023-02-25 20:43:29 +00:00
wayland.windowManager.sway.config.output."eDP-1" = {
2022-10-17 15:32:12 +00:00
mode = "2560x1600@60Hz";
2023-04-08 05:54:26 +00:00
scale = "1.5";
2022-10-17 15:32:12 +00:00
subpixel = "vrgb";
};
wayland.windowManager.sway.config.input."1452:641:Apple_Internal_Keyboard_/_Trackpad" = {
# Keyboard stuff
xkb_layout = "jp";
repeat_delay = "300";
2022-10-19 14:27:22 +00:00
repeat_rate = "15";
2022-10-17 15:32:12 +00:00
# Trackpad stuff
accel_profile = "adaptive";
drag = "enabled";
dwt = "enabled";
middle_emulation = "enabled";
natural_scroll = "enabled";
2023-02-27 15:10:45 +00:00
scroll_factor = "2.5";
2022-10-17 15:32:12 +00:00
pointer_accel = "0.5";
tap = "disabled";
};
2022-10-16 21:55:37 +00:00
# Kitty
2022-10-21 11:17:07 +00:00
# nki.programs.kitty = {
# enable = true;
# fontSize = 22;
# enableTabs = false;
# };
2022-10-17 08:25:38 +00:00
2022-10-17 15:32:12 +00:00
# Yellow light!
services.wlsunset = {
enable = true;
# # Waterloo
# latitude = "43.3";
# longitude = "-80.3";
# Lausanne
latitude = "46.31";
longitude = "6.38";
};
2022-10-17 08:25:38 +00:00
home.file.".gnupg/gpg-agent.conf" = {
text = ''
2022-10-17 13:58:13 +00:00
pinentry-program ${pkgs.pinentry-gnome}/bin/pinentry-gnome3
2022-10-17 08:25:38 +00:00
'';
onChange = ''
echo "Reloading gpg-agent"
echo RELOADAGENT | gpg-connect-agent
'';
2022-10-16 21:55:37 +00:00
};
2022-10-17 15:32:12 +00:00
# Autostart
xdg.configFile."autostart/polkit.desktop".text = ''
${builtins.readFile "${pkgs.pantheon.pantheon-agent-polkit}/etc/xdg/autostart/io.elementary.desktop.agent-polkit.desktop"}
OnlyShowIn=sway;
'';
2023-06-07 08:48:29 +00:00
xdg.configFile."autostart/input-remapper-autoload.desktop".source =
"${pkgs.input-remapper}/share/applications/input-remapper-autoload.desktop";
2022-10-17 15:32:12 +00:00
2022-10-16 21:55:37 +00:00
# Multiple screen setup
# services.kanshi = {
2022-10-17 08:25:38 +00:00
# enable = true;
# profiles.undocked.outputs = [{ criteria = "LVDS-1"; }];
# profiles.docked-hdmi.outputs = [
# { criteria = "LVDS-1"; status = "disable"; }
# { criteria = "HDMI-A-1"; }
# ];
2022-10-16 21:55:37 +00:00
# };
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "21.05";
}