Compare commits

...

12 commits

Author SHA1 Message Date
c0c919be76
niri: config: updates 2025-06-12 20:13:12 +02:00
cbcb45221d
niri: enable if isGraphical is true 2025-06-12 20:12:52 +02:00
0e43fa97ee
hermit: configuration: set systemType to laptop 2025-06-12 20:12:31 +02:00
8f19e283d8
modules: users: add systemType and isGraphical options
systemType describes the type of a system, e.g. a laptop,
desktop or server. 

isGraphical takes this to determine whether a system needs
programs such as a compositor, graphical applications etc.
2025-06-12 20:11:08 +02:00
64db6a4d5f
kanata: fix dell-keyboard 2025-06-12 20:10:38 +02:00
6cdd9badc5
temperance: programs: drop ghostty and element-desktop 2025-06-12 20:10:32 +02:00
0cc0a28e39
hermit: programs: drop ghostty 2025-06-12 20:10:28 +02:00
64adfc6ea4
modules: ghostty: init 2025-06-12 20:09:38 +02:00
362e52b874
fish: fix atuin 2025-06-12 20:09:29 +02:00
b40df13a90
fish: remove yt-dlp 2025-06-12 20:09:18 +02:00
ffc32faed0
helix: languages: make clippy more restrictive 2025-06-12 20:08:38 +02:00
7f57ac844f
flake: bump inputs 2025-06-12 20:08:17 +02:00
13 changed files with 153 additions and 60 deletions

14
flake.lock generated
View file

@ -374,11 +374,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1749540031,
"narHash": "sha256-11k6hq/4Tao2PNBFQpSNTlFFKmKGswL17caKuZIE0sM=",
"lastModified": 1749657143,
"narHash": "sha256-3MiuAUQBo9Luk0lNzNSuomx1WMMBua2feVjXNfg9Dws=",
"owner": "hyprwm",
"repo": "hyprland",
"rev": "6bdb1f413e4c592f73d91bef33dfb202503ef7ab",
"rev": "412c7dc7f79cb6b04af41692504e82d4417e6e13",
"type": "github"
},
"original": {
@ -760,11 +760,11 @@
]
},
"locked": {
"lastModified": 1749533342,
"narHash": "sha256-cQzKzqsPQmDBRDjcX4UFEQKNeAyibLIKkF+BBhE2JnI=",
"lastModified": 1749674850,
"narHash": "sha256-5V6Jmiyg820PCLwskW6gp1sojo0F8hze6eR/xgp2d4U=",
"ref": "refs/heads/master",
"rev": "2b01a75679a03bd6557cf11c20b1588f436d6b94",
"revCount": 571,
"rev": "2a8479d635958e6c2ced68767001da4638b6f197",
"revCount": 572,
"type": "git",
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
},

View file

