This commit is contained in:
Ivan Kirilov Dimitrov 2024-07-07 10:42:36 +02:00
parent b1ee621d91
commit 6a4d3f96e7
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294

View File

@ -5,135 +5,49 @@ top@{ moduleWithSystem, ... }: {
loader = { loader = {
grub = grub =
let let
theme = pkgs.sleek-grub-theme.override { theme = pkgs.sleek-grub-theme.override { withBanner = "Hello Ivan"; withStyle = "bigSur"; };
withBanner = "Hello Ivan";
withStyle = "bigSur";
};
in in
{ { enable = true; useOSProber = true; efiSupport = true; device = "nodev"; theme = theme; splashImage = "${theme}/background.png"; };
enable = true; efi = { canTouchEfiVariables = true; };
useOSProber = true;
efiSupport = true;
device = "nodev";
theme = theme;
splashImage = "${theme}/background.png";
};
efi = {
canTouchEfiVariables = true;
};
}; };
}; };
}); });
base = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: { base = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
system.stateVersion = top.config.flake.stateVersion; system.stateVersion = top.config.flake.stateVersion;
nix = { nix = { extraOptions = ''experimental-features = nix-command flakes''; };
extraOptions = ''
experimental-features = nix-command flakes
'';
};
i18n.supportedLocales = [ "all" ]; i18n.supportedLocales = [ "all" ];
time.timeZone = "Europe/Prague"; time.timeZone = "Europe/Prague";
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ]; fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ];
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [ cmatrix coreutils-full cryptsetup fd file git glibc gnumake mlocate moreutils openssh openssl procs ripgrep srm unzip vim zip ];
cmatrix
coreutils-full
cryptsetup
fd
file
git
glibc
gnumake
mlocate
moreutils
openssh
openssl
procs
ripgrep
srm
unzip
vim
zip
];
shells = with pkgs; [ zsh nushell ]; shells = with pkgs; [ zsh nushell ];
}; };
programs = { programs = { zsh.enable = true; nix-ld.enable = true; dconf.enable = true; };
zsh.enable = true; services = { dbus.enable = true; };
nix-ld.enable = true; networking = { stevenBlackHosts = { enable = true; blockFakenews = true; blockGambling = true; }; };
dconf.enable = true;
};
services = {
dbus.enable = true;
};
networking = {
stevenBlackHosts = {
enable = true;
blockFakenews = true;
blockGambling = true;
};
};
}); });
sound = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: { sound = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
services = { services = { pipewire = { enable = true; alsa.enable = true; pulse.enable = true; }; };
pipewire = { environment.systemPackages = with pkgs; [ pwvucontrol ];
enable = true;
alsa.enable = true;
pulse.enable = true;
};
};
environment.systemPackages = with pkgs; [
pwvucontrol
];
}); });
music = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: { music = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ guitarix ];
guitarix
];
services.pipewire = { services.pipewire = {
jack.enable = true; jack.enable = true;
extraConfig = { extraConfig = { jack."69-low-latency" = { "jack.properties" = { "node.latency" = "64/48000"; }; }; };
jack."69-low-latency" = {
"jack.properties" = {
"node.latency" = "64/48000";
};
};
};
}; };
musnix = { musnix = {
enable = true; enable = true;
rtcqs.enable = true; rtcqs.enable = true;
soundcardPciId = "00:1f.3"; soundcardPciId = "00:1f.3";
kernel = { realtime = true; packages = pkgs.linuxPackages_6_8_rt; };
kernel = { rtirq = { resetAll = 1; prioLow = 0; enable = true; nameList = "rtc0 snd"; };
realtime = true;
packages = pkgs.linuxPackages_6_8_rt;
};
# magic to me
rtirq = {
# highList = "snd_hrtimer";
resetAll = 1;
prioLow = 0;
enable = true;
nameList = "rtc0 snd";
};
}; };
}); });
wayland = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: { wayland = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: { hardware.graphics.enable = true; security.pam.services.swaylock = { }; });
hardware.graphics.enable = true;
security.pam.services.swaylock = { };
});
security = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: { security = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: {
security = { security = {
sudo = { sudo = { enable = false; execWheelOnly = true; extraRules = [{ groups = [ "wheel" ]; }]; };
enable = false;
execWheelOnly = true;
extraRules = [
{
groups = [ "wheel" ];
}
];
};
doas = { doas = {
enable = true; enable = true;
extraRules = [ extraRules = [
@ -228,60 +142,16 @@ top@{ moduleWithSystem, ... }: {
extraGroups = { mlocate = { }; }; extraGroups = { mlocate = { }; };
}; };
}); });
testUser = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
users = {
defaultUserShell = pkgs.zsh;
users = {
test = {
isNormalUser = true;
createHome = true;
initialPassword = "test";
extraGroups = [
"adbusers"
"adm"
"audio"
"bluetooth"
"dialout"
"flatpak"
"kvm"
"mlocate"
"render"
"video"
"wheel"
];
};
};
extraGroups = { mlocate = { }; };
};
});
flatpak = { flatpak = {
xdg = { xdg = { portal = { enable = true; wlr.enable = true; config.common.default = "*"; }; };
portal = {
enable = true;
wlr.enable = true;
config.common.default = "*";
};
};
services.flatpak.enable = true; services.flatpak.enable = true;
}; };
ai = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: { ai = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: {
services = { services = { ollama.enable = true; };
ollama.enable = true;
};
}); });
nonya = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: { nonya = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ tor-browser electrum monero-cli ];
tor-browser services.monero = { enable = true; };
electrum
monero-cli
];
services.monero = {
enable = true;
mining = {
enable = true;
address = "48e9t9xvq4M4HBWomz6whiY624YRCPwgJ7LPXngcc8pUHk6hCuR3k6ENpLGDAhPEHWaju8Z4btxkbENpcwaqWcBvLxyh5cn";
};
};
}); });
}; };
} }