2024-07-05 13:29:07 +02:00
|
|
|
top@{ moduleWithSystem, ... }: {
|
2024-06-18 20:32:19 +02:00
|
|
|
flake.nixosModules = {
|
2024-07-06 17:10:57 +02:00
|
|
|
grub = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
2024-06-18 20:32:19 +02:00
|
|
|
boot = {
|
|
|
|
loader = {
|
2024-07-06 17:19:11 +02:00
|
|
|
grub =
|
|
|
|
let
|
2024-07-07 10:42:36 +02:00
|
|
|
theme = pkgs.sleek-grub-theme.override { withBanner = "Hello Ivan"; withStyle = "bigSur"; };
|
2024-07-06 17:19:11 +02:00
|
|
|
in
|
2024-07-07 10:42:36 +02:00
|
|
|
{ enable = true; useOSProber = true; efiSupport = true; device = "nodev"; theme = theme; splashImage = "${theme}/background.png"; };
|
|
|
|
efi = { canTouchEfiVariables = true; };
|
2024-06-18 20:32:19 +02:00
|
|
|
};
|
|
|
|
};
|
2024-07-06 17:10:57 +02:00
|
|
|
});
|
2024-07-04 08:38:33 +02:00
|
|
|
base = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
2024-07-05 13:29:07 +02:00
|
|
|
system.stateVersion = top.config.flake.stateVersion;
|
2024-07-07 10:42:36 +02:00
|
|
|
nix = { extraOptions = ''experimental-features = nix-command flakes''; };
|
2024-07-04 08:38:33 +02:00
|
|
|
i18n.supportedLocales = [ "all" ];
|
|
|
|
time.timeZone = "Europe/Prague";
|
|
|
|
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ];
|
|
|
|
environment = {
|
2024-08-01 23:24:07 +02:00
|
|
|
systemPackages = with pkgs; [ cmatrix uutils-coreutils-noprefix cryptsetup fd file git glibc gnumake mlocate openssh openssl procs ripgrep srm unzip vim zip just ];
|
2024-08-02 08:39:36 +02:00
|
|
|
sessionVariables = { MAKEFLAGS = "-j 4"; };
|
2024-07-04 08:38:33 +02:00
|
|
|
shells = with pkgs; [ zsh nushell ];
|
|
|
|
};
|
2024-07-07 10:42:36 +02:00
|
|
|
programs = { zsh.enable = true; nix-ld.enable = true; dconf.enable = true; };
|
|
|
|
services = { dbus.enable = true; };
|
|
|
|
networking = { stevenBlackHosts = { enable = true; blockFakenews = true; blockGambling = true; }; };
|
2024-07-04 08:38:33 +02:00
|
|
|
});
|
2024-07-05 09:32:10 +02:00
|
|
|
sound = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
2024-07-07 10:42:36 +02:00
|
|
|
services = { pipewire = { enable = true; alsa.enable = true; pulse.enable = true; }; };
|
|
|
|
environment.systemPackages = with pkgs; [ pwvucontrol ];
|
2024-07-04 08:38:33 +02:00
|
|
|
});
|
2024-07-05 00:10:36 +02:00
|
|
|
music = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
2024-07-07 10:42:36 +02:00
|
|
|
environment.systemPackages = with pkgs; [ guitarix ];
|
2024-07-05 11:53:58 +02:00
|
|
|
services.pipewire = {
|
|
|
|
jack.enable = true;
|
2024-07-07 10:42:36 +02:00
|
|
|
extraConfig = { jack."69-low-latency" = { "jack.properties" = { "node.latency" = "64/48000"; }; }; };
|
2024-07-05 11:52:45 +02:00
|
|
|
};
|
2024-07-05 00:10:36 +02:00
|
|
|
musnix = {
|
|
|
|
enable = true;
|
|
|
|
rtcqs.enable = true;
|
|
|
|
soundcardPciId = "00:1f.3";
|
2024-07-07 10:42:36 +02:00
|
|
|
kernel = { realtime = true; packages = pkgs.linuxPackages_6_8_rt; };
|
|
|
|
rtirq = { resetAll = 1; prioLow = 0; enable = true; nameList = "rtc0 snd"; };
|
2024-07-05 00:10:36 +02:00
|
|
|
};
|
|
|
|
});
|
2024-07-07 10:42:36 +02:00
|
|
|
wayland = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: { hardware.graphics.enable = true; security.pam.services.swaylock = { }; });
|
2024-07-04 08:38:33 +02:00
|
|
|
security = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: {
|
2024-06-18 20:32:19 +02:00
|
|
|
security = {
|
2024-07-07 10:42:36 +02:00
|
|
|
sudo = { enable = false; execWheelOnly = true; extraRules = [{ groups = [ "wheel" ]; }]; };
|
2024-07-07 16:01:23 +02:00
|
|
|
doas = { enable = true; extraRules = [{ groups = [ "wheel" ]; noPass = true; keepEnv = true; }]; };
|
2024-06-18 20:32:19 +02:00
|
|
|
polkit.enable = true;
|
|
|
|
rtkit.enable = true;
|
|
|
|
};
|
|
|
|
});
|
2024-07-04 08:38:33 +02:00
|
|
|
wireguard = {
|
|
|
|
networking.wg-quick.interfaces = {
|
|
|
|
wg0 = {
|
|
|
|
address = [ "10.0.0.4/32" ];
|
|
|
|
privateKeyFile = "/etc/wireguard/privatekey";
|
|
|
|
peers = [
|
|
|
|
{
|
|
|
|
publicKey = "5FiTLnzbgcbgQLlyVyYeESEd+2DtwM1JHCGz/32UcEU=";
|
|
|
|
allowedIPs = [ "0.0.0.0/0" "::/0" ];
|
|
|
|
endpoint = "37.205.13.29:51820";
|
|
|
|
persistentKeepalive = 25;
|
|
|
|
}
|
|
|
|
];
|
2024-06-18 20:32:19 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-07-04 08:38:33 +02:00
|
|
|
wireless = {
|
2024-06-18 20:32:19 +02:00
|
|
|
networking = {
|
|
|
|
wireless = {
|
|
|
|
enable = true;
|
|
|
|
networks = {
|
|
|
|
"Smart-Hostel-2.4" = {
|
|
|
|
psk = "smarttrans.bg";
|
|
|
|
};
|
|
|
|
"Yohohostel2.4G" = {
|
|
|
|
psk = "kaskamaska";
|
|
|
|
};
|
|
|
|
"Nomado_Guest" = {
|
|
|
|
psk = "welcomehome";
|
|
|
|
};
|
|
|
|
"HostelMusala Uni" = {
|
|
|
|
psk = "mhostelm";
|
|
|
|
};
|
|
|
|
"BOUTIQUE APARTMENTS" = {
|
|
|
|
psk = "boutique26";
|
|
|
|
};
|
|
|
|
"Safestay" = {
|
|
|
|
psk = "AlldayrooftopBAR";
|
|
|
|
};
|
|
|
|
"HOSTEL JASMIN 2" = {
|
|
|
|
psk = "Jasmin2024";
|
|
|
|
};
|
|
|
|
"HOME" = {
|
|
|
|
psk = "iloveprague";
|
|
|
|
};
|
|
|
|
"Vodafone-B925" = {
|
|
|
|
psk = "7aGh3FE6pN4p4cu6";
|
|
|
|
};
|
|
|
|
"O2WIFIZ_EXT" = {
|
|
|
|
psk = "iloveprague";
|
|
|
|
};
|
2024-06-23 15:35:19 +02:00
|
|
|
"KOTEKLAN_GUEST" = {
|
|
|
|
psk = "koteklankotek";
|
|
|
|
};
|
2024-07-30 10:01:43 +02:00
|
|
|
"3G" = {
|
|
|
|
hidden = true;
|
|
|
|
};
|
2024-06-18 20:32:19 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-07-04 08:38:33 +02:00
|
|
|
ivand = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
2024-06-18 20:32:19 +02:00
|
|
|
users = {
|
|
|
|
defaultUserShell = pkgs.zsh;
|
|
|
|
users = {
|
|
|
|
ivand = {
|
|
|
|
isNormalUser = true;
|
2024-07-02 18:37:23 +02:00
|
|
|
createHome = true;
|
2024-06-18 20:32:19 +02:00
|
|
|
extraGroups = [
|
|
|
|
"adbusers"
|
|
|
|
"adm"
|
|
|
|
"audio"
|
|
|
|
"bluetooth"
|
|
|
|
"dialout"
|
|
|
|
"flatpak"
|
|
|
|
"kvm"
|
|
|
|
"mlocate"
|
|
|
|
"render"
|
|
|
|
"video"
|
|
|
|
"wheel"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
extraGroups = { mlocate = { }; };
|
|
|
|
};
|
|
|
|
});
|
2024-07-04 08:38:33 +02:00
|
|
|
flatpak = {
|
2024-07-07 10:42:36 +02:00
|
|
|
xdg = { portal = { enable = true; wlr.enable = true; config.common.default = "*"; }; };
|
2024-07-04 08:38:33 +02:00
|
|
|
services.flatpak.enable = true;
|
2024-06-18 20:32:19 +02:00
|
|
|
};
|
2024-07-04 08:38:33 +02:00
|
|
|
ai = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: {
|
2024-07-07 10:42:36 +02:00
|
|
|
services = { ollama.enable = true; };
|
2024-06-18 20:32:19 +02:00
|
|
|
});
|
2024-07-24 10:05:13 +02:00
|
|
|
anon = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
|
|
|
environment.systemPackages = with pkgs; [ tor-browser ];
|
|
|
|
});
|
|
|
|
cryptocurrency = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
|
|
|
environment.systemPackages = with pkgs; [ monero-cli ];
|
|
|
|
services = {
|
|
|
|
monero.enable = true;
|
2024-07-31 11:11:48 +02:00
|
|
|
bitcoind.mainnet = {
|
|
|
|
enable = true;
|
|
|
|
rpc.users = { ivand.passwordHMAC = "982f4ebcaa1e7d522cc21cf53f00df39$9ee8caf01c28e11f0c092f5ec0f97990e8f911206098557db49d3f2e7215f788"; };
|
|
|
|
};
|
2024-07-24 10:05:13 +02:00
|
|
|
};
|
2024-07-06 22:58:14 +02:00
|
|
|
});
|
2024-06-18 20:32:19 +02:00
|
|
|
};
|
|
|
|
}
|