nix-home/home/nki-x1c1.nix

109 lines
3.1 KiB
Nix
Raw Normal View History

2022-04-19 23:36:11 +00:00
{ pkgs, config, lib, ... }:
2022-04-19 21:44:08 +00:00
{
imports = [
2022-04-19 23:36:11 +00:00
# Common configuration
./common.nix
# We use our own firefox
# ./firefox.nix
# osu!
# ./osu.nix
2022-04-19 21:44:08 +00:00
];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "nki";
home.homeDirectory = "/home/nki";
# More packages
home.packages = (with pkgs; [
2022-04-19 23:36:11 +00:00
# CLI stuff
python3
2022-04-19 23:36:11 +00:00
zip
# TeX
texlive.combined.scheme-full
2023-08-30 23:19:54 +00:00
# Note-taking
rnote
2022-04-19 21:44:08 +00:00
2022-04-19 23:36:11 +00:00
# Java & sbt
openjdk11
sbt
2022-04-19 21:44:08 +00:00
]);
2022-04-20 17:05:02 +00:00
# Graphical set up
linux.graphical.type = "wayland";
linux.graphical.wallpaper = ./images/wallpaper_0.png;
2023-08-30 21:53:14 +00:00
linux.graphical.defaults.webBrowser = "librewolf.desktop";
2022-04-19 23:36:11 +00:00
# Enable sway
programs.my-sway.enable = true;
programs.my-sway.fontSize = 14.0;
programs.my-sway.terminal = "${config.programs.kitty.package}/bin/kitty";
2023-08-30 21:53:14 +00:00
programs.my-sway.browser = "librewolf";
2022-04-20 17:21:08 +00:00
wayland.windowManager.sway.config = {
# Keyboard support
2023-08-30 21:53:14 +00:00
input."*".xkb_layout = "jp";
2022-05-05 13:52:36 +00:00
input."1278:34:HHKB-Hybrid_3_Keyboard".xkb_layout = "jp";
2022-04-20 17:21:08 +00:00
input."1:1:AT_Translated_Set_2_keyboard" = {
xkb_options = "ctrl:swapcaps";
};
2023-08-31 08:28:48 +00:00
# Touch and Pen
input."1386:21338:Wacom_HID_535A_Finger".map_to_output = "eDP-1";
input."1386:21338:Wacom_HID_535A_Pen".map_to_output = "eDP-1";
startup = [
# rotation
(
let
iio-sway = pkgs.stdenv.mkDerivation {
name = "iio-sway";
version = "0.0.1";
src = pkgs.fetchFromGitHub {
owner = "okeri";
repo = "iio-sway";
rev = "e07477d1b2478fede1446e97424a94c80767819d";
hash = "sha256-JGacKajslCOvd/BFfFSf7s1/hgF6rJqJ6H6xNnsuMb4=";
};
buildInputs = with pkgs; [ dbus ];
nativeBuildInputs = with pkgs; [ meson ninja pkg-config ];
};
in
{ command = "${iio-sway}/bin/iio-sway"; }
)
];
2022-04-20 17:21:08 +00:00
};
2023-08-30 21:53:14 +00:00
# input-remapping
xdg.configFile."autostart/input-remapper-autoload.desktop".source =
"${pkgs.input-remapper}/share/applications/input-remapper-autoload.desktop";
# Kitty
nki.programs.kitty = {
enable = true;
fontSize = 16;
};
2022-04-19 23:36:11 +00:00
2022-05-05 13:52:50 +00:00
# Multiple screen setup
2023-09-01 08:38:24 +00:00
services.kanshi = with config.common.monitors; {
2023-08-31 11:24:39 +00:00
enable = true;
profiles.undocked.outputs = [{ criteria = "LVDS-1"; }];
profiles.work-both.outputs = [
2023-09-01 08:38:24 +00:00
{ criteria = "eDP-1"; position = "0,${toString (builtins.floor ((2160 / work.scale - 1200) + 1200 / 3))}"; status = "enable"; }
{ criteria = work.name; position = "1920,0"; }
2023-08-31 11:24:39 +00:00
];
profiles.work-one.outputs = [
{ criteria = "eDP-1"; status = "disable"; }
{ criteria = config.common.monitors.work.name; }
];
};
2022-05-05 13:52:50 +00:00
2022-04-19 21:44:08 +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";
}