@ -28,7 +28,6 @@
modules = {
wms.wayland.enable = true;
desktops.hyprland.enable = false;
desktops.niri.enable = true;
theming = {
gtk.enable = true;
@ -36,6 +35,8 @@
};
system = {
systemType = "laptop";
boot = {
systemd-boot.enable = true;
lanzaboote.enable = true;

View file

@ -23,7 +23,6 @@
fselect
gcc
gh
ghostty
grc
gparted
git

View file

@ -1,5 +1,4 @@
{pkgs, ...}: let
in {
{pkgs, ...}: {
environment.systemPackages = builtins.attrValues {
inherit
(pkgs)
@ -17,11 +16,9 @@ in {
difftastic
dnsutils
devenv
element-desktop
evince
gcc
gh
ghostty
gnumake
gparted
halloy

View file

@ -5,7 +5,10 @@
}: let
inherit (builtins) elemAt;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) enum listOf str nullOr bool package;
inherit (lib.types) enum listOf str nullOr bool oneOf;
inherit (lib.lists) elem;
inherit (config.modules.system) systemType;
in {
imports = [
# configuration options for nixos activation scripts
@ -44,7 +47,7 @@ in {
users = mkOption {
type = listOf str;
default = ["charlie"];
default = ["cr"];
description = "A list of users on the system.";
};
@ -57,6 +60,23 @@ in {
'';
};
systemType = mkOption {
type = nullOr (enum ["desktop" "laptop" "server"]);
default = null;
description = ''
The type of the current system. This is used to determine whether things like graphical
environments and power-saving programs should be installed or not.
'';
};
isGraphical = mkOption {
type = bool;
default = elem systemType ["desktop" "laptop"];
description = ''
Whether the current system is a graphical system.
'';
};
yubikeySupport = {
enable = mkEnableOption "yubikey support";
deviceType = mkOption {
@ -72,6 +92,7 @@ in {
impermanence = {
enable = mkEnableOption "Enable Impermanence";
};
video = {
enable = mkEnableOption "video drivers and programs that require a graphical user interface";
nvidia = mkEnableOption "Nvidia graphics drivers";
@ -92,15 +113,6 @@ in {
default = [];
description = "A list of extra drivers to enable for printing";
};
"3d" = {
enable = mkEnableOption "3D printing suite";
extraPrograms = mkOption {
type = listOf package;
default = [];
description = "A list of extra programs to enable for 3D printing";
};
};
};
};
}

View file

@ -7,7 +7,7 @@
}: let
inherit (builtins) elemAt;
inherit (lib.options) mkOption;
inherit (lib.types) listOf str;
inherit (lib.types) listOf str package;
inherit (config.meta.mainUser) username;
in {
@ -27,6 +27,7 @@ in {
The main user for each system. This is the first element of the list of users by default.
'';
};
gitSigningKey = mkOption {
type = str;
description = ''
@ -36,9 +37,28 @@ in {
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw==
'';
};
# TODO: clean this up and move it somewhere else.
defaultShell = {
name = mkOption {
type = str;
default = "nushell";
description = ''
The default shell of a user. This is not the main system shell, but the shell used in terminals.
'';
};
package = mkOption {
type = package;
default = pkgs.nushell;
};
};
};
};
config = {
programs.zsh = {
enable = true;
enableBashCompletion = true;
};
users = {
mutableUsers = true;
users = {
@ -53,6 +73,7 @@ in {
"nix"
"docker"
];
# shell = self.packages.${pkgs.stdenv.system}.fish;
shell = pkgs.zsh;
# hashedPasswordFile = "/etc/passwords/cr";
};

View file

@ -0,0 +1,47 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.lists) elem;
inherit (lib.meta) getExe;
inherit (config.meta.mainUser.defaultShell) name package;
inherit (config.modules.style.colorScheme) slug;
# Shell integration for ghostty only supports
# bash, fish and zsh for now.
shell-integration =
if elem name ["bash" "fish" "zsh"]
then name
else "none";
ghostty-settings = pkgs.writeText "config" ''
font-family = JetBrainsMono Nerd Font Mono
window-padding-x = 8
window-padding-y = 8
background-opacity = 0.85
gtk-single-instance = true
font-size = 14
theme = ${slug}
resize-overlay-duration = 0s
cursor-style-blink = false
shell-integration = ${shell-integration}
command = ${getExe package}
'';
ghostty-wrapped = pkgs.symlinkJoin {
name = "ghostty-wrapped";
paths = [pkgs.ghostty];
nativeBuildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/ghostty --add-flags "--config-file=${ghostty-settings}"
'';
};
in {
environment.systemPackages = builtins.attrValues {
inherit ghostty-wrapped;
};
}

View file

@ -24,7 +24,7 @@ in {
};
keyboards.dell-keyboard = {
devices = ["/dev/input/by-path/usb-Dell_Dell_USB_Keyboard-event-kbd "];
devices = ["/dev/input/by-id/usb-Dell_Dell_USB_Keyboard-event-kbd"];
config = builtins.readFile (./. + "/main.kbd");
};
};

View file

@ -79,8 +79,6 @@ environment {
}
// prefer no client side decorations
prefer-no-csd
// no saving screenshots
screenshot-path null
switch-events {
lid-close {
spawn "swaylock"
@ -108,7 +106,12 @@ window-rule {
open-on-workspace "browser"
}
window-rule {
match app-id="^org\\.keepassxc\\.KeePassXC$"
match app-id="org.keepassxc.KeePassXC"
block-out-from "screen-capture"
open-on-workspace "keepassxc"
}
window-rule {
match app-id="thunderbird"
block-out-from "screen-capture"
open-on-workspace "keepassxc"
}
@ -169,7 +172,7 @@ binds {
close-window
}
Mod+H {
focus-column-left
focus-column-or-monitor-left
}
Mod+J {
focus-window-or-workspace-down
@ -178,10 +181,10 @@ binds {
focus-window-or-workspace-up
}
Mod+L {
focus-column-right
focus-column-or-monitor-right
}
Mod+Shift+H {
move-column-left
move-column-left-or-to-monitor-left
}
Mod+Shift+J {
move-window-down-or-to-workspace-down
@ -190,7 +193,7 @@ binds {
move-window-up-or-to-workspace-up
}
Mod+Shift+L {
move-column-right
move-column-right-or-to-monitor-right
}
Mod+Home {
focus-column-first
@ -405,13 +408,13 @@ binds {
toggle-overview
}
Print {
screenshot
screenshot write-to-disk=false
}
Ctrl+Print {
screenshot-screen
}
Alt+Print {
screenshot-window
screenshot write-to-disk=true
}
Mod+Escape allow-inhibiting=false {
toggle-keyboard-shortcuts-inhibit

View file

@ -7,10 +7,15 @@
inherit (lib.modules) mkForce mkIf;
inherit (lib.options) mkEnableOption;
inherit (config.modules.system) isGraphical;
cfg = config.modules.desktops.niri;
in {
options.modules.desktops.niri.enable = mkEnableOption "Niri, a scolling tiling wayland compositor";
config = mkIf cfg.enable {
config =
mkIf (cfg.enable
|| isGraphical)
{
programs.niri = {
enable = true;
package = pkgs.niri;
@ -19,7 +24,6 @@ in {
# which is something I direly want to avoid.
services.gnome.gnome-keyring.enable = mkForce false;
# set niri's config location to /etc/niri/config.kdl.
environment.etc."niri/config.kdl".source = ./config.kdl;
environment.systemPackages = builtins.attrValues {

View file

@ -8,7 +8,16 @@ pkgs.writeTextDir "${vendorConf}/blox_config.fish"
''
# source ${pkgs.fishPlugins.sponge}/share/zsh-defer/zsh-defer.plugin.zsh
${pkgs.atuin}/bin/atuin init fish | source
bind up _atuin_bind_up
${pkgs.zoxide}/bin/zoxide init fish | source
# abbr --erase cd &>/dev/null
# alias cd=__zoxide_z
# abbr --erase ci &>/dev/null
# alias ci=__zoxide_zi
${pkgs.starship}/bin/starship init fish | source
${pkgs.direnv}/bin/direnv hook fish | source
${pkgs.pay-respects}/bin/pay-respects fish --alias f --nocnf | source

View file

@ -50,7 +50,7 @@ builtins.attrValues {
wget
cpufetch
watchman
yt-dlp
# yt-dlp # borked check phase
tealdeer
hyperfine
imagemagick

View file

@ -162,7 +162,7 @@
config = {
check = {
command = "clippy";
extraArgs = ["--" "-W" "clippy::pedantic" "-W" "clippy::nursery" "-W" "clippy::perf"];
extraArgs = ["--" "-D" "clippy::pedantic" "-W" "clippy::nursery" "-W" "clippy::perf"];
};
cargo.features = "all";
};