Introduce a variable for sway includes and disable relatime on the zfs legacy mounts.
This commit is contained in:
parent
a817464b38
commit
5146a114eb
@ -119,6 +119,27 @@ lib.mkIf (!config.me.buildingIso) {
|
||||
fileSystems."/state".neededForBoot = true;
|
||||
fileSystems."/home".neededForBoot = true;
|
||||
|
||||
fileSystems."/".options = [
|
||||
"noatime"
|
||||
"norelatime"
|
||||
];
|
||||
fileSystems."/nix".options = [
|
||||
"noatime"
|
||||
"norelatime"
|
||||
];
|
||||
fileSystems."/persist".options = [
|
||||
"noatime"
|
||||
"norelatime"
|
||||
];
|
||||
fileSystems."/state".options = [
|
||||
"noatime"
|
||||
"norelatime"
|
||||
];
|
||||
fileSystems."/home".options = [
|
||||
"noatime"
|
||||
"norelatime"
|
||||
];
|
||||
|
||||
# Only attempt to decrypt the main pool. Otherwise it attempts to decrypt pools that aren't even used.
|
||||
boot.zfs.requestEncryptionCredentials = [ "zroot/linux/nix" ];
|
||||
}
|
||||
|
@ -5,6 +5,14 @@
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
exec_kanshi = pkgs.writeTextFile {
|
||||
name = "exec_kanshi.conf";
|
||||
text = ''
|
||||
exec kanshi
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
@ -12,6 +20,10 @@
|
||||
kanshi
|
||||
];
|
||||
|
||||
me.swayIncludes = [
|
||||
exec_kanshi
|
||||
];
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
@ -34,19 +34,11 @@ let
|
||||
|
||||
# Do not show a title bar on windows
|
||||
default_border pixel 2
|
||||
hide_edge_borders smart_no_gaps
|
||||
|
||||
bindsym $mod+grave exec $term
|
||||
|
||||
include ${base-hotkeys}
|
||||
include ${display-configs}
|
||||
include ${window-management}
|
||||
include ${movement}
|
||||
include ${disable-focus-follows-mouse}
|
||||
include ${background}
|
||||
include ${touchpad_input}
|
||||
include ${waybar}
|
||||
include ${announce_sway_start}
|
||||
include ${exec_kanshi}
|
||||
${lib.concatMapStringsSep "\n" (item: "include ${item}") config.me.swayIncludes}
|
||||
'';
|
||||
};
|
||||
base-hotkeys = pkgs.writeTextFile {
|
||||
@ -232,27 +224,6 @@ let
|
||||
}
|
||||
'';
|
||||
};
|
||||
waybar = pkgs.writeTextFile {
|
||||
name = "waybar.conf";
|
||||
text = ''
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
bar {
|
||||
position top
|
||||
|
||||
font pango:Cascadia Mono, FontAwesome 10
|
||||
swaybar_command waybar
|
||||
|
||||
colors {
|
||||
statusline #ffffff
|
||||
background #323232
|
||||
inactive_workspace #32323200 #32323200 #5c5c5c
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
announce_sway_start = pkgs.writeTextFile {
|
||||
name = "announce_sway_start.conf";
|
||||
text = ''
|
||||
@ -262,13 +233,6 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
exec_kanshi = pkgs.writeTextFile {
|
||||
name = "exec_kanshi.conf";
|
||||
text = ''
|
||||
exec kanshi
|
||||
'';
|
||||
};
|
||||
|
||||
start_screen_share = pkgs.writeShellScriptBin "start_screen_share" ''
|
||||
# Disable displaying notifications. This is useful for video conference screen sharing.
|
||||
set -euo pipefail
|
||||
@ -295,6 +259,18 @@ in
|
||||
../kanshi
|
||||
];
|
||||
|
||||
options.me.swayIncludes = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
default = [ ];
|
||||
example = lib.literalExpression ''
|
||||
[ (pkgs.writeTextFile {
|
||||
name = "launch-kanshi.conf";
|
||||
text = "exec kanshi";
|
||||
}) ]'';
|
||||
description = "List of packages to import as sway configs.";
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.systemPackages = with pkgs; [
|
||||
alacritty
|
||||
pcmanfm
|
||||
@ -302,6 +278,17 @@ in
|
||||
stop_screen_share
|
||||
];
|
||||
|
||||
me.swayIncludes = [
|
||||
base-hotkeys
|
||||
display-configs
|
||||
window-management
|
||||
movement
|
||||
disable-focus-follows-mouse
|
||||
background
|
||||
touchpad_input
|
||||
announce_sway_start
|
||||
];
|
||||
|
||||
# Probably would be cleaner to use environment.sessionVariables but programs.sway.extraSessionCommands is sway-specific.
|
||||
programs.sway.extraSessionCommands =
|
||||
if config.me.buildingIso then
|
||||
@ -399,4 +386,5 @@ in
|
||||
doas iw dev wlan0 set power_save off
|
||||
[[ "$(tty)" = "/dev/tty1" ]] && exec sway
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -5,6 +5,28 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
waybar_sway_config = pkgs.writeTextFile {
|
||||
name = "waybar.conf";
|
||||
text = ''
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
bar {
|
||||
position top
|
||||
|
||||
font pango:Cascadia Mono, FontAwesome 10
|
||||
swaybar_command waybar
|
||||
|
||||
colors {
|
||||
statusline #ffffff
|
||||
background #323232
|
||||
inactive_workspace #32323200 #32323200 #5c5c5c
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
waybar_available_memory =
|
||||
(pkgs.writeScriptBin "waybar_custom_available_memory" (
|
||||
builtins.readFile ./files/waybar_scripts/waybar_available_memory_linux.bash
|
||||
@ -72,6 +94,10 @@ in
|
||||
wlsunset # for night mode
|
||||
];
|
||||
|
||||
me.swayIncludes = [
|
||||
waybar_sway_config
|
||||
];
|
||||
|
||||
services.upower.enable = true; # for battery
|
||||
|
||||
home-manager.users.talexander =
|
||||
|
Loading…
x
Reference in New Issue
Block a user