Compare commits

..

No commits in common. "8f247b2e6b86cbf5df344519551d714405c0af16" and "9ddaad38888b89bb44ccd57932f7b95994a033b4" have entirely different histories.

13 changed files with 182 additions and 222 deletions

View File

@ -31,14 +31,17 @@
nixpkgs,
home-manager,
nix-rosetta-builder,
nanostatus,
emacs-larstvei,
zen-browser,
...
}@inputs:
}:
{
darwinConfigurations = {
larstvei-macbookpro = darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs = { inherit inputs; };
specialArgs = { inherit emacs-larstvei; };
modules = [
home-manager.darwinModules.default
@ -51,7 +54,7 @@
nixosConfigurations.thinkpad = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = { inherit emacs-larstvei nanostatus zen-browser; };
modules = [
home-manager.nixosModules.default
./machines/thinkpad

View File

@ -1,4 +1,4 @@
{ pkgs, inputs, ... }:
{ pkgs, emacs-larstvei, ... }:
{
imports = [
../../modules/base
@ -17,7 +17,7 @@
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
extraSpecialArgs = { inherit emacs-larstvei; };
users.larstvei.imports = [ ../../modules/home/full ];
};
}

View File

@ -11,8 +11,6 @@
../../modules/desktop
];
security.pam.services.hyprlock = { };
networking.hostName = "larstvei-think";
# Bootloader.

View File

@ -1,4 +1,4 @@
{ pkgs, inputs, ... }:
{ pkgs, zen-browser, ... }:
{
home.packages = [
@ -11,8 +11,8 @@
];
imports = [
inputs.zen-browser.homeModules.beta
./hypr
zen-browser.homeModules.beta
./hyprland
./theme
];

View File

@ -1,32 +0,0 @@
{
# The animations is taken from Omarchy, see:
# https://github.com/basecamp/omarchy/blob/master/default/hypr/looknfeel.conf
wayland.windowManager.hyprland.settings.animations = {
enabled = true;
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
animation = [
"global, 1, 10, default"
"border, 1, 5.39, easeOutQuint"
"windows, 1, 4.79, easeOutQuint"
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
"windowsOut, 1, 1.49, linear, popin 87%"
"fadeIn, 1, 1.73, almostLinear"
"fadeOut, 1, 1.46, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 3.81, easeOutQuint"
"layersIn, 1, 4, easeOutQuint, fade"
"layersOut, 1, 1.5, linear, fade"
"fadeLayersIn, 1, 1.79, almostLinear"
"fadeLayersOut, 1, 1.39, almostLinear"
"workspaces, 0, 0, ease"
];
};
}

View File

@ -1,92 +0,0 @@
{ pkgs, inputs, ... }:
let
nanostatus = inputs.nanostatus.packages.${pkgs.system}.default;
in
{
wayland.windowManager.hyprland.settings = {
input = {
kb_options = "altwin:swap_alt_win";
repeat_delay = 300;
repeat_rate = 50;
touchpad = {
natural_scroll = true;
scroll_factor = 0.4;
tap-to-click = true;
};
};
"$mod" = "SUPER";
"$shiftMod" = "SUPER_SHIFT";
bind = [
# Master layout
"$mod, F, fullscreen"
"$mod, Return, layoutmsg, swapwithmaster master"
"$mod, minus, layoutmsg, mfact -0.01"
"$mod, equal, layoutmsg, mfact +0.01"
"$mod, Tab, layoutmsg, cyclenext"
"$shiftMod, Tab, layoutmsg, cycleprev"
"$mod, comma, layoutmsg, addmaster"
"$mod, period, layoutmsg, removemaster"
# App launchers / session
"$mod, T, exec, kitty"
"$mod, E, exec, emacs"
"$mod, B, exec, zen"
"$mod, Q, killactive"
"$mod, S, exec, grimblast copysave area /tmp/screenshot-$(date +%F--%T).png"
"$shiftMod, S, exec, grimblast copysave screen /tmp/screenshot-$(date +%F--%T).png"
# Window focus & movement
"$mod, H, movefocus, l"
"$mod, J, movefocus, d"
"$mod, K, movefocus, u"
"$mod, L, movefocus, r"
"$shiftMod, H, movewindow, l"
"$shiftMod, J, movewindow, d"
"$shiftMod, K, movewindow, u"
"$shiftMod, L, movewindow, r"
"$mod, =, resizeactive, +10"
"$mod, -, resizeactive, -10"
"$mod, D, exec, darkman toggle"
"$mod, space, exec, ${nanostatus}/bin/nanostatus-toggle"
"$mod, backspace, exec, hyprlock"
# Text input (macOS-like way of producing Norwegian characters)
"$mod, A, exec, wtype 'å'"
"$mod, O, exec, wtype 'ø'"
"$mod, apostrophe, exec, wtype 'æ'"
"$shiftMod, A, exec, wtype 'Å'"
"$shiftMod, O, exec, wtype 'Ø'"
"$shiftMod, apostrophe, exec, wtype 'Æ'"
# Media & brightness
", XF86AudioRaiseVolume, exec, pamixer -i 5 "
", XF86AudioLowerVolume, exec, pamixer -d 5 "
", XF86AudioMute, exec, pamixer -t"
", XF86AudioMicMute, exec, pamixer --default-source -t"
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
"SHIFT, XF86MonBrightnessUp, exec, brightnessctl set 100%"
"SHIFT, XF86MonBrightnessDown, exec, brightnessctl set 1"
]
++ builtins.concatLists (
builtins.genList (
i:
let
code = "1${toString i}";
ws = toString (i + 1);
in
[
"$mod, code:${code}, workspace, ${ws}"
"$shiftMod, code:${code}, movetoworkspace, ${ws}"
]
) 9
);
};
}

View File

@ -1,51 +0,0 @@
{
imports = [
./animations
./bindings
./hypridle
];
programs.kitty.enable = true;
programs.hyprlock.enable = true;
wayland.windowManager.hyprland = {
enable = true;
settings = {
exec-once = [ "hyprlock || hyprctl dispatch exit" ];
misc.disable_hyprland_logo = true;
general = {
border_size = 2;
layout = "master";
};
# No borders or gaps when there is only one window
workspace = "w[t1], gapsin:0, gapsout:0, border:0, rounding:0";
decoration = {
rounding = 15;
inactive_opacity = 0.75;
blur.enabled = false;
shadow.enabled = false;
border_part_of_window = true;
};
monitor = [ ",preferred,auto,1" ];
gestures.workspace_swipe = true;
cursor = {
enable_hyprcursor = false;
inactive_timeout = 2;
};
env = [
"XCURSOR_THEME,Adwaita"
"XCURSOR_SIZE,24"
];
};
};
}

View File

@ -1,26 +0,0 @@
{
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "hyprlock";
before_sleep_cmd = "loginctl lock-session";
};
listener = [
{
timeout = 150; # 2.5 min
on-timeout = "brightnessctl --save && brightnessctl set 1";
on-resume = "brightnessctl --restore";
}
{
timeout = 300; # 5 min
on-resume = "loginctl lock-session";
}
{
timeout = 900; # 15 min
on-timeout = "systemctl suspend-then-hibernate";
}
];
};
};
}

View File

@ -0,0 +1,157 @@
{ pkgs, nanostatus, ... }:
{
programs.kitty.enable = true;
wayland.windowManager.hyprland = {
enable = true;
settings = {
misc.disable_hyprland_logo = true;
general = {
border_size = 2;
layout = "master";
};
# No borders or gaps when there is only one window
workspace = "w[t1], gapsin:0, gapsout:0, border:0";
decoration = {
rounding = 15;
inactive_opacity = 0.75;
blur.enabled = false;
shadow.enabled = false;
border_part_of_window = true;
};
# The animations is taken from Omarchy, see:
# https://github.com/basecamp/omarchy/blob/master/default/hypr/looknfeel.conf
animations = {
enabled = true;
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
animation = [
"global, 1, 10, default"
"border, 1, 5.39, easeOutQuint"
"windows, 1, 4.79, easeOutQuint"
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
"windowsOut, 1, 1.49, linear, popin 87%"
"fadeIn, 1, 1.73, almostLinear"
"fadeOut, 1, 1.46, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 3.81, easeOutQuint"
"layersIn, 1, 4, easeOutQuint, fade"
"layersOut, 1, 1.5, linear, fade"
"fadeLayersIn, 1, 1.79, almostLinear"
"fadeLayersOut, 1, 1.39, almostLinear"
"workspaces, 0, 0, ease"
];
};
monitor = [ ",preferred,auto,1" ];
gestures.workspace_swipe = true;
cursor = {
enable_hyprcursor = false;
inactive_timeout = 2;
};
env = [
"XCURSOR_THEME,Adwaita"
"XCURSOR_SIZE,24"
];
input = {
kb_options = "altwin:swap_alt_win";
repeat_delay = 300;
repeat_rate = 50;
touchpad = {
natural_scroll = true;
scroll_factor = 0.4;
tap-to-click = true;
};
};
"$mod" = "SUPER";
"$shiftMod" = "SUPER_SHIFT";
bind = [
# Master layout
"$mod, F, fullscreen"
"$mod, Return, layoutmsg, swapwithmaster master"
"$mod, minus, layoutmsg, mfact -0.01"
"$mod, equal, layoutmsg, mfact +0.01"
"$mod, Tab, layoutmsg, cyclenext"
"$shiftMod, Tab, layoutmsg, cycleprev"
"$mod, comma, layoutmsg, addmaster"
"$mod, period, layoutmsg, removemaster"
# App launchers / session
"$mod, T, exec, kitty"
"$mod, E, exec, emacs"
"$mod, B, exec, zen"
"$mod, Q, killactive"
"$mod, S, exec, grimblast copysave area /tmp/screenshot-$(date +%F--%T).png"
"$shiftMod, S, exec, grimblast copysave screen /tmp/screenshot-$(date +%F--%T).png"
# Window focus & movement
"$mod, H, movefocus, l"
"$mod, J, movefocus, d"
"$mod, K, movefocus, u"
"$mod, L, movefocus, r"
"$shiftMod, H, movewindow, l"
"$shiftMod, J, movewindow, d"
"$shiftMod, K, movewindow, u"
"$shiftMod, L, movewindow, r"
"$mod, =, resizeactive, +10"
"$mod, -, resizeactive, -10"
"$mod, D, exec, darkman toggle"
"$mod, space, exec, ${nanostatus.packages.${pkgs.system}.default}/bin/nanostatus-toggle"
# Text input (macOS-like way of producing Norwegian characters)
"$mod, A, exec, wtype 'å'"
"$mod, O, exec, wtype 'ø'"
"$mod, apostrophe, exec, wtype 'æ'"
"$shiftMod, A, exec, wtype 'Å'"
"$shiftMod, O, exec, wtype 'Ø'"
"$shiftMod, apostrophe, exec, wtype 'Æ'"
# Media & brightness
", XF86AudioRaiseVolume, exec, pamixer -i 5 "
", XF86AudioLowerVolume, exec, pamixer -d 5 "
", XF86AudioMute, exec, pamixer -t"
", XF86AudioMicMute, exec, pamixer --default-source -t"
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
]
++ builtins.concatLists (
builtins.genList (
i:
let
code = "1${toString i}";
ws = toString (i + 1);
in
[
"$mod, code:${code}, workspace, ${ws}"
"$shiftMod, code:${code}, movetoworkspace, ${ws}"
]
) 9
);
};
};
}

View File

@ -1,3 +1,4 @@
{ pkgs, ... }:
let
bg = {
light = "FAFAFA";

View File

@ -1,4 +1,10 @@
{ pkgs, inputs, ... }:
{
pkgs,
nanostatus,
emacs-larstvei,
zen-browser,
...
}:
{
imports = [
@ -8,7 +14,7 @@
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
extraSpecialArgs = { inherit nanostatus emacs-larstvei zen-browser; };
};
users.users.larstvei = {
@ -26,13 +32,10 @@
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "hyprland > /dev/null 2>&1";
settings.default_session = {
command = "hyprland";
user = "larstvei";
};
default_session = initial_session;
};
};
fonts = {

View File

@ -1,6 +1,6 @@
{ pkgs, inputs, ... }:
{ pkgs, emacs-larstvei, ... }:
{
home.packages = [
inputs.emacs-larstvei.defaultPackage.${pkgs.system}
emacs-larstvei.defaultPackage.${pkgs.system}
];
}

View File

@ -6,7 +6,6 @@
gnumake
jet
jq
localsend
pandoc
parallel
ripgrep