Compare commits

..

No commits in common. "f3e6c0f7434d02d25afe3a29ca6a2d62bbb447cc" and "db77ece3c3b7e06bf9a9d96dae7f2b24b75a8bc3" have entirely different histories.

39 changed files with 265 additions and 255 deletions

View file

@ -9,7 +9,7 @@ android:
boot:
nixos-rebuild boot $(options) --flake $(flake)
boot-no-nixconf:
boot-vanilla:
mv /etc/nix/nix.conf /etc/nix/nix.conf_
nixos-rebuild boot $(options) --flake $(flake)
mv /etc/nix/nix.conf_ /etc/nix/nix.conf

View file

@ -8,8 +8,8 @@
inherit (config.style.font) serif sansSerif monospace emoji;
sizes = {
inherit (config.style.font.size) terminal desktop;
applications = config.style.font.size.application;
popups = config.style.font.size.popup;
applications = config.style.font.size.application;
};
};
opacity = {

View file

@ -1,6 +1,6 @@
{ container, pkgs, util, lib, config, __findFile, ... } @args: with lib; let
{ container, pkgs, util, lib, config, ... } @args: with lib; let
cfg = config.container.module.home;
package = (pkgs.callPackage <package/homer> args);
package = (pkgs.callPackage ./homer args);
in {
options = {
container.module.home = {

View file

@ -1,6 +1,6 @@
{ container, pkgsJobber, poetry2nixJobber, lib, config, __findFile, ... }: with lib; let
{ container, pkgsJobber, poetry2nixJobber, lib, config, ... }: with lib; let
cfg = config.container.module.jobber;
script = import <package/jobber> { poetry2nix = poetry2nixJobber; pkgs = pkgsJobber; };
script = import ./jobber { poetry2nix = poetry2nixJobber; pkgs = pkgsJobber; };
in {
options = {
container.module.jobber = {

View file

@ -1,6 +1,6 @@
{ pkgs, util, container, lib, config, __findFile, ... } @args: with lib; let
{ pkgs, util, container, lib, config, ... } @args: with lib; let
cfg = config.container.module.paste;
package = (pkgs.callPackage <package/pastebin> args);
package = (pkgs.callPackage ./pastebin args);
in {
options = {
container.module.paste = {

View file

@ -2,9 +2,9 @@
# ipp://192.168.2.237
# Pantum M6500W-Series
{ container, pkgs, lib, config, __findFile, ... } @args: with lib; let
{ container, pkgs, lib, config, ... } @args: with lib; let
cfg = config.container.module.print;
package = pkgs.callPackage <package/print> args;
package = pkgs.callPackage ./print args;
in {
options = {
container.module.print = {

View file

@ -238,6 +238,7 @@
# for Live ISO and Android configurations respectively.
(x86System "dasha")
(x86System "desktop")
(x86System "fsight")
(x86System "home")
(x86System "laptop")
(x86System "work")
@ -292,13 +293,7 @@
in nixpkgs.lib.foldl' (acc: h: acc // h) {} [
x86LinuxRoot
(x86LinuxHome "voronind" [
{
home.hm.package = {
android.enable = true;
core.enable = true;
common.enable = true;
};
}
{ home.hm.packages.common.enable = true; }
])
];

View file

@ -23,7 +23,7 @@ in {
config = mkIf cfg.enable {
time.timeZone = const.timeZone;
environment.packages = package.core ++ package.android;
environment.packages = package.core;
home-manager.config = stylix // {
imports = [ inputs.stylix.homeManagerModules.stylix ];
home = {

View file

@ -19,18 +19,17 @@ in {
default = "/home/${cfg.username}";
type = types.str;
};
package = mkOption {
packages = mkOption {
default = {};
type = types.submodule {
options = {
android.enable = mkEnableOption "Android apks.";
common.enable = mkEnableOption "Common apps.";
core.enable = mkEnableOption "Core apps.";
creative.enable = mkEnableOption "Creative apps.";
common.enable = mkEnableOption "Common apps.";
desktop.enable = mkEnableOption "Desktop apps.";
gaming.enable = mkEnableOption "Gaming apps.";
creative.enable = mkEnableOption "Creative apps.";
dev.enable = mkEnableOption "Dev apps.";
extra.enable = mkEnableOption "Extra apps.";
gaming.enable = mkEnableOption "Gaming apps.";
};
};
};
@ -49,13 +48,12 @@ in {
programs = import ./program args;
dconf.settings = util.catSet (util.ls ./config/dconf) args;
}
(mkIf cfg.package.android.enable { home.packages = package.android; })
(mkIf cfg.package.common.enable { home.packages = package.common; })
(mkIf cfg.package.core.enable { home.packages = package.core; })
(mkIf cfg.package.creative.enable { home.packages = package.creative; })
(mkIf cfg.package.desktop.enable { home.packages = package.desktop; })
(mkIf cfg.package.dev.enable { home.packages = package.dev; })
(mkIf cfg.package.extra.enable { home.packages = package.extra; })
(mkIf cfg.package.gaming.enable { home.packages = package.gaming; })
(mkIf cfg.packages.core.enable { home.packages = package.core; })
(mkIf cfg.packages.common.enable { home.packages = package.common; })
(mkIf cfg.packages.desktop.enable { home.packages = package.desktop; })
(mkIf cfg.packages.gaming.enable { home.packages = package.gaming; })
(mkIf cfg.packages.creative.enable { home.packages = package.creative; })
(mkIf cfg.packages.dev.enable { home.packages = package.dev; })
(mkIf cfg.packages.extra.enable { home.packages = package.extra; })
]);
}

View file

@ -1,15 +1,13 @@
{ ... }: {
fileSystems = {
"/storage/hot" = {
fileSystems."/storage/hot" = {
device = "/dev/storage/hot";
fsType = "ext4";
options = [ "nofail" "noatime" ];
};
"/storage/cold" = {
fileSystems."/storage/cold" = {
device = "/dev/storage/cold";
fsType = "ext4";
options = [ "nofail" "noatime" ];
};
};
}

View file

@ -9,19 +9,20 @@
module = {
amd.gpu.enable = true;
builder.client.enable = true;
desktop.sway.enable = true;
intel.cpu.enable = true;
print.enable = true;
strongswan.enable = true;
tablet.enable = true;
package = {
desktop = {
sway.enable = true;
app = {
common.enable = true;
core.enable = true;
creative.enable = true;
desktop.enable = true;
gaming.enable = true;
creative.enable = true;
dev.enable = true;
extra.enable = true;
gaming.enable = true;
};
};
};
}

View file

@ -1,21 +1,19 @@
{ ... }: {
fileSystems = {
"/storage/hot" = {
fileSystems."/storage/hot" = {
device = "/dev/storage/hot";
fsType = "ext4";
options = [ "noatime" "nofail" ];
};
"/storage/cold_1" = {
fileSystems."/storage/cold_1" = {
device = "/dev/storage/cold_1";
fsType = "ext4";
options = [ "noatime" "noauto" "nofail" ];
};
"/storage/cold_2" = {
fileSystems."/storage/cold_2" = {
device = "/dev/storage/cold_2";
fsType = "ext4";
options = [ "noatime" "noauto" "nofail" ];
};
};
}

View file

@ -1,4 +1,4 @@
{ ... }: {
{ lib, ... }: {
imports = [
./Filesystem.nix
];
@ -8,7 +8,6 @@
module = {
builder.client.enable = true;
desktop.sway.enable = true;
ollama.enable = true;
print.enable = true;
virtmanager.enable = true;
@ -17,19 +16,21 @@
cpu.enable = true;
gpu.enable = true;
};
docker = {
enable = true;
autostart = false;
rootless = false;
};
package = {
desktop = {
sway.enable = true;
app = {
common.enable = true;
core.enable = true;
creative.enable = true;
desktop.enable = true;
creative.enable = true;
dev.enable = true;
extra.enable = true;
gaming.enable = true;
};
};
docker = {
enable = true;
autostart = false;
rootless = false;
};
};
}

17
host/fsight/Grub.nix Normal file
View file

@ -0,0 +1,17 @@
{ lib, ... }: {
# This host is running inside BIOS VM so it needs the Grub.
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.loader.efi.canTouchEfiVariables = lib.mkForce false;
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
fileSystems."/" = lib.mkForce {
device = "/dev/sda2";
fsType = "ext4";
};
fileSystems."/boot" = lib.mkForce {
device = "/dev/sda1";
fsType = "vfat";
};
}

8
host/fsight/Root.nix Normal file
View file

@ -0,0 +1,8 @@
{ lib, ... }: {
# Force specific PW for this host.
users.users.root.hashedPassword = lib.mkForce "$y$j9T$d4HfwutZr.eNHuLJYRuro/$7swZfgCNS6jEXHFCxsW5um/68jX9BRiiZD1BYcm/gD/";
# Allow login with PW for others.
# services.openssh.settings.PasswordAuthentication = lib.mkForce true;
# services.openssh.settings.PermitRootLogin = lib.mkForce "yes";
}

13
host/fsight/default.nix Normal file
View file

@ -0,0 +1,13 @@
{ ... }: {
imports = [
./Grub.nix
./Root.nix
];
home.nixos.enable = true;
module.docker = {
enable = true;
autostart = true;
rootless = false;
};
}

View file

@ -77,7 +77,9 @@ in {
systemd.services.backup = util.mkStaticSystemdService {
enable = true;
description = "Home system backup.";
serviceConfig.Type = "oneshot";
serviceConfig = {
Type = "oneshot";
};
path = with pkgs; [
bashInteractive
curl

View file

@ -1,5 +1,5 @@
{ ... }: {
# TODO: Remove this with Fsight container. ALSO!!! delete images and everything before that.
# TODO: Remove this with Fsight container.
virtualisation.docker.enable = true;
container = {

View file

@ -1,23 +1,21 @@
{ ... }: {
fileSystems = {
"/storage/cold_1" = {
fileSystems."/storage/cold_1" = {
device = "/dev/storage/cold_1";
fsType = "ext4";
options = [ "nofail" "noatime" ];
};
"/storage/cold_2" = {
fileSystems."/storage/cold_2" = {
device = "/dev/storage/cold_2";
fsType = "ext4";
options = [ "nofail" "noatime" ];
};
"/storage/hot" = {
fileSystems."/storage/hot" = {
device = "/dev/storage/hot";
fsType = "ext4";
options = [ "nofail" "noatime" ];
};
};
swapDevices = [{
device = "/storage/hot/.swapfile";

View file

@ -1,13 +1,11 @@
{ util, ... }: {
networking = {
networkmanager.insertNameservers = [
{ ... }: {
networking.networkmanager.insertNameservers = [
"1.1.1.1"
"8.8.8.8"
];
extraHosts = util.trimTabs ''
networking.extraHosts = ''
10.1.0.2 git.voronind.com
10.1.0.2 iot.voronind.com
10.1.0.2 pass.voronind.com
'';
};
}

View file

@ -14,7 +14,17 @@
module = {
autoupdate.enable = false;
builder.server.enable = true;
desktop.sway.enable = true;
desktop = {
sway.enable = true;
app = {
common.enable = true;
desktop.enable = true;
};
};
ftpd = {
enable = true;
storage = "/storage/hot/ftp";
};
amd = {
cpu = {
enable = true;
@ -22,15 +32,5 @@
};
gpu.enable = true;
};
ftpd = {
enable = true;
storage = "/storage/hot/ftp";
};
package = {
android.enable = true;
common.enable = true;
core.enable = true;
desktop.enable = true;
};
};
}

View file

@ -11,7 +11,6 @@
module = {
builder.client.enable = true;
desktop.sway.enable = true;
print.enable = true;
strongswan.enable = true;
tablet.enable = true;
@ -20,13 +19,15 @@
cpu.enable = true;
gpu.enable = true;
};
package = {
desktop = {
sway.enable = true;
app = {
common.enable = true;
core.enable = true;
desktop.enable = true;
gaming.enable = true;
creative.enable = true;
dev.enable = true;
};
};
};
}

View file

@ -3,11 +3,7 @@
fprintd
];
services.fprintd = {
enable = true;
tod = {
enable = true;
driver = pkgs.libfprint-2-tod1-vfs0090;
};
};
services.fprintd.enable = true;
services.fprintd.tod.enable = true;
services.fprintd.tod.driver = pkgs.libfprint-2-tod1-vfs0090;
}

View file

@ -11,17 +11,18 @@
module = {
builder.client.enable = true;
desktop.sway.enable = true;
intel.cpu.enable = true;
powerlimit.thinkpad.enable = true;
print.enable = true;
package = {
desktop = {
sway.enable = true;
app = {
common.enable = true;
core.enable = true;
desktop.enable = true;
gaming.enable = true;
dev.enable = true;
extra.enable = true;
gaming.enable = true;
};
};
};
}

74
module/App.nix Normal file
View file

@ -0,0 +1,74 @@
{ pkgs, config, lib, __findFile, ... } @args: with lib; let
cfg = config.module.desktop.app;
package = import <package> args;
in {
options = {
module.desktop.app = {
common.enable = mkEnableOption "Common Apps.";
desktop.enable = mkEnableOption "Desktop Apps.";
gaming.enable = mkEnableOption "Gaming Apps.";
creative.enable = mkEnableOption "Creative Apps.";
dev.enable = mkEnableOption "Dev Apps.";
extra.enable = mkEnableOption "Extra Apps.";
};
};
config = mkMerge [
# Common apps.
(mkIf cfg.common.enable {
xdg.mime.defaultApplications = {
# Use `file -i file.txt` to find file mime type.
# Use `xdg-mime query default "text/plain"` to find default app.
"application/pdf" = "org.gnome.Evince.desktop";
"application/vnd.openxmlformats-officedocument.*" = "onlyoffice-desktopeditors.desktop";
"audio/*" = "mpv.desktop";
"image/*" = "org.gnome.Loupe.desktop";
"text/*" = "nvim.desktop";
"video/*" = "mpv.desktop";
};
environment.systemPackages = package.common;
services.gvfs.enable = true;
})
# Desktop apps.
(mkIf cfg.desktop.enable {
environment.systemPackages = package.desktop;
})
# Gaming.
(mkIf cfg.gaming.enable {
hardware.graphics = let
packages = with pkgs; [
dxvk
gamescope
pkgs.mangohud
vkd3d
];
in {
extraPackages = packages;
extraPackages32 = packages;
};
programs.steam.enable = true;
environment.systemPackages = package.gaming;
})
# Creative.
(mkIf cfg.creative.enable {
environment.systemPackages = package.creative;
})
# Development.
(mkIf cfg.dev.enable {
environment.systemPackages = package.dev;
})
# Extras.
(mkIf cfg.extra.enable {
environment.systemPackages = package.extra;
})
];
}

View file

@ -7,6 +7,7 @@ in {
config = mkIf cfg.enable {
module.desktop = {
app.common.enable = true;
dm.enable = true;
sound.enable = true;
wayland.enable = true;

View file

@ -1,25 +1,9 @@
{ pkgs, config, lib, __findFile, ... } @args: with lib; let
cfg = config.module.package;
{ pkgs, __findFile, ... } @args: let
package = import <package> args;
in {
options = {
module.package = {
android.enable = mkEnableOption "Android Apks.";
common.enable = mkEnableOption "Common Apps.";
core.enable = mkEnableOption "Core apps.";
creative.enable = mkEnableOption "Creative Apps.";
desktop.enable = mkEnableOption "Desktop Apps.";
dev.enable = mkEnableOption "Dev Apps.";
extra.enable = mkEnableOption "Extra Apps.";
gaming.enable = mkEnableOption "Gaming Apps.";
};
};
config = mkMerge [
# Core apps.
(mkIf cfg.core.enable {
environment.systemPackages = package.core;
# Special packages.
programs = {
adb.enable = true;
git.enable = true;
@ -31,68 +15,4 @@ in {
services = {
udisks2.enable = true;
};
})
# Common apps.
(mkIf cfg.common.enable {
xdg.mime.defaultApplications = {
# Use `file -i file.txt` to find file mime type.
# Use `xdg-mime query default "text/plain"` to find default app.
"application/pdf" = "org.gnome.Evince.desktop";
"application/vnd.openxmlformats-officedocument.*" = "onlyoffice-desktopeditors.desktop";
"audio/*" = "mpv.desktop";
"image/*" = "org.gnome.Loupe.desktop";
"text/*" = "nvim.desktop";
"video/*" = "mpv.desktop";
};
environment.systemPackages = package.common;
services.gvfs.enable = true;
})
# Android apps.
(mkIf cfg.android.enable {
environment.systemPackages = package.android;
})
# Desktop apps.
(mkIf cfg.desktop.enable {
environment.systemPackages = package.desktop;
})
# Gaming.
(mkIf cfg.gaming.enable {
hardware.graphics = let
packages = with pkgs; [
dxvk
gamescope
pkgs.mangohud
vkd3d
];
in {
extraPackages = packages;
extraPackages32 = packages;
};
programs.steam.enable = true;
environment.systemPackages = package.gaming;
})
# Creative.
(mkIf cfg.creative.enable {
environment.systemPackages = package.creative;
})
# Development.
(mkIf cfg.dev.enable {
environment.systemPackages = package.dev;
})
# Extras.
(mkIf cfg.extra.enable {
environment.systemPackages = package.extra;
})
];
}

View file

@ -9,6 +9,7 @@ in {
config = mkIf cfg.enable {
module.desktop = {
app.common.enable = true;
bluetooth.enable = true;
brightness.enable = true;
portal.enable = true;

View file

@ -3,28 +3,20 @@
android-tools # Android adb tool. Can be used to connect to itself via wireless debugging.
binwalk # Can analyze files for other files inside them.
btop htop # System monitors.
coreutils # UNIX Core utilities.
cryptsetup # Filesystem encryption (LUKS).
curl # CLI http client.
ddrescue testdisk # Apps to recover data from drives.
diffutils # Diff tool.
dnsutils # NS utilities.
exiftool # Image info.
fastfetch # Systeminfo summary.
ffmpeg # Video/audio converter.
file # Get general info about a file.
findutils # Find tool.
gawk # Awk.
gcc # C compiler.
gdu # TUI storage analyzer.
git # Version control system.
gnugrep # Grep.
gnumake # Make.
gnused # Sed.
gnutar gzip xz # Archive and compression tools.
gparted parted # GUI/CLI disk partition tool.
imagemagick # Image converter and transformation tool.
inetutils # Things like FTP.
iputils # IP tools.
jq # Json parser.
lm_sensors # Hardware sensors, like temperature and fan speeds.
lshw # Detailed hardware info tool.
@ -34,12 +26,12 @@
neovim # Text editor.
nixd # Nix LSP.
nmap # Network analyzer.
ollama # LLMs.
openssh sshfs # Ssh client.
parallel # Run programs in parallel.
parted gparted # GUI/CLI disk partition tool.
pv # IO progress bar.
radare2 # Hex editor.
ripgrep # Better grep.
ripgrep # Grep for file search.
rsync # File copy tool.
scanmem # Memory edit tool.
smartmontools # S.M.A.R.T. tools.
@ -52,12 +44,16 @@
wget # CLI http download tool.
wireguard-tools # Tools to work with Wireguard.
yazi chafa # CLI file manager.
yt-dlp # Video downloader.
zapret # FRKN.
zip unzip # Zip archive/unarchive tools.
coreutils dnsutils diffutils findutils utillinux # Common utilities.
gawk gnused gnugrep gnumake ripgrep # Common Gnu utils.
(pkgs.callPackage ./apks {})
(pkgs.callPackage ./yamusicdownload {})
# (pkgs.callPackage ./ytdlp {})
yt-dlp
];
desktop = with pkgs; [
@ -104,19 +100,12 @@
jetbrains.idea-community
];
android = [
(pkgs.callPackage ./apks {})
];
extra = with pkgs; [
anilibria-winmaclinux # Anime!
appimage-run # Tool to run .AppImage files in NixOS.
blanket # Sounds generator.
calibre # Book library manager.
cbonsai cmatrix # CLI Screensavers.
cowsay lolcat # CLI funni.
gnome-font-viewer # Font viewer.
ollama # LLMs.
tor-browser # Privacy browser.
universal-android-debloater # Debloat Android devices.
];