feat: add darwun

This commit is contained in:
zoey 2025-05-28 16:55:13 -04:00
parent b3f397713b
commit 99745a7f02
Signed by: zoey
GPG key ID: 248926B700C2C126
23 changed files with 970 additions and 751 deletions

209
flake.lock generated
View file

@ -233,6 +233,24 @@
"type": "github" "type": "github"
} }
}, },
"darwin_2": {
"inputs": {
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1748352827,
"narHash": "sha256-sNUUP6qxGkK9hXgJ+p362dtWLgnIWwOCmiq72LAWtYo=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "44a7d0e687a87b73facfe94fba78d323a6686a90",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"disko": { "disko": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -255,7 +273,7 @@
}, },
"emacs-overlay": { "emacs-overlay": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_7",
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
@ -1534,7 +1552,7 @@
"lexical": { "lexical": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_7", "flake-parts": "flake-parts_7",
"nixpkgs": "nixpkgs_21", "nixpkgs": "nixpkgs_22",
"systems": "systems_21" "systems": "systems_21"
}, },
"locked": { "locked": {
@ -1591,7 +1609,7 @@
"blobs": "blobs", "blobs": "blobs",
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_4",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"nixpkgs": "nixpkgs_9", "nixpkgs": "nixpkgs_10",
"nixpkgs-25_05": "nixpkgs-25_05" "nixpkgs-25_05": "nixpkgs-25_05"
}, },
"locked": { "locked": {
@ -1615,7 +1633,7 @@
"git-hooks": "git-hooks_2", "git-hooks": "git-hooks_2",
"hercules-ci-effects": "hercules-ci-effects", "hercules-ci-effects": "hercules-ci-effects",
"neovim-src": "neovim-src", "neovim-src": "neovim-src",
"nixpkgs": "nixpkgs_10", "nixpkgs": "nixpkgs_11",
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
@ -1652,7 +1670,7 @@
"inputs": { "inputs": {
"niri-stable": "niri-stable", "niri-stable": "niri-stable",
"niri-unstable": "niri-unstable", "niri-unstable": "niri-unstable",
"nixpkgs": "nixpkgs_11", "nixpkgs": "nixpkgs_12",
"nixpkgs-stable": "nixpkgs-stable_4", "nixpkgs-stable": "nixpkgs-stable_4",
"xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
@ -1726,6 +1744,25 @@
"type": "github" "type": "github"
} }
}, },
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1748352827,
"narHash": "sha256-sNUUP6qxGkK9hXgJ+p362dtWLgnIWwOCmiq72LAWtYo=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "44a7d0e687a87b73facfe94fba78d323a6686a90",
"type": "github"
},
"original": {
"id": "nix-darwin",
"type": "indirect"
}
},
"nix-filter": { "nix-filter": {
"locked": { "locked": {
"lastModified": 1731533336, "lastModified": 1731533336,
@ -1818,11 +1855,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1747744144, "lastModified": 1748370509,
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "narHash": "sha256-QlL8slIgc16W5UaI3w7xHQEP+Qmv/6vSNTpoZrrSlbk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "rev": "4faa5f5321320e49a78ae7848582f684d64783e9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1980,6 +2017,22 @@
} }
}, },
"nixpkgs_10": { "nixpkgs_10": {
"locked": {
"lastModified": 1747179050,
"narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_11": {
"locked": { "locked": {
"lastModified": 1747920628, "lastModified": 1747920628,
"narHash": "sha256-IlAuXnIi+ZmyS89tt1YOFDCv7FKs9bNBHd3MXMp8PxE=", "narHash": "sha256-IlAuXnIi+ZmyS89tt1YOFDCv7FKs9bNBHd3MXMp8PxE=",
@ -1995,39 +2048,39 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_11": {
"locked": {
"lastModified": 1747744144,
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_12": { "nixpkgs_12": {
"locked": { "locked": {
"lastModified": 1747744144, "lastModified": 1747744144,
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_13": { "nixpkgs_13": {
"locked": {
"lastModified": 1747744144,
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_14": {
"locked": { "locked": {
"lastModified": 1702151865, "lastModified": 1702151865,
"narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=", "narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=",
@ -2043,7 +2096,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_14": { "nixpkgs_15": {
"locked": { "locked": {
"lastModified": 1736189585, "lastModified": 1736189585,
"narHash": "sha256-GBC2LIBk9BuJR4HXfjuNlIWeY15U6jFvaqc7PeToGLw=", "narHash": "sha256-GBC2LIBk9BuJR4HXfjuNlIWeY15U6jFvaqc7PeToGLw=",
@ -2059,7 +2112,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_15": { "nixpkgs_16": {
"locked": { "locked": {
"lastModified": 1712883908, "lastModified": 1712883908,
"narHash": "sha256-icE1IJE9fHcbDfJ0+qWoDdcBXUoZCcIJxME4lMHwvSM=", "narHash": "sha256-icE1IJE9fHcbDfJ0+qWoDdcBXUoZCcIJxME4lMHwvSM=",
@ -2075,7 +2128,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_16": { "nixpkgs_17": {
"locked": { "locked": {
"lastModified": 1744536153, "lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
@ -2091,7 +2144,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_17": { "nixpkgs_18": {
"locked": { "locked": {
"lastModified": 1744868846, "lastModified": 1744868846,
"narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
@ -2107,7 +2160,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_18": { "nixpkgs_19": {
"locked": { "locked": {
"lastModified": 1740547748, "lastModified": 1740547748,
"narHash": "sha256-Ly2fBL1LscV+KyCqPRufUBuiw+zmWrlJzpWOWbahplg=", "narHash": "sha256-Ly2fBL1LscV+KyCqPRufUBuiw+zmWrlJzpWOWbahplg=",
@ -2123,22 +2176,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_19": {
"locked": {
"lastModified": 1747542820,
"narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1712883908, "lastModified": 1712883908,
@ -2156,6 +2193,22 @@
} }
}, },
"nixpkgs_20": { "nixpkgs_20": {
"locked": {
"lastModified": 1747542820,
"narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_21": {
"locked": { "locked": {
"lastModified": 1743448293, "lastModified": 1743448293,
"narHash": "sha256-bmEPmSjJakAp/JojZRrUvNcDX2R5/nuX6bm+seVaGhs=", "narHash": "sha256-bmEPmSjJakAp/JojZRrUvNcDX2R5/nuX6bm+seVaGhs=",
@ -2171,7 +2224,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_21": { "nixpkgs_22": {
"locked": { "locked": {
"lastModified": 1719931832, "lastModified": 1719931832,
"narHash": "sha256-0LD+KePCKKEb4CcPsTBOwf019wDtZJanjoKm1S8q3Do=", "narHash": "sha256-0LD+KePCKKEb4CcPsTBOwf019wDtZJanjoKm1S8q3Do=",
@ -2234,6 +2287,22 @@
} }
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": {
"lastModified": 1747728033,
"narHash": "sha256-NnXFQu7g4LnvPIPfJmBuZF7LFy/fey2g2+LCzjQhTUk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2f9173bde1d3fbf1ad26ff6d52f952f9e9da52ea",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1747744144, "lastModified": 1747744144,
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
@ -2249,7 +2318,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1728538411, "lastModified": 1728538411,
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
@ -2265,7 +2334,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": { "nixpkgs_9": {
"locked": { "locked": {
"lastModified": 1731890469, "lastModified": 1731890469,
"narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=", "narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=",
@ -2281,22 +2350,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": {
"locked": {
"lastModified": 1747179050,
"narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pnpm2nix": { "pnpm2nix": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
@ -2319,7 +2372,7 @@
"pnpm2nix_2": { "pnpm2nix_2": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_6", "flake-utils": "flake-utils_6",
"nixpkgs": "nixpkgs_13" "nixpkgs": "nixpkgs_14"
}, },
"locked": { "locked": {
"lastModified": 1706694632, "lastModified": 1706694632,
@ -2337,7 +2390,7 @@
}, },
"posting": { "posting": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_14", "nixpkgs": "nixpkgs_15",
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
@ -2421,7 +2474,7 @@
}, },
"resume": { "resume": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_15", "nixpkgs": "nixpkgs_16",
"systems": "systems_14" "systems": "systems_14"
}, },
"locked": { "locked": {
@ -2469,6 +2522,7 @@
"blog": "blog", "blog": "blog",
"catppuccin": "catppuccin", "catppuccin": "catppuccin",
"chaotic": "chaotic", "chaotic": "chaotic",
"darwin": "darwin_2",
"disko": "disko", "disko": "disko",
"emacs-overlay": "emacs-overlay", "emacs-overlay": "emacs-overlay",
"ghostty": "ghostty", "ghostty": "ghostty",
@ -2482,9 +2536,10 @@
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"niri": "niri", "niri": "niri",
"niri-src": "niri-src", "niri-src": "niri-src",
"nix-darwin": "nix-darwin",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nixos-stable": "nixos-stable", "nixos-stable": "nixos-stable",
"nixpkgs": "nixpkgs_12", "nixpkgs": "nixpkgs_13",
"pnpm2nix": "pnpm2nix_2", "pnpm2nix": "pnpm2nix_2",
"posting": "posting", "posting": "posting",
"resume": "resume", "resume": "resume",
@ -2521,7 +2576,7 @@
}, },
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1733279627, "lastModified": 1733279627,
@ -2585,7 +2640,7 @@
}, },
"rust-overlay_4": { "rust-overlay_4": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_16" "nixpkgs": "nixpkgs_17"
}, },
"locked": { "locked": {
"lastModified": 1747449297, "lastModified": 1747449297,
@ -2692,7 +2747,7 @@
}, },
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_17" "nixpkgs": "nixpkgs_18"
}, },
"locked": { "locked": {
"lastModified": 1747603214, "lastModified": 1747603214,
@ -3062,7 +3117,7 @@
}, },
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_8" "nixpkgs": "nixpkgs_9"
}, },
"locked": { "locked": {
"lastModified": 1733222881, "lastModified": 1733222881,
@ -3101,7 +3156,7 @@
}, },
"umu": { "umu": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_18" "nixpkgs": "nixpkgs_19"
}, },
"locked": { "locked": {
"dir": "packaging/nix", "dir": "packaging/nix",
@ -3139,7 +3194,7 @@
}, },
"walker": { "walker": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_19", "nixpkgs": "nixpkgs_20",
"systems": "systems_20" "systems": "systems_20"
}, },
"locked": { "locked": {
@ -3254,7 +3309,7 @@
"zen-browser": { "zen-browser": {
"inputs": { "inputs": {
"home-manager": "home-manager_4", "home-manager": "home-manager_4",
"nixpkgs": "nixpkgs_20" "nixpkgs": "nixpkgs_21"
}, },
"locked": { "locked": {
"lastModified": 1747998984, "lastModified": 1747998984,

View file

@ -19,6 +19,9 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
ghostty.url = "github:ghostty-org/ghostty"; ghostty.url = "github:ghostty-org/ghostty";
emacs-overlay.url = "github:nix-community/emacs-overlay"; emacs-overlay.url = "github:nix-community/emacs-overlay";

View file

@ -0,0 +1,79 @@
{
inputs,
pkgs,
system,
lib,
...
}: {
apps = {
tools.git.enable = true;
tools.tmux.enable = true;
tools.neovim.enable = true;
tools.skim.enable = true;
tools.starship.enable = true;
tools.direnv.enable = true;
tools.tealdeer.enable = true;
tools.bat.enable = true;
tools.emacs.enable = false;
term.kitty.enable = true;
};
shells.nu.enable = true;
shells.zsh.enable = true;
shells.fish.enable = true;
programs = {
gpg.enable = true;
man.enable = true;
eza.enable = true;
dircolors = {
enable = true;
enableZshIntegration = true;
};
};
catppuccin.enable = true;
catppuccin.flavor = "mocha";
catppuccin.accent = "red";
catppuccin.aerc.enable = true;
catppuccin.cava.enable = true;
catppuccin.fuzzel.enable = true;
catppuccin.fzf.enable = true;
home.packages = with pkgs; [
devenv
(discord.override {
withOpenASAR = true;
withVencord = true;
})
uutils-coreutils-noprefix
yazi
inputs.posting.packages.${pkgs.system}.default
mosh
nix-output-monitor
fastfetch
starfetch
];
programs.zoxide = {
enable = true;
options = ["--cmd cd"];
};
programs.btop = {
enable = true;
extraConfig = ''
update_ms = 100
vim_keys = true
'';
};
}

View file

@ -19,6 +19,9 @@ with lib; rec {
disabled = {enable = false;}; disabled = {enable = false;};
# Check if the current system is Darwin
isDarwin = pkgs: pkgs.stdenv.isDarwin;
nixos-stable = import inputs.nixos-stable { nixos-stable = import inputs.nixos-stable {
system = "x86_64-linux"; system = "x86_64-linux";
config = {}; config = {};

View file

@ -44,7 +44,7 @@ in {
enable = mkBoolOpt false "Enable AGS"; enable = mkBoolOpt false "Enable AGS";
}; };
config = mkIf cfg.enable { config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
programs.ags = { programs.ags = {
enable = true; enable = true;

View file

@ -14,8 +14,7 @@ in {
enable = mkBoolOpt false "Enable Anyrun"; enable = mkBoolOpt false "Enable Anyrun";
}; };
config = config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
mkIf cfg.enable {
}; };
# programs.anyrun = { # programs.anyrun = {
# enable = true; # enable = true;

View file

@ -12,7 +12,7 @@ in {
enable = mkBoolOpt false "Enable Rofi"; enable = mkBoolOpt false "Enable Rofi";
}; };
config = mkIf cfg.enable { config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
programs.rofi = { programs.rofi = {
enable = true; enable = true;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;

View file

@ -14,7 +14,7 @@ in {
enable = mkBoolOpt false "Enable WayBar"; enable = mkBoolOpt false "Enable WayBar";
}; };
config = mkIf cfg.enable { config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;

View file

@ -12,7 +12,7 @@ in {
enable = mkBoolOpt false "Enable Foot Terminal"; enable = mkBoolOpt false "Enable Foot Terminal";
}; };
config = mkIf cfg.enable { config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
programs.foot = { programs.foot = {
enable = true; enable = true;
settings = { settings = {

View file

@ -89,7 +89,6 @@ in {
sqlite sqlite
postgresql postgresql
mongosh mongosh
gerbera
# vscode-extensions.vadimcn.vscode-lldb.adapter # vscode-extensions.vadimcn.vscode-lldb.adapter
]; ];
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [

View file

@ -14,7 +14,7 @@ in {
setDefault = mkBoolOpt false "Set zen as default browser"; setDefault = mkBoolOpt false "Set zen as default browser";
}; };
config = mkIf cfg.enable { config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
xdg.mimeApps.defaultApplications = mkIf cfg.setDefault { xdg.mimeApps.defaultApplications = mkIf cfg.setDefault {
"text/html" = "zen-beta.desktop"; "text/html" = "zen-beta.desktop";
"x-scheme-handler/http" = "zen-beta.desktop"; "x-scheme-handler/http" = "zen-beta.desktop";

View file

@ -59,13 +59,12 @@ in {
''; '';
}; };
home = { # Linux-specific packages (Qt theming)
packages = with pkgs; [ home.packages = with pkgs; lib.mkIf (!pkgs.stdenv.isDarwin) [
qt5.qttools qt5.qttools
qt6Packages.qtstyleplugin-kvantum qt6Packages.qtstyleplugin-kvantum
libsForQt5.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct libsForQt5.qt5ct
]; ];
}; };
};
} }

View file

@ -14,7 +14,7 @@ in {
enable = mkBoolOpt false "Enable Hypridle Service"; enable = mkBoolOpt false "Enable Hypridle Service";
}; };
config = mkIf cfg.enable { config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;
catppuccin.enable = false; catppuccin.enable = false;

View file

@ -12,7 +12,7 @@ in {
enable = mkBoolOpt false "Enable MPD (Music Player Daemon)"; enable = mkBoolOpt false "Enable MPD (Music Player Daemon)";
}; };
config = mkIf cfg.enable { config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
services.mpd = { services.mpd = {
enable = true; enable = true;
musicDirectory = "/home/zoey/Music"; musicDirectory = "/home/zoey/Music";

View file

@ -138,11 +138,10 @@ in {
# Generate qr codes # Generate qr codes
qrencode qrencode
# script kidde stuff unzip
] ++ (if !pkgs.stdenv.isDarwin then [
hcxdumptool hcxdumptool
hashcat hashcat
] else []);
unzip
];
}; };
} }

View file

@ -72,9 +72,10 @@ in {
rsync rsync
figlet figlet
qrencode qrencode
unzip
] ++ (if !pkgs.stdenv.isDarwin then [
hcxdumptool hcxdumptool
hashcat hashcat
unzip ] else []);
];
}; };
} }

View file

@ -144,10 +144,11 @@ in {
qrencode qrencode
# script kidde stuff # script kidde stuff
hcxdumptool
hashcat
unzip unzip
]; ] ++ (if !pkgs.stdenv.isDarwin then [
hcxdumptool
hashcat
] else []);
}; };
} }

View file

@ -38,7 +38,7 @@ in {
enable = mkBoolOpt false "Enable Hyprland"; enable = mkBoolOpt false "Enable Hyprland";
}; };
config = mkIf cfg.enable { config = mkIf (cfg.enable && pkgs.stdenv.isLinux) {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland; package = inputs.hyprland.packages.${pkgs.system}.hyprland;

View file

@ -0,0 +1,554 @@
# This file contains the Niri configuration that will only be included on Linux
{
options,
config,
lib,
inputs,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.wms.niri;
mkService = recursiveUpdate {
Unit.PartOf = ["graphical-session.target"];
Unit.After = ["graphical-session.target"];
Install.WantedBy = ["graphical-session.target"];
};
actions = config.lib.niri.actions;
niri = "${config.programs.niri.package}/bin/niri";
mkColor = color: {inherit color;};
mkGradient = from: to: {
angle ? 180,
relative-to ? "window",
in' ? null,
}: {
gradient = {inherit from to angle relative-to in';};
};
spawnSlackOnWeekday = pkgs.writeShellScriptBin "spawn-slack-on-weekday" ''
# Get the day of the week (1=Monday, ..., 7=Sunday)
DAY_OF_WEEK=$(${pkgs.coreutils}/bin/date +%u)
# Check if it's a weekday (between 1 and 5 inclusive)
if [ "$DAY_OF_WEEK" -ge 1 ] && [ "$DAY_OF_WEEK" -le 5 ]; then
# Execute Slack. Use the full path for robustness.
# Ensure pkgs.slack is available (e.g., via environment.systemPackages)
exec ${pkgs.slack}/bin/slack
fi
# Exit successfully if not a weekday or after exec replaces the process
exit 0
'';
in {
config = mkIf cfg.enable {
programs.niri = {
package = pkgs.niri;
settings = {
# Input device configuration
input = {
keyboard = {
xkb = {
rules = "";
model = "";
layout = "us";
variant = "";
options = "ctrl:nocaps";
};
};
touchpad = {
enable = true;
tap = true;
dwt = true;
dwtp = true;
natural-scroll = true;
# Other options
# accel-profile = "flat";
# accel-speed = 0.0;
disabled-on-external-mouse = true;
};
mouse = {
enable = true;
natural-scroll = false;
accel-speed = 0.0;
accel-profile = "flat";
};
trackpoint = {
enable = true;
natural-scroll = false;
# accel-profile = "flat";
# accel-speed = 0.0;
# scroll-button = "middle";
middle-emulation = true;
};
warp-mouse-to-focus = true;
focus-follows-mouse = {
enable = true;
threshold = 1;
};
};
# Output configuration
outputs."DP-1" = {
enable = true;
mode = {
width = 2560;
height = 1440;
refresh = 240.000;
};
variable-refresh-rate = true;
scale = 1.0;
transform = {
flipped = false;
rotation = 0;
};
position = {
x = 0;
y = 0;
};
};
# Environment variables
environment = {
DISPLAY = ":0"; # for applications using xwayland-satillite
};
hotkey-overlay = {
skip-at-startup = true;
};
# Window manager behavior
layout = {
gaps = 4;
center-focused-column = true;
# Column widths in preset-column-widths are relative to the available space
preset-column-widths = [
{proportion = 1.0;} # One column that takes all available space
{proportion = 0.5;} # Two columns of equal size
{proportion = 0.66;} # Two columns: first takes 2/3, second takes 1/3
];
# A new column will use this width by default
default-column-width = {
proportion = 0.5; # Half of the available space
};
# Focused window highlight
focus-ring = {
enable = true;
width = 4;
active = mkGradient colors.lavender.hex colors.sapphire.hex {
angle = 45;
};
inactive = mkGradient colors.overlay0.hex colors.overlay0.hex {
angle = 45;
relative-to = "window";
};
};
# Window borders
border = {
enable = true;
width = 4;
active = colors.lavender.hex;
inactive = colors.overlay0.hex;
};
# Reserved screen areas (e.g., for panels)
struts = {
left = 0;
right = 0;
top = 0;
bottom = 0;
};
};
# Spawn processes at startup
spawn-at-startup = [
{command = ["xwayland-satellite"];}
{command = ["${pkgs.writeShellScriptBin "thunderbird-delayed" ''sleep 5; thunderbird''}/bin/thunderbird-delayed"];}
{command = ["${pkgs.writeShellScriptBin "zen-delayed" ''sleep 5; zen''}/bin/zen-delayed"];}
{command = ["vesktop"];}
{command = ["spotify"];}
{command = ["${spawnSlackOnWeekday}/bin/spawn-slack-on-weekday"];}
];
# Prefer server-side decorations
prefer-no-csd = true;
# Screenshot path
screenshot-path = "${config.home.homeDirectory}/Pictures/screenshots/Screenshot_%F_%H-%M-%S.png";
# Animations for windows, workspace transitions, etc.
animations = {
enable = true;
};
debug = {
wait-for-frame-completion-in-pipewire = [];
};
layer-rules = [
{
# Match layer shell surfaces with the GTK layer shell namespace
matches = [
{namespace = "gtk-layer-shell";}
];
# Don't blur out this layer shell surface
block-out-from = ["blur"];
}
];
window-rules = [
{
# Matching criteria
matches = [
{app-id = "waybar";}
{app-id = "eww-bar";}
{app-id = "ags";}
{app-id = "gtk-layer-shell";}
{app-id = "mako";}
{app-id = "swaync-client";}
{app-id = "swaync-control-center";}
];
# Rules
block-out-from = ["blur"];
}
# Configure rounded corners
{
geometry-corner-radius = {
top-left = 0;
top-right = 0;
bottom-left = 0;
bottom-right = 0;
};
clip-to-geometry = true;
}
# Configure a different appearance for window cast targets
{
matches = [{is-window-cast-target = true;}];
focus-ring = {
active = colors.red.hex;
inactive = colors.red.hex;
};
shadow = {
color = colors.red.hex;
};
tab-indicator = {
active = colors.red.hex;
inactive = colors.red.hex;
};
}
# Configure floating Windows
{
matches = [
{app-id = "zenity";}
];
excludes = [
{title = "Zen Browser";}
];
open-floating = true;
open-focused = true;
default-floating-position = {
relative-to = "window-manager";
x = 0;
y = 0;
};
}
# Configure video apps
{
matches = [
{app-id = "mpv";}
{app-id = "io.github.celluloid_player.Celluloid";}
];
variable-refresh-rate = true;
}
# Configure maximized Firefox
{
matches = [
{at-startup = true;}
{app-id = "firefox";}
];
open-maximized = true;
open-on-workspace = "01-browser";
}
# Configure Zen Browser
{
matches = [
{at-startup = true;}
{app-id = "zen";}
];
open-on-workspace = "01-browser";
}
# Configure VSCode
{
matches = [
{at-startup = true;}
{app-id = "code-url-handler";}
];
open-on-workspace = "02-code";
}
# Configure chat apps
{
matches = [
{at-startup = true;}
{app-id = "vesktop";}
];
open-on-workspace = "03-chat";
}
];
# Named workspaces
workspaces."01-browser" = {
name = "browser";
};
workspaces."02-code" = {
name = "code";
};
workspaces."03-chat" = {
name = "chat";
};
workspaces."04-work" = {
name = "work";
};
# Keybindings
binds = {
# Show help
"Mod+Shift+Slash" = {action = actions.show-hotkey-overlay;};
# Terminal and launcher
"Mod+Return" = {action = actions.spawn "kitty";};
"Mod+D" = {action = actions.spawn "fuzzel";};
"Super+Alt+L" = {action = actions.spawn "swaylock";};
# "Mod+T" = { action = actions.spawn "bash" "-c" "notify-send hello && exec alacritty"; };
# "Mod+S" = {action = actions.set-dynamic-cast-window;};
#
# "Mod+Shift+S" = {action = actions.set-dynamic-cast-monitor;};
#
# "XF86AudioLowerVolume" = {
# action = actions.spawn "pamixer" "--decrease" "5";
# allow-when-locked = true;
# };
# "XF86AudioRaiseVolume" = {
# action = actions.spawn "pamixer" "--increase" "5";
# allow-when-locked = true;
# };
# "XF86AudioMute" = {
# action = actions.spawn "pamixer" "--toggle-mute";
# allow-when-locked = true;
# };
# "XF86AudioMicMute" = {
# action = actions.spawn "pamixer" "--default-source" "--toggle-mute";
# allow-when-locked = true;
# };
# "XF86MonBrightnessDown" = {
# action = actions.spawn "brightnessctl" "set" "5%-";
# allow-when-locked = true;
# };
# "XF86MonBrightnessUp" = {
# action = actions.spawn "brightnessctl" "set" "5%+";
# allow-when-locked = true;
# };
# Media controls
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = actions.spawn "pamixer" "-i" "5";
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action = actions.spawn "pamixer" "-d" "5";
};
"XF86AudioMute" = {
allow-when-locked = true;
action = actions.spawn "pamixer" "--toggle-mute";
};
"XF86AudioMicMute" = {
allow-when-locked = true;
action = actions.spawn "pamixer" "--default-source"
"--toggle-mute";
};
# Close window
"Mod+Q" = {action = actions.close-window;};
# Focus windows and columns
"Mod+Left" = {action = actions.focus-column-left;};
"Mod+Down" = {action = actions.focus-window-down;};
"Mod+Up" = {action = actions.focus-window-up;};
"Mod+Right" = {action = actions.focus-column-right;};
"Mod+H" = {action = actions.focus-column-left;};
"Mod+J" = {action = actions.focus-window-down;};
"Mod+K" = {action = actions.focus-window-up;};
"Mod+L" = {action = actions.focus-column-right;};
# Move windows within a column
"Mod+Ctrl+Left" = {action = actions.move-column-left;};
"Mod+Ctrl+Down" = {action = actions.move-window-down;};
"Mod+Ctrl+Up" = {action = actions.move-window-up;};
"Mod+Ctrl+Right" = {action = actions.move-column-right;};
"Mod+Ctrl+H" = {action = actions.move-column-left;};
"Mod+Ctrl+J" = {action = actions.move-window-down;};
"Mod+Ctrl+K" = {action = actions.move-window-up;};
"Mod+Ctrl+L" = {action = actions.move-column-right;};
# "Mod+Alt+Left" = {action = actions.move-to-monitor-left;};
# "Mod+Alt+Down" = {action = actions.move-to-monitor-down;};
# "Mod+Alt+Up" = {action = actions.move-to-monitor-up;};
# "Mod+Alt+Right" = {action = actions.move-to-monitor-right;};
# "Mod+Alt+H" = {action = actions.move-to-monitor-left;};
# "Mod+Alt+J" = {action = actions.move-to-monitor-down;};
# "Mod+Alt+K" = {action = actions.move-to-monitor-up;};
# "Mod+Alt+L" = {action = actions.move-to-monitor-right;};
"Mod+Home" = {action = actions.focus-column-first;};
"Mod+End" = {action = actions.focus-column-last;};
"Mod+Ctrl+Home" = {action = actions.move-column-to-first;};
"Mod+Ctrl+End" = {action = actions.move-column-to-last;};
# Move window out of column
"Mod+Shift+Left" = {action = actions.move-view-left;};
"Mod+Shift+Down" = {action = actions.move-view-down;};
"Mod+Shift+Up" = {action = actions.move-view-up;};
"Mod+Shift+Right" = {action = actions.move-view-right;};
"Mod+Shift+H" = {action = actions.move-view-left;};
"Mod+Shift+J" = {action = actions.move-view-down;};
"Mod+Shift+K" = {action = actions.move-view-up;};
"Mod+Shift+L" = {action = actions.move-view-right;};
"Mod+Ctrl+Shift+F" = {action = actions.toggle-windowed-fullscreen;};
# Move to a different monitor
"Mod+Shift+Ctrl+Left" = {action = actions.move-to-monitor-left;};
"Mod+Shift+Ctrl+Down" = {action = actions.move-to-monitor-down;};
"Mod+Shift+Ctrl+Up" = {action = actions.move-to-monitor-up;};
"Mod+Shift+Ctrl+Right" = {action = actions.move-to-monitor-right;};
"Mod+Shift+Ctrl+H" = {action = actions.move-to-monitor-left;};
"Mod+Shift+Ctrl+J" = {action = actions.move-to-monitor-down;};
"Mod+Shift+Ctrl+K" = {action = actions.move-to-monitor-up;};
"Mod+Shift+Ctrl+L" = {action = actions.move-to-monitor-right;};
# Switch to workspace
"Mod+Page_Down" = {action = actions.focus-workspace-down;};
"Mod+Page_Up" = {action = actions.focus-workspace-up;};
"Mod+U" = {action = actions.focus-workspace-previous;};
"Mod+I" = {action = actions.focus-workspace-next;};
"Mod+Ctrl+Page_Down" = {action = actions.move-column-to-workspace-down;};
"Mod+Ctrl+Page_Up" = {action = actions.move-column-to-workspace-up;};
"Mod+Ctrl+U" = {action = actions.move-column-to-workspace-down;};
"Mod+Ctrl+I" = {action = actions.move-column-to-workspace-up;};
# Move window to workspace
"Mod+Shift+Page_Down" = {action = actions.move-view-to-workspace-down;};
"Mod+Shift+Page_Up" = {action = actions.move-view-to-workspace-up;};
"Mod+Shift+U" = {action = actions.move-view-to-workspace-previous;};
"Mod+Shift+I" = {action = actions.move-view-to-workspace-next;};
# Switch workspaces using scroll wheel
"Mod+WheelScrollDown" = {
cooldown-ms = 50;
action = actions.focus-workspace-down;
};
"Mod+WheelScrollUp" = {
cooldown-ms = 50;
action = actions.focus-workspace-up;
};
"Mod+Ctrl+WheelScrollDown" = {
cooldown-ms = 50;
action = actions.move-column-to-workspace-down;
};
"Mod+Ctrl+WheelScrollUp" = {
cooldown-ms = 50;
action = actions.move-column-to-workspace-up;
};
"Mod+WheelScrollRight" = {action = actions.focus-column-right;};
"Mod+WheelScrollLeft" = {action = actions.focus-column-left;};
"Mod+Ctrl+WheelScrollRight" = {action = actions.move-column-right;};
"Mod+Ctrl+WheelScrollLeft" = {action = actions.move-column-left;};
"Mod+Shift+WheelScrollDown" = {action = actions.move-view-to-workspace-down;};
"Mod+Shift+WheelScrollUp" = {action = actions.move-view-to-workspace-up;};
"Mod+Ctrl+Shift+WheelScrollDown" = {action = actions.move-view-to-workspace-down;};
"Mod+Ctrl+Shift+WheelScrollUp" = {action = actions.move-view-to-workspace-up;};
# Named workspaces
"Mod+Comma" = {action = actions.focus-workspace-previous;};
"Mod+Period" = {action = actions.focus-workspace-next;};
"Mod+BracketLeft" = {action = actions.consume-or-expel-window-left;};
"Mod+BracketRight" = {action = actions.consume-or-expel-window-right;};
"Mod+R" = {action = actions.switch-preset-column-width;};
"Mod+Shift+R" = {action = actions.switch-preset-window-height;};
"Mod+Ctrl+R" = {action = actions.reset-window-height;};
"Mod+F" = {action = actions.maximize-column;};
"Mod+Shift+F" = {action = actions.toggle-fullscreen;};
"Mod+C" = {action = actions.center-column;};
"Mod+Ctrl+F" = {action = actions.expand-column-to-available-width;};
"Mod+V" = {action = actions.toggle-floating;};
"Mod+Minus" = {action = actions.decrease-column-width;};
"Mod+Equal" = {action = actions.increase-column-width;};
"Mod+Shift+Minus" = {action = actions.set-column-width 33;};
"Mod+Shift+Equal" = {action = actions.set-column-width 67;};
"Print" = {action = actions.screen-shot {};};
"Mod+Shift+E" = {action = actions.quit {};}; # Default: no skip-confirmation
"Ctrl+Alt+Delete" = {action = actions.quit {};};
"Mod+Shift+P" = {action = actions.lock-screen {};};
# Navigate to specific workspaces
# These bindings use the names of the workspaces defined above
"Mod+1" = {
action = actions.focus-workspace "01-browser";
};
"Mod+2" = {
action = actions.focus-workspace "02-code";
};
"Mod+3" = {
action = actions.focus-workspace "03-chat";
};
"Mod+4" = {
action = actions.focus-workspace "04-work";
};
};
};
systemd.user.services = {
swaybg = mkService {
Unit.Description = "Wallpaper Chooser";
Service = {
ExecStart = "${getExe pkgs.swaybg} -i ${wallpaper}";
Restart = "always";
};
};
};
};
};
}

View file

@ -1,527 +1,23 @@
{ {
lib, options,
config, config,
pkgs, lib,
inputs, inputs,
pkgs,
... ...
}: }:
with lib; with lib;
with lib.custom; let with lib.custom; {
cfg = config.wms.niri;
mkService = recursiveUpdate {
Unit.PartOf = ["graphical-session.target"];
Unit.After = ["graphical-session.target"];
Install.WantedBy = ["graphical-session.target"];
};
actions = config.lib.niri.actions;
niri = "${config.programs.niri.package}/bin/niri";
mkColor = color: {inherit color;};
mkGradient = from: to: {
angle ? 180,
relative-to ? "window",
in' ? null,
}: {
gradient = {inherit from to angle relative-to in';};
};
spawnSlackOnWeekday = pkgs.writeShellScriptBin "spawn-slack-on-weekday" ''
# Get the day of the week (1=Monday, ..., 7=Sunday)
DAY_OF_WEEK=$(${pkgs.coreutils}/bin/date +%u)
# Check if it's a weekday (between 1 and 5 inclusive)
if [ "$DAY_OF_WEEK" -ge 1 ] && [ "$DAY_OF_WEEK" -le 5 ]; then
# Execute Slack. Use the full path for robustness.
# Ensure pkgs.slack is available (e.g., via environment.systemPackages)
exec ${pkgs.slack}/bin/slack
fi
# Exit successfully if not a weekday or after exec replaces the process
exit 0
'';
in {
options.wms.niri = with types; { options.wms.niri = with types; {
enable = mkBoolOpt false "Enable niri"; enable = mkBoolOpt false "Enable niri";
}; };
config = mkIf cfg.enable { imports = optionals (pkgs.stdenv.isLinux) [
programs.niri = { ./config.nix
package = pkgs.niri;
settings = {
# Input device configuration
input = {
keyboard = {
# xkb settings are empty in KDL, using defaults/empty strings
xkb = {
rules = "";
model = "";
layout = "";
variant = "";
options = null; # Or "" if you prefer explicit empty
};
};
touchpad = {
enable = true; # Not explicitly 'off' in KDL
tap = true;
dwt = false; # Commented out in KDL
dwtp = false; # Commented out in KDL
natural-scroll = true;
# accel-speed = 0.2; # Commented out
# accel-profile = "flat"; # Commented out
# scroll-method = "two-finger"; # Commented out
disabled-on-external-mouse = true;
};
mouse = {
enable = true; # Not explicitly 'off' in KDL
natural-scroll = false; # Commented out in KDL
accel-speed = 0.2;
accel-profile = "flat";
# scroll-method = "no-scroll"; # Commented out
};
trackpoint = {
enable = true; # Not explicitly 'off' in KDL
natural-scroll = false; # Commented out
# accel-speed = 0.2; # Commented out
# accel-profile = "flat"; # Commented out
# scroll-method = "on-button-down"; # Commented out
# scroll-button = 273; # Commented out
middle-emulation = false; # Commented out
};
warp-mouse-to-focus = true;
focus-follows-mouse = {
enable = false; # Commented out in KDL
# max-scroll-amount = "0%"; # Only relevant if enabled
};
};
# Output configuration
outputs."DP-1" = {
enable = true; # Not explicitly 'off'
mode = {
width = 2560;
height = 1440;
refresh = 239.972;
};
variable-refresh-rate = "on-demand";
scale = 1;
transform = {
# "normal"
rotation = 0;
flipped = false;
};
position = {
x = 0;
y = 0;
};
};
# Environment variables
environment = {
DISPLAY = ":0"; # for applications using xwayland-satillite
};
hotkey-overlay = {
skip-at-startup = true;
};
# Layout settings
layout = {
gaps = 16;
center-focused-column = "never";
preset-column-widths = [
{proportion = 0.33333;}
{proportion = 0.5;}
{proportion = 0.66667;}
# { fixed = 1920; } # Example if needed
]; ];
# preset-window-heights = []; # Empty in KDL # For Darwin, just provide empty configuration
config = mkIf (config.wms.niri.enable && pkgs.stdenv.isDarwin) {
default-column-width = {proportion = 0.5;}; # Empty configuration for Darwin - module is effectively disabled
# default-column-width = {}; # Alternative from KDL comments
focus-ring = {
enable = true; # Not explicitly 'off'
width = 4;
active = mkGradient colors.blue.hex colors.sky.hex {angle = 45;};
# active = mkColor "#7fc8ff"; # Alternative solid color from KDL
inactive = mkGradient colors.surface1.hex colors.surface2.hex {
angle = 45;
relative-to = "workspace-view";
};
# inactive = mkColor "#505050"; # Alternative solid color from KDL
};
border = {
enable = true; # Explicitly 'off' in KDL
width = 0;
active = mkColor colors.blue.hex;
inactive = mkColor colors.base.hex;
# active-gradient = ... # Commented out in KDL
# inactive-gradient = ... # Commented out in KDL
};
struts = {
# left = 64; # Commented out
# right = 64; # Commented out
# top = 64; # Commented out
# bottom = 64; # Commented out
};
};
# Spawn processes at startup
spawn-at-startup = [
{command = ["xwayland-satellite"];}
{command = ["${pkgs.writeShellScriptBin "thunderbird-delayed" ''sleep 5; thunderbird''}/bin/thunderbird-delayed"];}
{command = ["${pkgs.writeShellScriptBin "zen-delayed" ''sleep 5; zen''}/bin/zen-delayed"];}
{command = ["vesktop"];}
{command = ["spotify"];}
{command = ["${spawnSlackOnWeekday}/bin/spawn-slack-on-weekday"];}
];
# Prefer server-side decorations
prefer-no-csd = true;
# Screenshot path
screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png";
# screenshot-path = null; # Alternative from KDL comments
# Animation settings
animations = {
enable = true; # Not explicitly 'off'
# slowdown = 3.0; # Commented out
# Individual animation settings can be added here if needed
};
debug = {
wait-for-frame-completion-in-pipewire = [];
};
layer-rules = [
{
matches = [
{namespace = "notifications$";}
];
block-out-from = "screen-capture";
}
];
# Window rules
window-rules = [
# Password manager rule (example from KDL comments)
{
matches = [
{app-id = "^org\\.keepassxc\\.KeePassXC$";}
{app-id = "^org\\.gnome\\.World\\.Secrets$";}
{app-id = "^1Password$";}
{app-id = "^thunderbird$";}
{app-id = "^signal$";}
{app-id = "^vesktop$";}
{app-id = "^slack$";}
];
block-out-from = "screen-capture";
}
# Rounded corners rule (example from KDL comments)
{
# No matches means apply to all windows
geometry-corner-radius = {
top-left = 12.0;
top-right = 12.0;
bottom-left = 12.0;
bottom-right = 12.0;
};
clip-to-geometry = true;
}
# Window cast target rule
{
matches = [{is-window-cast-target = true;}];
focus-ring = {
active = mkColor colors.red.hex;
inactive = mkColor (lerpColor colors.red.hex colors.base.hex 0.5);
};
shadow = {
# Only color is specified in KDL rule
color = "#7d0d2d70";
};
tab-indicator = {
active = mkColor colors.red.hex;
inactive = mkColor (lerpColor colors.red.hex colors.base.hex 0.5);
};
}
# fix steam popups holy fuck they're annoying
{
matches = [
{app-id = "^steam$";}
];
excludes = [{title = "^Steam$";}];
open-floating = true;
open-focused = false;
default-floating-position = {
relative-to = "bottom-right";
x = 16;
y = 16;
};
}
{
matches = [
{
app-id = "^cyberpunk2077.exe$";
}
{
app-id = "^Overwatch2.exe$";
}
];
variable-refresh-rate = true;
}
{
matches = [
{
at-startup = true;
app-id = "^zen$";
}
];
open-maximized = true;
open-on-workspace = "browser";
}
{
matches = [
{
at-startup = true;
app-id = "^spotify$";
}
{
at-startup = true;
app-id = "^vesktop$";
}
];
open-on-workspace = "chat";
}
{
matches = [
{
at-startup = true;
app-id = "^Slack$";
}
{
at-startup = true;
app-id = "^thunderbird$";
}
];
open-on-workspace = "work";
}
];
workspaces."01-browser" = {
name = "browser";
};
workspaces."02-code" = {
name = "code";
};
workspaces."03-chat" = {
name = "chat";
};
workspaces."04-work" = {
name = "work";
};
# Keybindings
binds =
{
"Mod+Shift+Slash" = {action = actions.show-hotkey-overlay;};
"Mod+Return" = {action = actions.spawn "kitty";};
"Mod+D" = {action = actions.spawn "fuzzel";};
"Super+Alt+L" = {action = actions.spawn "swaylock";};
# "Mod+T" = { action = actions.spawn "bash" "-c" "notify-send hello && exec alacritty"; };
# "Mod+S" = {action = actions.set-dynamic-cast-window;};
#
# "Mod+Shift+S" = {action = actions.set-dynamic-cast-monitor;};
#
# "Mod+Z" = {action = actions.clear-dynamic-cast-target;};
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = actions.spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+";
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action = actions.spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-";
};
"XF86AudioMute" = {
allow-when-locked = true;
action = actions.spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
};
"XF86AudioMicMute" = {
allow-when-locked = true;
action =
actions.spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
};
"Mod+Q" = {action = actions.close-window;};
"Mod+Left" = {action = actions.focus-column-left;};
"Mod+Down" = {action = actions.focus-window-down;};
"Mod+Up" = {action = actions.focus-window-up;};
"Mod+Right" = {action = actions.focus-column-right;};
"Mod+H" = {action = actions.focus-column-left;};
"Mod+J" = {action = actions.focus-window-down;};
"Mod+K" = {action = actions.focus-window-up;};
"Mod+L" = {action = actions.focus-column-right;};
"Mod+Ctrl+Left" = {action = actions.move-column-left;};
"Mod+Ctrl+Down" = {action = actions.move-window-down;};
"Mod+Ctrl+Up" = {action = actions.move-window-up;};
"Mod+Ctrl+Right" = {action = actions.move-column-right;};
"Mod+Ctrl+H" = {action = actions.move-column-left;};
"Mod+Ctrl+J" = {action = actions.move-window-down;};
"Mod+Ctrl+K" = {action = actions.move-window-up;};
"Mod+Ctrl+L" = {action = actions.move-column-right;};
# Alternative commands (commented out in KDL)
# "Mod+J" = { action = actions.focus-window-or-workspace-down; };
# "Mod+K" = { action = actions.focus-window-or-workspace-up; };
# "Mod+Ctrl+J" = { action = actions.move-window-down-or-to-workspace-down; };
# "Mod+Ctrl+K" = { action = actions.move-window-up-or-to-workspace-up; };
"Mod+Home" = {action = actions.focus-column-first;};
"Mod+End" = {action = actions.focus-column-last;};
"Mod+Ctrl+Home" = {action = actions.move-column-to-first;};
"Mod+Ctrl+End" = {action = actions.move-column-to-last;};
"Mod+Shift+Left" = {action = actions.focus-monitor-left;};
"Mod+Shift+Down" = {action = actions.focus-monitor-down;};
"Mod+Shift+Up" = {action = actions.focus-monitor-up;};
"Mod+Shift+Right" = {action = actions.focus-monitor-right;};
"Mod+Shift+H" = {action = actions.focus-monitor-left;};
"Mod+Shift+J" = {action = actions.focus-workspace-down;};
"Mod+Shift+K" = {action = actions.focus-workspace-up;};
"Mod+Shift+L" = {action = actions.focus-monitor-right;};
"Mod+Ctrl+Shift+F" = {action = actions.toggle-windowed-fullscreen;};
"Mod+Shift+Ctrl+Left" = {action = actions.move-column-to-monitor-left;};
"Mod+Shift+Ctrl+Down" = {action = actions.move-column-to-monitor-down;};
"Mod+Shift+Ctrl+Up" = {action = actions.move-column-to-monitor-up;};
"Mod+Shift+Ctrl+Right" = {action = actions.move-column-to-monitor-right;};
"Mod+Shift+Ctrl+H" = {action = actions.move-column-to-monitor-left;};
"Mod+Shift+Ctrl+J" = {action = actions.move-column-to-monitor-down;};
"Mod+Shift+Ctrl+K" = {action = actions.move-column-to-monitor-up;};
"Mod+Shift+Ctrl+L" = {action = actions.move-column-to-monitor-right;};
"Mod+Page_Down" = {action = actions.focus-workspace-down;};
"Mod+Page_Up" = {action = actions.focus-workspace-up;};
"Mod+U" = {action = actions.focus-workspace-down;};
"Mod+I" = {action = actions.focus-workspace-up;};
"Mod+Ctrl+Page_Down" = {action = actions.move-column-to-workspace-down;};
"Mod+Ctrl+Page_Up" = {action = actions.move-column-to-workspace-up;};
"Mod+Ctrl+U" = {action = actions.move-column-to-workspace-down;};
"Mod+Ctrl+I" = {action = actions.move-column-to-workspace-up;};
"Mod+Shift+Page_Down" = {action = actions.move-workspace-down;};
"Mod+Shift+Page_Up" = {action = actions.move-workspace-up;};
"Mod+Shift+U" = {action = actions.move-workspace-down;};
"Mod+Shift+I" = {action = actions.move-workspace-up;};
"Mod+WheelScrollDown" = {
cooldown-ms = 150;
action = actions.focus-workspace-down;
};
"Mod+WheelScrollUp" = {
cooldown-ms = 150;
action = actions.focus-workspace-up;
};
"Mod+Ctrl+WheelScrollDown" = {
cooldown-ms = 150;
action = actions.move-column-to-workspace-down;
};
"Mod+Ctrl+WheelScrollUp" = {
cooldown-ms = 150;
action = actions.move-column-to-workspace-up;
};
"Mod+WheelScrollRight" = {action = actions.focus-column-right;};
"Mod+WheelScrollLeft" = {action = actions.focus-column-left;};
"Mod+Ctrl+WheelScrollRight" = {action = actions.move-column-right;};
"Mod+Ctrl+WheelScrollLeft" = {action = actions.move-column-left;};
"Mod+Shift+WheelScrollDown" = {action = actions.focus-column-right;};
"Mod+Shift+WheelScrollUp" = {action = actions.focus-column-left;};
"Mod+Ctrl+Shift+WheelScrollDown" = {action = actions.move-column-right;};
"Mod+Ctrl+Shift+WheelScrollUp" = {action = actions.move-column-left;};
"Mod+Comma" = {action = actions.consume-window-into-column;};
"Mod+Period" = {action = actions.expel-window-from-column;};
"Mod+BracketLeft" = {action = actions.consume-or-expel-window-left;};
"Mod+BracketRight" = {action = actions.consume-or-expel-window-right;};
"Mod+R" = {action = actions.switch-preset-column-width;};
"Mod+Shift+R" = {action = actions.switch-preset-window-height;};
"Mod+Ctrl+R" = {action = actions.reset-window-height;};
"Mod+F" = {action = actions.maximize-column;};
"Mod+Shift+F" = {action = actions.fullscreen-window;};
"Mod+C" = {action = actions.center-column;};
"Mod+Ctrl+F" = {action = actions.expand-column-to-available-width;};
"Mod+V" = {action = actions.toggle-window-floating;};
"Mod+Minus" = {action = actions.set-column-width "-10%";};
"Mod+Equal" = {action = actions.set-column-width "+10%";};
"Mod+Shift+Minus" = {action = actions.set-window-height "-10%";};
"Mod+Shift+Equal" = {action = actions.set-window-height "+10%";};
"Print" = {action = actions.screenshot {};}; # Empty attrset for default args
"Mod+Shift+E" = {action = actions.quit {};}; # Default: no skip-confirmation
"Ctrl+Alt+Delete" = {action = actions.quit {};};
"Mod+Shift+P" = {action = actions.power-off-monitors;};
}
// lib.attrsets.listToAttrs (builtins.concatMap (i:
with actions; [
{
name = "Mod+${toString i}";
value.action = focus-workspace i;
}
# FIXME: use this action directly untril sodiboo/niri-flake#1018 is fixed.
{
name = "Mod+Shift+${toString i}";
value.action = spawn [niri "msg" "action" "move-column-to-workspace" (toString i)];
}
]) (lib.range 1 9));
};
};
systemd.user.services = {
swaybg = mkService {
Unit.Description = "Wallpaper Chooser";
Service = {
ExecStart = "${getExe pkgs.swaybg} -i ${wallpaper}";
Restart = "always";
};
};
};
}; };
} }

View file

@ -14,7 +14,7 @@ in {
enable = mkBoolOpt false "Enable River WM"; enable = mkBoolOpt false "Enable River WM";
}; };
config = mkIf cfg.enable { config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
wayland.windowManager.river = { wayland.windowManager.river = {
enable = true; enable = true;
settings = { settings = {

View file

@ -19,7 +19,7 @@ in {
enable = mkBoolOpt false "Enable Sway"; enable = mkBoolOpt false "Enable Sway";
}; };
config = mkIf cfg.enable { config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
xwayland = true; xwayland = true;

View file

@ -0,0 +1,31 @@
{pkgs, ...}:{
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages =
[ pkgs.vim
];
# Auto upgrade nix package
nix.package = pkgs.nix;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
programs.fish.enable = true;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
users.users.zack = {
name = "zack";
home = "/Users/zack";
};
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
}