[STYLE/REFACTOR] Deadnix, Alejandra and Statix

This commit is contained in:
Kat Inskip 2023-04-25 16:48:32 -07:00
parent 8573c4508d
commit d4242f9dd8
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
51 changed files with 465 additions and 466 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
fonts = { fonts = {
fonts = with pkgs; [ fonts = with pkgs; [
font-awesome font-awesome

View file

@ -1,3 +1,3 @@
{ machine, ... }: { {machine, ...}: {
networking.hostName = machine; networking.hostName = machine;
} }

View file

@ -5,7 +5,7 @@
inputs, inputs,
... ...
}: let }: let
inherit (std) set tuple list function; inherit (std) set list;
inherit (lib.strings) versionAtLeast; inherit (lib.strings) versionAtLeast;
inputs' = set.filter (n: _: !list.elem n ["pypi-deps-db"]) (set.rename "self" "kat" inputs); inputs' = set.filter (n: _: !list.elem n ["pypi-deps-db"]) (set.rename "self" "kat" inputs);
in { in {

View file

@ -1,7 +1,5 @@
{ {
inputs, inputs,
pkgs,
tree,
system, system,
... ...
}: { }: {

View file

@ -1,11 +1,12 @@
{ pkgs, ... }: { {pkgs, ...}: {
nix.envVars = { nix.envVars = {
"SSH_AUTH_SOCK" = "/Users/kat/.gnupg/S.gpg-agent.ssh"; "SSH_AUTH_SOCK" = "/Users/kat/.gnupg/S.gpg-agent.ssh";
}; };
launchd.daemons.start_nixos_native = { launchd.daemons.start_nixos_native = {
serviceConfig.ProgramArguments = [ serviceConfig.ProgramArguments = [
"/bin/sh" "-c" "/bin/sh"
"-c"
"/bin/wait4path /nix/store && ${pkgs.writeScript "start_nixos_native" '' "/bin/wait4path /nix/store && ${pkgs.writeScript "start_nixos_native" ''
/usr/bin/open "utm://start?name=NixOS Native" /usr/bin/open "utm://start?name=NixOS Native"
''}" ''}"

View file

@ -1,7 +1,4 @@
{ {lib, ...}: let
lib,
...
}: let
inherit (lib.modules) mkMerge; inherit (lib.modules) mkMerge;
in { in {
base16 = { base16 = {

View file

@ -16,7 +16,7 @@
in in
dirImports dirImports
// { // {
user = tree.prev.user; inherit (tree.prev) user;
common = { common = {
imports = with tree.prev; [ imports = with tree.prev; [
base16 base16

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { _: {
dconf = { dconf = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
imv # Image viewer imv # Image viewer
yt-dlp # Downloading media yt-dlp # Downloading media

View file

@ -1,13 +1,17 @@
{ config, lib, pkgs, ... }: let {
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkMerge mkIf; inherit (lib.modules) mkMerge mkIf;
inherit (lib.attrsets) mapAttrsToList; inherit (lib.attrsets) mapAttrsToList;
in { in {
# TODO: fix lib usage # TODO: fix lib usage
programs.mpv = { programs.mpv = {
enable = true; enable = true;
scripts = with pkgs.mpvScripts; [ sponsorblock paused ]; scripts = with pkgs.mpvScripts; [sponsorblock paused];
bindings = bindings = let
let
vim = { vim = {
"l" = "seek 5"; "l" = "seek 5";
"h" = "seek -5"; "h" = "seek -5";
@ -100,7 +104,8 @@ in {
osd-bar-h = 2.5; # 3.125 default osd-bar-h = 2.5; # 3.125 default
osd-border-size = 2; # font border pixels, default 3 osd-border-size = 2; # font border pixels, default 3
term-osd-bar = true; term-osd-bar = true;
script-opts = builtins.concatStringsSep "," script-opts =
builtins.concatStringsSep ","
(mapAttrsToList (k: v: "${k}=${toString v}") { (mapAttrsToList (k: v: "${k}=${toString v}") {
ytdl_hook-ytdl_path = "${pkgs.yt-dlp}/bin/yt-dlp"; ytdl_hook-ytdl_path = "${pkgs.yt-dlp}/bin/yt-dlp";
osc-layout = "slimbox"; osc-layout = "slimbox";
@ -114,6 +119,7 @@ in {
osc-seekbarkeyframes = "no"; osc-seekbarkeyframes = "no";
osc-seekrangestyle = "slider"; osc-seekrangestyle = "slider";
}); });
}]; }
];
}; };
} }

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
gnome.adwaita-icon-theme gnome.adwaita-icon-theme
]; ];

View file

@ -1,4 +1,8 @@
{ config, lib, ... }: { {
config,
lib,
...
}: {
# TODO: fix lib use # TODO: fix lib use
home.packages = [ home.packages = [
config.services.konawall.konashow config.services.konawall.konashow
@ -8,7 +12,7 @@
enable = true; enable = true;
interval = "30m"; interval = "30m";
mode = "shuffle"; mode = "shuffle";
commonTags = [ "width:>=1600" ]; commonTags = ["width:>=1600"];
tagList = map lib.toList [ tagList = map lib.toList [
[ [
"score:>=50" "score:>=50"

View file

@ -1,18 +1,21 @@
{ config, pkgs, ... }: let {
config,
pkgs,
...
}: let
inherit (config.base16) palette; inherit (config.base16) palette;
in { in {
systemd.user.services = { systemd.user.services = {
mako = { mako = {
Unit = { Unit = {
Description = "mako"; Description = "mako";
X-Restart-Triggers = X-Restart-Triggers = [(toString config.xdg.configFile."mako/config".source)];
[ (toString config.xdg.configFile."mako/config".source) ];
}; };
Service = { Service = {
ExecStart = "${pkgs.mako}/bin/mako"; ExecStart = "${pkgs.mako}/bin/mako";
Restart = "always"; Restart = "always";
}; };
Install = { WantedBy = [ "graphical-session.target" ]; }; Install = {WantedBy = ["graphical-session.target"];};
}; };
}; };

View file

@ -1,10 +1,14 @@
{ kittywitch, ... }: { {kittywitch, ...}: {
programs.wofi = { programs.wofi = {
enable = true; enable = true;
settings = { settings = {
style = let style = let
template = kittywitch.sassTemplate { name = "wofi-style"; src = ./wofi.sass; }; template = kittywitch.sassTemplate {
in template.source; name = "wofi-style";
src = ./wofi.sass;
};
in
template.source;
insensitive = true; insensitive = true;
allow_images = true; allow_images = true;
hide_scroll = true; hide_scroll = true;

View file

@ -1,8 +1,14 @@
{ config, pkgs, lib, ... }: let {
config,
pkgs,
lib,
...
}: let
inherit (lib.types) attrsOf str enum; inherit (lib.types) attrsOf str enum;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
cfg = config.base16; cfg = config.base16;
in with lib; { in
with lib; {
options.base16 = { options.base16 = {
palette = mkOption { palette = mkOption {
type = attrsOf str; type = attrsOf str;
@ -10,14 +16,16 @@ in with lib; {
sass = { sass = {
variables = mkOption { variables = mkOption {
type = attrsOf str; type = attrsOf str;
default = cfg.palette // { default =
cfg.palette
// {
term_font = "Iosevka"; term_font = "Iosevka";
font = "Iosevka"; font = "Iosevka";
font_size = "12px"; font_size = "12px";
}; };
}; };
css_style = mkOption { css_style = mkOption {
type = enum [ "nested" "compressed" "compact" "expanded" ]; type = enum ["nested" "compressed" "compact" "expanded"];
default = "expanded"; default = "expanded";
}; };
}; };
@ -25,7 +33,8 @@ in with lib; {
config = mkIf (cfg.schemes != {}) { config = mkIf (cfg.schemes != {}) {
base16 = { base16 = {
# TODO: convert to std # TODO: convert to std
palette = lib.mapAttrs' (k: v: palette =
lib.mapAttrs' (k: v:
lib.nameValuePair lib.nameValuePair
k k
"#${v.hex}") "#${v.hex}")
@ -33,27 +42,33 @@ in with lib; {
cfg.defaultScheme); cfg.defaultScheme);
}; };
lib.kittywitch.sassTemplate = { name, src }: lib.kittywitch.sassTemplate = {
let name,
src,
}: let
variables = pkgs.writeText "base-variables.sass" '' variables = pkgs.writeText "base-variables.sass" ''
${(concatStringsSep "\n" (mapAttrsToList(var: con: "\$${var}: ${con}") cfg.sass.variables))} ${(concatStringsSep "\n" (mapAttrsToList (var: con: "\$${var}: ${con}") cfg.sass.variables))}
''; '';
source = pkgs.callPackage source =
({ sass, stdenv }: stdenv.mkDerivation { pkgs.callPackage
({
sass,
stdenv,
}:
stdenv.mkDerivation {
inherit name src variables; inherit name src variables;
nativeBuildInputs = lib.singleton pkgs.sass; nativeBuildInputs = lib.singleton pkgs.sass;
phases = [ "buildPhase" ]; phases = ["buildPhase"];
buildPhase = '' buildPhase = ''
cat $variables $src > src-mut.sass cat $variables $src > src-mut.sass
sass src-mut.sass $out --sourcemap=none --trace --style=${cfg.sass.css_style} sass src-mut.sass $out --sourcemap=none --trace --style=${cfg.sass.css_style}
''; '';
}) })
{ }; {};
in in {
{
inherit source; inherit source;
text = builtins.readFile source; text = builtins.readFile source;
}; };
_module.args = { inherit (config.lib) kittywitch; }; _module.args = {inherit (config.lib) kittywitch;};
}; };
} }

View file

@ -1,7 +1,12 @@
{ config, lib, ... }: let {
config,
lib,
...
}: let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
in mkIf (config.programs.waybar.enable) { in
mkIf config.programs.waybar.enable {
systemd.user.services.waybar.Unit.X-Restart-Triggers = [ systemd.user.services.waybar.Unit.X-Restart-Triggers = [
(builtins.toString config.programs.waybar.style) (builtins.toString config.programs.waybar.style)
]; ];
} }

View file

@ -1,8 +1,4 @@
{ {lib, ...}: let
config,
lib,
...
}: let
inherit (lib.types) listOf path; inherit (lib.types) listOf path;
inherit (lib.options) mkOption; inherit (lib.options) mkOption;
in { in {

View file

@ -1,13 +1,11 @@
({ config, pkgs, ... }: ({pkgs, ...}: {
{
users.users.arc = { users.users.arc = {
uid = 1001; uid = 1001;
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; extraGroups = ["wheel"];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ8Z6briIboxIdedPGObEWB6QEQkvxKvnMW/UVU9t/ac mew-pgp" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ8Z6briIboxIdedPGObEWB6QEQkvxKvnMW/UVU9t/ac mew-pgp"
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
}) })

View file

@ -1,30 +1,39 @@
{ config, pkgs, lib, ... }: let {
# TODO: solve lib usage config,
inherit (lib.lists) concatLists elem; lib,
inherit (lib.attrsets) mapAttrsToList; ...
commonUser = { }: let
# TODO: solve lib usage
inherit (lib.lists) concatLists elem;
inherit (lib.attrsets) mapAttrsToList;
commonUser = {
openssh.authorizedKeys.keys = concatLists (mapAttrsToList openssh.authorizedKeys.keys = concatLists (mapAttrsToList
(_: user: (_: user:
if elem "wheel" user.extraGroups then if elem "wheel" user.extraGroups
user.openssh.authorizedKeys.keys then user.openssh.authorizedKeys.keys
else else [])
[ ])
config.users.users); config.users.users);
}; };
in { in {
security.sudo.extraRules = [{ security.sudo.extraRules = [
users = [ "deploy" ]; {
commands = [ { users = ["deploy"];
commands = [
{
command = "ALL"; command = "ALL";
options = [ options = [
"NOPASSWD" "NOPASSWD"
"SETENV" "SETENV"
]; ];
} ]; }
}]; ];
}
];
users.users = { users.users = {
root = commonUser; root = commonUser;
deploy = commonUser // { deploy =
commonUser
// {
isNormalUser = true; isNormalUser = true;
}; };
}; };

View file

@ -1,4 +1,4 @@
{ config, ... }: { {config, ...}: {
system.autoUpgrade = { system.autoUpgrade = {
enable = true; enable = true;
flake = "github:kittywitch/kittywitch#${config.networking.hostName}"; flake = "github:kittywitch/kittywitch#${config.networking.hostName}";

View file

@ -1,4 +1,4 @@
{ config, ... }: { {config, ...}: {
base16 = { base16 = {
inherit (config.home-manager.users.kat.base16) defaultSchemeName defaultScheme schemes; inherit (config.home-manager.users.kat.base16) defaultSchemeName defaultScheme schemes;
console = { console = {

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
fonts.fonts = [ fonts.fonts = [
pkgs.tamzen pkgs.tamzen
]; ];
@ -12,7 +12,7 @@
]; ];
}; };
console = { console = {
packages = [ pkgs.tamzen ]; packages = [pkgs.tamzen];
font = "Tamzen7x14"; font = "Tamzen7x14";
earlySetup = true; earlySetup = true;
keyMap = "uk"; keyMap = "uk";

View file

@ -1,19 +1,31 @@
{ config, lib, std, ... }: let {
config,
lib,
std,
...
}: let
inherit (lib.modules) mkDefault; inherit (lib.modules) mkDefault;
inherit (std) list; inherit (std) list;
in { in {
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ (list.unsafeHead config.services.openssh.ports) ]; allowedTCPPorts = [(list.unsafeHead config.services.openssh.ports)];
allowedUDPPortRanges = [ { from = 60000; to = 61000; } ]; allowedUDPPortRanges = [
{
from = 60000;
to = 61000;
}
];
}; };
services.openssh = { services.openssh = {
enable = true; enable = true;
/* knownHosts.katca = { /*
knownHosts.katca = {
certAuthority = true; certAuthority = true;
publicKey = builtins.readFile ./ca-pubkey.pem; publicKey = builtins.readFile ./ca-pubkey.pem;
}; */ };
kexAlgorithms = [ "curve25519-sha256@libssh.org" ]; */
kexAlgorithms = ["curve25519-sha256@libssh.org"];
settings = { settings = {
PasswordAuthentication = false; PasswordAuthentication = false;
KbdInteractiveAuthentication = false; KbdInteractiveAuthentication = false;

View file

@ -2,7 +2,7 @@ _: {
services.tzupdate.enable = true; services.tzupdate.enable = true;
systemd.timers."tzupdate" = { systemd.timers."tzupdate" = {
wantedBy = [ "timers.target" ]; wantedBy = ["timers.target"];
timerConfig = { timerConfig = {
OnBootSec = "5m"; OnBootSec = "5m";
OnUnitActiveSec = "5m"; OnUnitActiveSec = "5m";

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { {pkgs, ...}: {
environment.systemPackages = with pkgs; [ bluez5-experimental ]; environment.systemPackages = with pkgs; [bluez5-experimental];
environment.etc = { environment.etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = '' "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''

View file

@ -1,4 +1,9 @@
{ lib, tree, ... }: with lib; let {
lib,
tree,
...
}:
with lib; let
profiles = tree.prev; profiles = tree.prev;
appendedProfiles = { appendedProfiles = {
common-wifi-bt = { common-wifi-bt = {
@ -23,4 +28,4 @@
}; };
}; };
in in
profiles // appendedProfiles profiles // appendedProfiles

View file

@ -1,5 +1,9 @@
{lib, pkgs, ...}: let {
inherit (lib.modules) mkDefault mkOrder; lib,
pkgs,
...
}: let
inherit (lib.modules) mkDefault;
in { in {
powerManagement.cpuFreqGovernor = mkDefault "powersave"; powerManagement.cpuFreqGovernor = mkDefault "powersave";
programs.light.enable = true; programs.light.enable = true;
@ -25,7 +29,7 @@ in {
format-charging = " {capacity}%"; format-charging = " {capacity}%";
format-plugged = " {capacity}%"; format-plugged = " {capacity}%";
format-alt = "{icon} {time}"; format-alt = "{icon} {time}";
format-icons = [ "" "" "" "" "" ]; format-icons = ["" "" "" "" ""];
}; };
}; };
} }

View file

@ -1,9 +1,7 @@
{lib, ...}: let _: {
in {
boot = { boot = {
initrd.availableKernelModules = initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "sr_mod" "rtsx_usb_sdmmc"];
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sr_mod" "rtsx_usb_sdmmc" ]; kernelModules = ["kvm-intel"];
kernelModules = [ "kvm-intel" ];
}; };
home-manager.sharedModules = [ home-manager.sharedModules = [
{ {

View file

@ -1,7 +1,5 @@
{lib, pkgs, ...}: let {pkgs, ...}: {
inherit (lib.modules) mkDefault mkOrder; environment.systemPackages = with pkgs; [pulsemixer];
in {
environment.systemPackages = with pkgs; [ pulsemixer ];
sound = { sound = {
enable = true; enable = true;

View file

@ -1,13 +1,22 @@
{ lib, pkgs, ... }: let {
inherit (lib.modules) mkForce; lib,
pkgs,
...
}: let
inherit (lib.modules) mkForce;
in { in {
systemd.services.NetworkManager-wait-online = { systemd.services.NetworkManager-wait-online = {
serviceConfig.ExecStart = [ "" "${pkgs.networkmanager}/bin/nm-online -q" ]; serviceConfig.ExecStart = ["" "${pkgs.networkmanager}/bin/nm-online -q"];
}; };
networking = { networking = {
firewall = { firewall = {
allowedUDPPorts = [ 5353 ]; # MDNS allowedUDPPorts = [5353]; # MDNS
allowedUDPPortRanges = [ { from = 32768; to=60999; } ]; # Ephemeral / Chromecast allowedUDPPortRanges = [
{
from = 32768;
to = 60999;
}
]; # Ephemeral / Chromecast
}; };
networkmanager = { networkmanager = {
enable = true; enable = true;

View file

@ -1,4 +1,9 @@
{ config, lib, std, ... }: let {
config,
lib,
std,
...
}: let
inherit (lib.modules) mkDefault mkIf mkMerge; inherit (lib.modules) mkDefault mkIf mkMerge;
inherit (std) list; inherit (std) list;
in { in {

View file

@ -1,10 +1,4 @@
{ {pkgs, ...}: {
pkgs,
lib,
...
}: let
inherit (lib.modules) mkForce;
in {
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true; services.xserver.desktopManager.gnome.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { _: {
fonts = { fonts = {
enableDefaultFonts = true; enableDefaultFonts = true;
fontDir.enable = true; fontDir.enable = true;

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { {pkgs, ...}: {
services.pcscd.enable = true; services.pcscd.enable = true;
services.udev.packages = [ pkgs.yubikey-personalization ]; services.udev.packages = [pkgs.yubikey-personalization];
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;

View file

@ -1,3 +1,3 @@
_: { _: {
boot.supportedFilesystems = [ "nfs" ]; boot.supportedFilesystems = ["nfs"];
} }

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
android-udev-rules android-udev-rules
jmtpfs jmtpfs

View file

@ -1,7 +1,6 @@
{ {
lib, lib,
config, config,
pkgs,
prev, prev,
... ...
}: let }: let

View file

@ -1,9 +1,15 @@
{ config, pkgs, std, lib, ... }: let {
config,
pkgs,
std,
lib,
...
}: let
inherit (std) set list; inherit (std) set list;
inherit (lib.modules) mkForce; inherit (lib.modules) mkForce;
in { in {
programs.sway = { programs.sway = {
enable = list.any (user: user.wayland.windowManager.sway.enable) (set.values config.home-manager.users); enable = list.any (user: user.wayland.windowManager.sway.enable) (set.values config.home-manager.users);
extraPackages = with pkgs; mkForce [ xwayland swaylock swayidle swaylock-fancy wmctrl ]; extraPackages = with pkgs; mkForce [xwayland swaylock swayidle swaylock-fancy wmctrl];
}; };
} }

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
xdg = { xdg = {
portal = { portal = {
enable = true; enable = true;

View file

@ -1,10 +1,4 @@
{ {config, ...}: {
lib,
config,
pkgs,
prev,
...
}: {
scalpel.trafos."credentials_file" = { scalpel.trafos."credentials_file" = {
source = "/etc/ssl/credentials_template"; source = "/etc/ssl/credentials_template";
matchers."CLOUDFLARE_EMAIL".secret = config.sops.secrets.cloudflare_email.path; matchers."CLOUDFLARE_EMAIL".secret = config.sops.secrets.cloudflare_email.path;

View file

@ -1,6 +1,6 @@
_: { _: {
boot = { boot = {
initrd.availableKernelModules = [ "virtiofs"]; initrd.availableKernelModules = ["virtiofs"];
binfmt.registrations."rosetta" = { binfmt.registrations."rosetta" = {
interpreter = "/run/rosetta/rosetta"; interpreter = "/run/rosetta/rosetta";
fixBinary = true; fixBinary = true;
@ -12,7 +12,7 @@ _: {
}; };
nix.settings = { nix.settings = {
extra-platforms = [ "x86_64-linux" ]; extra-platforms = ["x86_64-linux"];
extra-sandbox-paths = [ "/run/rosetta" "/run/binfmt" ]; extra-sandbox-paths = ["/run/rosetta" "/run/binfmt"];
}; };
} }

View file

@ -8,10 +8,10 @@
inherit (import ./pkgs.nix {inherit inputs tree overlay;}) pkgs; inherit (import ./pkgs.nix {inherit inputs tree overlay;}) pkgs;
formatter = import ./formatter.nix {inherit inputs pkgs;}; formatter = import ./formatter.nix {inherit inputs pkgs;};
inherit (std) set; inherit (std) set;
#checks = set.map (_: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib; checks = set.map (_: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib;
in in
{ {
inherit inputs tree std pkgs formatter lib; # checks inherit inputs tree std pkgs formatter lib checks;
legacyPackages = pkgs; legacyPackages = pkgs;
} }
// systems // systems

View file

@ -1,3 +1,9 @@
{ inputs, tree, ... }: final: prev: let {
inherit (inputs.std.lib) set list; inputs,
in set.map (_: package: prev.callPackage package {} ) (removeAttrs tree.packages ["default"]) tree,
...
}: _: prev: let
# formerly final: prev:, but deadnix
inherit (inputs.std.lib) set;
in
set.map (_: package: prev.callPackage package {}) (removeAttrs tree.packages ["default"])

View file

@ -5,4 +5,9 @@
}: let }: let
overlays = import tree.overlays {inherit inputs tree;}; overlays = import tree.overlays {inherit inputs tree;};
in in
inputs.utils.lib.eachDefaultSystem (system: {pkgs = import inputs.nixpkgs { inherit system overlays; config.allowUnfree = true; };}) inputs.utils.lib.eachDefaultSystem (system: {
pkgs = import inputs.nixpkgs {
inherit system overlays;
config.allowUnfree = true;
};
})

View file

@ -1,5 +1,10 @@
_: let _: let
hostConfig = {lib, tree, modulesPath, inputs, pkgs, ...}: let hostConfig = {
lib,
tree,
inputs,
...
}: let
inherit (lib.modules) mkForce; inherit (lib.modules) mkForce;
in { in {
imports = with tree; [ imports = with tree; [
@ -46,7 +51,7 @@ _: let
}; };
swapDevices = [ swapDevices = [
{ device = "/dev/sdb"; } {device = "/dev/sdb";}
]; ];
wsl = { wsl = {

View file

@ -110,7 +110,7 @@
{ {
inherit machine; inherit machine;
systemType = config.folder; systemType = config.folder;
system = config.system; inherit (config) system;
} }
// defaultSpecialArgs; // defaultSpecialArgs;
}; };

View file

@ -1,14 +1,21 @@
_: let _: let
hostConfig = {config, tree, pkgs, ...}: { hostConfig = {
imports = with tree.nixos.hardware; [ config,
tree,
...
}: {
imports = with tree.nixos.hardware;
[
lenovo-thinkpad-x260 lenovo-thinkpad-x260
common-pc-laptop-ssd common-pc-laptop-ssd
] ++ (with tree.nixos.roles; [ ]
++ (with tree.nixos.roles; [
graphical graphical
sway sway
laptop laptop
bootable bootable
]) ++ (with tree; [ ])
++ (with tree; [
kat.gui kat.gui
kat.sway kat.sway
]); ]);

View file

@ -1,5 +1,9 @@
_: let _: let
hostConfig = { lib, tree, ... }: let hostConfig = {
lib,
tree,
...
}: let
inherit (lib.modules) mkDefault; inherit (lib.modules) mkDefault;
in { in {
imports = with tree; [ imports = with tree; [
@ -9,7 +13,7 @@ _: let
boot = { boot = {
loader.systemd-boot.enable = true; loader.systemd-boot.enable = true;
initrd.availableKernelModules = ["virtio_pci" "xhci_pci" "usb_storage" "usbhid" ]; initrd.availableKernelModules = ["virtio_pci" "xhci_pci" "usb_storage" "usbhid"];
}; };
fileSystems = { fileSystems = {

View file

@ -1,84 +0,0 @@
_: let
hostConfig = {tree, lib, ...}: let
inherit (lib.modules) mkForce;
in {
imports = with tree; [
nixos.arc
/* ./kanidm.nix
./vouch.nix
./home-assistant.nix
./zigbee2mqtt.nix
./mosquitto.nix
./postgres.nix
./nginx.nix
../../gui/nfs.nix */
];
networking = {
useDHCP = false;
interfaces = {
eno1 = {
useDHCP = true;
};
};
};
boot = {
loader = {
systemd-boot = {
enable = true;
};
efi = {
canTouchEfiVariables = true;
};
};
initrd = {
availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
};
kernelModules = [ "kvm-intel" ];
};
/* services.openiscsi = {
enable = true;
name = "";
discoverPortal = "shanghai.tail.cutie.moe";
};
environment.etc."iscsi/initiatorname.iscsi" = mkForce {
source = config.secrets.files.openscsi-config.path;
};
secrets.variables.openscsi-password = {
path = "gensokyo/tewi-scsi";
field = "password";
};
secrets.files.openscsi-config = {
text = "InitiatorName=${tf.variables.openscsi-password.ref}";
}; */
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/6c5d82b1-5d11-4c72-96c6-5f90e6ce57f5";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/85DC-72FA";
fsType = "vfat";
};
};
swapDevices = lib.singleton ({
device = "/dev/disk/by-uuid/137605d3-5e3f-47c8-8070-6783ce651932";
});
system.stateVersion = "21.05";
};
in {
arch = "x86_64";
type = "NixOS";
modules = [
hostConfig
];
}

View file

@ -1,8 +1,4 @@
{ {inputs, ...}:
inputs,
pkgs,
...
}:
(inputs.tree.tree { (inputs.tree.tree {
inherit inputs; inherit inputs;
folder = ./.; folder = ./.;