Changed: Podman

This commit is contained in:
DerGrumpf 2025-03-26 15:17:45 +01:00
parent 065f4ed0be
commit a9312ed768
2 changed files with 174 additions and 166 deletions

View File

@ -6,6 +6,5 @@
./media.nix ./media.nix
./xdg.nix ./xdg.nix
./neovim.nix ./neovim.nix
./podman.nix
]; ];
} }

View File

@ -4,22 +4,22 @@
username, username,
... ...
}: { }: {
# ============================= User related ============================= # ============================= User related =============================
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.${username} = { users.users.${username} = {
isNormalUser = true; isNormalUser = true;
description = username; description = username;
extraGroups = ["networkmanager" "wheel"]; extraGroups = ["networkmanager" "wheel"];
}; };
# given the users in this list the right to specify additional substituters via: # given the users in this list the right to specify additional substituters via:
# 1. `nixConfig.substituers` in `flake.nix` # 1. `nixConfig.substituers` in `flake.nix`
# 2. command line args `--options substituers http://xxx` # 2. command line args `--options substituers http://xxx`
nix.settings.trusted-users = [username]; nix.settings.trusted-users = [username];
# customise /etc/nix/nix.conf declaratively via `nix.settings` # customise /etc/nix/nix.conf declaratively via `nix.settings`
nix.settings = { nix.settings = {
# enable flakes globally # enable flakes globally
experimental-features = ["nix-command" "flakes"]; experimental-features = ["nix-command" "flakes"];
substituters = [ substituters = [
@ -34,20 +34,20 @@
builders-use-substitutes = true; builders-use-substitutes = true;
}; };
# do garbage collection weekly to keep disk usage low # do garbage collection weekly to keep disk usage low
nix.gc = { nix.gc = {
automatic = lib.mkDefault true; automatic = lib.mkDefault true;
dates = lib.mkDefault "weekly"; dates = lib.mkDefault "weekly";
options = lib.mkDefault "--delete-older-than 7d"; options = lib.mkDefault "--delete-older-than 7d";
}; };
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {
@ -62,7 +62,7 @@
LC_TIME = "de_DE.UTF-8"; LC_TIME = "de_DE.UTF-8";
}; };
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
fonts = { fonts = {
@ -79,12 +79,12 @@
(nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];}) (nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];})
]; ];
# use fonts specified by user rather than default ones # use fonts specified by user rather than default ones
enableDefaultPackages = false; enableDefaultPackages = false;
# user defined fonts # user defined fonts
# the reason there's Noto Color Emoji everywhere is to override DejaVu's # the reason there's Noto Color Emoji everywhere is to override DejaVu's
# B&W emojis that would sometimes show instead of some Color emojis # B&W emojis that would sometimes show instead of some Color emojis
fontconfig.defaultFonts = { fontconfig.defaultFonts = {
serif = ["Noto Serif" "Noto Color Emoji"]; serif = ["Noto Serif" "Noto Color Emoji"];
sansSerif = ["Noto Sans" "Noto Color Emoji"]; sansSerif = ["Noto Sans" "Noto Color Emoji"];
@ -106,12 +106,21 @@
services.gvfs.enable = true; services.gvfs.enable = true;
services.tumbler.enable = true; services.tumbler.enable = true;
# networking.firewall.allowedTCPPorts = [ ... ]; virtualisation = {
# networking.firewall.allowedUDPPorts = [ ... ]; containers.enable = true;
# Or disable the firewall altogether.
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
};
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false; networking.firewall.enable = false;
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {
@ -122,26 +131,26 @@
openFirewall = true; openFirewall = true;
}; };
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Bare minimum # Bare minimum
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget wget
git git
# System tools # System tools
sysstat sysstat
lm_sensors # for `sensors` command lm_sensors # for `sensors` command
ethtool ethtool
pciutils # lspci pciutils # lspci
usbutils # lsusb usbutils # lsusb
# Rizz # Rizz
fastfetch fastfetch
#microfetch #microfetch
# Terminal # Terminal
yazi # file manager yazi # file manager
jq # JSON Parser jq # JSON Parser
yq-go # YAML Parser yq-go # YAML Parser
@ -164,14 +173,14 @@
zstd zstd
gnupg gnupg
# Archives # Archives
zip zip
unzip unzip
p7zip p7zip
xz xz
]; ];
# Enable sound with pipewire. # Enable sound with pipewire.
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
services.power-profiles-daemon = { services.power-profiles-daemon = {