formating

This commit is contained in:
Don Harper 2025-09-18 21:56:27 -05:00
parent 45c20d9cbe
commit 7016e89c79
12 changed files with 121 additions and 201 deletions

View file

@ -1,9 +1,4 @@
{ { pkgs, inputs, osConfig, ... }: {
pkgs,
inputs,
osConfig,
...
}: {
imports = [ imports = [
./aerc.nix ./aerc.nix
./bash.nix ./bash.nix
@ -119,7 +114,8 @@
programs.keychain = { programs.keychain = {
enable = true; enable = true;
enableBashIntegration = true; enableBashIntegration = true;
keys = "id_aur id_dsa id_ed25519 git C7E41C9F79C846984163693FCCD8E76F07EA701B"; keys =
"id_aur id_dsa id_ed25519 git C7E41C9F79C846984163693FCCD8E76F07EA701B";
}; };
home.file.".links/links.cfg".source = files/links.cfg; home.file.".links/links.cfg".source = files/links.cfg;
xdg.configFile."nix/nix.conf".text = '' xdg.configFile."nix/nix.conf".text = ''

View file

@ -1,11 +1,4 @@
{ { inputs, outputs, lib, config, pkgs, ... }: {
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
# ../disko/mmcblk.nix # ../disko/mmcblk.nix
@ -18,7 +11,5 @@
gui.enable = true; gui.enable = true;
kmscon.enable = true; kmscon.enable = true;
}; };
wm = { wm = { sway.enable = true; };
sway.enable = true;
};
} }

View file

@ -1,11 +1,4 @@
{ { inputs, outputs, lib, config, pkgs, ... }: {
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.google-pixelbook inputs.nixos-hardware.nixosModules.google-pixelbook
./hardware-configuration.nix ./hardware-configuration.nix
@ -24,7 +17,5 @@
auto-cpufreq.enable = true; auto-cpufreq.enable = true;
gnome-calendar.enable = true; gnome-calendar.enable = true;
}; };
wm = { wm = { sway.enable = true; };
sway.enable = true;
};
} }

View file

@ -1,9 +1,4 @@
{ { inputs, config, pkgs, ... }: {
inputs,
config,
pkgs,
...
}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
inputs.nixos-hardware.nixosModules.common-cpu-intel inputs.nixos-hardware.nixosModules.common-cpu-intel
@ -20,7 +15,5 @@
kmscon.enable = true; kmscon.enable = true;
auto-cpufreq.enable = true; auto-cpufreq.enable = true;
}; };
wm = { wm = { sway.enable = true; };
sway.enable = true;
};
} }

View file

@ -1,11 +1,4 @@
{ { inputs, outputs, lib, config, pkgs, ... }: {
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.google-pixelbook inputs.nixos-hardware.nixosModules.google-pixelbook
./hardware-configuration.nix ./hardware-configuration.nix
@ -21,7 +14,5 @@
kmscon.enable = true; kmscon.enable = true;
auto-cpufreq.enable = true; auto-cpufreq.enable = true;
}; };
wm = { wm = { sway.enable = true; };
sway.enable = true;
};
} }

View file

@ -1,11 +1,4 @@
{ { inputs, outputs, lib, config, pkgs, ... }: {
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.framework-amd-ai-300-series inputs.nixos-hardware.nixosModules.framework-amd-ai-300-series
./hardware-configuration.nix ./hardware-configuration.nix
@ -27,7 +20,5 @@
gnome-calendar.enable = true; gnome-calendar.enable = true;
}; };
primary.enable = true; primary.enable = true;
wm = { wm = { sway.enable = true; };
sway.enable = true;
};
} }

View file

@ -10,10 +10,6 @@
networking.hostName = "pocket2"; networking.hostName = "pocket2";
variables.swayScale = "1.7"; variables.swayScale = "1.7";
roles = { roles = { gui.enable = true; };
gui.enable = true; wm = { sway.enable = true; };
};
wm = {
sway.enable = true;
};
} }

View file

@ -1,11 +1,4 @@
{ { inputs, outputs, lib, config, pkgs, ... }: {
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x260 inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x260
inputs.nixos-hardware.nixosModules.common-pc-laptop inputs.nixos-hardware.nixosModules.common-pc-laptop
@ -24,7 +17,5 @@
auto-cpufreq.enable = true; auto-cpufreq.enable = true;
gnome-calendar.enable = true; gnome-calendar.enable = true;
}; };
wm = { wm = { sway.enable = true; };
sway.enable = true;
};
} }

View file

