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