aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-07-25 13:40:27 -0400
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-07-25 13:40:27 -0400
commitf2fb01a55b54dae9a5c26c7e1bae3d17c18de73e (patch)
treec861617d8ff6f5fdf188b1f7dd5774c1d17a3cd5 /nixos
parent8a0457f14d000b4aae8bbd4e950654802f01c584 (diff)
downloadhome-f2fb01a55b54dae9a5c26c7e1bae3d17c18de73e.tar.gz
repo: format tree
Diffstat (limited to 'nixos')
-rw-r--r--nixos/bluetooth.nix7
-rw-r--r--nixos/default.nix114
-rw-r--r--nixos/keyd.nix11
-rw-r--r--nixos/osu.nix8
-rw-r--r--nixos/yubikey.nix25
5 files changed, 107 insertions, 58 deletions
diff --git a/nixos/bluetooth.nix b/nixos/bluetooth.nix
index ebe6b88..f9d6478 100644
--- a/nixos/bluetooth.nix
+++ b/nixos/bluetooth.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.nixos.bluetooth;
inherit (lib) types mkOption;
diff --git a/nixos/default.nix b/nixos/default.nix
index 7cde2e1..7fe9e5a 100644
--- a/nixos/default.nix
+++ b/nixos/default.nix
@@ -1,6 +1,12 @@
-{ config, lib, pkgs, inputs, ... }:
-let
- cfg = config.nixos;
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ ...
+}:
+let
+ cfg = config.nixos;
in
{
imports = [
@@ -11,7 +17,7 @@ in
];
options.nixos = with lib.options; {
- hostname = mkOption {
+ hostname = mkOption {
type = lib.types.str;
description = "Hostname for the system";
default = "nixos";
@@ -46,7 +52,10 @@ in
# nixos = {
# };
nix = {
- settings.experimental-features = [ "nix-command" "flakes" ];
+ settings.experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
};
# time.timeZone = lib.mkDefault cfg.timezone;
@@ -55,11 +64,18 @@ in
nixpkgs.config.allowUnfree = true;
boot = {
- consoleLogLevel=0;
+ consoleLogLevel = 0;
initrd.verbose = false;
initrd.systemd.enable = true; # required for early stuff
kernelPackages = pkgs.linuxPackages_latest;
- kernelParams = ["quiet" "splash" "rd.systemd.show_status=false" "rd.udev.log_level=3" "udev.log_priority=3" "boot.shell_on_fail"];
+ kernelParams = [
+ "quiet"
+ "splash"
+ "rd.systemd.show_status=false"
+ "rd.udev.log_level=3"
+ "udev.log_priority=3"
+ "boot.shell_on_fail"
+ ];
loader = {
timeout = 0;
systemd-boot = {
@@ -90,8 +106,8 @@ in
"networkmanager"
"gamemode"
];
- # ++ (lib.optional cfg.wifi "networkmanager")
- # ++ (lib.optional cfg.gaming "gamemode");
+ # ++ (lib.optional cfg.wifi "networkmanager")
+ # ++ (lib.optional cfg.gaming "gamemode");
packages = with pkgs; [
unzip
tree
@@ -100,20 +116,22 @@ in
shell = cfg.shell;
};
- environment.systemPackages = with pkgs; [
- neovim
- wl-clipboard
- wmenu
- gnupg
- pinentry-qt
- btop
- man-pages
- man-pages-posix
- cage
- zsh
- discord-ptb
- ] ++ (lib.optional cfg.wifi networkmanagerapplet); # TODO
-
+ environment.systemPackages =
+ with pkgs;
+ [
+ neovim
+ wl-clipboard
+ wmenu
+ gnupg
+ pinentry-qt
+ btop
+ man-pages
+ man-pages-posix
+ cage
+ zsh
+ discord-ptb
+ ]
+ ++ (lib.optional cfg.wifi networkmanagerapplet); # TODO
services.greetd = {
enable = false;
@@ -123,7 +141,7 @@ in
user = "${cfg.username}";
};
default_session = {
- command = "${pkgs.greetd.greetd}/bin/agreety --cmd 'sway --unsupported-gpu'";
+ command = "${pkgs.greetd.greetd}/bin/agreety --cmd 'sway --unsupported-gpu'";
};
};
};
@@ -155,28 +173,30 @@ in
rtkit.enable = true;
doas = {
enable = true;
- extraRules = [{
- users = ["${cfg.username}"];
- keepEnv = true;
- persist = true;
- }];
+ extraRules = [
+ {
+ users = [ "${cfg.username}" ];
+ keepEnv = true;
+ persist = true;
+ }
+ ];
};
};
- i18n.defaultLocale = "en_US.UTF-8";
-
- i18n.extraLocaleSettings = {
- LC_ADDRESS = "en_US.UTF-8";
- LC_IDENTIFICATION = "en_US.UTF-8";
- LC_MEASUREMENT = "en_US.UTF-8";
- LC_MONETARY = "en_US.UTF-8";
- LC_NAME = "en_US.UTF-8";
- LC_NUMERIC = "en_US.UTF-8";
- LC_PAPER = "en_US.UTF-8";
- LC_TELEPHONE = "en_US.UTF-8";
- LC_TIME = "en_US.UTF-8";
- };
-
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "en_US.UTF-8";
+ LC_IDENTIFICATION = "en_US.UTF-8";
+ LC_MEASUREMENT = "en_US.UTF-8";
+ LC_MONETARY = "en_US.UTF-8";
+ LC_NAME = "en_US.UTF-8";
+ LC_NUMERIC = "en_US.UTF-8";
+ LC_PAPER = "en_US.UTF-8";
+ LC_TELEPHONE = "en_US.UTF-8";
+ LC_TIME = "en_US.UTF-8";
+ };
+
services.xserver.xkb.layout = "us";
services.xserver.xkb.variant = "colemak_dh,";
@@ -248,6 +268,12 @@ in
};
services.printing.enable = true;
- services.printing.drivers = [ pkgs.gutenprint pkgs.brlaser pkgs.brgenml1lpr pkgs.brgenml1cupswrapper ];
+ services.printing.drivers = [
+ pkgs.gutenprint
+ pkgs.brlaser
+ pkgs.brgenml1lpr
+ pkgs.brgenml1cupswrapper
+ ];
};
+
}
diff --git a/nixos/keyd.nix b/nixos/keyd.nix
index 8a17590..6ca7563 100644
--- a/nixos/keyd.nix
+++ b/nixos/keyd.nix
@@ -1,4 +1,10 @@
-{ config, lib, inputs, pkgs, ...}:
+{
+ config,
+ lib,
+ inputs,
+ pkgs,
+ ...
+}:
let
cfg = config.nixos.keyd;
in
@@ -74,8 +80,7 @@ in
space = "_";
};
};
- extraConfig = ''
- '';
+ extraConfig = '''';
};
};
};
diff --git a/nixos/osu.nix b/nixos/osu.nix
index 3bfb11b..e791ebf 100644
--- a/nixos/osu.nix
+++ b/nixos/osu.nix
@@ -1,4 +1,10 @@
-{ config, lib, pkgs, inputs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ ...
+}:
{
options.nixos.osu = {
enable = lib.mkEnableOption "osu!";
diff --git a/nixos/yubikey.nix b/nixos/yubikey.nix
index 868913a..ce3d5d3 100644
--- a/nixos/yubikey.nix
+++ b/nixos/yubikey.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.nixos.yubikey;
inherit (lib) types mkOption;
@@ -15,10 +20,10 @@ in
config = lib.mkIf cfg.enable {
environment.systemPackages = builtins.attrValues {
inherit (pkgs)
- yubioath-flutter
- yubikey-manager
- pam_u2f
- ;
+ yubioath-flutter
+ yubikey-manager
+ pam_u2f
+ ;
};
programs.yubikey-touch-detector = {
@@ -37,10 +42,12 @@ in
# interactive = true;
interactive = false;
cue = true;
- authfile = pkgs.writeText "u2f-mappings" (lib.concatStrings [
- config.nixos.username
- ":GB+R91Ur898D/fEgih7f/tsSDOaDw1QcEOSGzHs4fOUo5uCaliIiEK4fFGDClybL/8Qa7tGAN+mo0tU7PVmzfA==,GUPJuYykJoqBw7atGbIK/QcIATgJ3VZQKd1BrjMZ9g/f3nSejOv69LM5UCEoXAwuZHyJitVr1qYd1jLP2uckoQ==,es256,+presence"
- ]);
+ authfile = pkgs.writeText "u2f-mappings" (
+ lib.concatStrings [
+ config.nixos.username
+ ":GB+R91Ur898D/fEgih7f/tsSDOaDw1QcEOSGzHs4fOUo5uCaliIiEK4fFGDClybL/8Qa7tGAN+mo0tU7PVmzfA==,GUPJuYykJoqBw7atGbIK/QcIATgJ3VZQKd1BrjMZ9g/f3nSejOv69LM5UCEoXAwuZHyJitVr1qYd1jLP2uckoQ==,es256,+presence"
+ ]
+ );
};
};
services = {