Compare commits
30 commits
f9f9abf279
...
f8adbd437a
Author | SHA1 | Date | |
---|---|---|---|
f8adbd437a | |||
233d03639c | |||
0333e31aac | |||
ff92fb22ff | |||
fbfec1f8da | |||
aa53aea6cf | |||
21ea51b78d | |||
d22ff8cbe4 | |||
760cfcc059 | |||
d952121242 | |||
f00f6b55fc | |||
b3de4567ff | |||
ee879be648 | |||
54cac7ed48 | |||
c6a7cc9a3f | |||
75e037b7f8 | |||
671b9e94e3 | |||
d19b849577 | |||
73aa0bdcca | |||
af432693bd | |||
334d3ae658 | |||
b18d5e4d9d | |||
da9ca5a563 | |||
57b58d78ea | |||
3a3d1e6cdf | |||
baa1766186 | |||
a57da685a7 | |||
ede3d69907 | |||
230e2d0e3a | |||
badd1aa7ad |
|
@ -14,11 +14,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: Move these to custom modules
|
# TODO: Move these to custom modules
|
||||||
overlays = with inputs; [
|
overlays = [
|
||||||
lix.overlays.default
|
# Lix pollutes my terminal with warnings if I move this to a module :(
|
||||||
nur.overlays.default
|
inputs.lix.overlays.default
|
||||||
agenix.overlays.default
|
|
||||||
niri-flake.overlays.niri
|
|
||||||
|
|
||||||
(import ./overlays/ddclient.nix)
|
(import ./overlays/ddclient.nix)
|
||||||
(import ./overlays/firefox-addons {
|
(import ./overlays/firefox-addons {
|
||||||
|
@ -26,12 +24,8 @@
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
})
|
})
|
||||||
(import ./overlays/jetbrains.nix {inherit inputs;})
|
(import ./overlays/jetbrains.nix {inherit inputs;})
|
||||||
(import ./overlays/maple-mono-NF.nix)
|
|
||||||
(import ./overlays/marleyvim.nix {inherit inputs;})
|
(import ./overlays/marleyvim.nix {inherit inputs;})
|
||||||
(import ./overlays/wezterm.nix {inherit inputs;})
|
(import ./overlays/wezterm.nix {inherit inputs;})
|
||||||
|
|
||||||
# Custom packages
|
|
||||||
(import ./overlays/marleyos.nix)
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
|
lib,
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [inputs.easy-hosts.flakeModule];
|
imports = [inputs.easy-hosts.flakeModule];
|
||||||
|
|
||||||
config.easy-hosts = {
|
config.easy-hosts = {
|
||||||
shared.specialArgs.marleylib = import ../lib;
|
shared.specialArgs.marleylib = import ../lib {inherit lib;};
|
||||||
|
|
||||||
# shared.modules = with inputs; [
|
# shared.modules = with inputs; [
|
||||||
# # TODO: Move module imports to custom module
|
# # TODO: Move module imports to custom module
|
||||||
|
@ -19,13 +20,6 @@
|
||||||
|
|
||||||
perClass = class: {
|
perClass = class: {
|
||||||
modules = ["${self}/modules/${class}/default.nix"];
|
modules = ["${self}/modules/${class}/default.nix"];
|
||||||
|
|
||||||
# modules = with inputs;
|
|
||||||
# (nixpkgs.lib.optionals (class == "nixos") [
|
|
||||||
# niri-flake.nixosModules.niri
|
|
||||||
# ])
|
|
||||||
# ++ (nixpkgs.lib.optionals (class == "darwin") [
|
|
||||||
# ]);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hosts = {
|
hosts = {
|
||||||
|
|
|
@ -22,6 +22,11 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users."${name}" = {
|
home-manager.users."${name}" = {
|
||||||
|
marleyos = {
|
||||||
|
shell.niri.monitors = ["DP-1" "HDMI-A-1"];
|
||||||
|
services.syncthing = enabled;
|
||||||
|
};
|
||||||
|
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{lib}: {
|
||||||
module = import ./module.nix;
|
module = import ./module.nix {inherit lib;};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{lib}: {
|
||||||
enabled = {
|
|
||||||
## Quickly enable an option.
|
## Quickly enable an option.
|
||||||
##
|
##
|
||||||
## ```nix
|
## ```nix
|
||||||
|
@ -7,10 +6,10 @@
|
||||||
## ```
|
## ```
|
||||||
##
|
##
|
||||||
#@ true
|
#@ true
|
||||||
|
enabled = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
disabled = {
|
|
||||||
## Quickly disable an option.
|
## Quickly disable an option.
|
||||||
##
|
##
|
||||||
## ```nix
|
## ```nix
|
||||||
|
@ -18,6 +17,23 @@
|
||||||
## ```
|
## ```
|
||||||
##
|
##
|
||||||
#@ false
|
#@ false
|
||||||
|
disabled = {
|
||||||
enable = false;
|
enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
## Like lib.mkEnableOption, but allows specifying the default.
|
||||||
|
##
|
||||||
|
## ```nix
|
||||||
|
## options.marleyos.wayland = mkEnableOption' "wayland" false;
|
||||||
|
## ```
|
||||||
|
mkEnableOption' = name: default:
|
||||||
|
lib.mkOption {
|
||||||
|
inherit default;
|
||||||
|
example = true;
|
||||||
|
description =
|
||||||
|
if name ? _type && name._type == "mdDoc"
|
||||||
|
then lib.mdDoc "Whether to enable ${name.text}."
|
||||||
|
else "Whether to enable ${name}.";
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{marleylib, ...}: let
|
{
|
||||||
|
marleylib,
|
||||||
|
inputs',
|
||||||
|
...
|
||||||
|
}: let
|
||||||
my = {
|
my = {
|
||||||
name = "marley";
|
name = "marley";
|
||||||
fullName = "Marley Rae";
|
fullName = "Marley Rae";
|
||||||
|
@ -19,7 +23,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
sharedModules = [../home];
|
sharedModules = [../home];
|
||||||
extraSpecialArgs = {inherit marleylib;};
|
extraSpecialArgs = {inherit marleylib inputs';};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,10 +50,19 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs = {
|
||||||
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
overlays = [
|
||||||
|
inputs.nur.overlays.default
|
||||||
|
|
||||||
|
# Custom packages
|
||||||
|
(import ../../overlays/marleyos.nix)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# More useful repl.
|
# More useful repl.
|
||||||
environment.systemPackages = let
|
environment.systemPackages = let
|
||||||
nrepl =
|
nrepl =
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
config = {
|
config = {
|
||||||
|
nixpkgs.overlays = [(import ../../../overlays/maple-mono-NF.nix)];
|
||||||
|
|
||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
./system
|
./system
|
||||||
./shell
|
./shell
|
||||||
./programs
|
./programs
|
||||||
|
./services
|
||||||
|
|
||||||
./profiles.nix
|
./profiles.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -12,13 +12,30 @@ in {
|
||||||
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
{
|
{
|
||||||
programs = {
|
programs = {
|
||||||
|
agenix = enabled;
|
||||||
|
bat = enabled;
|
||||||
|
curl = enabled;
|
||||||
|
eza = enabled;
|
||||||
|
fish = enabled;
|
||||||
nh = enabled;
|
nh = enabled;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Graphical Desktop - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# Graphical Desktop - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
(lib.optionalAttrs cfg.desktop {})
|
(lib.optionalAttrs cfg.desktop {
|
||||||
|
shell.niri = enabled;
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
cheat = enabled;
|
||||||
|
figlet = enabled;
|
||||||
|
nemo = enabled;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
udiskie = enabled;
|
||||||
|
};
|
||||||
|
})
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Server - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# Server - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
pkgs,
|
lib,
|
||||||
|
inputs',
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.agenix;
|
cfg = config.marleyos.programs.agenix;
|
||||||
|
@ -9,8 +9,9 @@ in {
|
||||||
options.marleyos.programs.agenix.enable = lib.mkEnableOption "agenix";
|
options.marleyos.programs.agenix.enable = lib.mkEnableOption "agenix";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = [
|
||||||
agenix
|
# The overlay doesn't work for some reason...
|
||||||
|
inputs'.agenix.packages.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
# pkgs,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.bat;
|
cfg = config.marleyos.programs.bat;
|
||||||
|
@ -12,21 +11,11 @@ in {
|
||||||
programs.bat = {
|
programs.bat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# FIX: Currently broken. Re-enable when not broken.
|
|
||||||
# extraPackages = with pkgs.bat-extras; [
|
|
||||||
# batdiff
|
|
||||||
# batman
|
|
||||||
# ];
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
style = "auto";
|
style = "auto";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = lib.mkIf config.programs.git.delta.enable {
|
|
||||||
# BATDIFF_USE_DELTA = "true";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
functions = {
|
functions = {
|
||||||
cat = {
|
cat = {
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.cheat;
|
cfg = config.marleyos.programs.cheat;
|
|
@ -1,12 +1,17 @@
|
||||||
{
|
{
|
||||||
lib,
|
marleylib,
|
||||||
config,
|
config,
|
||||||
|
osConfig,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (marleylib.module) mkEnableOption';
|
||||||
|
|
||||||
cfg = config.marleyos.programs.curl;
|
cfg = config.marleyos.programs.curl;
|
||||||
|
osCfg = osConfig.marleyos.programs.curl;
|
||||||
in {
|
in {
|
||||||
options.marleyos.programs.curl.enable = lib.mkEnableOption "curl";
|
options.marleyos.programs.curl.enable = mkEnableOption' "curl" osCfg.enable;
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
|
@ -1,5 +1,20 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./agenix.nix
|
||||||
|
./bat.nix
|
||||||
|
./cheat.nix
|
||||||
|
./curl.nix
|
||||||
|
./eza.nix
|
||||||
|
./figlet.nix
|
||||||
|
./fish.nix
|
||||||
|
./fuzzel.nix
|
||||||
|
./nemo.nix
|
||||||
./nh.nix
|
./nh.nix
|
||||||
|
./waybar.nix
|
||||||
|
|
||||||
|
# TODO: uncomment when swaylock is figured out
|
||||||
|
# ./wlogout
|
||||||
|
|
||||||
|
./xwayland-satellite.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.eza;
|
cfg = config.marleyos.programs.eza;
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
|
@ -1,15 +1,17 @@
|
||||||
{
|
{
|
||||||
lib,
|
marleylib,
|
||||||
config,
|
config,
|
||||||
|
osConfig,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
system,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.snowfall.system) is-linux is-darwin;
|
inherit (marleylib.module) mkEnableOption';
|
||||||
|
|
||||||
cfg = config.marleyos.programs.fish;
|
cfg = config.marleyos.programs.fish;
|
||||||
|
osCfg = osConfig.marleyos.programs.fish;
|
||||||
in {
|
in {
|
||||||
options.marleyos.programs.fish.enable = lib.mkEnableOption "fish";
|
options.marleyos.programs.fish.enable = mkEnableOption' "fish" osCfg.enable;
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs;
|
||||||
|
@ -31,8 +33,8 @@ in {
|
||||||
pax
|
pax
|
||||||
]
|
]
|
||||||
# unrar-free is broken on darwin :(
|
# unrar-free is broken on darwin :(
|
||||||
++ (lib.optionals (is-linux system) [unrar-free])
|
++ (lib.optionals pkgs.stdenv.isLinux [unrar-free])
|
||||||
++ (lib.optionals (is-darwin system) [unrar]);
|
++ (lib.optionals pkgs.stdenv.isDarwin [unrar]);
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
|
@ -1,14 +1,15 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.fuzzel;
|
cfg = config.marleyos.programs.fuzzel;
|
||||||
in {
|
in {
|
||||||
options.marleyos.programs.fuzzel.enable = lib.mkEnableOption "fuzzel";
|
options.marleyos.programs.fuzzel.enable = lib.mkEnableOption "fuzzel";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
|
||||||
marleyos.apps.launcher = {
|
marleycfg.apps.launcher = {
|
||||||
inherit (config.programs.fuzzel) package;
|
inherit (config.programs.fuzzel) package;
|
||||||
command = "";
|
command = "";
|
||||||
};
|
};
|
|
@ -8,11 +8,11 @@
|
||||||
in {
|
in {
|
||||||
options.marleyos.programs.nemo.enable = lib.mkEnableOption "nemo";
|
options.marleyos.programs.nemo.enable = lib.mkEnableOption "nemo";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
nemo
|
nemo
|
||||||
];
|
];
|
||||||
|
|
||||||
marleyos.apps.file-browser = pkgs.nemo;
|
marleycfg.apps.file-browser = pkgs.nemo;
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,12 +1,16 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
marleylib,
|
||||||
osConfig,
|
osConfig,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (marleylib.module) mkEnableOption';
|
||||||
|
|
||||||
|
osCfg = osConfig.marleyos.programs.nh.enable;
|
||||||
cfg = config.marleyos.programs.nh;
|
cfg = config.marleyos.programs.nh;
|
||||||
in {
|
in {
|
||||||
options.marleyos.programs.nh.enable = lib.mkEnableOption "nh";
|
options.marleyos.programs.nh.enable = mkEnableOption' "nh" osCfg;
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.nh = {
|
programs.nh = {
|
||||||
|
|
|
@ -1,19 +1,24 @@
|
||||||
{
|
{
|
||||||
lib,
|
marleylib,
|
||||||
config,
|
config,
|
||||||
|
osConfig,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.waybar;
|
inherit (marleylib.module) mkEnableOption';
|
||||||
in {
|
|
||||||
options.marleyos.programs.waybar = {
|
|
||||||
enable = lib.mkEnableOption "waybar";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
cfg = config.marleyos.programs.waybar;
|
||||||
|
osCfg = osConfig.marleyos.programs.waybar;
|
||||||
|
in {
|
||||||
|
options.marleyos.programs.waybar.enable =
|
||||||
|
mkEnableOption' "waybar" osCfg.enable;
|
||||||
|
|
||||||
|
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
|
||||||
marleyos = {
|
marleyos = {
|
||||||
services.swaync.enable = true;
|
services.swaync.enable = true;
|
||||||
programs.wlogout.enable = true;
|
# TODO: enable once swaylock is figured out
|
||||||
|
# programs.wlogout.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
stylix.targets.waybar.addCss = false;
|
stylix.targets.waybar.addCss = false;
|
||||||
|
@ -26,9 +31,10 @@ in {
|
||||||
settings = let
|
settings = let
|
||||||
niri =
|
niri =
|
||||||
config.programs.niri
|
config.programs.niri
|
||||||
# HM module doesn't include an enable option...
|
# HM module doesn't include an enable option when imported by nixOS
|
||||||
|
# module...
|
||||||
// {
|
// {
|
||||||
enable = config.marleyos.wayland.niri.enable;
|
inherit (config.marleyos.shell.niri) enable;
|
||||||
};
|
};
|
||||||
in [
|
in [
|
||||||
{
|
{
|
||||||
|
@ -47,18 +53,16 @@ in {
|
||||||
"cpu"
|
"cpu"
|
||||||
"memory"
|
"memory"
|
||||||
];
|
];
|
||||||
modules-center =
|
modules-center = lib.optionals niri.enable [
|
||||||
[]
|
|
||||||
++ (lib.optionals niri.enable [
|
|
||||||
"niri/workspaces"
|
"niri/workspaces"
|
||||||
]);
|
];
|
||||||
modules-right =
|
modules-right =
|
||||||
[
|
[
|
||||||
"mpd"
|
"mpd"
|
||||||
"custom/notifications"
|
"custom/notifications"
|
||||||
"tray"
|
"tray"
|
||||||
]
|
]
|
||||||
++ (lib.optionals (!config.marleyos.isDesktop) [
|
++ (lib.optionals config.marleycfg.profiles.laptop [
|
||||||
"battery"
|
"battery"
|
||||||
])
|
])
|
||||||
++ [
|
++ [
|
||||||
|
@ -71,7 +75,7 @@ in {
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
format = "";
|
format = "";
|
||||||
on-click = let
|
on-click = let
|
||||||
inherit (config.marleyos.apps) launcher;
|
inherit (config.marleycfg.apps) launcher;
|
||||||
in "sleep 0.1 && ${lib.getExe launcher.package} ${launcher.command}";
|
in "sleep 0.1 && ${lib.getExe launcher.package} ${launcher.command}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
in {
|
in {
|
||||||
options.marleyos.programs.wlogout.enable = lib.mkEnableOption "wlogout";
|
options.marleyos.programs.wlogout.enable = lib.mkEnableOption "wlogout";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
|
||||||
marleyos.programs.hyprlock.enable = true;
|
marleyos.programs.hyprlock.enable = true;
|
||||||
|
|
||||||
programs.wlogout = {
|
programs.wlogout = {
|
||||||
|
@ -16,8 +16,10 @@ in {
|
||||||
|
|
||||||
layout = let
|
layout = let
|
||||||
systemctl = lib.getExe' pkgs.systemd "systemctl";
|
systemctl = lib.getExe' pkgs.systemd "systemctl";
|
||||||
|
# TODO: use niri msg action quit
|
||||||
hyprctrl =
|
hyprctrl =
|
||||||
lib.getExe' config.wayland.windowManager.hyprland.package "hyprctrl";
|
lib.getExe' config.wayland.windowManager.hyprland.package "hyprctrl";
|
||||||
|
# TODO: switch to swaylock
|
||||||
hyprlock = lib.getExe config.programs.hyprlock.package;
|
hyprlock = lib.getExe config.programs.hyprlock.package;
|
||||||
in [
|
in [
|
||||||
{
|
{
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
in {
|
in {
|
||||||
options.marleyos.programs.xwayland-satellite.enable = lib.mkEnableOption "xwayland-satellite";
|
options.marleyos.programs.xwayland-satellite.enable = lib.mkEnableOption "xwayland-satellite";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
xwayland-satellite
|
xwayland-satellite
|
||||||
];
|
];
|
9
modules/home/services/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./gnome-keyring.nix
|
||||||
|
./swaybg.nix
|
||||||
|
./swaync.nix
|
||||||
|
./syncthing.nix
|
||||||
|
./udiskie.nix
|
||||||
|
];
|
||||||
|
}
|
21
modules/home/services/gnome-keyring.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
marleylib,
|
||||||
|
config,
|
||||||
|
osConfig,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (marleylib.module) mkEnableOption';
|
||||||
|
|
||||||
|
cfg = config.marleyos.services.gnome-keyring;
|
||||||
|
osCfg = osConfig.marleyos.services.gnome-keyring;
|
||||||
|
in {
|
||||||
|
options.marleyos.services.gnome-keyring.enable =
|
||||||
|
mkEnableOption' "gnome-keyring" osCfg.enable;
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.gnome-keyring = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
|
@ -1,13 +1,14 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.services.swaync;
|
cfg = config.marleyos.services.swaync;
|
||||||
in {
|
in {
|
||||||
options.marleyos.services.swaync.enable = lib.mkEnableOption "swaync";
|
options.marleyos.services.swaync.enable = lib.mkEnableOption "swaync";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
|
||||||
services.swaync = {
|
services.swaync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.services.syncthing;
|
cfg = config.marleyos.services.syncthing;
|
||||||
in {
|
in {
|
||||||
|
# I am specifically not enabling this for the OS as a whole, as I don't want
|
||||||
|
# to deal with user shenanigans.
|
||||||
options.marleyos.services.syncthing.enable = lib.mkEnableOption "syncthing";
|
options.marleyos.services.syncthing.enable = lib.mkEnableOption "syncthing";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
|
@ -8,13 +8,12 @@
|
||||||
in {
|
in {
|
||||||
options.marleyos.services.udiskie.enable = lib.mkEnableOption "udiskie";
|
options.marleyos.services.udiskie.enable = lib.mkEnableOption "udiskie";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
|
||||||
services.udiskie = {
|
services.udiskie = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
program_options = {
|
program_options = {
|
||||||
# FIXME: set default file manager in default progs mod
|
file_manager = "${lib.getExe config.marleycfg.apps.file-browser}";
|
||||||
file_manager = "${lib.getExe pkgs.xfce.thunar}";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
|
@ -1,6 +1,12 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./stylix.nix
|
./stylix.nix
|
||||||
|
|
||||||
|
./xorg.nix
|
||||||
|
|
||||||
|
./wayland.nix
|
||||||
|
./niri.nix
|
||||||
|
|
||||||
./gtk.nix
|
./gtk.nix
|
||||||
./qt.nix
|
./qt.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = lib.mkIf config.marleycfg.profiles.desktop {
|
config = lib.mkIf (config.marleycfg.profiles.desktop && pkgs.stdenv.isLinux) {
|
||||||
home.pointerCursor.gtk.enable = true;
|
home.pointerCursor.gtk.enable = true;
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
|
|
|
@ -1,12 +1,19 @@
|
||||||
{
|
{
|
||||||
lib,
|
marleylib,
|
||||||
config,
|
config,
|
||||||
|
osConfig,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.wayland.niri;
|
inherit (marleylib.module) mkEnableOption' enabled;
|
||||||
|
|
||||||
|
cfg = config.marleyos.shell.niri;
|
||||||
|
osCfg = osConfig.marleyos.shell.niri;
|
||||||
in {
|
in {
|
||||||
options.marleyos.wayland.niri = {
|
options.marleyos.shell.niri = {
|
||||||
enable = lib.mkEnableOption "niri";
|
enable = mkEnableOption' "niri" osCfg.enable;
|
||||||
|
|
||||||
monitors = lib.mkOption {
|
monitors = lib.mkOption {
|
||||||
type = with lib.types; nullOr (listOf str);
|
type = with lib.types; nullOr (listOf str);
|
||||||
|
@ -15,19 +22,22 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
|
||||||
marleyos = {
|
nixpkgs.overlays = [inputs.niri-flake.overlays.niri];
|
||||||
wayland.enable = true;
|
|
||||||
|
|
||||||
|
marleyos = {
|
||||||
|
shell.wayland = enabled;
|
||||||
programs = {
|
programs = {
|
||||||
waybar.enable = true;
|
waybar = enabled;
|
||||||
wlogout.enable = true;
|
# TODO: enable once swaylock is figured out
|
||||||
fuzzel.enable = true;
|
# wlogout = enabled;
|
||||||
xwayland-satellite.enable = true;
|
fuzzel = enabled;
|
||||||
|
xwayland-satellite = enabled;
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
swaybg.enable = true;
|
gnome-keyring = enabled;
|
||||||
swaync.enable = true;
|
swaybg = enabled;
|
||||||
|
swaync = enabled;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,7 +58,7 @@ in {
|
||||||
|
|
||||||
### Startup Programs ###
|
### Startup Programs ###
|
||||||
spawn-at-startup = let
|
spawn-at-startup = let
|
||||||
inherit (config.marleyos) apps;
|
inherit (config.marleycfg) apps;
|
||||||
in [
|
in [
|
||||||
{command = ["sh" "-c" "${lib.getExe apps.terminal} -e tmux new -s main -A"];}
|
{command = ["sh" "-c" "${lib.getExe apps.terminal} -e tmux new -s main -A"];}
|
||||||
(cmd (lib.getExe apps.browser))
|
(cmd (lib.getExe apps.browser))
|
||||||
|
@ -95,7 +105,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
### Screenshots ###
|
### Screenshots ###
|
||||||
screenshot-path = "~/pictures/screenshots/%Y-%m-%d %H-%M-%S.png";
|
screenshot-path = "~/${config.xdg.userDirs.pictures}/screenshots/%Y-%m-%d %H-%M-%S.png";
|
||||||
|
|
||||||
### Workspaces ###
|
### Workspaces ###
|
||||||
workspaces = {
|
workspaces = {
|
||||||
|
@ -128,6 +138,7 @@ in {
|
||||||
title = "^Picture-in-Picture$";
|
title = "^Picture-in-Picture$";
|
||||||
}
|
}
|
||||||
{title = "^Picture in picture$";}
|
{title = "^Picture in picture$";}
|
||||||
|
{title = "Bitwarden";}
|
||||||
];
|
];
|
||||||
open-floating = true;
|
open-floating = true;
|
||||||
}
|
}
|
||||||
|
@ -164,7 +175,7 @@ in {
|
||||||
"Ctrl+Alt+Delete".action = quit;
|
"Ctrl+Alt+Delete".action = quit;
|
||||||
|
|
||||||
"Mod+Shift+Slash".action = show-hotkey-overlay;
|
"Mod+Shift+Slash".action = show-hotkey-overlay;
|
||||||
"Mod+Return".action = spawn (lib.getExe config.marleyos.apps.terminal);
|
"Mod+Return".action = spawn (lib.getExe config.marleycfg.apps.terminal);
|
||||||
"Mod+R".action = spawn (lib.getExe config.programs.fuzzel.package);
|
"Mod+R".action = spawn (lib.getExe config.programs.fuzzel.package);
|
||||||
|
|
||||||
"Mod+H".action = focus-column-or-monitor-left;
|
"Mod+H".action = focus-column-or-monitor-left;
|
|
@ -1,9 +1,10 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = lib.mkIf config.marleycfg.profiles.desktop {
|
config = lib.mkIf (config.marleycfg.profiles.desktop && pkgs.stdenv.isLinux) {
|
||||||
qt = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
cfg = config.marleyos.wayland;
|
options.marleyos.shell.wayland.enable = lib.mkEnableOption "wayland";
|
||||||
in {
|
|
||||||
options.marleyos.wayland.enable = lib.mkEnableOption "wayland";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf (config.marleyos.shell.wayland.enable && pkgs.stdenv.isLinux) {
|
||||||
# Fix the "tray.target not found" error.
|
# Fix the "tray.target not found" error.
|
||||||
systemd.user.targets.tray = lib.mkIf (!config.xsession.enable) {
|
systemd.user.targets.tray = lib.mkIf (!config.xsession.enable) {
|
||||||
Unit = {
|
Unit = {
|
16
modules/home/shell/xorg.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
options.marleyos.shell.xorg.enable = lib.mkEnableOption "xorg";
|
||||||
|
|
||||||
|
config = lib.mkIf (config.marleyos.shell.xorg.enable && pkgs.stdenv.isLinux) {
|
||||||
|
xsession = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
numlock.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -17,8 +17,8 @@ in {
|
||||||
|
|
||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
c = "clear";
|
c = "clear";
|
||||||
e = "${config.home.sessionVariables.EDITOR}";
|
e = "${config.home.sessionVariables.EDITOR or "$EDITOR"}";
|
||||||
v = "${config.home.sessionVariables.EDITOR}";
|
v = "${config.home.sessionVariables.EDITOR or "$EDITOR"}";
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = [
|
packages = [
|
||||||
|
@ -27,7 +27,9 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
marleycfg.apps.pinentry =
|
marleycfg.apps.pinentry =
|
||||||
if profiles.desktop
|
if pkgs.stdenv.isDarwin
|
||||||
|
then pkgs.pinentry_mac
|
||||||
|
else if profiles.desktop
|
||||||
then pkgs.pinentry-gtk2
|
then pkgs.pinentry-gtk2
|
||||||
else pkgs.pinentry-curses;
|
else pkgs.pinentry-curses;
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,6 +12,7 @@ in {
|
||||||
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
{
|
{
|
||||||
programs = {
|
programs = {
|
||||||
|
curl = enabled;
|
||||||
fish = enabled;
|
fish = enabled;
|
||||||
nh = enabled;
|
nh = enabled;
|
||||||
};
|
};
|
||||||
|
|
16
modules/nixos/programs/curl.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.marleyos.programs.curl;
|
||||||
|
in {
|
||||||
|
options.marleyos.programs.curl.enable = lib.mkEnableOption "curl";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
curl
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./curl.nix
|
||||||
./fish.nix
|
./fish.nix
|
||||||
./nh.nix
|
./nh.nix
|
||||||
|
./waybar.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
15
modules/nixos/programs/waybar.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.marleyos.programs.waybar;
|
||||||
|
in {
|
||||||
|
options.marleyos.programs.waybar.enable = lib.mkEnableOption "waybar";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,13 +1,31 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
marleylib,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.shell.niri;
|
cfg = config.marleyos.shell.niri;
|
||||||
|
|
||||||
|
inherit (marleylib.module) enabled;
|
||||||
in {
|
in {
|
||||||
options.marleyos.shell.niri.enable = lib.mkEnableOption "niri";
|
options.marleyos.shell.niri.enable = lib.mkEnableOption "niri";
|
||||||
|
|
||||||
|
imports = [inputs.niri-flake.nixosModules.niri];
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
nixpkgs.overlays = [inputs.niri-flake.overlays.niri];
|
||||||
|
|
||||||
|
marleyos = {
|
||||||
|
shell.hyprlock = enabled;
|
||||||
|
programs = {
|
||||||
|
waybar = enabled;
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
gnome-keyring = enabled;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
programs.niri = {
|
programs.niri = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,25 @@
|
||||||
{lib, ...}: {
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.marleycfg.profiles;
|
||||||
|
in {
|
||||||
options.marleycfg.profiles = {
|
options.marleycfg.profiles = {
|
||||||
desktop = lib.mkEnableOption "graphical desktop profile";
|
desktop = lib.mkEnableOption "graphical desktop profile";
|
||||||
|
laptop = lib.mkEnableOption "laptop profile";
|
||||||
server = lib.mkEnableOption "server profile";
|
server = lib.mkEnableOption "server profile";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.server {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = cfg.server -> !cfg.desktop;
|
||||||
|
message = ''
|
||||||
|
The marleycfg.profiles.server and marleycfg.profiles.desktop options
|
||||||
|
are mutually exclusive.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
_: prev: {
|
_: prev: {
|
||||||
marleyos =
|
marleyos =
|
||||||
prev.marleyos
|
(prev.marleyos or {})
|
||||||
// {
|
// {
|
||||||
CEmu-TI-84-Plus-CE = prev.callPackage ../packages/CEmu-TI-84-Plus-CE {};
|
CEmu-TI-84-Plus-CE = prev.callPackage ../packages/CEmu-TI-84-Plus-CE {};
|
||||||
figlet-xero-fonts = prev.callPackage ../packages/figlet-xero-fonts {};
|
figlet-xero-fonts = prev.callPackage ../packages/figlet-xero-fonts {};
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
{lib, ...}: let
|
|
||||||
inherit (lib.marleyos) enabled;
|
|
||||||
in {
|
|
||||||
marleyos = {
|
|
||||||
bundles.desktop = enabled;
|
|
||||||
|
|
||||||
wayland.niri = {
|
|
||||||
enable = true;
|
|
||||||
monitors = ["DP-1" "HDMI-A-1"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.stateVersion = "24.05";
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.marleyos.programs.hyprlock;
|
|
||||||
in {
|
|
||||||
options.marleyos.programs.hyprlock.enable = lib.mkEnableOption "hyprlock";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
programs.hyprlock = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
disable_loading_bar = true;
|
|
||||||
grace = 10;
|
|
||||||
hide_cursor = true;
|
|
||||||
no_fade_in = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
input-field = {
|
|
||||||
size = "200, 50";
|
|
||||||
position = "0, -80";
|
|
||||||
monitor = "";
|
|
||||||
dots_center = true;
|
|
||||||
fade_on_empty = false;
|
|
||||||
outline_thickness = 5;
|
|
||||||
placeholder_text = "password...";
|
|
||||||
shadow_passes = 2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.marleyos.services.gnome-keyring;
|
|
||||||
in {
|
|
||||||
options.marleyos.services.gnome-keyring.enable = lib.mkEnableOption "gnome-keyring";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.gnome-keyring = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
;; vim: ft=commonlisp
|
|
||||||
|
|
||||||
;; Home row mods QWERTY example with more complexity.
|
|
||||||
;; Some of the changes from the basic example:
|
|
||||||
;; - when a home row mod activates tap, the home row mods are disabled
|
|
||||||
;; while continuing to type rapidly
|
|
||||||
;; - tap-hold-release helps make the hold action more responsive
|
|
||||||
;; - pressing another key on the same half of the keyboard
|
|
||||||
;; as the home row mod will activate an early tap action
|
|
||||||
|
|
||||||
(defcfg
|
|
||||||
process-unmapped-keys yes
|
|
||||||
)
|
|
||||||
(defsrc
|
|
||||||
lsft a s d f j k l ;
|
|
||||||
)
|
|
||||||
(defvar
|
|
||||||
;; Note: consider using different time values for your different fingers.
|
|
||||||
;; For example, your pinkies might be slower to release keys and index
|
|
||||||
;; fingers faster.
|
|
||||||
tap-time 200
|
|
||||||
hold-time 150
|
|
||||||
|
|
||||||
left-hand-keys (
|
|
||||||
q w e r t
|
|
||||||
a s d f g
|
|
||||||
z x c v b
|
|
||||||
)
|
|
||||||
right-hand-keys (
|
|
||||||
y u i o p
|
|
||||||
h j k l ;
|
|
||||||
n m , . /
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(deflayer base
|
|
||||||
@lsft @a @s @d @f @j @k @l @;
|
|
||||||
)
|
|
||||||
|
|
||||||
(deflayer nomods
|
|
||||||
@lsft a s d f j k l ;
|
|
||||||
)
|
|
||||||
(deffakekeys
|
|
||||||
to-base (layer-switch base)
|
|
||||||
)
|
|
||||||
(defalias
|
|
||||||
tap (multi
|
|
||||||
(layer-switch nomods)
|
|
||||||
(on-idle-fakekey to-base tap 20)
|
|
||||||
)
|
|
||||||
|
|
||||||
lsft (tap-hold 100 100 esc lsft)
|
|
||||||
a (tap-hold-release-keys $tap-time $hold-time (multi a @tap) lctl $left-hand-keys)
|
|
||||||
s (tap-hold-release-keys $tap-time $hold-time (multi s @tap) lalt $left-hand-keys)
|
|
||||||
d (tap-hold-release-keys $tap-time $hold-time (multi d @tap) lsft $left-hand-keys)
|
|
||||||
f (tap-hold-release-keys $tap-time $hold-time (multi f @tap) lmet $left-hand-keys)
|
|
||||||
j (tap-hold-release-keys $tap-time $hold-time (multi j @tap) rmet $right-hand-keys)
|
|
||||||
k (tap-hold-release-keys $tap-time $hold-time (multi k @tap) rsft $right-hand-keys)
|
|
||||||
l (tap-hold-release-keys $tap-time $hold-time (multi l @tap) ralt $right-hand-keys)
|
|
||||||
; (tap-hold-release-keys $tap-time $hold-time (multi ; @tap) rctl $right-hand-keys)
|
|
||||||
)
|
|
|
@ -1,42 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
system,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib.snowfall.system) is-darwin;
|
|
||||||
|
|
||||||
cfg = config.marleyos.services.kanata;
|
|
||||||
isGenericLinux = config.targets.genericLinux.enable;
|
|
||||||
isNotNixOS = isGenericLinux || (is-darwin system);
|
|
||||||
in {
|
|
||||||
options.marleyos.services.kanata.enable = lib.mkEnableOption "kanata";
|
|
||||||
|
|
||||||
# Kanata is available as a module for nixOS and that should be preferred when
|
|
||||||
# possible.
|
|
||||||
config = lib.mkIf (cfg.enable && isNotNixOS) {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
kanata
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.user.services.kanata = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Kanata keyboard remapper";
|
|
||||||
Documentation = "https://github.com/jtroo/kanata";
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
|
||||||
Environment = [
|
|
||||||
"PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin"
|
|
||||||
"DISPLAY=:0"
|
|
||||||
];
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "/bin/sh -c 'exec ${lib.getExe pkgs.kanata} --cfg ${./config.kbd}'";
|
|
||||||
Restart = "no";
|
|
||||||
};
|
|
||||||
|
|
||||||
Install.WantedBy = ["default.target"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.marleyos.xorg;
|
|
||||||
in {
|
|
||||||
options.marleyos.xorg.enable = lib.mkEnableOption "xorg";
|
|
||||||
|
|
||||||
# config = lib.mkIf cfg.enable {
|
|
||||||
#
|
|
||||||
# };
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.marleyos.xorg.xsession;
|
|
||||||
in {
|
|
||||||
options.marleyos.xorg.xsession.enable = lib.mkEnableOption "xsession";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
xsession = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
numlock.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|