style: format with nixfmt-rfc
This commit is contained in:
parent
3904ea1ce5
commit
2bfedcd162
51 changed files with 1248 additions and 1124 deletions
|
@ -1,5 +1,10 @@
|
||||||
# This file was generated by nvfetcher, please do not modify it manually.
|
# This file was generated by nvfetcher, please do not modify it manually.
|
||||||
{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }:
|
{
|
||||||
|
fetchgit,
|
||||||
|
fetchurl,
|
||||||
|
fetchFromGitHub,
|
||||||
|
dockerTools,
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
catppuccin-bat = {
|
catppuccin-bat = {
|
||||||
pname = "catppuccin-bat";
|
pname = "catppuccin-bat";
|
||||||
|
|
49
flake.nix
49
flake.nix
|
@ -1,16 +1,13 @@
|
||||||
{
|
{
|
||||||
description = "nekowinston's hm flake";
|
description = "nekowinston's hm flake";
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
flake-parts,
|
{ flake-parts, self, ... }@inputs:
|
||||||
self,
|
let
|
||||||
...
|
|
||||||
} @ inputs: let
|
|
||||||
inherit (import ./machines/lib.nix { inherit inputs overlays; }) mkSystems;
|
inherit (import ./machines/lib.nix { inherit inputs overlays; }) mkSystems;
|
||||||
overlays = import ./pkgs/overlays.nix { inherit inputs; };
|
overlays = import ./pkgs/overlays.nix { inherit inputs; };
|
||||||
in
|
in
|
||||||
flake-parts.lib.mkFlake {inherit self inputs;}
|
flake-parts.lib.mkFlake { inherit self inputs; } {
|
||||||
{
|
|
||||||
flake = mkSystems [
|
flake = mkSystems [
|
||||||
{
|
{
|
||||||
host = "sashimi";
|
host = "sashimi";
|
||||||
|
@ -34,14 +31,17 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
imports = [ inputs.pre-commit-hooks.flakeModule ];
|
imports = [ inputs.pre-commit-hooks.flakeModule ];
|
||||||
perSystem = {
|
perSystem =
|
||||||
|
{
|
||||||
config,
|
config,
|
||||||
self',
|
self',
|
||||||
inputs',
|
inputs',
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
_module.args.pkgs = import inputs.nixpkgs {
|
_module.args.pkgs = import inputs.nixpkgs {
|
||||||
inherit overlays system;
|
inherit overlays system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
@ -51,11 +51,12 @@
|
||||||
check.enable = true;
|
check.enable = true;
|
||||||
settings.excludes = [ "_sources/" ];
|
settings.excludes = [ "_sources/" ];
|
||||||
settings.hooks = {
|
settings.hooks = {
|
||||||
alejandra.enable = true;
|
|
||||||
commitizen.enable = true;
|
commitizen.enable = true;
|
||||||
editorconfig-checker.enable = true;
|
editorconfig-checker.enable = true;
|
||||||
luacheck.enable = true;
|
luacheck.enable = true;
|
||||||
nil.enable = true;
|
nil.enable = true;
|
||||||
|
nixfmt.enable = true;
|
||||||
|
nixfmt.package = pkgs.nixfmt-rfc-style;
|
||||||
shellcheck.enable = true;
|
shellcheck.enable = true;
|
||||||
stylua.enable = true;
|
stylua.enable = true;
|
||||||
};
|
};
|
||||||
|
@ -64,27 +65,41 @@
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
inherit (config.pre-commit.devShell) shellHook;
|
inherit (config.pre-commit.devShell) shellHook;
|
||||||
RULES = "./home/secrets/secrets.nix";
|
RULES = "./home/secrets/secrets.nix";
|
||||||
buildInputs = with pkgs;
|
buildInputs =
|
||||||
[alejandra just nil nix-output-monitor nvd inputs'.agenix.packages.agenix]
|
(with pkgs; [
|
||||||
++ lib.optionals stdenv.isDarwin [inputs'.darwin.packages.darwin-rebuild];
|
just
|
||||||
|
nix-output-monitor
|
||||||
|
nixd
|
||||||
|
nvd
|
||||||
|
self'.formatter
|
||||||
|
])
|
||||||
|
++ [ inputs'.agenix.packages.agenix ]
|
||||||
|
++ lib.optionals pkgs.stdenv.isDarwin [ inputs'.darwin.packages.darwin-rebuild ];
|
||||||
};
|
};
|
||||||
|
|
||||||
legacyPackages.homeConfigurations = let
|
legacyPackages.homeConfigurations =
|
||||||
|
let
|
||||||
homeLib = import ./home/lib.nix {
|
homeLib = import ./home/lib.nix {
|
||||||
inherit inputs pkgs username;
|
inherit inputs pkgs username;
|
||||||
isNixOS = false;
|
isNixOS = false;
|
||||||
};
|
};
|
||||||
username = "winston";
|
username = "winston";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
${username} = inputs.home-manager.lib.homeManagerConfiguration {
|
${username} = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit (homeLib) extraSpecialArgs modules;
|
inherit (homeLib) extraSpecialArgs modules;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
formatter = pkgs.alejandra;
|
formatter = pkgs.nixfmt-rfc-style;
|
||||||
};
|
};
|
||||||
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux"];
|
systems = [
|
||||||
|
"aarch64-darwin"
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs.stdenv) isLinux;
|
inherit (pkgs.stdenv) isLinux;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
config = lib.mkIf config.isGraphical {
|
config = lib.mkIf config.isGraphical {
|
||||||
programs.chromium = {
|
programs.chromium = {
|
||||||
enable = isLinux;
|
enable = isLinux;
|
||||||
|
@ -155,9 +157,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = lib.mkIf isLinux [
|
home.packages = lib.mkIf isLinux [ pkgs.mullvad-browser ];
|
||||||
pkgs.mullvad-browser
|
|
||||||
];
|
|
||||||
|
|
||||||
xdg.mimeApps.defaultApplications = {
|
xdg.mimeApps.defaultApplications = {
|
||||||
"text/html" = "chromium.desktop";
|
"text/html" = "chromium.desktop";
|
||||||
|
|
|
@ -3,16 +3,19 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs.stdenv) isDarwin isLinux;
|
inherit (pkgs.stdenv) isDarwin isLinux;
|
||||||
|
|
||||||
vividBuilder = flavor:
|
vividBuilder =
|
||||||
|
flavor:
|
||||||
pkgs.runCommand "vivid-${flavor}" { nativeBuildInputs = [ pkgs.vivid ]; } ''
|
pkgs.runCommand "vivid-${flavor}" { nativeBuildInputs = [ pkgs.vivid ]; } ''
|
||||||
vivid generate ${pkgs.vivid.src}/themes/catppuccin-${flavor}.yml > $out
|
vivid generate ${pkgs.vivid.src}/themes/catppuccin-${flavor}.yml > $out
|
||||||
'';
|
'';
|
||||||
vividLatte = vividBuilder "latte";
|
vividLatte = vividBuilder "latte";
|
||||||
vividMocha = vividBuilder "mocha";
|
vividMocha = vividBuilder "mocha";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
config = lib.mkIf config.isGraphical {
|
config = lib.mkIf config.isGraphical {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
(pkgs.writeShellApplication {
|
(pkgs.writeShellApplication {
|
||||||
|
@ -21,14 +24,17 @@ in {
|
||||||
pkgs.dbus
|
pkgs.dbus
|
||||||
pkgs.gnugrep
|
pkgs.gnugrep
|
||||||
];
|
];
|
||||||
text = let
|
text =
|
||||||
|
let
|
||||||
queryCommand =
|
queryCommand =
|
||||||
if isLinux
|
if isLinux then
|
||||||
then "dbus-send --session --print-reply=literal --reply-timeout=5 --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read string:'org.freedesktop.appearance' string:'color-scheme' | grep -q 'uint32 1'"
|
"dbus-send --session --print-reply=literal --reply-timeout=5 --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read string:'org.freedesktop.appearance' string:'color-scheme' | grep -q 'uint32 1'"
|
||||||
else if isDarwin
|
else if isDarwin then
|
||||||
then "defaults read -g AppleInterfaceStyle &>/dev/null"
|
"defaults read -g AppleInterfaceStyle &>/dev/null"
|
||||||
else throw "Unsupported platform";
|
else
|
||||||
in ''
|
throw "Unsupported platform";
|
||||||
|
in
|
||||||
|
''
|
||||||
[[ -z "''${1-}" ]] && [[ -z "''${2-}" ]] && echo "Usage: $0 <dark> <light>" && exit 1
|
[[ -z "''${1-}" ]] && [[ -z "''${2-}" ]] && echo "Usage: $0 <dark> <light>" && exit 1
|
||||||
|
|
||||||
if ${queryCommand}; then
|
if ${queryCommand}; then
|
||||||
|
|
|
@ -3,15 +3,18 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs.stdenv) isDarwin isLinux;
|
inherit (pkgs.stdenv) isDarwin isLinux;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
config = lib.mkIf config.isGraphical {
|
config = lib.mkIf config.isGraphical {
|
||||||
home.packages =
|
home.packages =
|
||||||
(lib.optionals isDarwin [ (pkgs.discord.override { withOpenASAR = true; }) ])
|
(lib.optionals isDarwin [ (pkgs.discord.override { withOpenASAR = true; }) ])
|
||||||
++ (lib.optionals isLinux [ (pkgs.vesktop.override { withSystemVencord = false; }) ]);
|
++ (lib.optionals isLinux [ (pkgs.vesktop.override { withSystemVencord = false; }) ]);
|
||||||
|
|
||||||
home.activation.discordSettings = let
|
home.activation.discordSettings =
|
||||||
|
let
|
||||||
json = pkgs.writeTextFile {
|
json = pkgs.writeTextFile {
|
||||||
name = "discord-settings.json";
|
name = "discord-settings.json";
|
||||||
text = lib.generators.toJSON { } {
|
text = lib.generators.toJSON { } {
|
||||||
|
@ -27,11 +30,12 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
path =
|
path =
|
||||||
if isLinux
|
if isLinux then
|
||||||
then "${config.xdg.configHome}/discord/settings.json"
|
"${config.xdg.configHome}/discord/settings.json"
|
||||||
else if isDarwin
|
else if isDarwin then
|
||||||
then "${config.home.homeDirectory}/Library/Application Support/discord/settings.json"
|
"${config.home.homeDirectory}/Library/Application Support/discord/settings.json"
|
||||||
else throw "unsupported platform";
|
else
|
||||||
|
throw "unsupported platform";
|
||||||
in
|
in
|
||||||
# gets written as a file after the writeBoundary to keep it mutable
|
# gets written as a file after the writeBoundary to keep it mutable
|
||||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
|
|
@ -3,14 +3,17 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
config = lib.mkIf config.isGraphical {
|
config = lib.mkIf config.isGraphical {
|
||||||
home.activation = {
|
home.activation = {
|
||||||
installCustomFonts = let
|
installCustomFonts =
|
||||||
|
let
|
||||||
fontDirectory =
|
fontDirectory =
|
||||||
if pkgs.stdenv.isDarwin
|
if pkgs.stdenv.isDarwin then
|
||||||
then "${config.home.homeDirectory}/Library/Fonts"
|
"${config.home.homeDirectory}/Library/Fonts"
|
||||||
else "${config.xdg.dataHome}/fonts";
|
else
|
||||||
|
"${config.xdg.dataHome}/fonts";
|
||||||
fontPath = ../secrets/fonts;
|
fontPath = ../secrets/fonts;
|
||||||
in
|
in
|
||||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.foot = {
|
programs.foot = {
|
||||||
enable = pkgs.stdenv.isLinux;
|
enable = pkgs.stdenv.isLinux;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
programs.git.includes = [
|
programs.git.includes = [
|
||||||
{
|
{
|
||||||
condition = "gitdir:~/Code/work/";
|
condition = "gitdir:~/Code/work/";
|
||||||
|
@ -15,7 +12,10 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# use fsmonitor
|
# use fsmonitor
|
||||||
home.packages = [pkgs.rs-git-fsmonitor pkgs.watchman];
|
home.packages = [
|
||||||
|
pkgs.rs-git-fsmonitor
|
||||||
|
pkgs.watchman
|
||||||
|
];
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -4,12 +4,16 @@
|
||||||
osConfig,
|
osConfig,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
primary-color = "#161321";
|
primary-color = "#161321";
|
||||||
secondary-color = "#161321";
|
secondary-color = "#161321";
|
||||||
wallpaper-uri = "file://${../wallpapers/dhm_1610.png}";
|
wallpaper-uri = "file://${../wallpapers/dhm_1610.png}";
|
||||||
in {
|
in
|
||||||
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "gnome")) {
|
{
|
||||||
|
config =
|
||||||
|
lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "gnome"))
|
||||||
|
{
|
||||||
home.packages = with pkgs.gnomeExtensions; [
|
home.packages = with pkgs.gnomeExtensions; [
|
||||||
appindicator
|
appindicator
|
||||||
blur-my-shell
|
blur-my-shell
|
||||||
|
@ -27,7 +31,12 @@ in {
|
||||||
resize-with-right-button = true;
|
resize-with-right-button = true;
|
||||||
};
|
};
|
||||||
"org/gnome/desktop/input-sources" = {
|
"org/gnome/desktop/input-sources" = {
|
||||||
sources = [(mkTuple ["xkb" "us"])];
|
sources = [
|
||||||
|
(mkTuple [
|
||||||
|
"xkb"
|
||||||
|
"us"
|
||||||
|
])
|
||||||
|
];
|
||||||
xkb-options = [ "caps:ctrl_modifier" ];
|
xkb-options = [ "caps:ctrl_modifier" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -42,7 +51,11 @@ in {
|
||||||
"noannoyance-fork@vrba.dev"
|
"noannoyance-fork@vrba.dev"
|
||||||
"user-theme@gnome-shell-extensions.gcampax.github.com"
|
"user-theme@gnome-shell-extensions.gcampax.github.com"
|
||||||
];
|
];
|
||||||
favorite-apps = ["org.gnome.Nautilus.desktop" "chromium-browser.desktop" "org.wezfurlong.wezterm.desktop"];
|
favorite-apps = [
|
||||||
|
"org.gnome.Nautilus.desktop"
|
||||||
|
"chromium-browser.desktop"
|
||||||
|
"org.wezfurlong.wezterm.desktop"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
"org/gnome/shell/extensions/user-theme" = {
|
"org/gnome/shell/extensions/user-theme" = {
|
||||||
name = "WhiteSur-Light";
|
name = "WhiteSur-Light";
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
{
|
{ config, pkgs, ... }:
|
||||||
config,
|
let
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (pkgs.stdenv.hostPlatform) isLinux isDarwin;
|
inherit (pkgs.stdenv.hostPlatform) isLinux isDarwin;
|
||||||
key = "0x0B89BC45007EE9CC";
|
key = "0x0B89BC45007EE9CC";
|
||||||
mailvelopeConfig = builtins.toJSON {
|
mailvelopeConfig = builtins.toJSON {
|
||||||
|
@ -12,14 +9,19 @@
|
||||||
type = "stdio";
|
type = "stdio";
|
||||||
allowed_extensions = [ "jid1-AQqSMBYb0a8ADg@jetpack" ];
|
allowed_extensions = [ "jid1-AQqSMBYb0a8ADg@jetpack" ];
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
home.packages = with pkgs; ([
|
{
|
||||||
|
home.packages =
|
||||||
|
with pkgs;
|
||||||
|
(
|
||||||
|
[
|
||||||
git-credential-gopass
|
git-credential-gopass
|
||||||
gopass
|
gopass
|
||||||
gopass-jsonapi
|
gopass-jsonapi
|
||||||
yubikey-personalization
|
yubikey-personalization
|
||||||
]
|
]
|
||||||
++ lib.optionals isDarwin [pinentry_mac]);
|
++ lib.optionals isDarwin [ pinentry_mac ]
|
||||||
|
);
|
||||||
|
|
||||||
# two amazing examples of glorious XDG compliance
|
# two amazing examples of glorious XDG compliance
|
||||||
home.file = {
|
home.file = {
|
||||||
|
@ -101,9 +103,6 @@ in {
|
||||||
enable = isLinux;
|
enable = isLinux;
|
||||||
enableExtraSocket = true;
|
enableExtraSocket = true;
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
pinentryPackage =
|
pinentryPackage = if config.isGraphical then pkgs.pinentry-gnome3 else pkgs.pinentry-curses;
|
||||||
if config.isGraphical
|
|
||||||
then pkgs.pinentry-gnome3
|
|
||||||
else pkgs.pinentry-curses;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
themeDir = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}";
|
themeDir = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) {
|
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) {
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
name = "macOS-Monterey";
|
name = "macOS-Monterey";
|
||||||
|
|
|
@ -4,8 +4,11 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
osConfig,
|
osConfig,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "sway")) {
|
{
|
||||||
|
config =
|
||||||
|
lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "sway"))
|
||||||
|
{
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
blueberry
|
blueberry
|
||||||
|
@ -34,14 +37,16 @@
|
||||||
udiskie.enable = true;
|
udiskie.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland = let
|
wayland.windowManager.hyprland =
|
||||||
|
let
|
||||||
mod = "SUPER";
|
mod = "SUPER";
|
||||||
modFocus = "${mod}_CTRL";
|
modFocus = "${mod}_CTRL";
|
||||||
modMove = "${mod}_SHIFT";
|
modMove = "${mod}_SHIFT";
|
||||||
hyper = "SUPER_CTRL_SHIFT_ALT";
|
hyper = "SUPER_CTRL_SHIFT_ALT";
|
||||||
swayosd = pkgs.swayosd + "/bin/swayosd-client";
|
swayosd = pkgs.swayosd + "/bin/swayosd-client";
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
monitor = ",preferred,auto,2";
|
monitor = ",preferred,auto,2";
|
||||||
|
@ -134,9 +139,7 @@
|
||||||
"${pkgs.swayosd}/bin/swayosd-server"
|
"${pkgs.swayosd}/bin/swayosd-server"
|
||||||
"${pkgs.swaybg}/bin/swaybg -o '*' -m fill -i ${../wallpapers/dhm_1610.png}"
|
"${pkgs.swaybg}/bin/swaybg -o '*' -m fill -i ${../wallpapers/dhm_1610.png}"
|
||||||
];
|
];
|
||||||
exec-once = [
|
exec-once = [ "${config.programs.waybar.package}/bin/waybar -b hyprland" ];
|
||||||
"${config.programs.waybar.package}/bin/waybar -b hyprland"
|
|
||||||
];
|
|
||||||
plugin.hy3.autotile.enable = true;
|
plugin.hy3.autotile.enable = true;
|
||||||
};
|
};
|
||||||
plugins = [ pkgs.hyprlandPlugins.hy3 ];
|
plugins = [ pkgs.hyprlandPlugins.hy3 ];
|
||||||
|
|
|
@ -1,12 +1,7 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
(wrapHelm kubernetes-helm {
|
(wrapHelm kubernetes-helm { plugins = [ kubernetes-helmPlugins.helm-diff ]; })
|
||||||
plugins = [kubernetes-helmPlugins.helm-diff];
|
|
||||||
})
|
|
||||||
cmctl
|
cmctl
|
||||||
dyff
|
dyff
|
||||||
gojq
|
gojq
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
age.secrets."aerc-personal.conf".path = "${config.xdg.configHome}/aerc/accounts.conf";
|
age.secrets."aerc-personal.conf".path = "${config.xdg.configHome}/aerc/accounts.conf";
|
||||||
programs = {
|
programs = {
|
||||||
aerc = {
|
aerc = {
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
config = lib.mkIf config.isGraphical {
|
config = lib.mkIf config.isGraphical {
|
||||||
programs.imv.enable = isLinux;
|
programs.imv.enable = isLinux;
|
||||||
programs.mpv.enable = isLinux;
|
programs.mpv.enable = isLinux;
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
{pkgs, ...}: let
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.newsboat = rec {
|
programs.newsboat = rec {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoReload = true;
|
autoReload = true;
|
||||||
browser =
|
browser = if isLinux then "${pkgs.xdg-utils}/bin/xdg-open" else "open";
|
||||||
if isLinux
|
|
||||||
then "${pkgs.xdg-utils}/bin/xdg-open"
|
|
||||||
else "open";
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
urls-source "freshrss"
|
urls-source "freshrss"
|
||||||
freshrss-url "https://freshrss.winston.sh/api/greader.php"
|
freshrss-url "https://freshrss.winston.sh/api/greader.php"
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
||||||
ctp = {
|
ctp = {
|
||||||
base = "#1e1e2e";
|
base = "#1e1e2e";
|
||||||
|
@ -13,7 +14,8 @@
|
||||||
red = "#f38ba8";
|
red = "#f38ba8";
|
||||||
mauve = "#cba6f7";
|
mauve = "#cba6f7";
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
config = lib.mkIf config.isGraphical {
|
config = lib.mkIf config.isGraphical {
|
||||||
programs.i3status-rust = lib.mkIf isLinux {
|
programs.i3status-rust = lib.mkIf isLinux {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -4,9 +4,13 @@
|
||||||
osConfig,
|
osConfig,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
fonts = {
|
fonts = {
|
||||||
names = ["IBM Plex Sans" "Symbols Nerd Font"];
|
names = [
|
||||||
|
"IBM Plex Sans"
|
||||||
|
"Symbols Nerd Font"
|
||||||
|
];
|
||||||
size = 12.0;
|
size = 12.0;
|
||||||
};
|
};
|
||||||
ctp = {
|
ctp = {
|
||||||
|
@ -17,8 +21,11 @@
|
||||||
red = "#f38ba8";
|
red = "#f38ba8";
|
||||||
mauve = "#cba6f7";
|
mauve = "#cba6f7";
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "sway")) {
|
{
|
||||||
|
config =
|
||||||
|
lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "sway"))
|
||||||
|
{
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
@ -48,9 +55,11 @@ in {
|
||||||
udiskie.enable = true;
|
udiskie.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.sway = let
|
wayland.windowManager.sway =
|
||||||
|
let
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
package = null;
|
package = null;
|
||||||
checkConfig = false;
|
checkConfig = false;
|
||||||
|
@ -63,9 +72,7 @@ in {
|
||||||
command = "${pkgs.autotiling}/bin/autotiling -l2";
|
command = "${pkgs.autotiling}/bin/autotiling -l2";
|
||||||
always = true;
|
always = true;
|
||||||
}
|
}
|
||||||
{
|
{ command = "1password --silent"; }
|
||||||
command = "1password --silent";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
command = ''
|
command = ''
|
||||||
swayidle -w \
|
swayidle -w \
|
||||||
|
@ -80,9 +87,7 @@ in {
|
||||||
command = "${pkgs.swayosd}/bin/swayosd-server";
|
command = "${pkgs.swayosd}/bin/swayosd-server";
|
||||||
always = true;
|
always = true;
|
||||||
}
|
}
|
||||||
{
|
{ command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; }
|
||||||
command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
workspaceAutoBackAndForth = true;
|
workspaceAutoBackAndForth = true;
|
||||||
terminal = "${config.programs.wezterm.package}/bin/wezterm";
|
terminal = "${config.programs.wezterm.package}/bin/wezterm";
|
||||||
|
@ -93,7 +98,8 @@ in {
|
||||||
scale = "2";
|
scale = "2";
|
||||||
bg = "${../wallpapers/dhm_1610.png} fill #171320";
|
bg = "${../wallpapers/dhm_1610.png} fill #171320";
|
||||||
};
|
};
|
||||||
keybindings = let
|
keybindings =
|
||||||
|
let
|
||||||
mod = modifier;
|
mod = modifier;
|
||||||
modMove = "${mod}+Shift";
|
modMove = "${mod}+Shift";
|
||||||
modFocus = "${mod}+Ctrl";
|
modFocus = "${mod}+Ctrl";
|
||||||
|
@ -103,7 +109,8 @@ in {
|
||||||
screenshot = "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
|
screenshot = "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
swayosd = pkgs.swayosd + "/bin/swayosd-client";
|
swayosd = pkgs.swayosd + "/bin/swayosd-client";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
"${mod}+Shift+b" = "border none";
|
"${mod}+Shift+b" = "border none";
|
||||||
"${mod}+b" = "border pixel 2";
|
"${mod}+b" = "border pixel 2";
|
||||||
"${mod}+n" = "border normal";
|
"${mod}+n" = "border normal";
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: let
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
inherit (pkgs.tmuxPlugins) mkTmuxPlugin;
|
inherit (pkgs.tmuxPlugins) mkTmuxPlugin;
|
||||||
|
|
||||||
menus = mkTmuxPlugin {
|
menus = mkTmuxPlugin {
|
||||||
|
@ -21,7 +22,8 @@
|
||||||
sha256 = "sha256-c5EGBrKcrqHWTKpCEhxYfxPeERFrbTuDfcQhsUAbic4=";
|
sha256 = "sha256-c5EGBrKcrqHWTKpCEhxYfxPeERFrbTuDfcQhsUAbic4=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
sensibleOnTop = true;
|
sensibleOnTop = true;
|
||||||
|
|
|
@ -5,13 +5,15 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
isNixOS,
|
isNixOS,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
||||||
|
|
||||||
settingsJSON = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/settings.json";
|
settingsJSON = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/settings.json";
|
||||||
keybindingsJSON = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/keybindings.json";
|
keybindingsJSON = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/keybindings.json";
|
||||||
snippetsDir = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/snippets";
|
snippetsDir = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/snippets";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
enable = config.isGraphical;
|
enable = config.isGraphical;
|
||||||
extensions =
|
extensions =
|
||||||
|
@ -36,24 +38,11 @@ in {
|
||||||
# some default config patching to make these work without needing devShells all the time.
|
# some default config patching to make these work without needing devShells all the time.
|
||||||
# other extensions like Go/Rust are only really used with devShells,
|
# other extensions like Go/Rust are only really used with devShells,
|
||||||
# nix & shell are universal enough for me to want them everywhere.
|
# nix & shell are universal enough for me to want them everywhere.
|
||||||
(jnoortheen.nix-ide.overrideAttrs (prev: {
|
|
||||||
nativeBuildInputs = prev.nativeBuildInputs ++ [pkgs.jq pkgs.moreutils];
|
|
||||||
postInstall = ''
|
|
||||||
cd "$out/$installPrefix"
|
|
||||||
jq -e '
|
|
||||||
.contributes.configuration.properties."nix.formatterPath".default =
|
|
||||||
"${pkgs.alejandra}/bin/alejandra" |
|
|
||||||
.contributes.configuration.properties."nix.enableLanguageServer".default =
|
|
||||||
"true" |
|
|
||||||
.contributes.configuration.properties."nix.serverPath".default =
|
|
||||||
"${pkgs.nil}/bin/nil" |
|
|
||||||
.contributes.configuration.properties."nix.serverSettings".default.nil.formatting.command[0] =
|
|
||||||
"${pkgs.alejandra}/bin/alejandra"
|
|
||||||
' < package.json | sponge package.json
|
|
||||||
'';
|
|
||||||
}))
|
|
||||||
(mads-hartmann.bash-ide-vscode.overrideAttrs (prev: {
|
(mads-hartmann.bash-ide-vscode.overrideAttrs (prev: {
|
||||||
nativeBuildInputs = prev.nativeBuildInputs ++ [pkgs.jq pkgs.moreutils];
|
nativeBuildInputs = prev.nativeBuildInputs ++ [
|
||||||
|
pkgs.jq
|
||||||
|
pkgs.moreutils
|
||||||
|
];
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
cd "$out/$installPrefix"
|
cd "$out/$installPrefix"
|
||||||
jq -e '
|
jq -e '
|
||||||
|
@ -63,7 +52,10 @@ in {
|
||||||
'';
|
'';
|
||||||
}))
|
}))
|
||||||
(mkhl.shfmt.overrideAttrs (prev: {
|
(mkhl.shfmt.overrideAttrs (prev: {
|
||||||
nativeBuildInputs = prev.nativeBuildInputs ++ [pkgs.jq pkgs.moreutils];
|
nativeBuildInputs = prev.nativeBuildInputs ++ [
|
||||||
|
pkgs.jq
|
||||||
|
pkgs.moreutils
|
||||||
|
];
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
cd "$out/$installPrefix"
|
cd "$out/$installPrefix"
|
||||||
jq -e '
|
jq -e '
|
||||||
|
@ -72,8 +64,6 @@ in {
|
||||||
' < package.json | sponge package.json
|
' < package.json | sponge package.json
|
||||||
'';
|
'';
|
||||||
}))
|
}))
|
||||||
ms-vscode-remote.remote-ssh-edit
|
|
||||||
ms-vscode.remote-explorer
|
|
||||||
adrianwilczynski.alpine-js-intellisense
|
adrianwilczynski.alpine-js-intellisense
|
||||||
antfu.icons-carbon
|
antfu.icons-carbon
|
||||||
arcanis.vscode-zipfs
|
arcanis.vscode-zipfs
|
||||||
|
@ -95,13 +85,18 @@ in {
|
||||||
golang.go
|
golang.go
|
||||||
graphql.vscode-graphql-syntax
|
graphql.vscode-graphql-syntax
|
||||||
gruntfuggly.todo-tree
|
gruntfuggly.todo-tree
|
||||||
|
hbenl.vscode-test-explorer
|
||||||
|
jnoortheen.nix-ide
|
||||||
jock.svg
|
jock.svg
|
||||||
leonardssh.vscord
|
leonardssh.vscord
|
||||||
lunuan.kubernetes-templates
|
lunuan.kubernetes-templates
|
||||||
mikestead.dotenv
|
mikestead.dotenv
|
||||||
mkhl.direnv
|
mkhl.direnv
|
||||||
ms-kubernetes-tools.vscode-kubernetes-tools
|
ms-kubernetes-tools.vscode-kubernetes-tools
|
||||||
|
ms-vscode-remote.remote-ssh-edit
|
||||||
ms-vscode.live-server
|
ms-vscode.live-server
|
||||||
|
ms-vscode.remote-explorer
|
||||||
|
ms-vscode.test-adapter-converter
|
||||||
oscarotero.vento-syntax
|
oscarotero.vento-syntax
|
||||||
redhat.vscode-yaml
|
redhat.vscode-yaml
|
||||||
ryanluker.vscode-coverage-gutters
|
ryanluker.vscode-coverage-gutters
|
||||||
|
@ -113,19 +108,7 @@ in {
|
||||||
usernamehw.errorlens
|
usernamehw.errorlens
|
||||||
vscodevim.vim
|
vscodevim.vim
|
||||||
wakatime.vscode-wakatime
|
wakatime.vscode-wakatime
|
||||||
ms-vscode.test-adapter-converter
|
|
||||||
hbenl.vscode-test-explorer
|
|
||||||
webfreak.code-d
|
webfreak.code-d
|
||||||
# (webfreak.code-d.overrideAttrs (prev: {
|
|
||||||
# nativeBuildInputs = prev.nativeBuildInputs ++ [pkgs.jq pkgs.moreutils];
|
|
||||||
# postInstall = ''
|
|
||||||
# cd "$out/$installPrefix"
|
|
||||||
# jq -e '
|
|
||||||
# .contributes.configuration.properties."d.dcdClientPath".default =
|
|
||||||
# "${pkgs.alejandra}/bin/alejandra"
|
|
||||||
# ' < package.json | sponge package.json
|
|
||||||
# '';
|
|
||||||
# }))
|
|
||||||
]);
|
]);
|
||||||
mutableExtensionsDir = true;
|
mutableExtensionsDir = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
commonSettings = {
|
commonSettings = {
|
||||||
layer = "top";
|
layer = "top";
|
||||||
position = "top";
|
position = "top";
|
||||||
|
@ -112,15 +113,14 @@
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) {
|
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
hyprland =
|
hyprland = commonSettings // {
|
||||||
commonSettings
|
|
||||||
// {
|
|
||||||
modules-left = [ "hyprland/workspaces" ];
|
modules-left = [ "hyprland/workspaces" ];
|
||||||
"hyprland/workspaces" = {
|
"hyprland/workspaces" = {
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
mkSymlink = path: config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/wezterm/${path}";
|
mkSymlink = path: config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/wezterm/${path}";
|
||||||
srcs = pkgs.callPackage ../../_sources/generated.nix { };
|
srcs = pkgs.callPackage ../../_sources/generated.nix { };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# use the GUI version & config when we have a gui, else just get terminfo
|
# use the GUI version & config when we have a gui, else just get terminfo
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
(lib.mkIf (!config.isGraphical) {
|
(lib.mkIf (!config.isGraphical) { home.packages = [ pkgs.wezterm.terminfo ]; })
|
||||||
home.packages = [pkgs.wezterm.terminfo];
|
|
||||||
})
|
|
||||||
|
|
||||||
(lib.mkIf config.isGraphical {
|
(lib.mkIf config.isGraphical {
|
||||||
programs.wezterm.enable = true;
|
programs.wezterm.enable = true;
|
||||||
|
|
|
@ -3,15 +3,18 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs.stdenv) isLinux;
|
inherit (pkgs.stdenv) isLinux;
|
||||||
srcs = pkgs.callPackage ../../_sources/generated.nix { };
|
srcs = pkgs.callPackage ../../_sources/generated.nix { };
|
||||||
zshPlugins = plugins: (map (plugin: rec {
|
zshPlugins =
|
||||||
|
plugins:
|
||||||
|
(map (plugin: rec {
|
||||||
name = src.name;
|
name = src.name;
|
||||||
inherit (plugin) file src;
|
inherit (plugin) file src;
|
||||||
})
|
}) plugins);
|
||||||
plugins);
|
in
|
||||||
in {
|
{
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
LESS = "-R --use-color";
|
LESS = "-R --use-color";
|
||||||
LESSHISTFILE = "-";
|
LESSHISTFILE = "-";
|
||||||
|
@ -87,7 +90,11 @@ in {
|
||||||
prompt = "#cba6f7";
|
prompt = "#cba6f7";
|
||||||
spinner = "#f5e0dc";
|
spinner = "#f5e0dc";
|
||||||
};
|
};
|
||||||
defaultOptions = ["--height=30%" "--layout=reverse" "--info=inline"];
|
defaultOptions = [
|
||||||
|
"--height=30%"
|
||||||
|
"--layout=reverse"
|
||||||
|
"--info=inline"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
less.enable = true;
|
less.enable = true;
|
||||||
|
@ -161,8 +168,16 @@ in {
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins =
|
plugins =
|
||||||
["colored-man-pages" "colorize" "git" "kubectl"]
|
[
|
||||||
++ lib.optionals pkgs.stdenv.isDarwin ["dash" "macos"];
|
"colored-man-pages"
|
||||||
|
"colorize"
|
||||||
|
"git"
|
||||||
|
"kubectl"
|
||||||
|
]
|
||||||
|
++ lib.optionals pkgs.stdenv.isDarwin [
|
||||||
|
"dash"
|
||||||
|
"macos"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
plugins = zshPlugins [
|
plugins = zshPlugins [
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,13 +3,22 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
||||||
in {
|
in
|
||||||
imports = [./apps ./secrets ./xdg.nix];
|
{
|
||||||
|
imports = [
|
||||||
|
./apps
|
||||||
|
./secrets
|
||||||
|
./xdg.nix
|
||||||
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; ([
|
packages =
|
||||||
|
with pkgs;
|
||||||
|
(
|
||||||
|
[
|
||||||
_1password
|
_1password
|
||||||
age
|
age
|
||||||
age-plugin-yubikey
|
age-plugin-yubikey
|
||||||
|
@ -37,7 +46,8 @@ in {
|
||||||
_1password-gui
|
_1password-gui
|
||||||
uhk-agent
|
uhk-agent
|
||||||
neovide
|
neovide
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
sessionVariables = lib.mkIf isDarwin {
|
sessionVariables = lib.mkIf isDarwin {
|
||||||
SSH_AUTH_SOCK = "${config.programs.gpg.homedir}/S.gpg-agent.ssh";
|
SSH_AUTH_SOCK = "${config.programs.gpg.homedir}/S.gpg-agent.ssh";
|
||||||
};
|
};
|
||||||
|
|
32
home/lib.nix
32
home/lib.nix
|
@ -3,24 +3,24 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
isNixOS ? true,
|
isNixOS ? true,
|
||||||
}: rec {
|
}:
|
||||||
|
rec {
|
||||||
inherit (pkgs.stdenv) isLinux isDarwin;
|
inherit (pkgs.stdenv) isLinux isDarwin;
|
||||||
|
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
flakePath =
|
flakePath =
|
||||||
if isDarwin
|
if isDarwin then "/Users/${username}/.config/flake" else "/home/${username}/.config/flake";
|
||||||
then "/Users/${username}/.config/flake"
|
|
||||||
else "/home/${username}/.config/flake";
|
|
||||||
inherit inputs isNixOS;
|
inherit inputs isNixOS;
|
||||||
};
|
};
|
||||||
|
|
||||||
hmStandaloneConfig = {
|
hmStandaloneConfig = {
|
||||||
home.homeDirectory =
|
home.homeDirectory =
|
||||||
if isLinux
|
if isLinux then
|
||||||
then "/home/${username}"
|
"/home/${username}"
|
||||||
else if isDarwin
|
else if isDarwin then
|
||||||
then "/Users/${username}"
|
"/Users/${username}"
|
||||||
else throw "Unsupported system";
|
else
|
||||||
|
throw "Unsupported system";
|
||||||
home.username = username;
|
home.username = username;
|
||||||
isGraphical = false;
|
isGraphical = false;
|
||||||
targets.genericLinux.enable = isLinux;
|
targets.genericLinux.enable = isLinux;
|
||||||
|
@ -36,13 +36,12 @@
|
||||||
vscode-server.homeModules.default
|
vscode-server.homeModules.default
|
||||||
])
|
])
|
||||||
++ [
|
++ [
|
||||||
({
|
(
|
||||||
osConfig,
|
{ osConfig, lib, ... }:
|
||||||
lib,
|
let
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkOption types;
|
inherit (lib) mkOption types;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
isGraphical = mkOption {
|
isGraphical = mkOption {
|
||||||
default = osConfig.isGraphical;
|
default = osConfig.isGraphical;
|
||||||
|
@ -60,7 +59,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
|
)
|
||||||
]
|
]
|
||||||
++ pkgs.lib.optionals (!isNixOS) [ hmStandaloneConfig ]
|
++ pkgs.lib.optionals (!isNixOS) [ hmStandaloneConfig ]
|
||||||
++ [ ./. ];
|
++ [ ./. ];
|
||||||
|
|
|
@ -3,17 +3,24 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs.stdenv) isDarwin;
|
inherit (pkgs.stdenv) isDarwin;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
age = {
|
age = {
|
||||||
identityPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
identityPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
||||||
|
|
||||||
secrets = with builtins;
|
secrets =
|
||||||
listToAttrs (map (k: {
|
with builtins;
|
||||||
|
listToAttrs (
|
||||||
|
map (k: {
|
||||||
name = lib.removePrefix "home/secrets/" (lib.removeSuffix ".age" k);
|
name = lib.removePrefix "home/secrets/" (lib.removeSuffix ".age" k);
|
||||||
value = {file = ./../.. + "/${k}";};
|
value = {
|
||||||
}) (attrNames (import ./secrets.nix)));
|
file = ./../.. + "/${k}";
|
||||||
|
};
|
||||||
|
}) (attrNames (import ./secrets.nix))
|
||||||
|
);
|
||||||
|
|
||||||
secretsDir = lib.mkIf isDarwin "/private/tmp/agenix";
|
secretsDir = lib.mkIf isDarwin "/private/tmp/agenix";
|
||||||
secretsMountPoint = lib.mkIf isDarwin "/private/tmp/agenix.d";
|
secretsMountPoint = lib.mkIf isDarwin "/private/tmp/agenix.d";
|
||||||
|
|
|
@ -7,7 +7,8 @@ let
|
||||||
yubikeys._5ci = "age1yubikey1qfkn095xth4ukxjye98ew4ul6xdkyz7sek0hd67yfjs5z6tv7q9jgnfchls";
|
yubikeys._5ci = "age1yubikey1qfkn095xth4ukxjye98ew4ul6xdkyz7sek0hd67yfjs5z6tv7q9jgnfchls";
|
||||||
|
|
||||||
default = [ yubikeys._5ci ] ++ (builtins.attrValues homes);
|
default = [ yubikeys._5ci ] ++ (builtins.attrValues homes);
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
"home/secrets/aerc-personal.conf.age".publicKeys = default;
|
"home/secrets/aerc-personal.conf.age".publicKeys = default;
|
||||||
"home/secrets/gitconfig-freelance.age".publicKeys = default;
|
"home/secrets/gitconfig-freelance.age".publicKeys = default;
|
||||||
"home/secrets/gitconfig-work.age".publicKeys = default;
|
"home/secrets/gitconfig-work.age".publicKeys = default;
|
||||||
|
|
13
home/xdg.nix
13
home/xdg.nix
|
@ -5,11 +5,18 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
||||||
inherit (config.xdg) cacheHome configHome dataHome stateHome;
|
inherit (config.xdg)
|
||||||
|
cacheHome
|
||||||
|
configHome
|
||||||
|
dataHome
|
||||||
|
stateHome
|
||||||
|
;
|
||||||
inherit (config.home) homeDirectory;
|
inherit (config.home) homeDirectory;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
home = rec {
|
home = rec {
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
AZURE_CONFIG_DIR = "${configHome}/azure";
|
AZURE_CONFIG_DIR = "${configHome}/azure";
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [ ./options.nix ];
|
imports = [ ./options.nix ];
|
||||||
# manipulate the global /etc/zshenv for PATH, etc.
|
# manipulate the global /etc/zshenv for PATH, etc.
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
@ -40,12 +37,15 @@
|
||||||
mouse_follows_focus = "off";
|
mouse_follows_focus = "off";
|
||||||
focus_follows_mouse = "off";
|
focus_follows_mouse = "off";
|
||||||
};
|
};
|
||||||
extraConfig = let
|
extraConfig =
|
||||||
|
let
|
||||||
rule = "yabai -m rule";
|
rule = "yabai -m rule";
|
||||||
mkRules = apps: options:
|
mkRules =
|
||||||
|
apps: options:
|
||||||
builtins.concatStringsSep "\n" (map (app: ''yabai -m rule --add app="${app}" ${options}'') apps);
|
builtins.concatStringsSep "\n" (map (app: ''yabai -m rule --add app="${app}" ${options}'') apps);
|
||||||
unmanaged = apps: mkRules apps "manage=off";
|
unmanaged = apps: mkRules apps "manage=off";
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
# auto-inject scripting additions
|
# auto-inject scripting additions
|
||||||
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
|
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
|
||||||
sudo yabai --load-sa
|
sudo yabai --load-sa
|
||||||
|
@ -82,22 +82,17 @@
|
||||||
};
|
};
|
||||||
skhd = {
|
skhd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
skhdConfig = let
|
skhdConfig =
|
||||||
mapKeymaps = cmd:
|
let
|
||||||
|
mapKeymaps =
|
||||||
|
cmd:
|
||||||
builtins.concatStringsSep "\n" (
|
builtins.concatStringsSep "\n" (
|
||||||
map (i:
|
map (i: builtins.replaceStrings [ "Num" ] [ (toString (if (i == 10) then 0 else i)) ] cmd) (
|
||||||
builtins.replaceStrings ["Num"] [
|
|
||||||
(toString (
|
|
||||||
if (i == 10)
|
|
||||||
then 0
|
|
||||||
else i
|
|
||||||
))
|
|
||||||
]
|
|
||||||
cmd) (
|
|
||||||
lib.range 1 10
|
lib.range 1 10
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
# focus window
|
# focus window
|
||||||
cmd + ctrl - h : yabai -m window --focus west
|
cmd + ctrl - h : yabai -m window --focus west
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{lib, ...}: let
|
{ lib, ... }:
|
||||||
|
let
|
||||||
inherit (lib) mkOption types;
|
inherit (lib) mkOption types;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.location = {
|
options.location = {
|
||||||
latitude = mkOption { type = types.nullOr types.float; };
|
latitude = mkOption { type = types.nullOr types.float; };
|
||||||
longitude = mkOption { type = types.nullOr types.float; };
|
longitude = mkOption { type = types.nullOr types.float; };
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./gnome.nix
|
./gnome.nix
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
config = lib.mkIf (config.dotfiles.desktop == "gnome") {
|
config = lib.mkIf (config.dotfiles.desktop == "gnome") {
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
config = lib.mkIf (config.dotfiles.desktop == "sway") {
|
config = lib.mkIf (config.dotfiles.desktop == "sway") {
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
hardware.keyboard.qmk.enable = true;
|
hardware.keyboard.qmk.enable = true;
|
||||||
services.udev.packages = [ pkgs.uhk-udev-rules ];
|
services.udev.packages = [ pkgs.uhk-udev-rules ];
|
||||||
services.kanata = {
|
services.kanata = {
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
services = {
|
services = {
|
||||||
dnsmasq = {
|
dnsmasq = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -26,9 +27,7 @@
|
||||||
};
|
};
|
||||||
stubby = {
|
stubby = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings =
|
settings = pkgs.stubby.passthru.settingsExample // {
|
||||||
pkgs.stubby.passthru.settingsExample
|
|
||||||
// {
|
|
||||||
resolution_type = "GETDNS_RESOLUTION_STUB";
|
resolution_type = "GETDNS_RESOLUTION_STUB";
|
||||||
listen_addresses = [
|
listen_addresses = [
|
||||||
"127.0.0.1@53000"
|
"127.0.0.1@53000"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
virtualisation.podman = {
|
virtualisation.podman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
programs.noisetorch.enable = config.isGraphical;
|
programs.noisetorch.enable = config.isGraphical;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services = {
|
services = {
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
config = lib.mkIf (config.dotfiles.desktop == "sway") {
|
config = lib.mkIf (config.dotfiles.desktop == "sway") {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# file management
|
# file management
|
||||||
|
|
|
@ -40,7 +40,10 @@
|
||||||
keyFile = builtins.toString ../certs/local.key;
|
keyFile = builtins.toString ../certs/local.key;
|
||||||
};
|
};
|
||||||
http.routers.traefik = {
|
http.routers.traefik = {
|
||||||
entryPoints = ["http" "https"];
|
entryPoints = [
|
||||||
|
"http"
|
||||||
|
"https"
|
||||||
|
];
|
||||||
rule = "Host(`traefik.this.test`)";
|
rule = "Host(`traefik.this.test`)";
|
||||||
tls = true;
|
tls = true;
|
||||||
service = "api@internal";
|
service = "api@internal";
|
||||||
|
|
|
@ -3,18 +3,19 @@
|
||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (builtins) attrValues mapAttrs;
|
inherit (builtins) attrValues mapAttrs;
|
||||||
inherit (lib) filterAttrs;
|
inherit (lib) filterAttrs;
|
||||||
inherit (pkgs.stdenv) isDarwin isLinux;
|
inherit (pkgs.stdenv) isDarwin isLinux;
|
||||||
flakeInputs = filterAttrs (name: value: (value ? outputs) && (name != "self")) inputs;
|
flakeInputs = filterAttrs (name: value: (value ? outputs) && (name != "self")) inputs;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nix = {
|
nix = {
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
package = pkgs.nixVersions.nix_2_22;
|
package = pkgs.nixVersions.nix_2_22;
|
||||||
settings =
|
settings = {
|
||||||
{
|
|
||||||
# breaks the Nix Store on macOS
|
# breaks the Nix Store on macOS
|
||||||
# https://github.com/NixOS/nix/issues/7273
|
# https://github.com/NixOS/nix/issues/7273
|
||||||
auto-optimise-store = isLinux;
|
auto-optimise-store = isLinux;
|
||||||
|
@ -30,14 +31,14 @@ in {
|
||||||
];
|
];
|
||||||
use-xdg-base-directories = true;
|
use-xdg-base-directories = true;
|
||||||
warn-dirty = false;
|
warn-dirty = false;
|
||||||
}
|
} // (import ../../../flake.nix).nixConfig;
|
||||||
// (import ../../../flake.nix).nixConfig;
|
|
||||||
registry = mapAttrs (name: v: { flake = v; }) flakeInputs;
|
registry = mapAttrs (name: v: { flake = v; }) flakeInputs;
|
||||||
nixPath =
|
nixPath =
|
||||||
if isDarwin
|
if isDarwin then
|
||||||
then lib.mkForce (mapAttrs (k: v: v.outPath) flakeInputs)
|
lib.mkForce (mapAttrs (k: v: v.outPath) flakeInputs)
|
||||||
else if isLinux
|
else if isLinux then
|
||||||
then attrValues (mapAttrs (k: v: "${k}=${v.outPath}") flakeInputs)
|
attrValues (mapAttrs (k: v: "${k}=${v.outPath}") flakeInputs)
|
||||||
else throw "Unsupported platform";
|
else
|
||||||
|
throw "Unsupported platform";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,26 +3,32 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
homeRoot =
|
homeRoot =
|
||||||
if pkgs.stdenv.isDarwin
|
if pkgs.stdenv.isDarwin then
|
||||||
then "/Users"
|
"/Users"
|
||||||
else if pkgs.stdenv.isLinux
|
else if pkgs.stdenv.isLinux then
|
||||||
then "/home"
|
"/home"
|
||||||
else throw "Unsupported OS";
|
else
|
||||||
in {
|
throw "Unsupported OS";
|
||||||
|
in
|
||||||
|
{
|
||||||
users.users."${config.dotfiles.username}" =
|
users.users."${config.dotfiles.username}" =
|
||||||
{
|
{
|
||||||
home = "${homeRoot}/${config.dotfiles.username}";
|
home = "${homeRoot}/${config.dotfiles.username}";
|
||||||
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILm0O46zW/XfVOSwz0okRWYeOAg+wCVkCtCAoVTpZsOh"];
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILm0O46zW/XfVOSwz0okRWYeOAg+wCVkCtCAoVTpZsOh"
|
||||||
|
];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
}
|
}
|
||||||
// (
|
// (
|
||||||
if pkgs.stdenv.isLinux
|
if pkgs.stdenv.isLinux then
|
||||||
then {
|
{
|
||||||
isNormalUser = lib.mkIf pkgs.stdenv.isLinux true;
|
isNormalUser = lib.mkIf pkgs.stdenv.isLinux true;
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
}
|
}
|
||||||
else {}
|
else
|
||||||
|
{ }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
{
|
{ lib, pkgs, ... }:
|
||||||
lib,
|
let
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkForce;
|
inherit (lib) mkForce;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
services = {
|
services = {
|
||||||
kanata.enable = mkForce false;
|
kanata.enable = mkForce false;
|
||||||
dnsmasq.enable = mkForce false;
|
dnsmasq.enable = mkForce false;
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [ ./hardware.nix ];
|
imports = [ ./hardware.nix ];
|
||||||
|
|
||||||
dotfiles.desktop = "sway";
|
dotfiles.desktop = "sway";
|
||||||
|
@ -30,7 +27,10 @@
|
||||||
virtualisation.podman.enable = true;
|
virtualisation.podman.enable = true;
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
|
|
||||||
users.users."${config.dotfiles.username}".extraGroups = ["libvirtd" "transmission"];
|
users.users."${config.dotfiles.username}".extraGroups = [
|
||||||
|
"libvirtd"
|
||||||
|
"transmission"
|
||||||
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
cabextract
|
cabextract
|
||||||
|
@ -56,8 +56,8 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.steam.override {
|
package = pkgs.steam.override {
|
||||||
extraEnv.MANGOHUD = 1;
|
extraEnv.MANGOHUD = 1;
|
||||||
extraPkgs = p:
|
extraPkgs =
|
||||||
with p; [
|
p: with p; [
|
||||||
corefonts
|
corefonts
|
||||||
protontricks
|
protontricks
|
||||||
gamescope
|
gamescope
|
||||||
|
|
|
@ -4,17 +4,28 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [
|
{
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
];
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"];
|
initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
initrd.kernelModules = [ "dm-snapshot" ];
|
initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
kernelModules = ["kvm-amd" "v4l2loopback"];
|
kernelModules = [
|
||||||
kernelParams = ["quiet" "splash"];
|
"kvm-amd"
|
||||||
|
"v4l2loopback"
|
||||||
|
];
|
||||||
|
kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"splash"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Intel Arc A770
|
# Intel Arc A770
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ inputs, overlays }:
|
||||||
inputs,
|
rec {
|
||||||
overlays,
|
hmCommonConfig =
|
||||||
}: rec {
|
{ username }:
|
||||||
hmCommonConfig = {username}: ({
|
(
|
||||||
config,
|
{ config, pkgs, ... }:
|
||||||
pkgs,
|
let
|
||||||
...
|
|
||||||
}: let
|
|
||||||
homeLib = import ../home/lib.nix { inherit inputs username pkgs; };
|
homeLib = import ../home/lib.nix { inherit inputs username pkgs; };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
config = {
|
config = {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = overlays;
|
overlays = overlays;
|
||||||
|
@ -23,21 +22,26 @@
|
||||||
users.${username}.imports = [ ../home ];
|
users.${username}.imports = [ ../home ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
mkSystem = {
|
mkSystem =
|
||||||
|
{
|
||||||
host,
|
host,
|
||||||
system,
|
system,
|
||||||
username,
|
username,
|
||||||
isGraphical ? false,
|
isGraphical ? false,
|
||||||
extraModules ? [ ],
|
extraModules ? [ ],
|
||||||
}: let
|
}:
|
||||||
ldTernary = l: d:
|
let
|
||||||
if pkgs.stdenv.isLinux
|
ldTernary =
|
||||||
then l
|
l: d:
|
||||||
else if pkgs.stdenv.isDarwin
|
if pkgs.stdenv.isLinux then
|
||||||
then d
|
l
|
||||||
else throw "Unsupported system";
|
else if pkgs.stdenv.isDarwin then
|
||||||
|
d
|
||||||
|
else
|
||||||
|
throw "Unsupported system";
|
||||||
target = ldTernary "nixosConfigurations" "darwinConfigurations";
|
target = ldTernary "nixosConfigurations" "darwinConfigurations";
|
||||||
builder = with inputs; ldTernary nixpkgs.lib.nixosSystem darwin.lib.darwinSystem;
|
builder = with inputs; ldTernary nixpkgs.lib.nixosSystem darwin.lib.darwinSystem;
|
||||||
module = ldTernary "nixosModules" "darwinModules";
|
module = ldTernary "nixosModules" "darwinModules";
|
||||||
|
@ -45,11 +49,11 @@
|
||||||
|
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
inherit (pkgs.lib) mkOption types;
|
inherit (pkgs.lib) mkOption types;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
${target}."${host}" = builder {
|
${target}."${host}" = builder {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules =
|
modules = [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
dotfiles = {
|
dotfiles = {
|
||||||
|
@ -59,7 +63,12 @@
|
||||||
description = "The username of the user";
|
description = "The username of the user";
|
||||||
};
|
};
|
||||||
desktop = mkOption {
|
desktop = mkOption {
|
||||||
type = types.nullOr (types.enum ["gnome" "sway"]);
|
type = types.nullOr (
|
||||||
|
types.enum [
|
||||||
|
"gnome"
|
||||||
|
"sway"
|
||||||
|
]
|
||||||
|
);
|
||||||
default = "sway";
|
default = "sway";
|
||||||
description = "The desktop environment to use";
|
description = "The desktop environment to use";
|
||||||
};
|
};
|
||||||
|
@ -77,10 +86,10 @@
|
||||||
./common/${hostPlatform}
|
./common/${hostPlatform}
|
||||||
./${host}
|
./${host}
|
||||||
inputs.home-manager.${module}.home-manager
|
inputs.home-manager.${module}.home-manager
|
||||||
]
|
] ++ [ (hmCommonConfig { inherit username; }) ] ++ extraModules;
|
||||||
++ [(hmCommonConfig {inherit username;})]
|
specialArgs = {
|
||||||
++ extraModules;
|
inherit inputs;
|
||||||
specialArgs = {inherit inputs;};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{config, ...}: let
|
{ config, ... }:
|
||||||
|
let
|
||||||
noQuarantine = name: {
|
noQuarantine = name: {
|
||||||
inherit name;
|
inherit name;
|
||||||
args.no_quarantine = true;
|
args.no_quarantine = true;
|
||||||
|
@ -7,7 +8,8 @@
|
||||||
inherit name;
|
inherit name;
|
||||||
args.require_sha = false;
|
args.require_sha = false;
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# make brew available in PATH
|
# make brew available in PATH
|
||||||
environment.systemPath = [ config.homebrew.brewPrefix ];
|
environment.systemPath = [ config.homebrew.brewPrefix ];
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
writeScriptBin,
|
writeScriptBin,
|
||||||
# command line arguments which are always set e.g "--disable-gpu"
|
# command line arguments which are always set e.g "--disable-gpu"
|
||||||
commandLineArgs ? [ ],
|
commandLineArgs ? [ ],
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
name = "apple-music-via-google-chrome";
|
name = "apple-music-via-google-chrome";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -46,5 +47,8 @@
|
||||||
in
|
in
|
||||||
symlinkJoin {
|
symlinkJoin {
|
||||||
inherit name meta;
|
inherit name meta;
|
||||||
paths = [script desktopItem];
|
paths = [
|
||||||
|
script
|
||||||
|
desktopItem
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
{inputs}: [
|
{ inputs }:
|
||||||
|
[
|
||||||
inputs.catppuccin-toolbox.overlays.default
|
inputs.catppuccin-toolbox.overlays.default
|
||||||
inputs.catppuccin-vsc.overlays.default
|
inputs.catppuccin-vsc.overlays.default
|
||||||
inputs.nix-vscode-extensions.overlays.default
|
inputs.nix-vscode-extensions.overlays.default
|
||||||
(final: prev: let
|
(
|
||||||
|
final: prev:
|
||||||
|
let
|
||||||
srcs = prev.callPackages ../_sources/generated.nix { };
|
srcs = prev.callPackages ../_sources/generated.nix { };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
inherit (inputs.swayfx.packages.${prev.system}) swayfx-unwrapped;
|
inherit (inputs.swayfx.packages.${prev.system}) swayfx-unwrapped;
|
||||||
starship = prev.starship.overrideAttrs (old: {
|
starship = prev.starship.overrideAttrs (old: {
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -24,5 +28,6 @@
|
||||||
nekowinston = inputs.nekowinston-nur.packages.${prev.stdenv.system};
|
nekowinston = inputs.nekowinston-nur.packages.${prev.stdenv.system};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue