Compare commits
7 commits
b30f6e22a6
...
32f419cdb1
Author | SHA1 | Date | |
---|---|---|---|
32f419cdb1 | |||
a344b8fcf6 | |||
d5141091bd | |||
3a26b31226 | |||
ed3384b223 | |||
b13a75f429 | |||
47e12fd9c9 |
9 changed files with 192 additions and 186 deletions
38
flake.in.nix
38
flake.in.nix
|
@ -6,23 +6,20 @@
|
|||
#?? nix run .#genflake flake.nix
|
||||
# TODO: Remove flakegen hook when nix expressions are officially implemented
|
||||
# https://github.com/NixOS/nix/issues/3966
|
||||
|
||||
{
|
||||
# https://wiki.nixos.org/wiki/Flakes
|
||||
# https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake.html
|
||||
inputs =
|
||||
let
|
||||
flake = url: { inherit url; };
|
||||
follows = input: { inputs.${input}.follows = input; };
|
||||
stable = input: { inputs.${input}.follows = "${input}-stable"; };
|
||||
unstable = input: { inputs.${input}.follows = "${input}-unstable"; };
|
||||
inputs = let
|
||||
flake = url: {inherit url;};
|
||||
follows = input: {inputs.${input}.follows = input;};
|
||||
stable = input: {inputs.${input}.follows = "${input}-stable";};
|
||||
unstable = input: {inputs.${input}.follows = "${input}-unstable";};
|
||||
|
||||
source = url: {
|
||||
inherit url;
|
||||
flake = false;
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
#?? branch = "git+https://REPO?ref=BRANCH"
|
||||
#?? commit = "git+https://REPO?ref=BRANCH&rev=COMMIT"
|
||||
#?? tag = "git+https://REPO?ref=refs/tags/TAG"
|
||||
|
@ -88,8 +85,8 @@
|
|||
nixpkgs-staging-next = flake "github:NixOS/nixpkgs/staging-next";
|
||||
|
||||
### Development
|
||||
nixpkgs-local = flake "git+file:///home/myned/.dev/nixpkgs?ref=7849cd48822de4dc0515c787b20dc85de30acdca";
|
||||
#// hyprland = flake "git+file:///home/myned/.dev/Hyprland?submodules=1";
|
||||
nixpkgs-local = flake "git+file:///home/myned/SYNC/dev/repo/nixpkgs";
|
||||
#// hyprland = flake "git+file:///home/myned/SYNC/dev/repo/Hyprland?submodules=1";
|
||||
|
||||
### Source code
|
||||
firefox-gnome-theme = source "github:rafaelmardojai/firefox-gnome-theme/v128";
|
||||
|
@ -106,15 +103,13 @@
|
|||
# https://github.com/kamadorueda/alejandra/blob/main/STYLE.md
|
||||
formatter.x86_64-linux = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux.alejandra;
|
||||
|
||||
nixosConfigurations =
|
||||
let
|
||||
nixosConfigurations = let
|
||||
# TODO: Use inline modules instead of specialArgs
|
||||
# https://jade.fyi/blog/flakes-arent-real#nixos-modules
|
||||
# Boilerplate systems with global imports
|
||||
#!! There is no default nixpkgs, inputs.<nixpkgs|home-manager>-BRANCH must exist
|
||||
#?? branch = common "BRANCH" "ARCHITECTURE" [ MODULES ]
|
||||
common =
|
||||
branch: arch: modules:
|
||||
common = branch: arch: modules:
|
||||
inputs."nixpkgs-${branch}".lib.nixosSystem {
|
||||
system = arch;
|
||||
|
||||
|
@ -125,16 +120,20 @@
|
|||
# TODO: Clean up optional attributes with each new release
|
||||
#!! Options will diverge between branches over time
|
||||
#?? with lib; optionalAttrs (versionAtLeast version "VERSION") { ... };
|
||||
modules = modules ++ [
|
||||
modules =
|
||||
modules
|
||||
++ [
|
||||
./options
|
||||
./configuration.nix
|
||||
|
||||
#!! Avoid globally importing modules that are not guarded by .enable
|
||||
# https://github.com/NixOS/nixpkgs/issues/137168
|
||||
(
|
||||
{ config, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs."aagl-gtk-on-nix-${branch}".nixosModules.default
|
||||
inputs."home-manager-${branch}".nixosModules.home-manager
|
||||
|
@ -157,8 +156,7 @@
|
|||
#?? system = branch "ARCHITECTURE" [ MODULES ]
|
||||
stable = arch: modules: common "stable" "${arch}-linux" modules;
|
||||
unstable = arch: modules: common "unstable" "${arch}-linux" modules;
|
||||
in
|
||||
{
|
||||
in {
|
||||
### Stable
|
||||
myarm = stable "aarch64" [
|
||||
./profiles/server
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
url = "github:nix-community/nixd";
|
||||
};
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
nixpkgs-local.url = "git+file:///home/myned/.dev/nixpkgs?ref=7849cd48822de4dc0515c787b20dc85de30acdca";
|
||||
nixpkgs-local.url = "git+file:///home/myned/SYNC/dev/repo/nixpkgs";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
nixpkgs-staging-next.url = "github:NixOS/nixpkgs/staging-next";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
|
|
@ -10,10 +10,20 @@
|
|||
height = 1440;
|
||||
};
|
||||
|
||||
boot.kernelParams = [
|
||||
boot = {
|
||||
# Enable hibernation with a swapfile on btrfs
|
||||
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
|
||||
#?? findmnt -no UUID -T /swap/swapfile
|
||||
resumeDevice = "/dev/disk/by-uuid/5df5028b-a3ba-4f07-80ef-fd5abd542a81";
|
||||
|
||||
kernelParams = [
|
||||
#?? sudo btrfs inspect-internal map-swapfile -r /swap/swapfile
|
||||
"resume_offset=533760"
|
||||
|
||||
# https://gitlab.freedesktop.org/drm/amd/-/issues/2516#note_2119750
|
||||
#// "gpu_sched.sched_policy=0" # Attempt to fix stutter
|
||||
];
|
||||
};
|
||||
|
||||
# _._ _,-'""`-._
|
||||
# (,-.`._,'( |\`-/|
|
||||
|
|
|
@ -55,14 +55,14 @@ in
|
|||
|
||||
services.keyd.keyboards.default.settings.main.rightcontrol = "layer(altgr)"; # No Ctrl_R
|
||||
|
||||
boot = {
|
||||
# Enable hibernation with a swapfile on btrfs
|
||||
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
|
||||
#?? findmnt -no UUID -T /swap/swapfile
|
||||
#?? sudo btrfs inspect-internal map-swapfile -r /swap/swapfile
|
||||
boot = {
|
||||
resumeDevice = "/dev/disk/by-uuid/f9416347-eff5-45d5-8dc3-93414c11ba6f";
|
||||
|
||||
kernelParams = [
|
||||
#?? sudo btrfs inspect-internal map-swapfile -r /swap/swapfile
|
||||
"resume_offset=533760"
|
||||
|
||||
# Fix battery drain with suspend-then-hibernate
|
||||
|
|
|
@ -114,7 +114,7 @@ in {
|
|||
(key "Backspace" "Super" "changegroupactive" "f")
|
||||
(key "Backspace" "Super+Ctrl" "togglegroup" null)
|
||||
(key "Backspace" "Super+Ctrl+Shift" "lockactivegroup" "toggle")
|
||||
(key "Backspace" "Super+Shift" "changegroupactive" "b")
|
||||
(key "Backspace" "Super+Shift" "movegroupwindow" null)
|
||||
(key "Bracketleft" "Super" "layoutmsg" "orientationprev")
|
||||
(key "Bracketleft" "Super+Shift" "splitratio" "-0.1")
|
||||
(key "Bracketright" "Super" "layoutmsg" "orientationnext")
|
||||
|
@ -124,12 +124,14 @@ in {
|
|||
#// (key "Delete" "Super" "exec" "left")
|
||||
|
||||
(key "Delete" "Super+Shift" "exec" "vrr")
|
||||
(key "Down" "Super" "movewindoworgroup" "d")
|
||||
(key "Down" "Super" "movewindow" "d")
|
||||
(key "Down" "Super+Shift" "movewindoworgroup" "d")
|
||||
(key "Equal" "Super" "exec" "audio Normalizer")
|
||||
(key "Escape" "Super" "togglefloating" null)
|
||||
(key "Escape" "Super+Alt" "exec" "lifx state --color red")
|
||||
(key "Escape" "Super+Shift" "centerwindow" null)
|
||||
(key "Left" "Super" "movewindoworgroup" "l")
|
||||
(key "Left" "Super" "movewindow" "l")
|
||||
(key "Left" "Super+Shift" "movewindoworgroup" "l")
|
||||
(key "Minus" "Super" "exec" "audio")
|
||||
(key "Print" "Shift" "exec" "screenshot -d")
|
||||
(key "Print" "Super" "exec" "screenshot -e")
|
||||
|
@ -137,7 +139,8 @@ in {
|
|||
(key "Print" null "exec" "screenshot")
|
||||
(key "Return" "Super" "fullscreen" "1") # Maximize
|
||||
(key "Return" "Super+Shift" "fullscreen" "0") # Fullscreen
|
||||
(key "Right" "Super" "movewindoworgroup" "r")
|
||||
(key "Right" "Super" "movewindow" "r")
|
||||
(key "Right" "Super+Shift" "movewindoworgroup" "r")
|
||||
(key "Space" "Ctrl" "exec" (concatStringsSep " " [
|
||||
"toggle"
|
||||
"--focus"
|
||||
|
@ -155,56 +158,57 @@ in {
|
|||
"--workspace special:pip"
|
||||
]))
|
||||
(key "Space" "Super" "togglespecialworkspace" "scratchpad")
|
||||
(key "Space" "Super+Ctrl" "movetoworkspacesilent" "special:scratchpad")
|
||||
(key "Space" "Super+Shift" "movetoworkspacesilent" "special:scratchpad")
|
||||
(key "Tab" "Super" "cyclenext" "tiled")
|
||||
(key "Tab" "Super+Shift" "alterzorder" "top")
|
||||
(key "Tab" "Super+Shift" "cyclenext" "floating")
|
||||
(key "Up" "Super" "movewindoworgroup" "u")
|
||||
(key "Up" "Super" "movewindow" "u")
|
||||
(key "Up" "Super+Shift" "movewindoworgroup" "u")
|
||||
|
||||
(key "0" "Super" "workspace" "10")
|
||||
(key "0" "Super+Ctrl" "movetoworkspacesilent" "10")
|
||||
(key "0" "Super+Shift" "movetoworkspacesilent" "10")
|
||||
(key "1" "Ctrl+Alt" "exec" "lifx state --brightness 0.01")
|
||||
(key "1" "Super" "workspace" "1")
|
||||
(key "1" "Super+Alt" "exec" "lifx state --kelvin 1500")
|
||||
(key "1" "Super+Ctrl" "movetoworkspacesilent" "1")
|
||||
(key "1" "Super+Shift" "movetoworkspacesilent" "1")
|
||||
(key "2" "Ctrl+Alt" "exec" "lifx state --brightness 0.25")
|
||||
(key "2" "Super" "workspace" "2")
|
||||
(key "2" "Super+Alt" "exec" "lifx state --kelvin 2500")
|
||||
(key "2" "Super+Ctrl" "movetoworkspacesilent" "2")
|
||||
(key "2" "Super+Shift" "movetoworkspacesilent" "2")
|
||||
(key "3" "Ctrl+Alt" "exec" "lifx state --brightness 0.50")
|
||||
(key "3" "Super" "workspace" "3")
|
||||
(key "3" "Super+Alt" "exec" "lifx state --kelvin 3000")
|
||||
(key "3" "Super+Ctrl" "movetoworkspacesilent" "3")
|
||||
(key "3" "Super+Shift" "movetoworkspacesilent" "3")
|
||||
(key "4" "Ctrl+Alt" "exec" "lifx state --brightness 0.75")
|
||||
(key "4" "Super" "workspace" "4")
|
||||
(key "4" "Super+Alt" "exec" "lifx state --kelvin 4000")
|
||||
(key "4" "Super+Ctrl" "movetoworkspacesilent" "4")
|
||||
(key "4" "Super+Shift" "movetoworkspacesilent" "4")
|
||||
(key "5" "Ctrl+Alt" "exec" "lifx state --brightness 1.00")
|
||||
(key "5" "Super" "workspace" "5")
|
||||
(key "5" "Super+Alt" "exec" "lifx state --kelvin 5000")
|
||||
(key "5" "Super+Ctrl" "movetoworkspacesilent" "5")
|
||||
(key "5" "Super+Shift" "movetoworkspacesilent" "5")
|
||||
(key "6" "Super" "workspace" "6")
|
||||
(key "6" "Super+Ctrl" "movetoworkspacesilent" "6")
|
||||
(key "6" "Super+Shift" "movetoworkspacesilent" "6")
|
||||
(key "7" "Super" "workspace" "7")
|
||||
(key "7" "Super+Ctrl" "movetoworkspacesilent" "7")
|
||||
(key "7" "Super+Shift" "movetoworkspacesilent" "7")
|
||||
(key "8" "Super" "workspace" "8")
|
||||
(key "8" "Super+Ctrl" "movetoworkspacesilent" "8")
|
||||
(key "8" "Super+Shift" "movetoworkspacesilent" "8")
|
||||
(key "9" "Super" "workspace" "9")
|
||||
(key "9" "Super+Ctrl" "movetoworkspacesilent" "9")
|
||||
(key "9" "Super+Shift" "movetoworkspacesilent" "9")
|
||||
(key "A" "Ctrl+Alt" "exec" "${waydroid} session stop")
|
||||
(key "A" "Super" "togglespecialworkspace" "android")
|
||||
(key "A" "Super+Ctrl" "movetoworkspacesilent" "android")
|
||||
(key "A" "Super+Shift" "movetoworkspacesilent" "android")
|
||||
(key "B" "Super" "exec" "[group new lock; tile] ${firefox-esr}")
|
||||
(key "C" "Super" "exec" codium)
|
||||
(key "E" "Super" "exec" gnome-text-editor)
|
||||
(key "F" "Super" "exec" nautilus)
|
||||
(key "G" "Super" "workspace" "name:game")
|
||||
(key "G" "Super+Alt" "workspace" "name:gamescope")
|
||||
(key "G" "Super+Ctrl" "movetoworkspacesilent" "name:game")
|
||||
(key "G" "Super+Shift" "movetoworkspacesilent" "name:game")
|
||||
(key "G" "Super+Ctrl+Alt" "exec" "${pkill} gamescope")
|
||||
(key "K" "Super" "exec" obsidian)
|
||||
(key "M" "Super" "togglespecialworkspace" "music")
|
||||
(key "M" "Super+Ctrl" "movetoworkspacesilent" "music")
|
||||
(key "M" "Super+Shift" "movetoworkspacesilent" "music")
|
||||
(key "O" "Super" "togglespecialworkspace" "office")
|
||||
(key "P" "Super" "exec" "${hyprpicker} --autocopy")
|
||||
(key "P" "Super+Shift" "exec" "${hyprpicker} --autocopy --format rgb")
|
||||
|
@ -213,11 +217,11 @@ in {
|
|||
(key "Q" "Super" "killactive" null)
|
||||
(key "S" "Ctrl+Alt" "exec" "${pkill} steam")
|
||||
(key "S" "Super" "togglespecialworkspace" "steam")
|
||||
(key "S" "Super+Ctrl" "movetoworkspacesilent" "steam")
|
||||
(key "S" "Super+Shift" "movetoworkspacesilent" "steam")
|
||||
(key "S" "Super+Shift" "exec" steam)
|
||||
(key "T" "Ctrl+Alt" "exec" "${pkill} kitty")
|
||||
(key "T" "Super" "togglespecialworkspace" "terminal")
|
||||
(key "T" "Super+Ctrl" "movetoworkspacesilent" "terminal")
|
||||
(key "T" "Super+Shift" "movetoworkspacesilent" "terminal")
|
||||
(key "T" "Super+Shift" "exec" kitty)
|
||||
(key "V" "Super" "exec" "${kitty} --app-id clipboard --override font_size=12 ${clipse}")
|
||||
(key "V" "Super+Shift" "exec" "${clipse} -clear && ${notify-send} clipse 'Clipboard cleared' --urgency low")
|
||||
|
@ -227,12 +231,12 @@ in {
|
|||
then "/scale:140 +f"
|
||||
else ""
|
||||
}")
|
||||
(key "W" "Super+Ctrl" "movetoworkspacesilent" "vm")
|
||||
(key "W" "Super+Shift" "movetoworkspacesilent" "vm")
|
||||
(key "W" "Super+Ctrl+Shift" "exec" "vm ${virt-manager} --show-domain-console myndows")
|
||||
(key "X" "Super" "workspace" "+1")
|
||||
(key "X" "Super+Ctrl" "movetoworkspacesilent" "+1")
|
||||
(key "X" "Super+Shift" "movetoworkspacesilent" "+1")
|
||||
(key "Z" "Super" "workspace" "-1")
|
||||
(key "Z" "Super+Ctrl" "movetoworkspacesilent" "-1")
|
||||
(key "Z" "Super+Shift" "movetoworkspacesilent" "-1")
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -167,6 +167,7 @@ in {
|
|||
flatten [
|
||||
### Defaults
|
||||
(class ".*" ["float" "suppressevent maximize" "syncfullscreen"])
|
||||
(floating false ["noshadow"])
|
||||
(floating true ["bordercolor rgb(073642)"])
|
||||
(fullscreen true ["idleinhibit focus"])
|
||||
(pinned true ["bordercolor rgb(073642) rgb(073642)"])
|
||||
|
|
|
@ -181,7 +181,7 @@ in
|
|||
float_switch_override_focus = 0; # Disable float to tile hover focus
|
||||
focus_on_close = 1; # Focus window under mouse
|
||||
follow_mouse = 1; # Hover focus
|
||||
mouse_refocus = false;
|
||||
#// mouse_refocus = false;
|
||||
repeat_delay = 300;
|
||||
repeat_rate = 40;
|
||||
sensitivity = 0.5;
|
||||
|
|
|
@ -5,17 +5,13 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.anyrun;
|
||||
in
|
||||
{
|
||||
options.custom.programs.anyrun.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.anyrun.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
imports = [ inputs.anyrun.home-managerModules.default ];
|
||||
imports = [inputs.anyrun.homeManagerModules.default];
|
||||
|
||||
# https://github.com/Kirottu/anyrun
|
||||
programs.anyrun = {
|
||||
|
@ -27,8 +23,7 @@ in
|
|||
applications
|
||||
dictionary
|
||||
#// kidex # File search
|
||||
#// randr # Hyprland only\{
|
||||
|
||||
#// randr # Hyprland only
|
||||
rink # Calculator
|
||||
shell
|
||||
#// stdin # Entries from input, aka dmenu
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
set -x
|
||||
|
||||
# Toggle pinned window, launch if needed
|
||||
#?? toggle --type TYPE --expression EXPRESSION --workspace WORKSPACE [COMMAND]
|
||||
#!! Regex may need to be double-escaped
|
||||
|
|
Loading…
Add table
Reference in a new issue