@ -1,11 +1,4 @@
{ { inputs, outputs, lib, config, pkgs, ... }: {
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
# ../disko/mmcblk.nix # ../disko/mmcblk.nix

View file

@ -1,11 +1,5 @@
{ { inputs, outputs, lib, config, pkgs, ... }:
inputs, let
outputs,
lib,
config,
pkgs,
...
}: let
my-python-packages = python-packages: my-python-packages = python-packages:
with python-packages; [ with python-packages; [
# pipx # pipx
@ -62,21 +56,18 @@ in {
useDHCP = false; useDHCP = false;
firewall = { firewall = {
enable = true; enable = true;
trustedInterfaces = ["tailscale0"]; # always allow traffic from your Tailscale network trustedInterfaces =
[ "tailscale0" ]; # always allow traffic from your Tailscale network
checkReversePath = "loose"; checkReversePath = "loose";
allowedUDPPorts = [ config.services.tailscale.port ]; allowedUDPPorts = [ config.services.tailscale.port ];
allowedTCPPortRanges = [ allowedTCPPortRanges = [{
{
from = 1714; from = 1714;
to = 1764; to = 1764;
} }];
]; allowedUDPPortRanges = [{
allowedUDPPortRanges = [
{
from = 1714; from = 1714;
to = 1764; to = 1764;
} }];
];
allowedTCPPorts = [ 22 ]; allowedTCPPorts = [ 22 ];
}; };
}; };
@ -104,16 +95,13 @@ in {
kernelParams = [ "consoleblank=60" "mem_sleep_default=deep" ]; kernelParams = [ "consoleblank=60" "mem_sleep_default=deep" ];
# extraModulePackages = [config.boot.kernelPackages.ddcci-driver]; # extraModulePackages = [config.boot.kernelPackages.ddcci-driver];
# kernelModules = ["i2c-dev" "ddcci_backlight"]; # kernelModules = ["i2c-dev" "ddcci_backlight"];
loader = loader = if (pkgs.hostPlatform != lib.mkDefault "aarch64-linux") then {
if (pkgs.hostPlatform != lib.mkDefault "aarch64-linux")
then {
systemd-boot = { enable = true; }; systemd-boot = { enable = true; };
efi = { efi = {
canTouchEfiVariables = true; canTouchEfiVariables = true;
efiSysMountPoint = "/boot"; efiSysMountPoint = "/boot";
}; };
} } else {
else {
grub.enable = false; grub.enable = false;
generic-extlinux-compatible.enable = true; generic-extlinux-compatible.enable = true;
}; };
@ -126,13 +114,11 @@ in {
sudo.enable = false; sudo.enable = false;
doas = { doas = {
enable = true; enable = true;
extraRules = [ extraRules = [{
{
users = [ "don" ]; users = [ "don" ];
keepEnv = true; keepEnv = true;
noPass = true; noPass = true;
} }];
];
}; };
}; };
@ -158,6 +144,8 @@ in {
package = pkgs.mlocate; package = pkgs.mlocate;
}; };
logind = { logind = {
lidSwitchDocked = "ignore";
lidSwitchExternalPower = "ignore";
settings = { settings = {
Login = { Login = {
HandleLidSwitchDocked = "ignore"; HandleLidSwitchDocked = "ignore";
@ -227,7 +215,8 @@ in {
isNormalUser = true; isNormalUser = true;
initialPassword = "changeme"; initialPassword = "changeme";
description = "Don Harper"; description = "Don Harper";
extraGroups = ["networkmanager" "wheel" "scanner" "lp" "video" "mlocate" "disk"]; extraGroups =
[ "networkmanager" "wheel" "scanner" "lp" "video" "mlocate" "disk" ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINd8AdVbQQ/Fmw+b9mI8EMYqIoRkwmSwAOtmlte3incL don@loki" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINd8AdVbQQ/Fmw+b9mI8EMYqIoRkwmSwAOtmlte3incL don@loki"
]; ];
@ -374,5 +363,6 @@ in {
"x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop"; "x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop"; "x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop";
}; };
environment.sessionVariables.DEFAULT_BROWSER = "${pkgs.qutebrowser}/bin/qutebrowser"; environment.sessionVariables.DEFAULT_BROWSER =
"${pkgs.qutebrowser}/bin/qutebrowser";
} }

View file

@ -1,11 +1,6 @@
{ { pkgs, lib, config, ... }:
pkgs, with lib;
lib, let cfg = config.primary;
config,
...
}:
with lib; let
cfg = config.primary;
in { in {
options.primary = { enable = mkEnableOption "is primary host"; }; options.primary = { enable = mkEnableOption "is primary host"; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -17,7 +12,8 @@ in {
unitConfig = { Type = "simple"; }; unitConfig = { Type = "simple"; };
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; Environment =
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
ExecStart = "/home/don/bin/do_agenda"; ExecStart = "/home/don/bin/do_agenda";
}; };
}; };
@ -26,7 +22,8 @@ in {
unitConfig = { Type = "simple"; }; unitConfig = { Type = "simple"; };
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; Environment =
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
ExecStart = "/home/don/bin/do_agenda_tomorrow"; ExecStart = "/home/don/bin/do_agenda_tomorrow";
}; };
}; };
@ -35,7 +32,8 @@ in {
unitConfig = { Type = "simple"; }; unitConfig = { Type = "simple"; };
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; Environment =
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
ExecStart = "/home/don/bin/gosleep"; ExecStart = "/home/don/bin/gosleep";
}; };
}; };

View file

@ -1,8 +1,5 @@
{ { pkgs, lib, ... }:
pkgs, let
lib,
...
}: let
readlink = "${pkgs.coreutils}/bin/readlink"; readlink = "${pkgs.coreutils}/bin/readlink";
notify-send = "${pkgs.libnotify}/bin/notify-send"; notify-send = "${pkgs.libnotify}/bin/notify-send";
in { in {
@ -31,7 +28,8 @@ in {
wantedBy = [ "lock.target" ]; wantedBy = [ "lock.target" ];
serviceConfig = { serviceConfig = {
Type = "forking"; Type = "forking";
Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; Environment =
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
ExecStart = "/home/don/bin/lock.sh -m"; ExecStart = "/home/don/bin/lock.sh -m";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 0; RestartSec = 0;
@ -55,7 +53,8 @@ in {
unitConfig = { Type = "simple"; }; unitConfig = { Type = "simple"; };
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; Environment =
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
ExecStart = "/home/don/bin/check-nic"; ExecStart = "/home/don/bin/check-nic";
}; };
}; };