many changes this one forgot

This commit is contained in:
Lucy Hochkamp 2025-04-04 18:42:10 +02:00
parent 67c2117563
commit 44307a3f6f
No known key found for this signature in database
22 changed files with 1081 additions and 437 deletions

292
flake.lock generated
View file

@ -1,9 +1,79 @@
{
"nodes": {
"crane": {
"locked": {
"lastModified": 1731098351,
"narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=",
"owner": "ipetkov",
"repo": "crane",
"rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"lanzaboote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
@ -33,6 +103,28 @@
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"lanzaboote",
"pre-commit-hooks-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -54,6 +146,28 @@
"type": "github"
}
},
"iamb": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs-master"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1740367006,
"narHash": "sha256-TgkKx7NCxEXR7I6AY5CJ4fNC6BEXizJs1nt6zuik9E0=",
"owner": "ulyssa",
"repo": "iamb",
"rev": "b023e38f772f167f9c3a9e7d6dc105b2bc784a8e",
"type": "github"
},
"original": {
"owner": "ulyssa",
"repo": "iamb",
"type": "github"
}
},
"kmonad": {
"inputs": {
"nixpkgs": [
@ -77,6 +191,32 @@
"url": "https://github.com/jokesper/kmonad"
}
},
"lanzaboote": {
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1737639419,
"narHash": "sha256-AEEDktApTEZ5PZXNDkry2YV2k6t0dTgLPEmAZbnigXU=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "a65905a09e2c43ff63be8c0e86a93712361f871e",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "v0.4.2",
"repo": "lanzaboote",
"type": "github"
}
},
"lix": {
"flake": false,
"locked": {
@ -93,7 +233,7 @@
},
"lix-module": {
"inputs": {
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"flakey-profile": "flakey-profile",
"lix": "lix",
"nixpkgs": [
@ -146,16 +286,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1742512142,
"narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=",
"owner": "nixos",
"lastModified": 1736320768,
"narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7105ae3957700a9646cc4b766f5815b23ed0c682",
"rev": "4bc9c909d9ac828a039f288cf872d16d38185db8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -176,18 +316,139 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1730741070,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1742512142,
"narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7105ae3957700a9646cc4b766f5815b23ed0c682",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": [
"lanzaboote",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"lanzaboote",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1731363552,
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"quadlet": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1743126528,
"narHash": "sha256-4fkwPgP7HatDWC2wntWnWekgkC7G6tNMtbUQKmNKFy4=",
"owner": "SEIAROTg",
"repo": "quadlet-nix",
"rev": "e58deae6ca4cc331139360fbec53a6245aeb8a5c",
"type": "github"
},
"original": {
"owner": "SEIAROTg",
"repo": "quadlet-nix",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"iamb": "iamb",
"kmonad": "kmonad",
"lanzaboote": "lanzaboote",
"lix-module": "lix-module",
"nix-flatpak": "nix-flatpak",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-master": "nixpkgs-master",
"quadlet": "quadlet",
"zen-browser": "zen-browser"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1743302122,
"narHash": "sha256-VWyaUfBY49kjN29N140INa9LEW0YIgAr+OEJRdbKfnQ=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "15c2a7930e04efc87be3ebf1b5d06232e635e24b",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
"lanzaboote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1731897198,
"narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "0be641045af6d8666c11c2c40e45ffc9667839b5",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@ -203,6 +464,21 @@
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": [

View file

@ -8,17 +8,25 @@
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# helix.url = "github:helix-editor/helix";
# helix.inputs.nixpkgs.follows = "nixpkgs";
quadlet.url = "github:SEIAROTg/quadlet-nix";
quadlet.inputs.nixpkgs.follows = "nixpkgs";
# software
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.2";
# Optional but recommended to limit the size of your system closure.
inputs.nixpkgs.follows = "nixpkgs";
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser.url = "github:0xc000022070/zen-browser-flake";
zen-browser.inputs.nixpkgs.follows = "nixpkgs-master";
iamb.url = "github:ulyssa/iamb";
iamb.inputs.nixpkgs.follows = "nixpkgs-master";
kmonad = {
url = "git+https://github.com/jokesper/kmonad?dir=nix&ref=feat-tap-overlap";
inputs.nixpkgs.follows = "nixpkgs";
@ -62,6 +70,8 @@
inputs.lix-module.nixosModules.default
inputs.kmonad.nixosModules.default
inputs.home-manager.nixosModules.default
inputs.lanzaboote.nixosModules.lanzaboote
inputs.quadlet.nixosModules.quadlet
]
++ (import ./modules/module-list.nix));
devShell."x86_64-linux" =

View file

@ -11,6 +11,7 @@ in
config = lib.mkIf cfg.enable {
programs.git = {
enable = true;
difftastic.enable = true;
lfs.enable = true;
# Default configs

View file

@ -0,0 +1,21 @@
{
config,
pkgs,
lib,
...
}:
{
imports = [ ./hardware-configuration.nix ];
time.timeZone = "Europe/Berlin";
services.tailscale.enable = true;
services.tailscale.useRoutingFeatures = "client";
xyno.presets.cli.enable = true;
xyno.presets.home-manager.enable = true;
xyno.system.user.enable = true;
xyno.networking.networkd = {
enable = true;
};
system.stateVersion = "24.11";
}

View file

@ -0,0 +1,5 @@
{
modules = [ ./configuration.nix ];
system = "x86_64-linux";
hostName = "ds9";
}

View file

@ -0,0 +1,51 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ "${modulesPath}/installer/scan/not-detected.nix" ];
boot.initrd.availableKernelModules = [ "r8169" "ahci" "vfio-pci" "xhci_pci" "ehci_pci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
boot.kernelModules = [ "kvm-amd" ];
nix.settings.max-jobs = lib.mkDefault 12;
powerManagement.powertop.enable = true;
powerManagement.cpuFreqGovernor = "powersave";
powerManagement.scsiLinkPolicy = "min_power";
services.zfs.autoScrub.enable = true;
services.sanoid.datasets."rpool/content/safe/data/media" = { };
services.sanoid.enable = true;
services.sanoid.interval = "0/8:00:00";
swapDevices = [{ device = "/dev/disk/by-id/nvme-eui.000000000000000100a075202c247839-part1"; randomEncryption = true; }];
fileSystems."/boot".device = "/dev/disk/by-uuid/149F-23AA";
fileSystems."/" = {
device = "spool/safe/persist";
fsType = "zfs";
};
fileSystems."/nix" = {
device = "spool/local/nix";
fsType = "zfs";
};
fileSystems."/var/log" = {
device = "spool/local/journal";
fsType = "zfs";
};
fileSystems."/data" = {
device = "rpool/content/safe/data";
fsType = "zfs";
};
fileSystems."/data/media" = {
device = "rpool/content/safe/data/media";
fsType = "zfs";
};
fileSystems."/backups" = {
device = "rpool/content/local/backups";
fsType = "zfs";
};
}

View file

@ -1,6 +1,7 @@
{
config,
pkgs,
inputs,
lib,
...
}:
@ -11,7 +12,8 @@
{ ... }:
{
xyno.git.enable = true;
home.packages = [ # work
home.packages = [
# work
pkgs.jetbrains.rider
(pkgs.firefox-devedition.overrideAttrs (super: self: { meta.priority = 1; }))
];
@ -20,7 +22,7 @@
enable = true;
packages = [
"com.unicornsonlsd.finamp"
"io.github.softfever.OrcaSlicer"
# "io.github.softfever.OrcaSlicer"
"io.anytype.anytype"
"org.bionus.Grabber"
"org.getmonero.Monero"
@ -34,6 +36,14 @@
};
}
);
environment.systemPackages = with pkgs; [
aerc
jabref
inputs.iamb.packages.${pkgs.system}.default
(pkgs.writeShellScriptBin "sudo" "run0 $@")
];
time.timeZone = "Europe/Berlin";
services.tailscale.enable = true;
services.tailscale.useRoutingFeatures = "client";
@ -43,10 +53,15 @@
xyno.presets.gui.enable = true;
xyno.presets.home-manager.enable = true;
xyno.system.user.enable = true;
xyno.user-services.syncthing = {
enable = true;
tray = true;
};
xyno.networking.networkd = {
enable = true;
enableWifi = true;
};
xyno.desktop.fcitx5.enable = true;
hardware.bluetooth.enable = true;
services.blueman.enable = true;
services.power-profiles-daemon.enable = true;
@ -54,4 +69,5 @@
services.flatpak.enable = true;
system.stateVersion = "24.11";
programs.nh.enable = true;
}

View file

@ -24,7 +24,12 @@
"usbhid"
"sd_mod"
];
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
boot.initrd.luks.devices.cryptroot.device =
"/dev/disk/by-uuid/4cd8dbb3-8eea-48ff-87b1-92945be291ac";

View file

@ -23,10 +23,19 @@ in
environment.systemPackages = with pkgs; [
fishPlugins.grc
grc
fzf # needed for reverse history search
];
programs.direnv.enableFishIntegration = true;
programs.fish.interactiveShellInit = ''
set -g fish_key_bindings fish_vi_key_bindings
function y
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
end
'';
programs.fish.enable = true;
};

View file

@ -42,7 +42,6 @@ in
libreoffice-qt6-fresh
inkscape
easyeffects
dune3d
appimage-run
unstable.keepassxc
inputs.zen-browser.packages."${pkgs.system}".default

View file

@ -0,0 +1,27 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.xyno.desktop.fcitx5;
in
{
options.xyno.desktop.fcitx5.enable = lib.mkEnableOption "enable fcitx5 input daemon thing";
config = lib.mkIf cfg.enable {
i18n.inputMethod = {
type = "fcitx5";
enable = true;
fcitx5.addons = with pkgs; [
fcitx5-table-other
];
fcitx5.waylandFrontend = true;
fcitx5.quickPhrase = {
":pleading:" = "🥺";
":pointing_right:" = "👉";
":pointing_left:" = "👈";
};
};
};
}

39
modules/desktop/foot.nix Normal file
View file

@ -0,0 +1,39 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.xyno.desktop.foot;
in
{
options.xyno.desktop.foot.enable = lib.mkEnableOption "enable foot terminal emulator";
options.xyno.desktop.foot.wantedBy = lib.mkOption {
type = lib.types.str;
default = "niri.service";
};
options.xyno.desktop.foot.package= lib.mkOption {
type = lib.types.package;
default = pkgs.foot;
};
config = lib.mkIf cfg.enable {
# should be socket activated tm
# systemd.user.services.foot.wantedBy = lib.mkForce [ cfg.wantedBy ];
# systemd.user.sockets.foot.wantedBy = lib.mkForce [ cfg.wantedBy ];
systemd.packages = [ cfg.package ];
programs.foot = {
enable = true;
package = cfg.package;
theme = "gruvbox-dark";
settings = {
main = {
font = "JetBrainsMono Nerd Font:size=11";
};
scrollback = {
lines = 100000;
};
};
};
};
}

View file

@ -0,0 +1,32 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.xyno.desktop.mate-polkit;
in
{
options.xyno.desktop.mate-polkit.enable = lib.mkEnableOption "enable mate-polkit as the gui polkit thing";
options.xyno.desktop.mate-polkit.wantedBy = lib.mkOption {
type = lib.types.str;
default = "niri.service";
};
options.xyno.desktop.mate-polkit.package = lib.mkOption {
type = lib.types.package;
default = pkgs.mate.mate-polkit; # we're using mate polkit as it seems to be the only maintained gtk polkit thing (and we're using all the other gtk shit anyways)
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.user.services.mate-polkit = {
unitConfig.PartOf = "graphical-session.target";
unitConfig.After = "graphical-session.target";
unitConfig.Requisite = "graphical-session.target";
serviceConfig.Restart = "on-failure";
wantedBy = [ cfg.wantedBy ];
script = "${cfg.package}/libexec/polkit-mate-authentication-agent-1";
};
};
}

View file

@ -31,6 +31,7 @@ in
shikane.enable = lib.mkDefault true;
swayidle.enable = lib.mkDefault true;
wpaperd.enable = lib.mkDefault true;
foot.enable = lib.mkDefault true;
};
home-manager.users.${config.xyno.system.user.name} =
lib.mkIf config.xyno.presets.home-manager.enable
@ -56,7 +57,8 @@ in
# prompt=>
icon-theme=hicolor
icons-enabled=yes
fuzzy=yes
match-mode=fuzzy
launch-prefix=systemd-run --user --scope
width=80
horizontal-pad=10
vertical-pad=10
@ -74,6 +76,7 @@ in
width=2
radius=3
'';
environment.etc."niri/config.kdl".mode = "444"; # copy file so niri detects changes
environment.etc."niri/config.kdl".text = ''
// xwayland
spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
@ -83,7 +86,10 @@ in
// keybinds
binds {
Mod+D { spawn "fuzzel"; }
Mod+T { spawn "alacritty"; }
Mod+Alt+L { spawn "lock"; }
Mod+T { spawn "footclient"; }
Mod+Y { spawn "footclient yazi"; }
Mod+P { spawn "keepassxc"; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
@ -206,15 +212,15 @@ in
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+Ctrl+1 { move-column-to-workspace 1; }
Mod+Ctrl+2 { move-column-to-workspace 2; }
Mod+Ctrl+3 { move-column-to-workspace 3; }
Mod+Ctrl+4 { move-column-to-workspace 4; }
Mod+Ctrl+5 { move-column-to-workspace 5; }
Mod+Ctrl+6 { move-column-to-workspace 6; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Ctrl+9 { move-column-to-workspace 9; }
Mod+Shift+1 { move-column-to-workspace 1; }
Mod+Shift+2 { move-column-to-workspace 2; }
Mod+Shift+3 { move-column-to-workspace 3; }
Mod+Shift+4 { move-column-to-workspace 4; }
Mod+Shift+5 { move-column-to-workspace 5; }
Mod+Shift+6 { move-column-to-workspace 6; }
Mod+Shift+7 { move-column-to-workspace 7; }
Mod+Shift+8 { move-column-to-workspace 8; }
Mod+Shift+9 { move-column-to-workspace 9; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+1 { move-window-to-workspace 1; }
@ -304,18 +310,21 @@ in
Super+Backslash { focus-workspace "scratchpad"; }
}
layout {
gaps 4
gaps 12
shadow {
on
}
tab-indicator {
hide-when-single-tab
position "top"
place-within-column
width 8
gap 8
}
}
prefer-no-csd
// scratchpad
workspace "scratchpad"
// workspace "scratchpad"
screenshot-path "~/Pictures/screenshots/screenshot-%Y-%m-%d %H-%M-%S.png"
@ -346,7 +355,7 @@ in
match app-id="KeePassXC"
open-floating true
open-on-workspace "scratchpad"
// open-on-workspace "scratchpad"
block-out-from "screencast"
}
// Block out mako notifications from screencasts.
@ -360,16 +369,26 @@ in
// This app-id regular expression will work for both:
// - host Firefox (app-id is "firefox")
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
match title="Picture-in-Picture"
open-floating true
}
// Place steam notifications in the bottom right
window-rule {
match app-id="steam" title="^notificationtoasts_[\\d]+_desktop$"
default-floating-position x=o y=o relative-to="bottom-right"
}
input {
workspace-auto-back-and-forth
focus-follows-mouse
keyboard {
xkb {
layout "eu"
}
}
touchpad {
tap
natural-scroll
// natural-scroll
}
}
// autogenerated from here on

View file

@ -23,11 +23,16 @@ in
};
options.xyno.desktop.swayidle.swaylockArgs = lib.mkOption {
type = lib.types.str;
default = "-f --fade-in 2 --clock --timestr %T%z --datestr %F -i /home/${config.xyno.system.user.name}/Pictures/background.jpg";
default = "-f -F --clock --timestr %T --datestr %F --indicator -i /home/${config.xyno.system.user.name}/Pictures/background.jpg";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with cfg; [ package swaylockPackage ];
environment.systemPackages = with cfg; [ package swaylockPackage (
pkgs.writeScriptBin "lock" ''
#!/${pkgs.bash}/bin/bash
${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs} "$@"
''
) ];
systemd.user.services.swayidle = {
unitConfig.PartOf = "graphical-session.target";
unitConfig.After = "graphical-session.target";

View file

@ -6,38 +6,13 @@
}:
let
cfg = config.xyno.desktop.waybar;
in
{
options.xyno.desktop.waybar.enable = lib.mkEnableOption "enable mako notification daemon";
options.xyno.desktop.waybar.wantedBy = lib.mkOption {
type = lib.types.str;
default = "niri.service";
};
options.xyno.desktop.waybar.package = lib.mkOption {
type = lib.types.package;
default = pkgs.unstable.waybar;
};
options.xyno.desktop.waybar.mode = lib.mkOption {
type = lib.types.str;
default = "niri";
};
config = lib.mkIf cfg.enable {
programs.waybar.enable = true;
programs.waybar.package = cfg.package;
programs.light.enable = true;
systemd.user.services.waybar.wantedBy = lib.mkForce [ cfg.wantedBy ];
systemd.user.services.waybar.restartTriggers = [ "/etc/xdg/waybar/config" "/etc/xdg/waybar/style.css" ];
environment.etc."xdg/waybar/config".source =
let
json = pkgs.formats.json { };
in
(json.generate "waybar-config.json" {
waybarCfg = {
layer = "top";
position = "top";
height = 15;
modules-left = (lib.optionals (cfg.mode == "river") [
modules-left =
(lib.optionals (cfg.mode == "river") [
"river/tags"
"river/layout"
"river/window"
@ -48,10 +23,10 @@ in
]);
modules-right = [
"tray"
"power_profiles_daemon"
"idle_inhibitor"
"wireplumber"
"battery"
"power-profiles-daemon"
"backlight"
"cpu"
"temperature"
@ -60,6 +35,17 @@ in
"network"
"clock"
];
"power-profiles-daemon" = {
format = "{icon} ";
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
tooltip = true;
format-icons = {
"default" = "";
"performance" = "";
"balanced" = "";
"power-saver" = "";
};
};
"river/window" = {
max-length = 40;
};
@ -169,8 +155,10 @@ in
"tooltip-format-disconnected" = "Disconnected";
"max-length" = 50;
};
});
environment.etc."xdg/waybar/style.css".text = ''
};
waybarCfgFile = json.generate "waybar-config.json" waybarCfg;
waybarStyleCss = ''
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: "Source Sans Pro Nerd Font";
@ -425,5 +413,35 @@ in
background: rgba(0, 0, 0, 0.2);
}
'';
waybarCssFile = pkgs.writeText "waybar.css" waybarStyleCss;
in
{
options.xyno.desktop.waybar.enable = lib.mkEnableOption "enable mako notification daemon";
options.xyno.desktop.waybar.wantedBy = lib.mkOption {
type = lib.types.str;
default = "niri.service";
};
options.xyno.desktop.waybar.package = lib.mkOption {
type = lib.types.package;
default = pkgs.unstable.waybar;
};
options.xyno.desktop.waybar.mode = lib.mkOption {
type = lib.types.str;
default = "niri";
};
config = lib.mkIf cfg.enable {
programs.waybar.enable = true;
programs.waybar.package = cfg.package;
programs.light.enable = true;
systemd.user.services.waybar.wantedBy = lib.mkForce [ cfg.wantedBy ];
systemd.user.services.waybar.restartTriggers = [
waybarCfgFile
waybarCssFile
];
environment.etc."xdg/waybar/config".source = waybarCfgFile;
environment.etc."xdg/waybar/style.css".source = waybarCssFile;
};
}

View file

@ -25,6 +25,7 @@ in
default = pkgs.wpaperd;
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.user.services.wpaperd = {
unitConfig.PartOf = "graphical-session.target";
unitConfig.After = "graphical-session.target";

View file

@ -3,7 +3,10 @@
./cli/starship.nix
./desktop/audio.nix
./desktop/common-programs.nix
./desktop/fcitx5.nix
./desktop/foot.nix
./desktop/mako.nix
./desktop/mate-polkit.nix
./desktop/niri.nix
./desktop/shikane.nix
./desktop/swayidle.nix
@ -15,5 +18,6 @@
./presets/gui.nix
./presets/home-manager.nix
./system/user.nix
./user-services/syncthing.nix
]

View file

@ -16,13 +16,19 @@ in
security.sudo.enable = false;
nix.settings = {
trusted-users = lib.mkDefault [ "root" "@wheel" ];
allowed-users = lib.mkDefault [ "root" "@wheel" ];
trusted-users = lib.mkDefault [
"root"
"@wheel"
];
allowed-users = lib.mkDefault [
"root"
"@wheel"
];
auto-optimise-store = true;
};
nix.extraOptions = "experimental-features = nix-command flakes";
programs.nh.enable = true;
programs.direnv = {
enable = true;
nix-direnv.enable = true;
@ -31,13 +37,25 @@ in
# https://github.com/NixOS/nixpkgs/issues/361592 needed for run0
security.pam.services.systemd-run0 = { };
programs.tmux.enable = true;
programs.yazi = {
enable = true;
};
environment.systemPackages = with pkgs; [
jq
fd
bottom
htop
imagemagick
bat
ffmpeg
poppler
w3m
curl
aria2
fzf
file
git
neofetch
@ -45,6 +63,9 @@ security.pam.services.systemd-run0 = {};
pv
yt-dlp
helix
lm_sensors
dig
(pkgs.writeShellScriptBin "sudo" "run0 $@")
];
programs.mosh.enable = true;
environment.variables.EDITOR = "hx";
@ -52,6 +73,7 @@ security.pam.services.systemd-run0 = {};
environment.shellAliases = {
l = "ls -al";
n = "yazi";
gc = "git commit -v";
gpl = "git pull";
gd = "git diff";

View file

@ -9,9 +9,14 @@ let
in
{
options.xyno.presets.gui.enable = lib.mkEnableOption "enables xynos gui config";
options.xyno.presets.gui.terminalEmulator = lib.mkOption {
type = lib.types.str;
default = "alacritty";
};
config = lib.mkIf cfg.enable {
xyno.desktop.niri.enable = true;
xyno.desktop.audio.enable = lib.mkDefault true;
xyno.desktop.mate-polkit.enable = true;
xyno.hardware.kmonad.enable = true;
# wayland on electron
environment.sessionVariables.NIXOS_OZONE_WL = "1";
@ -23,6 +28,12 @@ in
# ssh agent
programs.ssh.startAgent = true;
qt = {
enable = true;
style = "breeze";
platformTheme = "kde";
};
# setup printing
services.avahi = {
enable = true;
@ -40,6 +51,42 @@ in
services.gnome.gnome-settings-daemon.enable = true;
services.gvfs.enable = true;
home-manager.users.${config.xyno.system.user.name} =
{ pkgs, ... }:
{
xdg.desktopEntries.nemo = {
name = "Nemo";
exec = "${pkgs.nemo-with-extensions}/bin/nemo";
};
xdg.mimeApps = {
enable = true;
defaultApplications = {
"inode/directory" = [ "nemo.desktop" ];
"application/x-gnome-saved-search" = [ "nemo.desktop" ];
"x-scheme-handler/http" = "userapp-Zen-D2P132.desktop";
"x-scheme-handler/https" = "userapp-Zen-D2P132.desktop";
"x-scheme-handler/chrome" = "userapp-Zen-D2P132.desktop";
"text/html" = "userapp-Zen-D2P132.desktop";
"application/x-extension-htm" = "userapp-Zen-D2P132.desktop";
"application/x-extension-html" = "userapp-Zen-D2P132.desktop";
"application/x-extension-shtml" = "userapp-Zen-D2P132.desktop";
"application/xhtml+xml" = "userapp-Zen-D2P132.desktop";
"application/x-extension-xhtml" = "userapp-Zen-D2P132.desktop";
"application/x-extension-xht" = "userapp-Zen-D2P132.desktop";
"application/pdf" = "org.gnome.Evince.desktop";
};
};
};
environment.systemPackages = with pkgs; [
nemo-with-extensions
kdePackages.breeze-gtk
kdePackages.breeze.qt5
kdePackages.breeze
kdePackages.breeze-icons
];
# fonts
fonts.packages = with pkgs; [
nerdfonts

View file

@ -0,0 +1,9 @@
{ pkgs, lib, config, ... }:
let cfg = config.xyno.services.authentik; in
{
options.xyno.services.authentik.enable = lib.mkEnableOption "enables the authentik SSO thing";
config = lib.mkIf cfg.enable {
};
}

View file

@ -0,0 +1,28 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.xyno.user-services.syncthing;
in
{
options.xyno.user-services.syncthing.enable = lib.mkEnableOption "enable syncthing as user/with gui";
options.xyno.user-services.syncthing.wantedBy = lib.mkOption {
type = lib.types.str;
default = "niri.service";
};
options.xyno.user-services.syncthing.tray = lib.mkEnableOption "add syncthingtray";
config = lib.mkIf cfg.enable {
services.syncthing = {
systemService = false;
enable = true;
openDefaultPorts = true;
};
environment.systemPackages = lib.optionals cfg.tray [ pkgs.syncthingtray ];
systemd.packages = lib.optionals cfg.tray [ pkgs.syncthingtray ];
systemd.user.services.syncthing.wantedBy = [ cfg.wantedBy ];
};
}