Compare commits

..

No commits in common. "f8adbd437a859b25e44698ff2693c97bdb444030" and "f9f9abf2794e53248489186566172bb2a7aab619" have entirely different histories.

57 changed files with 322 additions and 330 deletions

View file

@ -14,9 +14,11 @@
};
# TODO: Move these to custom modules
overlays = [
# Lix pollutes my terminal with warnings if I move this to a module :(
inputs.lix.overlays.default
overlays = with inputs; [
lix.overlays.default
nur.overlays.default
agenix.overlays.default
niri-flake.overlays.niri
(import ./overlays/ddclient.nix)
(import ./overlays/firefox-addons {
@ -24,8 +26,12 @@
inherit inputs;
})
(import ./overlays/jetbrains.nix {inherit inputs;})
(import ./overlays/maple-mono-NF.nix)
(import ./overlays/marleyvim.nix {inherit inputs;})
(import ./overlays/wezterm.nix {inherit inputs;})
# Custom packages
(import ./overlays/marleyos.nix)
];
};
};

View file

@ -1,13 +1,12 @@
{
inputs,
lib,
self,
...
}: {
imports = [inputs.easy-hosts.flakeModule];
config.easy-hosts = {
shared.specialArgs.marleylib = import ../lib {inherit lib;};
shared.specialArgs.marleylib = import ../lib;
# shared.modules = with inputs; [
# # TODO: Move module imports to custom module
@ -20,6 +19,13 @@
perClass = class: {
modules = ["${self}/modules/${class}/default.nix"];
# modules = with inputs;
# (nixpkgs.lib.optionals (class == "nixos") [
# niri-flake.nixosModules.niri
# ])
# ++ (nixpkgs.lib.optionals (class == "darwin") [
# ]);
};
hosts = {

View file

@ -22,11 +22,6 @@ in {
};
home-manager.users."${name}" = {
marleyos = {
shell.niri.monitors = ["DP-1" "HDMI-A-1"];
services.syncthing = enabled;
};
home.stateVersion = "24.05";
};

View file

@ -1,3 +1,3 @@
{lib}: {
module = import ./module.nix {inherit lib;};
{
module = import ./module.nix;
}

View file

@ -1,4 +1,5 @@
{lib}: {
{
enabled = {
## Quickly enable an option.
##
## ```nix
@ -6,10 +7,10 @@
## ```
##
#@ true
enabled = {
enable = true;
};
disabled = {
## Quickly disable an option.
##
## ```nix
@ -17,23 +18,6 @@
## ```
##
#@ false
disabled = {
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;
};
}

View file

@ -1,8 +1,4 @@
{
marleylib,
inputs',
...
}: let
{marleylib, ...}: let
my = {
name = "marley";
fullName = "Marley Rae";
@ -23,7 +19,7 @@ in {
};
sharedModules = [../home];
extraSpecialArgs = {inherit marleylib inputs';};
extraSpecialArgs = {inherit marleylib;};
};
};
}

View file

@ -50,19 +50,10 @@
};
};
nixpkgs = {
config = {
nixpkgs.config = {
allowUnfree = true;
};
overlays = [
inputs.nur.overlays.default
# Custom packages
(import ../../overlays/marleyos.nix)
];
};
# More useful repl.
environment.systemPackages = let
nrepl =

View file

@ -1,7 +1,5 @@
{pkgs, ...}: {
config = {
nixpkgs.overlays = [(import ../../../overlays/maple-mono-NF.nix)];
stylix = {
enable = true;

View file

@ -9,7 +9,6 @@
./system
./shell
./programs
./services
./profiles.nix
];

View file

@ -12,30 +12,13 @@ in {
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{
programs = {
agenix = enabled;
bat = enabled;
curl = enabled;
eza = enabled;
fish = enabled;
nh = enabled;
};
}
#
#
# Graphical Desktop - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(lib.optionalAttrs cfg.desktop {
shell.niri = enabled;
programs = {
cheat = enabled;
figlet = enabled;
nemo = enabled;
};
services = {
udiskie = enabled;
};
})
(lib.optionalAttrs cfg.desktop {})
#
#
# Server - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View file

@ -1,20 +1,5 @@
{
imports = [
./agenix.nix
./bat.nix
./cheat.nix
./curl.nix
./eza.nix
./figlet.nix
./fish.nix
./fuzzel.nix
./nemo.nix
./nh.nix
./waybar.nix
# TODO: uncomment when swaylock is figured out
# ./wlogout
./xwayland-satellite.nix
];
}

View file

@ -1,16 +1,12 @@
{
config,
marleylib,
osConfig,
lib,
osConfig,
...
}: let
inherit (marleylib.module) mkEnableOption';
osCfg = osConfig.marleyos.programs.nh.enable;
cfg = config.marleyos.programs.nh;
in {
options.marleyos.programs.nh.enable = mkEnableOption' "nh" osCfg;
options.marleyos.programs.nh.enable = lib.mkEnableOption "nh";
config = lib.mkIf cfg.enable {
programs.nh = {

View file

@ -1,9 +0,0 @@
{
imports = [
./gnome-keyring.nix
./swaybg.nix
./swaync.nix
./syncthing.nix
./udiskie.nix
];
}

View file

@ -1,21 +0,0 @@
{
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;
};
};
}

View file

@ -1,12 +1,6 @@
{
imports = [
./stylix.nix
./xorg.nix
./wayland.nix
./niri.nix
./gtk.nix
./qt.nix
];

View file

@ -1,10 +1,9 @@
{
lib,
config,
pkgs,
...
}: {
config = lib.mkIf (config.marleycfg.profiles.desktop && pkgs.stdenv.isLinux) {
config = lib.mkIf config.marleycfg.profiles.desktop {
home.pointerCursor.gtk.enable = true;
gtk = {

View file

@ -1,10 +1,9 @@
{
lib,
config,
pkgs,
...
}: {
config = lib.mkIf (config.marleycfg.profiles.desktop && pkgs.stdenv.isLinux) {
config = lib.mkIf config.marleycfg.profiles.desktop {
qt = {
enable = true;
};

View file

@ -1,16 +0,0 @@
{
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;
};
};
}

View file

@ -17,8 +17,8 @@ in {
shellAbbrs = {
c = "clear";
e = "${config.home.sessionVariables.EDITOR or "$EDITOR"}";
v = "${config.home.sessionVariables.EDITOR or "$EDITOR"}";
e = "${config.home.sessionVariables.EDITOR}";
v = "${config.home.sessionVariables.EDITOR}";
};
packages = [
@ -27,9 +27,7 @@ in {
};
marleycfg.apps.pinentry =
if pkgs.stdenv.isDarwin
then pkgs.pinentry_mac
else if profiles.desktop
if profiles.desktop
then pkgs.pinentry-gtk2
else pkgs.pinentry-curses;
};

View file

@ -12,7 +12,6 @@ in {
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{
programs = {
curl = enabled;
fish = enabled;
nh = enabled;
};

View file

@ -1,16 +0,0 @@
{
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
];
};
}

View file

@ -1,8 +1,6 @@
{
imports = [
./curl.nix
./fish.nix
./nh.nix
./waybar.nix
];
}

View file

@ -1,15 +0,0 @@
{
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;
};
};
}

View file

@ -1,31 +1,13 @@
{
config,
marleylib,
lib,
inputs,
config,
...
}: let
cfg = config.marleyos.shell.niri;
inherit (marleylib.module) enabled;
in {
options.marleyos.shell.niri.enable = lib.mkEnableOption "niri";
imports = [inputs.niri-flake.nixosModules.niri];
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 = {
enable = true;
};

View file

@ -1,25 +1,6 @@
{
lib,
config,
...
}: let
cfg = config.marleycfg.profiles;
in {
{lib, ...}: {
options.marleycfg.profiles = {
desktop = lib.mkEnableOption "graphical desktop profile";
laptop = lib.mkEnableOption "laptop 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.
'';
}
];
};
}

View file

@ -1,6 +1,6 @@
_: prev: {
marleyos =
(prev.marleyos or {})
prev.marleyos
// {
CEmu-TI-84-Plus-CE = prev.callPackage ../packages/CEmu-TI-84-Plus-CE {};
figlet-xero-fonts = prev.callPackage ../packages/figlet-xero-fonts {};

View file

@ -0,0 +1,14 @@
{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";
}

View file

@ -1,7 +1,7 @@
{
config,
lib,
inputs',
config,
pkgs,
...
}: let
cfg = config.marleyos.programs.agenix;
@ -9,9 +9,8 @@ in {
options.marleyos.programs.agenix.enable = lib.mkEnableOption "agenix";
config = lib.mkIf cfg.enable {
home.packages = [
# The overlay doesn't work for some reason...
inputs'.agenix.packages.default
home.packages = with pkgs; [
agenix
];
};
}

View file

@ -1,6 +1,7 @@
{
config,
lib,
config,
# pkgs,
...
}: let
cfg = config.marleyos.programs.bat;
@ -11,11 +12,21 @@ in {
programs.bat = {
enable = true;
# FIX: Currently broken. Re-enable when not broken.
# extraPackages = with pkgs.bat-extras; [
# batdiff
# batman
# ];
config = {
style = "auto";
};
};
home.sessionVariables = lib.mkIf config.programs.git.delta.enable {
# BATDIFF_USE_DELTA = "true";
};
programs.fish = {
functions = {
cat = {

View file

@ -1,7 +1,7 @@
{
lib,
config,
pkgs,
lib,
...
}: let
cfg = config.marleyos.programs.cheat;

View file

@ -1,17 +1,12 @@
{
marleylib,
config,
osConfig,
lib,
config,
pkgs,
...
}: let
inherit (marleylib.module) mkEnableOption';
cfg = config.marleyos.programs.curl;
osCfg = osConfig.marleyos.programs.curl;
in {
options.marleyos.programs.curl.enable = mkEnableOption' "curl" osCfg.enable;
options.marleyos.programs.curl.enable = lib.mkEnableOption "curl";
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -1,6 +1,6 @@
{
config,
lib,
config,
...
}: let
cfg = config.marleyos.programs.eza;

View file

@ -1,6 +1,6 @@
{
config,
lib,
config,
pkgs,
...
}: let

View file

@ -1,17 +1,15 @@
{
marleylib,
config,
osConfig,
lib,
config,
pkgs,
system,
...
}: let
inherit (marleylib.module) mkEnableOption';
inherit (lib.snowfall.system) is-linux is-darwin;
cfg = config.marleyos.programs.fish;
osCfg = osConfig.marleyos.programs.fish;
in {
options.marleyos.programs.fish.enable = mkEnableOption' "fish" osCfg.enable;
options.marleyos.programs.fish.enable = lib.mkEnableOption "fish";
config = lib.mkIf cfg.enable {
home.packages = with pkgs;
@ -33,8 +31,8 @@ in {
pax
]
# unrar-free is broken on darwin :(
++ (lib.optionals pkgs.stdenv.isLinux [unrar-free])
++ (lib.optionals pkgs.stdenv.isDarwin [unrar]);
++ (lib.optionals (is-linux system) [unrar-free])
++ (lib.optionals (is-darwin system) [unrar]);
programs.fish = {
enable = true;

View file

@ -8,11 +8,11 @@
in {
options.marleyos.programs.nemo.enable = lib.mkEnableOption "nemo";
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
nemo
];
marleycfg.apps.file-browser = pkgs.nemo;
marleyos.apps.file-browser = pkgs.nemo;
};
}

View file

@ -1,15 +1,14 @@
{
lib,
config,
pkgs,
...
}: let
cfg = config.marleyos.programs.fuzzel;
in {
options.marleyos.programs.fuzzel.enable = lib.mkEnableOption "fuzzel";
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
marleycfg.apps.launcher = {
config = lib.mkIf cfg.enable {
marleyos.apps.launcher = {
inherit (config.programs.fuzzel) package;
command = "";
};

View file

@ -0,0 +1,35 @@
{
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;
};
};
};
};
}

View file

@ -1,24 +1,19 @@
{
marleylib,
config,
osConfig,
lib,
config,
pkgs,
...
}: let
inherit (marleylib.module) mkEnableOption';
cfg = config.marleyos.programs.waybar;
osCfg = osConfig.marleyos.programs.waybar;
in {
options.marleyos.programs.waybar.enable =
mkEnableOption' "waybar" osCfg.enable;
options.marleyos.programs.waybar = {
enable = lib.mkEnableOption "waybar";
};
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
config = lib.mkIf cfg.enable {
marleyos = {
services.swaync.enable = true;
# TODO: enable once swaylock is figured out
# programs.wlogout.enable = true;
programs.wlogout.enable = true;
};
stylix.targets.waybar.addCss = false;
@ -31,10 +26,9 @@ in {
settings = let
niri =
config.programs.niri
# HM module doesn't include an enable option when imported by nixOS
# module...
# HM module doesn't include an enable option...
// {
inherit (config.marleyos.shell.niri) enable;
enable = config.marleyos.wayland.niri.enable;
};
in [
{
@ -53,16 +47,18 @@ in {
"cpu"
"memory"
];
modules-center = lib.optionals niri.enable [
modules-center =
[]
++ (lib.optionals niri.enable [
"niri/workspaces"
];
]);
modules-right =
[
"mpd"
"custom/notifications"
"tray"
]
++ (lib.optionals config.marleycfg.profiles.laptop [
++ (lib.optionals (!config.marleyos.isDesktop) [
"battery"
])
++ [
@ -75,7 +71,7 @@ in {
tooltip = false;
format = "";
on-click = let
inherit (config.marleycfg.apps) launcher;
inherit (config.marleyos.apps) launcher;
in "sleep 0.1 && ${lib.getExe launcher.package} ${launcher.command}";
};

View file

@ -8,7 +8,7 @@
in {
options.marleyos.programs.wlogout.enable = lib.mkEnableOption "wlogout";
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
config = lib.mkIf cfg.enable {
marleyos.programs.hyprlock.enable = true;
programs.wlogout = {
@ -16,10 +16,8 @@ in {
layout = let
systemctl = lib.getExe' pkgs.systemd "systemctl";
# TODO: use niri msg action quit
hyprctrl =
lib.getExe' config.wayland.windowManager.hyprland.package "hyprctrl";
# TODO: switch to swaylock
hyprlock = lib.getExe config.programs.hyprlock.package;
in [
{

View file

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

@ -1,6 +1,6 @@
{
config,
lib,
config,
pkgs,
...
}: let
@ -8,7 +8,7 @@
in {
options.marleyos.programs.xwayland-satellite.enable = lib.mkEnableOption "xwayland-satellite";
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
xwayland-satellite
];

View file

@ -0,0 +1,15 @@
{
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;
};
};
}

View file

@ -0,0 +1,60 @@
;; 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)
)

View file

@ -0,0 +1,42 @@
{
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"];
};
};
}

View file

@ -1,6 +1,6 @@
{
config,
lib,
config,
pkgs,
...
}: let

View file

@ -1,14 +1,13 @@
{
config,
lib,
pkgs,
config,
...
}: let
cfg = config.marleyos.services.swaync;
in {
options.marleyos.services.swaync.enable = lib.mkEnableOption "swaync";
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
config = lib.mkIf cfg.enable {
services.swaync = {
enable = true;

View file

@ -6,8 +6,6 @@
}: let
cfg = config.marleyos.services.syncthing;
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";
config = lib.mkIf cfg.enable {

View file

@ -8,12 +8,13 @@
in {
options.marleyos.services.udiskie.enable = lib.mkEnableOption "udiskie";
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
config = lib.mkIf cfg.enable {
services.udiskie = {
enable = true;
settings = {
program_options = {
file_manager = "${lib.getExe config.marleycfg.apps.file-browser}";
# FIXME: set default file manager in default progs mod
file_manager = "${lib.getExe pkgs.xfce.thunar}";
};
};
};

View file

@ -1,12 +1,13 @@
{
lib,
config,
pkgs,
lib,
...
}: {
options.marleyos.shell.wayland.enable = lib.mkEnableOption "wayland";
}: let
cfg = config.marleyos.wayland;
in {
options.marleyos.wayland.enable = lib.mkEnableOption "wayland";
config = lib.mkIf (config.marleyos.shell.wayland.enable && pkgs.stdenv.isLinux) {
config = lib.mkIf cfg.enable {
# Fix the "tray.target not found" error.
systemd.user.targets.tray = lib.mkIf (!config.xsession.enable) {
Unit = {

View file

@ -1,19 +1,12 @@
{
marleylib,
config,
osConfig,
lib,
pkgs,
inputs,
config,
...
}: let
inherit (marleylib.module) mkEnableOption' enabled;
cfg = config.marleyos.shell.niri;
osCfg = osConfig.marleyos.shell.niri;
cfg = config.marleyos.wayland.niri;
in {
options.marleyos.shell.niri = {
enable = mkEnableOption' "niri" osCfg.enable;
options.marleyos.wayland.niri = {
enable = lib.mkEnableOption "niri";
monitors = lib.mkOption {
type = with lib.types; nullOr (listOf str);
@ -22,22 +15,19 @@ in {
};
};
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
nixpkgs.overlays = [inputs.niri-flake.overlays.niri];
config = lib.mkIf cfg.enable {
marleyos = {
shell.wayland = enabled;
wayland.enable = true;
programs = {
waybar = enabled;
# TODO: enable once swaylock is figured out
# wlogout = enabled;
fuzzel = enabled;
xwayland-satellite = enabled;
waybar.enable = true;
wlogout.enable = true;
fuzzel.enable = true;
xwayland-satellite.enable = true;
};
services = {
gnome-keyring = enabled;
swaybg = enabled;
swaync = enabled;
swaybg.enable = true;
swaync.enable = true;
};
};
@ -58,7 +48,7 @@ in {
### Startup Programs ###
spawn-at-startup = let
inherit (config.marleycfg) apps;
inherit (config.marleyos) apps;
in [
{command = ["sh" "-c" "${lib.getExe apps.terminal} -e tmux new -s main -A"];}
(cmd (lib.getExe apps.browser))
@ -105,7 +95,7 @@ in {
};
### Screenshots ###
screenshot-path = "~/${config.xdg.userDirs.pictures}/screenshots/%Y-%m-%d %H-%M-%S.png";
screenshot-path = "~/pictures/screenshots/%Y-%m-%d %H-%M-%S.png";
### Workspaces ###
workspaces = {
@ -138,7 +128,6 @@ in {
title = "^Picture-in-Picture$";
}
{title = "^Picture in picture$";}
{title = "Bitwarden";}
];
open-floating = true;
}
@ -175,7 +164,7 @@ in {
"Ctrl+Alt+Delete".action = quit;
"Mod+Shift+Slash".action = show-hotkey-overlay;
"Mod+Return".action = spawn (lib.getExe config.marleycfg.apps.terminal);
"Mod+Return".action = spawn (lib.getExe config.marleyos.apps.terminal);
"Mod+R".action = spawn (lib.getExe config.programs.fuzzel.package);
"Mod+H".action = focus-column-or-monitor-left;

View file

@ -0,0 +1,13 @@
{
config,
lib,
...
}: let
cfg = config.marleyos.xorg;
in {
options.marleyos.xorg.enable = lib.mkEnableOption "xorg";
# config = lib.mkIf cfg.enable {
#
# };
}

View file

@ -0,0 +1,17 @@
{
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;
};
};
}