wip
This commit is contained in:
parent
546c5170d7
commit
433967847a
29 changed files with 1251 additions and 335 deletions
161
v22/hosts/limgrave/nixos/default.nix
Normal file
161
v22/hosts/limgrave/nixos/default.nix
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowBroken = true;
|
||||
nix.settings.download-buffer-size = 524288000;
|
||||
nixpkgs.config.permittedInsecurePackages = [ "electron-33.4.11" "mono-5.20.1.34" ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
services.snap.enable = false;
|
||||
|
||||
networking.hostName = "limgrave";
|
||||
networking.networkmanager.enable = true;
|
||||
services.mullvad-vpn.enable = true;
|
||||
|
||||
|
||||
environment.sessionVariables.MOZ_ENABLE_WAYLAND = 0;
|
||||
|
||||
time.timeZone = "Europe/Madrid";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "es_ES.UTF-8";
|
||||
LC_IDENTIFICATION = "es_ES.UTF-8";
|
||||
LC_MEASUREMENT = "es_ES.UTF-8";
|
||||
LC_MONETARY = "es_ES.UTF-8";
|
||||
LC_NAME = "es_ES.UTF-8";
|
||||
LC_NUMERIC = "es_ES.UTF-8";
|
||||
LC_PAPER = "es_ES.UTF-8";
|
||||
LC_TELEPHONE = "es_ES.UTF-8";
|
||||
LC_TIME = "es_ES.UTF-8";
|
||||
};
|
||||
|
||||
networking.firewall = rec {
|
||||
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
|
||||
allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
};
|
||||
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
windowManager.openbox.enable = true;
|
||||
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
hardware.graphics.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
users.users.catalin = {
|
||||
isNormalUser = true;
|
||||
description = "catalin";
|
||||
shell = pkgs.fish;
|
||||
useDefaultShell = true;
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" "nas" ];
|
||||
packages = with pkgs; [ flatpak ];
|
||||
};
|
||||
users.groups.nas.gid = 568;
|
||||
|
||||
programs.firefox.enable = true;
|
||||
# Enable smart card service and eID tooling (AutoFirma stack)
|
||||
services.pcscd.enable = true;
|
||||
programs.autofirma = {
|
||||
enable = true;
|
||||
firefoxIntegration.enable = true;
|
||||
};
|
||||
programs.dnieremote = {
|
||||
enable = true;
|
||||
jumpIntro = "no";
|
||||
wifiPort = 9501;
|
||||
usbPort = 9501;
|
||||
openFirewall = false;
|
||||
};
|
||||
programs.configuradorfnmt = {
|
||||
enable = true;
|
||||
firefoxIntegration.enable = true;
|
||||
};
|
||||
# Configure Firefox PKCS#11 modules for DNIe and OpenSC
|
||||
programs.firefox.policies = {
|
||||
SecurityDevices = {
|
||||
"OpenSC PKCS#11" = "${pkgs.opensc}/lib/opensc-pkcs11.so";
|
||||
"DNIeRemote" = "${config.programs.dnieremote.finalPackage}/lib/libdnieremotepkcs11.so";
|
||||
};
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
services.flatpak.enable = true;
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
# Merge base packages with host-specific packages
|
||||
environment.systemPackages = import ./packages.nix pkgs;
|
||||
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
steam = {
|
||||
enable = true;
|
||||
package = pkgs.steam.override {
|
||||
extraLibraries = p: with p; [ (lib.getLib networkmanager) ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
xdg.portal.config.common.default = "gtk";
|
||||
|
||||
programs.mtr.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
systemd.services.flatpak-repo = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.flatpak ];
|
||||
script = ''
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
'';
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 1w";
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
atkinson-hyperlegible
|
||||
];
|
||||
|
||||
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||
services.openssh.enable = true;
|
||||
services.tailscale.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
networking.nameservers = [ "192.168.1.7" "1.1.1.1" ];
|
||||
|
||||
nix.extraOptions = ''
|
||||
trusted-users = root catalin
|
||||
'';
|
||||
|
||||
system.autoUpgrade.enable = true;
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
82
v22/hosts/limgrave/nixos/hardware-configuration.nix
Normal file
82
v22/hosts/limgrave/nixos/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/07b5dda3-2fcd-494b-893c-72301d637e9a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/04FD-A91D";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
# fileSystems."/snap/acestreamplayer/17" =
|
||||
# { device = "/var/lib/snapd/snaps/acestreamplayer_17.snap";
|
||||
# fsType = "squashfs";
|
||||
# options = [ "loop" ];
|
||||
# };
|
||||
#
|
||||
# fileSystems."/snap/core22/1722" =
|
||||
# { device = "/var/lib/snapd/snaps/core22_1722.snap";
|
||||
# fsType = "squashfs";
|
||||
# options = [ "loop" ];
|
||||
# };
|
||||
#
|
||||
# fileSystems."/snap/snapd/23258" =
|
||||
# { device = "/var/lib/snapd/snaps/snapd_23258.snap";
|
||||
# fsType = "squashfs";
|
||||
# options = [ "loop" ];
|
||||
# };
|
||||
#
|
||||
fileSystems."/mnt/zeruel/nas1" =
|
||||
{ device = "zeruel.fuku:/mnt/pool1/nas1";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/zeruel/dcsi" =
|
||||
{ device = "zeruel.fuku:/mnt/pool1/dcsi";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/windoze2" =
|
||||
{ device = "/dev/disk/by-uuid/6084BE5384BE2B82";
|
||||
fsType = "ntfs-3g";
|
||||
options = [ "rw" "uid=1000"];
|
||||
};
|
||||
fileSystems."/mnt/windoze" =
|
||||
{ device = "/dev/disk/by-uuid/46B01460B01458AF";
|
||||
fsType = "ntfs-3g";
|
||||
options = [ "rw" "uid=1000"];
|
||||
};
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/03ecd98d-013f-4476-b43a-bcae0bc1de67"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.br-71a907d8e6fd.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue