chore: cleanup comments and remove module config descriptions
This commit is contained in:
@@ -27,7 +27,6 @@ in
|
|||||||
inputs.self.nixosModules.initrd-ssh
|
inputs.self.nixosModules.initrd-ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
# Modules
|
|
||||||
yubikey.enable = true;
|
yubikey.enable = true;
|
||||||
openssh.enable = true;
|
openssh.enable = true;
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
@@ -58,7 +57,6 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Stylix theming
|
|
||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
polarity = "dark";
|
polarity = "dark";
|
||||||
@@ -66,28 +64,22 @@ in
|
|||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml";
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Boot
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
# Locale
|
|
||||||
time.timeZone = "Europe/Ljubljana";
|
time.timeZone = "Europe/Ljubljana";
|
||||||
environment.variables.TZ = "America/New_York";
|
environment.variables.TZ = "America/New_York";
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
# nix-ld for pip-installed binaries
|
# WARN:(@janezicmatej) nix-ld for running pip-installed binaries outside nix, probably want to drop this
|
||||||
# WARN:(matej) probably want to drop this in the future
|
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
programs.nix-ld.libraries = options.programs.nix-ld.libraries.default;
|
programs.nix-ld.libraries = options.programs.nix-ld.libraries.default;
|
||||||
|
|
||||||
# Security
|
|
||||||
security.pki.certificateFiles = [ packages.ca-matheo-si ];
|
security.pki.certificateFiles = [ packages.ca-matheo-si ];
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
# Services
|
|
||||||
services.teamviewer.enable = true;
|
services.teamviewer.enable = true;
|
||||||
|
|
||||||
# Programs
|
|
||||||
programs.thunderbird.enable = true;
|
programs.thunderbird.enable = true;
|
||||||
programs._1password.enable = true;
|
programs._1password.enable = true;
|
||||||
programs._1password-gui.enable = true;
|
programs._1password-gui.enable = true;
|
||||||
@@ -99,12 +91,10 @@ in
|
|||||||
localNetworkGameTransfers.openFirewall = true;
|
localNetworkGameTransfers.openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Hardware
|
|
||||||
hardware.keyboard.zsa.enable = true;
|
hardware.keyboard.zsa.enable = true;
|
||||||
hardware.ledger.enable = true;
|
hardware.ledger.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
|
||||||
# Networking
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "matej-nixos";
|
hostName = "matej-nixos";
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
@@ -123,7 +113,6 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# XDG
|
|
||||||
xdg.mime.defaultApplications = {
|
xdg.mime.defaultApplications = {
|
||||||
"application/pdf" = "org.pwmt.zathura.desktop";
|
"application/pdf" = "org.pwmt.zathura.desktop";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
inputs.self.nixosModules.initrd-ssh
|
inputs.self.nixosModules.initrd-ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
# Modules
|
|
||||||
yubikey.enable = true;
|
yubikey.enable = true;
|
||||||
openssh.enable = true;
|
openssh.enable = true;
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
@@ -44,7 +43,6 @@
|
|||||||
networkModule = "r8169";
|
networkModule = "r8169";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Stylix theming
|
|
||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
polarity = "dark";
|
polarity = "dark";
|
||||||
@@ -52,7 +50,7 @@
|
|||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml";
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Boot - Lanzaboote secure boot
|
# lanzaboote secure boot
|
||||||
boot.kernelParams = [ "btusb.reset=1" ];
|
boot.kernelParams = [ "btusb.reset=1" ];
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||||
@@ -61,18 +59,15 @@
|
|||||||
pkiBundle = "/var/lib/sbctl";
|
pkiBundle = "/var/lib/sbctl";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Locale
|
|
||||||
time.timeZone = "Europe/Ljubljana";
|
time.timeZone = "Europe/Ljubljana";
|
||||||
environment.variables.TZ = "Europe/Ljubljana";
|
environment.variables.TZ = "Europe/Ljubljana";
|
||||||
|
|
||||||
# Services
|
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
|
|
||||||
# Programs
|
|
||||||
programs._1password.enable = true;
|
programs._1password.enable = true;
|
||||||
programs._1password-gui.enable = true;
|
programs._1password-gui.enable = true;
|
||||||
|
|
||||||
# Higher sample rate pipewire for audio equipment
|
# higher sample rate for audio equipment
|
||||||
services.pipewire.extraConfig.pipewire.adjust-sample-rate = {
|
services.pipewire.extraConfig.pipewire.adjust-sample-rate = {
|
||||||
"context.properties" = {
|
"context.properties" = {
|
||||||
"default.clock.rate" = 192000;
|
"default.clock.rate" = 192000;
|
||||||
@@ -80,12 +75,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# System packages
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
easyeffects
|
easyeffects
|
||||||
];
|
];
|
||||||
|
|
||||||
# XDG
|
|
||||||
xdg.mime.defaultApplications = {
|
xdg.mime.defaultApplications = {
|
||||||
"application/pdf" = "org.pwmt.zathura.desktop";
|
"application/pdf" = "org.pwmt.zathura.desktop";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
lib:
|
lib:
|
||||||
|
|
||||||
# takes dir as an argument and creates an attribute set by importing all .nix files in that directory
|
# import all .nix files in dir as attribute set
|
||||||
dir:
|
dir:
|
||||||
let
|
let
|
||||||
readDir = builtins.readDir dir;
|
readDir = builtins.readDir dir;
|
||||||
|
|||||||
@@ -15,12 +15,10 @@ let
|
|||||||
hostHWConfig = ../hosts/${name}/hardware-configuration.nix;
|
hostHWConfig = ../hosts/${name}/hardware-configuration.nix;
|
||||||
hasHWConfig = builtins.pathExists hostHWConfig;
|
hasHWConfig = builtins.pathExists hostHWConfig;
|
||||||
|
|
||||||
# Load NixOS-level user config (account, groups, SSH keys)
|
|
||||||
userNixosConfigs = map (user: ../users/${user}/nixos.nix) (
|
userNixosConfigs = map (user: ../users/${user}/nixos.nix) (
|
||||||
builtins.filter (user: builtins.pathExists ../users/${user}/nixos.nix) users
|
builtins.filter (user: builtins.pathExists ../users/${user}/nixos.nix) users
|
||||||
);
|
);
|
||||||
|
|
||||||
# Load home-manager user config
|
|
||||||
userHMConfigs = nixpkgs.lib.genAttrs users (user: import ../users/${user}/home-manager.nix);
|
userHMConfigs = nixpkgs.lib.genAttrs users (user: import ../users/${user}/home-manager.nix);
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -12,26 +12,20 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.desktop.enable {
|
config = lib.mkIf config.desktop.enable {
|
||||||
# Audio
|
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Bluetooth
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
|
|
||||||
# Security
|
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
|
||||||
# D-Bus
|
|
||||||
services.dbus.enable = true;
|
services.dbus.enable = true;
|
||||||
|
|
||||||
# Player control
|
|
||||||
services.playerctld.enable = true;
|
services.playerctld.enable = true;
|
||||||
|
|
||||||
# XDG Portals
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xdgOpenUsePortal = true;
|
xdgOpenUsePortal = true;
|
||||||
@@ -41,7 +35,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fonts
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
font-awesome
|
font-awesome
|
||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ let
|
|||||||
|
|
||||||
cfg = config.initrd-ssh;
|
cfg = config.initrd-ssh;
|
||||||
|
|
||||||
# Generate keys on new machines: ./scripts/initrd-ssh-keygen.sh
|
# generate host keys for new machines: ./scripts/initrd-ssh-keygen.sh
|
||||||
keyDir = "/etc/secrets/initrd";
|
keyDir = "/etc/secrets/initrd";
|
||||||
|
|
||||||
mkIpString =
|
mkIpString =
|
||||||
@@ -32,25 +32,21 @@ in
|
|||||||
|
|
||||||
address = lib.mkOption {
|
address = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Static IP address";
|
|
||||||
example = "10.222.0.247";
|
example = "10.222.0.247";
|
||||||
};
|
};
|
||||||
|
|
||||||
gateway = lib.mkOption {
|
gateway = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Gateway address";
|
|
||||||
example = "10.222.0.1";
|
example = "10.222.0.1";
|
||||||
};
|
};
|
||||||
|
|
||||||
netmask = lib.mkOption {
|
netmask = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "255.255.255.0";
|
default = "255.255.255.0";
|
||||||
description = "Network mask";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
interface = lib.mkOption {
|
interface = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Network interface";
|
|
||||||
example = "enp5s0";
|
example = "enp5s0";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -58,12 +54,10 @@ in
|
|||||||
authorizedKeys = lib.mkOption {
|
authorizedKeys = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = keys.sshAuthorizedKeys;
|
default = keys.sshAuthorizedKeys;
|
||||||
description = "SSH public keys authorized for initrd unlock";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networkModule = lib.mkOption {
|
networkModule = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Kernel module for network interface (e.g., r8169, e1000e)";
|
|
||||||
example = "r8169";
|
example = "r8169";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
type = lib.types.port;
|
type = lib.types.port;
|
||||||
default = 22;
|
default = 22;
|
||||||
description = "SSH server port";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
cmdFlags = lib.mkOption {
|
cmdFlags = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
description = "additional command line flags to pass to sway";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -24,23 +23,20 @@
|
|||||||
wrapperFeatures.gtk = true;
|
wrapperFeatures.gtk = true;
|
||||||
extraOptions = config.sway.cmdFlags;
|
extraOptions = config.sway.cmdFlags;
|
||||||
extraSessionCommands = ''
|
extraSessionCommands = ''
|
||||||
# Fix for some Java AWT applications (e.g. Android Studio),
|
# fix for java awt apps not rendering
|
||||||
# use this if they aren't displayed properly:
|
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# default extra packages
|
|
||||||
brightnessctl
|
brightnessctl
|
||||||
foot
|
foot
|
||||||
grim
|
grim
|
||||||
pulseaudio
|
pulseaudio
|
||||||
swayidle
|
swayidle
|
||||||
# swaylock - use swaylock-effects instead
|
# use swaylock-effects instead of swaylock
|
||||||
swaylock-effects
|
swaylock-effects
|
||||||
wmenu
|
wmenu
|
||||||
# additional things i like
|
|
||||||
slurp
|
slurp
|
||||||
wofi
|
wofi
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ in
|
|||||||
|
|
||||||
command = lib.mkOption {
|
command = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Session command to launch";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ python.pkgs.buildPythonPackage rec {
|
|||||||
sha256 = "sha256-ScBG8BoOKDdOAHTFP+zwyk+Kfu31WoKQSRkutOvnJ5E";
|
sha256 = "sha256-ScBG8BoOKDdOAHTFP+zwyk+Kfu31WoKQSRkutOvnJ5E";
|
||||||
};
|
};
|
||||||
|
|
||||||
format = "wheel"; # if it uses poetry/PEP517, otherwise "setuptools"
|
format = "wheel";
|
||||||
# nativeBuildInputs = [ python.pkgs.setuptools python.pkgs.wheel ];
|
# nativeBuildInputs = [ python.pkgs.setuptools python.pkgs.wheel ];
|
||||||
# propagatedBuildInputs = with python.pkgs; [
|
# propagatedBuildInputs = with python.pkgs; [
|
||||||
# # add runtime deps here if needed
|
# # add runtime deps here if needed
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ in
|
|||||||
{
|
{
|
||||||
home.stateVersion = "24.11";
|
home.stateVersion = "24.11";
|
||||||
|
|
||||||
# TODO:(janezicmatej) do i need this here?
|
# TODO:(@janezicmatej) do i need this here?
|
||||||
services.dunst.enable = true;
|
services.dunst.enable = true;
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
@@ -99,7 +99,6 @@ in
|
|||||||
luajit
|
luajit
|
||||||
nodejs_22 # copilot
|
nodejs_22 # copilot
|
||||||
|
|
||||||
# treesitter
|
|
||||||
tree-sitter
|
tree-sitter
|
||||||
|
|
||||||
# lua_fzf
|
# lua_fzf
|
||||||
@@ -109,7 +108,6 @@ in
|
|||||||
gnumake
|
gnumake
|
||||||
delta
|
delta
|
||||||
|
|
||||||
# language server
|
|
||||||
pyright
|
pyright
|
||||||
typescript-language-server
|
typescript-language-server
|
||||||
lua-language-server
|
lua-language-server
|
||||||
@@ -117,7 +115,6 @@ in
|
|||||||
nil
|
nil
|
||||||
nixd
|
nixd
|
||||||
|
|
||||||
# formatters
|
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
stylua
|
stylua
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user