refactor(statix): resolve 'statix check' issues
This commit is contained in:
@@ -174,7 +174,7 @@
|
||||
|
||||
packageDefinitions = {
|
||||
nvim =
|
||||
{ ... }:
|
||||
_:
|
||||
{
|
||||
settings = {
|
||||
suffix-path = true;
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
}@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
lib = inputs.nixpkgs.lib;
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
utils = import ./utils { inherit lib; };
|
||||
hostDirNames = utils.dirNames ./hosts;
|
||||
system = "x86_64-linux";
|
||||
|
||||
@@ -27,9 +27,11 @@ in
|
||||
../../modules/shell
|
||||
];
|
||||
|
||||
home.stateVersion = "25.05";
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
home = {
|
||||
stateVersion = "25.05";
|
||||
inherit username;
|
||||
homeDirectory = "/home/${username}";
|
||||
};
|
||||
|
||||
xdg.userDirs.createDirectories = false;
|
||||
xdg.userDirs.download = "${config.home.homeDirectory}/dl";
|
||||
|
||||
@@ -23,9 +23,11 @@ in
|
||||
../../modules/shell
|
||||
];
|
||||
|
||||
home.stateVersion = "25.05";
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
home = {
|
||||
stateVersion = "25.05";
|
||||
inherit username;
|
||||
homeDirectory = "/home/${username}";
|
||||
};
|
||||
|
||||
xdg.userDirs.createDirectories = false;
|
||||
xdg.userDirs.download = "${config.home.homeDirectory}/dl";
|
||||
|
||||
@@ -45,12 +45,14 @@ in
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home.stateVersion = "25.05";
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
home = {
|
||||
stateVersion = "25.05";
|
||||
inherit username;
|
||||
homeDirectory = "/home/${username}";
|
||||
};
|
||||
|
||||
targets.genericLinux.nixGL = {
|
||||
packages = inputs.nixgl.packages;
|
||||
inherit (inputs.nixgl) packages;
|
||||
defaultWrapper = "mesa";
|
||||
};
|
||||
|
||||
|
||||
@@ -13,4 +13,4 @@ let
|
||||
[ ];
|
||||
in
|
||||
|
||||
[ ] ++ localPackages
|
||||
localPackages
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
}:
|
||||
let
|
||||
cfg = config.shell.bash;
|
||||
username = config.home.username;
|
||||
inherit (config.home) username;
|
||||
in
|
||||
{
|
||||
options.shell.bash = {
|
||||
|
||||
@@ -27,7 +27,7 @@ in
|
||||
../../modules/desktops/niri
|
||||
../../modules/bluetooth
|
||||
../../modules/keyboard
|
||||
(import ../../modules/networking { hostName = hostName; })
|
||||
(import ../../modules/networking { inherit hostName; })
|
||||
../../modules/users
|
||||
../../modules/audio
|
||||
../../modules/localization
|
||||
@@ -93,16 +93,17 @@ in
|
||||
inputs.nvim.packages.x86_64-linux.nvim
|
||||
];
|
||||
|
||||
services.xserver = {
|
||||
services = {
|
||||
xserver = {
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
harden = true;
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
syncthing = {
|
||||
enable = true;
|
||||
openDefaultPorts = true;
|
||||
settings = {
|
||||
@@ -119,11 +120,11 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.locate = {
|
||||
locate = {
|
||||
enable = true;
|
||||
package = pkgs.plocate;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
# TODO: generate unique hostId on actual host with: head -c 8 /etc/machine-id
|
||||
@@ -131,7 +132,7 @@ in
|
||||
interfaces = {
|
||||
eno1 = {
|
||||
wakeOnLan.enable = true;
|
||||
macAddress = wolInterfaces.eno1.macAddress;
|
||||
inherit (wolInterfaces.eno1) macAddress;
|
||||
};
|
||||
};
|
||||
firewall = {
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
boot = {
|
||||
initrd.availableKernelModules = [
|
||||
"vmd"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
@@ -24,9 +25,10 @@
|
||||
"uas"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
||||
@@ -27,7 +27,7 @@ in
|
||||
../../modules/desktops/niri
|
||||
../../modules/bluetooth
|
||||
../../modules/keyboard
|
||||
(import ../../modules/networking { hostName = hostName; })
|
||||
(import ../../modules/networking { inherit hostName; })
|
||||
../../modules/users
|
||||
../../modules/audio
|
||||
../../modules/localization
|
||||
|
||||
@@ -14,16 +14,18 @@
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
boot = {
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"thunderbolt"
|
||||
"nvme"
|
||||
"uas"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"virtio_pci"
|
||||
@@ -22,9 +24,11 @@
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
kernelModules = [ ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
||||
@@ -18,7 +18,7 @@ in
|
||||
./disk.nix
|
||||
../../modules/boot/bootloader.nix
|
||||
../../modules/keyboard
|
||||
(import ../../modules/networking { hostName = hostName; })
|
||||
(import ../../modules/networking { inherit hostName; })
|
||||
../../modules/users
|
||||
../../modules/audio
|
||||
../../modules/localization
|
||||
@@ -42,9 +42,11 @@ in
|
||||
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nvim ];
|
||||
|
||||
disko = {
|
||||
devices.disk.main.device = "/dev/vda";
|
||||
devices.disk.main.imageName = "nixos-vm";
|
||||
devices.disk.main.imageSize = "32G";
|
||||
devices.disk.main = {
|
||||
device = "/dev/vda";
|
||||
imageName = "nixos-vm";
|
||||
imageSize = "32G";
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.vmVariantWithDisko = {
|
||||
@@ -59,11 +61,12 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
services.spice-vdagentd.enable = true;
|
||||
|
||||
services.openssh = {
|
||||
services = {
|
||||
qemuGuest.enable = true;
|
||||
spice-vdagentd.enable = true;
|
||||
openssh = {
|
||||
enable = true;
|
||||
harden = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,16 +14,20 @@
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"virtio_pci"
|
||||
"sr_mod"
|
||||
"virtio_blk"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
{ ... }:
|
||||
_:
|
||||
|
||||
{
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
services = {
|
||||
pulseaudio.enable = false;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
services.pulseaudio.extraConfig = "load-module module-switch-on-connect";
|
||||
pulseaudio.extraConfig = "load-module module-switch-on-connect";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ ... }:
|
||||
_:
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ inputs, outputs, dotsPath, ... }:
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
dotsPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@@ -23,16 +28,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
nix.optimise = {
|
||||
nix = {
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = [ "05:00" ];
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
{
|
||||
programs.niri.enable = true;
|
||||
|
||||
services.dbus.enable = true;
|
||||
services.logind.settings.Login = {
|
||||
services = {
|
||||
dbus.enable = true;
|
||||
logind.settings.Login = {
|
||||
HandleLidSwitch = "suspend";
|
||||
IdleAction = "suspend";
|
||||
IdleActionSec = 1800;
|
||||
};
|
||||
|
||||
services.displayManager.ly = {
|
||||
displayManager.ly = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
disk = {
|
||||
root = {
|
||||
type = "disk";
|
||||
device = config.device;
|
||||
inherit (config) device;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ ... }:
|
||||
_:
|
||||
|
||||
{
|
||||
time.timeZone = "Europe/Brussels";
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = hostName;
|
||||
inherit hostName;
|
||||
wireless.iwd.enable = true;
|
||||
networkmanager.wifi.backend = "iwd";
|
||||
nftables.enable = true;
|
||||
|
||||
@@ -34,7 +34,8 @@ in
|
||||
"opencode_api_key".owner = config.users.users.${cfg.username}.name;
|
||||
};
|
||||
|
||||
templates."taskrc.d/sync" = {
|
||||
templates = {
|
||||
"taskrc.d/sync" = {
|
||||
owner = config.users.users.${cfg.username}.name;
|
||||
content = ''
|
||||
sync.server.url=${config.sops.placeholder."taskwarrior_sync_server_url"}
|
||||
@@ -43,7 +44,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
templates.".gitconfig.email" = {
|
||||
".gitconfig.email" = {
|
||||
owner = config.users.users.${cfg.username}.name;
|
||||
path = "/home/${cfg.username}/.gitconfig.email";
|
||||
content = ''
|
||||
@@ -52,7 +53,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
templates.".gitconfig.work.email" = {
|
||||
".gitconfig.work.email" = {
|
||||
owner = config.users.users.${cfg.username}.name;
|
||||
path = "/home/${cfg.username}/.gitconfig.work.email";
|
||||
content = ''
|
||||
@@ -61,7 +62,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
templates."hcloud/cli.toml" = {
|
||||
"hcloud/cli.toml" = {
|
||||
owner = config.users.users.${cfg.username}.name;
|
||||
path = "/home/${cfg.username}/.config/hcloud/cli.toml";
|
||||
content = ''
|
||||
@@ -73,7 +74,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
templates."opencode/auth.json" = {
|
||||
"opencode/auth.json" = {
|
||||
owner = config.users.users.${cfg.username}.name;
|
||||
path = "/home/${cfg.username}/.local/share/opencode/auth.json";
|
||||
content = ''
|
||||
@@ -87,4 +88,5 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
username = config.ssh.username;
|
||||
inherit (config.ssh) username;
|
||||
in
|
||||
{
|
||||
# auto extract SSH keys
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ ... }:
|
||||
_:
|
||||
|
||||
{
|
||||
services.xserver.windowManager.xmonad = {
|
||||
|
||||
Reference in New Issue
Block a user