chore: run formatter
This commit is contained in:
@@ -10,14 +10,17 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, fenix }:
|
outputs = {
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
self,
|
||||||
let
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
fenix,
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
fenixLib = fenix.packages.${system};
|
fenixLib = fenix.packages.${system};
|
||||||
rustToolchain = fenixLib.stable.toolchain;
|
rustToolchain = fenixLib.stable.toolchain;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
lua-language-server
|
lua-language-server
|
||||||
|
|||||||
@@ -40,8 +40,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, ... }@inputs:
|
outputs = {nixpkgs, ...} @ inputs: let
|
||||||
let
|
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
mkHost = host: {
|
mkHost = host: {
|
||||||
${host} = nixpkgs.lib.nixosSystem {
|
${host} = nixpkgs.lib.nixosSystem {
|
||||||
@@ -66,7 +65,8 @@
|
|||||||
|
|
||||||
devShell.x86_64-linux = let
|
devShell.x86_64-linux = let
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
in pkgs.mkShell {
|
in
|
||||||
|
pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [nil lua-language-server];
|
buildInputs = with pkgs; [nil lua-language-server];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ config, lib, pkgs, hostSpec, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
hostSpec,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
(map lib.custom.relativeToRoot ["modules/common" "modules/home-manager"])
|
(map lib.custom.relativeToRoot ["modules/common" "modules/home-manager"])
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
{
|
{config, ...}: {
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ lib, pkgs, config, ... }: {
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
package = pkgs.gitAndTools.gitFull;
|
package = pkgs.gitAndTools.gitFull;
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
{
|
{config, ...}: {
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.btop = {enable = true;};
|
programs.btop = {enable = true;};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
lazygit
|
lazygit
|
||||||
gh
|
gh
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ config, ... }:
|
{config, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
@@ -9,6 +7,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Create a symlink from ~/.config/nvim to the dotfiles directory
|
# Create a symlink from ~/.config/nvim to the dotfiles directory
|
||||||
home.file.".config/nvim".source = config.lib.file.mkOutOfStoreSymlink
|
home.file.".config/nvim".source =
|
||||||
|
config.lib.file.mkOutOfStoreSymlink
|
||||||
"${config.home.homeDirectory}/git/nix-config/dotfiles/nvim";
|
"${config.home.homeDirectory}/git/nix-config/dotfiles/nvim";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{ ... }:
|
{...}: let
|
||||||
let onePassPath = "~/.1password/agent.sock";
|
onePassPath = "~/.1password/agent.sock";
|
||||||
in {
|
in {
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
home = {
|
home = {
|
||||||
file = {
|
file = {
|
||||||
"${config.xdg.configHome}/tmux".source =
|
"${config.xdg.configHome}/tmux".source =
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
discord
|
discord
|
||||||
protonmail-desktop
|
protonmail-desktop
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
{ pkgs, inputs, config, lib, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
{ lib, config, device, withSwap, swapSize, label, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
device,
|
||||||
|
withSwap,
|
||||||
|
swapSize,
|
||||||
|
label,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
disko = {
|
disko = {
|
||||||
devices = {
|
devices = {
|
||||||
disk = {
|
disk = {
|
||||||
@@ -34,8 +40,7 @@
|
|||||||
passwordFile = "/tmp/secret.key";
|
passwordFile = "/tmp/secret.key";
|
||||||
settings = {
|
settings = {
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
crypttabExtraOpts =
|
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10"];
|
||||||
[ "fido2-device=auto" "token-timeout=10" ];
|
|
||||||
};
|
};
|
||||||
content = {
|
content = {
|
||||||
type = "lvm_pv";
|
type = "lvm_pv";
|
||||||
@@ -70,8 +75,7 @@
|
|||||||
};
|
};
|
||||||
"@persist" = {
|
"@persist" = {
|
||||||
mountpoint = config.hostSpec.persist;
|
mountpoint = config.hostSpec.persist;
|
||||||
mountOptions =
|
mountOptions = ["subvol=persist" "compress=zstd" "noatime"];
|
||||||
[ "subvol=persist" "compress=zstd" "noatime" ];
|
|
||||||
};
|
};
|
||||||
"@nix" = {
|
"@nix" = {
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ config, ... }:
|
{config, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs = {
|
programs = {
|
||||||
_1password.enable = true;
|
_1password.enable = true;
|
||||||
_1password-gui = {
|
_1password-gui = {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [claude-code];
|
environment.systemPackages = with pkgs; [claude-code];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [hoppscotch];
|
environment.systemPackages = with pkgs; [hoppscotch];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{ inputs, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package =
|
package =
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [sbctl];
|
environment.systemPackages = with pkgs; [sbctl];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services = {
|
services = {
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
pulseaudio.enable = false;
|
pulseaudio.enable = false;
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
hardware = {
|
hardware = {
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.fwupd.enable = true;
|
services.fwupd.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_session = {
|
default_session = {
|
||||||
command =
|
command = "${pkgs.tuigreet}/bin/tuigreet --greeting 'Welcome to NixOS!' --asterisks --remember --remember-user-session --time --cmd ${pkgs.hyprland}/bin/Hyprland";
|
||||||
"${pkgs.tuigreet}/bin/tuigreet --greeting 'Welcome to NixOS!' --asterisks --remember --remember-user-session --time --cmd ${pkgs.hyprland}/bin/Hyprland";
|
|
||||||
user = "greeter";
|
user = "greeter";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{ config, ... }:
|
{config, ...}: let
|
||||||
let sshPort = config.hostSpec.networking.ports.tcp.ssh;
|
sshPort = config.hostSpec.networking.ports.tcp.ssh;
|
||||||
in {
|
in {
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
# Reminder that CUPS cpanel defaults to localhost:631
|
# Reminder that CUPS cpanel defaults to localhost:631
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.pcscd.enable = true;
|
services.pcscd.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# yubikey login / sudo
|
# yubikey login / sudo
|
||||||
security.pam = {
|
security.pam = {
|
||||||
u2f = {
|
u2f = {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{
|
||||||
let
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
hostSpec = config.hostSpec;
|
hostSpec = config.hostSpec;
|
||||||
in {
|
in {
|
||||||
specialisation.gaming.configuration = {
|
specialisation.gaming.configuration = {
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
{ pkgs, config, lib, inputs, ... }:
|
{
|
||||||
let
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
hostSpec = config.hostSpec;
|
hostSpec = config.hostSpec;
|
||||||
pubKeys = lib.filesystem.listFilesRecursive ./keys;
|
pubKeys = lib.filesystem.listFilesRecursive ./keys;
|
||||||
in {
|
in {
|
||||||
@@ -13,8 +18,7 @@ in {
|
|||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
home = hostSpec.home;
|
home = hostSpec.home;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
hashedPassword =
|
hashedPassword = "$y$j9T$pvjyL7hL5x2VBarGNTnMl1$mLA2UsWTbfp8Hgp/ug5l8224thi..Mo8.p7ME.tDZ.4";
|
||||||
"$y$j9T$pvjyL7hL5x2VBarGNTnMl1$mLA2UsWTbfp8Hgp/ug5l8224thi..Mo8.p7ME.tDZ.4";
|
|
||||||
extraGroups = ["networkmanager" "wheel" "input" "libvirtd"];
|
extraGroups = ["networkmanager" "wheel" "input" "libvirtd"];
|
||||||
|
|
||||||
# Read all keys in ./keys and add them to authorizedKeys.
|
# Read all keys in ./keys and add them to authorizedKeys.
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
{ inputs, pkgs, lib, config, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
#
|
#
|
||||||
# ========= Hardware =========
|
# ========= Hardware =========
|
||||||
@@ -99,7 +103,8 @@
|
|||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
initrd.postResumeCommands = lib.mkIf config.hostSpec.impermanance
|
initrd.postResumeCommands =
|
||||||
|
lib.mkIf config.hostSpec.impermanance
|
||||||
(lib.mkAfter ''
|
(lib.mkAfter ''
|
||||||
mkdir /btrfs_tmp
|
mkdir /btrfs_tmp
|
||||||
mount /dev/crypt_vg/root /btrfs_tmp
|
mount /dev/crypt_vg/root /btrfs_tmp
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ pkgs, config, lib, modulesPath, ... }: {
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
relativeToRoot = lib.path.append ../.;
|
relativeToRoot = lib.path.append ../.;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [./host-spec.nix];
|
imports = [./host-spec.nix];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
# Specifications For Differentiating Hosts
|
# Specifications For Differentiating Hosts
|
||||||
{ config, lib, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
options.hostSpec = {
|
options.hostSpec = {
|
||||||
username = lib.mkOption {
|
username = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
@@ -68,8 +72,7 @@
|
|||||||
scaling = lib.mkOption {
|
scaling = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "1";
|
default = "1";
|
||||||
description =
|
description = "Used to indicate what scaling to use. Floating point number";
|
||||||
"Used to indicate what scaling to use. Floating point number";
|
|
||||||
};
|
};
|
||||||
font = lib.mkOption {
|
font = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [./yubikey-touch-detector.nix];
|
imports = [./yubikey-touch-detector.nix];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
with lib;
|
lib,
|
||||||
|
pkgs,
|
||||||
let cfg = config.services.yubikey-touch-detector;
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.services.yubikey-touch-detector;
|
||||||
in {
|
in {
|
||||||
options.services.yubikey-touch-detector = {
|
options.services.yubikey-touch-detector = {
|
||||||
enable = mkEnableOption
|
enable =
|
||||||
|
mkEnableOption
|
||||||
"a tool to detect when your YubiKey is waiting for a touch";
|
"a tool to detect when your YubiKey is waiting for a touch";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
@@ -37,8 +41,7 @@ in {
|
|||||||
# See https://github.com/maximbaz/yubikey-touch-detector/blob/c9fdff7163361d6323e2de0449026710cacbc08a/LICENSE
|
# See https://github.com/maximbaz/yubikey-touch-detector/blob/c9fdff7163361d6323e2de0449026710cacbc08a/LICENSE
|
||||||
# Author: Maxim Baz
|
# Author: Maxim Baz
|
||||||
systemd.user.sockets.yubikey-touch-detector = mkIf cfg.socket.enable {
|
systemd.user.sockets.yubikey-touch-detector = mkIf cfg.socket.enable {
|
||||||
Unit.Description =
|
Unit.Description = "Unix socket activation for YubiKey touch detector service";
|
||||||
"Unix socket activation for YubiKey touch detector service";
|
|
||||||
Socket = {
|
Socket = {
|
||||||
ListenFIFO = "%t/yubikey-touch-detector.sock";
|
ListenFIFO = "%t/yubikey-touch-detector.sock";
|
||||||
RemoveOnStop = true;
|
RemoveOnStop = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user