statix fix

This commit is contained in:
Ivan Kirilov Dimitrov 2024-08-07 20:38:52 +02:00
parent dec199a870
commit 67279849d7
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294
6 changed files with 40 additions and 50 deletions

View File

@ -1,4 +1,4 @@
{ ... }: {
_: {
flake.hardwareConfigurations = {
nova = { lib, modulesPath, ... }: {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

View File

@ -1,7 +1,7 @@
toplevel @ { moduleWithSystem, ... }: {
flake.homeManagerModules = {
base = moduleWithSystem (
{ ... }: { config, ... }: {
_: { config, ... }: {
programs.home-manager.enable = true;
home.stateVersion = toplevel.config.flake.stateVersion;
xdg = {
@ -23,7 +23,7 @@ toplevel @ { moduleWithSystem, ... }: {
}
);
ivand = moduleWithSystem (
{ ... }: { pkgs, ... }: {
_: { pkgs, ... }: {
home = {
username = "ivand";
homeDirectory = "/home/ivand";
@ -55,7 +55,7 @@ toplevel @ { moduleWithSystem, ... }: {
}
);
util = moduleWithSystem (
{ ... }: { pkgs
_: { pkgs
, config
, ...
}: {
@ -175,7 +175,7 @@ toplevel @ { moduleWithSystem, ... }: {
}
);
shell = moduleWithSystem (
{ ... }: { pkgs, ... }: {
_: { pkgs, ... }: {
programs =
let
shellAliases = {
@ -263,7 +263,7 @@ toplevel @ { moduleWithSystem, ... }: {
}
);
swayland = moduleWithSystem (
{ ... }: { pkgs
_: { pkgs
, config
, ...
}: {
@ -315,15 +315,14 @@ toplevel @ { moduleWithSystem, ... }: {
};
};
};
swaynag = { enable = config.wayland.windowManager.sway.enable; };
swaynag = { inherit (config.wayland.windowManager.sway) enable; };
};
programs = {
waybar = {
enable = true;
settings = {
mainBar =
let
in {
{
layer = "top";
position = "top";
height = 30;
@ -620,7 +619,7 @@ toplevel @ { moduleWithSystem, ... }: {
}
);
web = moduleWithSystem (
{ ... }: { ... }: {
_: _: {
programs = {
browserpass.enable = true;
firefox = {

View File

@ -5,7 +5,7 @@ toplevel @ { inputs
let
system = "x86_64-linux";
mods = toplevel.config.flake.nixosModules;
hardwareConfigurations = toplevel.config.flake.hardwareConfigurations;
inherit (toplevel.config.flake) hardwareConfigurations;
essential = with mods; [ grub base shell security wireless intranet ];
desktop = with mods; [ sound wayland ];
configWithModules =
@ -13,11 +13,10 @@ let
, modules
,
}:
withSystem system ({ config, inputs', pkgs, ... }:
withSystem system ({ inputs', pkgs, ... }:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs inputs' pkgs;
packages = config.packages;
};
modules = [ hardware ] ++ modules;
});

View File

@ -1,6 +1,6 @@
top @ { inputs, moduleWithSystem, ... }: {
flake.nixosModules = {
grub = moduleWithSystem ({ ... }: { pkgs, ... }: {
grub = moduleWithSystem (_: { pkgs, ... }: {
boot = {
loader = {
grub =
@ -11,18 +11,18 @@ top @ { inputs, moduleWithSystem, ... }: {
};
in
{
inherit theme;
enable = pkgs.lib.mkDefault true;
useOSProber = true;
efiSupport = true;
device = "nodev";
theme = theme;
splashImage = "${theme}/background.png";
};
efi.canTouchEfiVariables = true;
};
};
});
base = moduleWithSystem ({ ... }: { pkgs, ... }: {
base = moduleWithSystem (_: { pkgs, ... }: {
imports = [ inputs.hosts.nixosModule ];
system.stateVersion = top.config.flake.stateVersion;
nix = { extraOptions = ''experimental-features = nix-command flakes''; };
@ -55,7 +55,7 @@ top @ { inputs, moduleWithSystem, ... }: {
};
};
});
shell = moduleWithSystem ({ ... }: { pkgs, ... }: {
shell = moduleWithSystem (_: { pkgs, ... }: {
programs = {
starship.enable = true;
zsh = {
@ -83,7 +83,7 @@ top @ { inputs, moduleWithSystem, ... }: {
};
};
});
sound = moduleWithSystem ({ ... }: { pkgs, ... }: {
sound = moduleWithSystem (_: { pkgs, ... }: {
services = {
pipewire = {
enable = true;
@ -93,7 +93,7 @@ top @ { inputs, moduleWithSystem, ... }: {
};
environment.systemPackages = with pkgs; [ pwvucontrol ];
});
music = moduleWithSystem ({ ... }: { pkgs, ... }: {
music = moduleWithSystem (_: { pkgs, ... }: {
imports = [ inputs.musnix.nixosModules.musnix ];
environment.systemPackages = with pkgs; [ guitarix ];
services.pipewire = {
@ -110,7 +110,7 @@ top @ { inputs, moduleWithSystem, ... }: {
};
};
});
wayland = moduleWithSystem ({ ... }: { ... }: {
wayland = moduleWithSystem (_: _: {
hardware.graphics.enable = true;
security.pam.services.swaylock = { };
xdg.portal = {
@ -128,7 +128,7 @@ top @ { inputs, moduleWithSystem, ... }: {
config.common.default = "*";
};
});
security = moduleWithSystem ({ ... }: { ... }: {
security = moduleWithSystem (_: _: {
security = {
sudo = {
enable = false;
@ -216,7 +216,7 @@ top @ { inputs, moduleWithSystem, ... }: {
};
};
};
ivand = moduleWithSystem ({ ... }: { pkgs, ... }:
ivand = moduleWithSystem (_: { pkgs, ... }:
let
homeMods = top.config.flake.homeManagerModules;
in
@ -276,17 +276,17 @@ top @ { inputs, moduleWithSystem, ... }: {
};
services.flatpak.enable = true;
};
ai = moduleWithSystem ({ ... }: { ... }: {
ai = moduleWithSystem (_: _: {
services = { ollama.enable = true; };
});
anon = moduleWithSystem ({ ... }: { pkgs, ... }: {
anon = moduleWithSystem (_: { pkgs, ... }: {
environment.systemPackages = with pkgs; [ tor-browser ];
});
cryptocurrency = moduleWithSystem ({ ... }: { pkgs, ... }: {
cryptocurrency = moduleWithSystem (_: { pkgs, ... }: {
environment.systemPackages = with pkgs; [ monero-cli ];
services = { monero.enable = true; };
});
monero-miner = moduleWithSystem ({ ... }: { ... }: {
monero-miner = moduleWithSystem (_: _: {
services = {
xmrig = {
enable = true;
@ -307,12 +307,12 @@ top @ { inputs, moduleWithSystem, ... }: {
};
};
});
vps = moduleWithSystem ({ ... }: { ... }: {
vps = moduleWithSystem (_: { ... }: {
imports = [
inputs.vpsadminos.nixosConfigurations.container
];
});
mailserver = moduleWithSystem ({ ... }: { config
mailserver = moduleWithSystem (_: { config
, pkgs
, ...
}: {
@ -374,7 +374,7 @@ top @ { inputs, moduleWithSystem, ... }: {
};
};
});
nginx = moduleWithSystem ({ ... }: { pkgs, ... }: {
nginx = moduleWithSystem (_: { pkgs, ... }: {
services = {
nginx =
let
@ -468,7 +468,7 @@ top @ { inputs, moduleWithSystem, ... }: {
};
};
});
wireguard-output = moduleWithSystem ({ ... }: { pkgs, ... }: {
wireguard-output = moduleWithSystem (_: { pkgs, ... }: {
networking = {
nat = {
enable = true;
@ -516,7 +516,7 @@ top @ { inputs, moduleWithSystem, ... }: {
};
};
});
anonymous-dns = moduleWithSystem ({ ... }: { ... }: {
anonymous-dns = moduleWithSystem (_: _: {
networking = {
nameservers = [ "127.0.0.1" "::1" ];
dhcpcd.extraConfig = "nohook resolv.conf";
@ -554,7 +554,7 @@ top @ { inputs, moduleWithSystem, ... }: {
};
};
});
firewall = moduleWithSystem ({ ... }: { lib, ... }: {
firewall = moduleWithSystem (_: { lib, ... }: {
networking = {
firewall = lib.mkForce {
enable = true;
@ -587,7 +587,7 @@ top @ { inputs, moduleWithSystem, ... }: {
};
};
});
rest = moduleWithSystem ({ ... }: { pkgs, ... }: {
rest = moduleWithSystem (_: { pkgs, ... }: {
fileSystems."/mnt/export1981" = {
device = "172.16.128.47:/nas/5490";
fsType = "nfs";

View File

@ -1,17 +1,8 @@
{ inputs, withSystem, ... }: {
flake.overlays.default = _final: _prev:
let
system = "x86_64-linux";
in
withSystem system (
{ config, ... }: {
nvim = config.packages.nvim;
bingwp = config.packages.bingwp;
screenshot = config.packages.screenshot;
cursors = config.packages.cursors;
wpd = config.packages.wpd;
webshite = config.packages.webshite;
sal = inputs.sal.packages.${system}.default;
{ withSystem, ... }: {
flake.overlays.default = _: _:
withSystem "x86_64-linux" (
{ config, ... }: with config.packages; {
inherit nvim bingwp screenshot cursors wpd webshite sal;
}
);
}

View File

@ -63,6 +63,7 @@
};
});
webshite = inputs.webshite.packages.${system}.default;
sal = inputs.sal.packages."x86_64-linux".default;
};
};
}