|
| 1 | +# Edit this configuration file to define what should be installed on |
| 2 | +# your system. Help is available in the configuration.nix(5) man page |
| 3 | +# and in the NixOS manual (accessible by running ‘nixos-help’). |
| 4 | + |
| 5 | +# sudo nixos-rebuild switch |
| 6 | +# sudo nix-channel --update |
| 7 | +# nix-shell -p vim |
| 8 | +# nmcli device wifi connect MYSSID password PWORD |
| 9 | +# systemctl restart display-manager.service |
| 10 | + |
| 11 | +{ config, pkgs, ... }: |
| 12 | + |
| 13 | +# https://nixos.wiki/wiki/FAQ#How_can_I_install_a_package_from_unstable_while_remaining_on_the_stable_channel.3F |
| 14 | +# https://discourse.nixos.org/t/differences-between-nix-channels/13998 |
| 15 | + |
| 16 | +{ |
| 17 | + # https://nixos.wiki/wiki/NixOS_modules |
| 18 | + imports = |
| 19 | + [ |
| 20 | + ./disko-chromebox1.nix |
| 21 | + #./hardware-configuration.nix |
| 22 | + ./sysctl.nix |
| 23 | + ./il8n.nix |
| 24 | + ./systemPackages.nix |
| 25 | + ./hosts.nix |
| 26 | + ./nodeExporter.nix |
| 27 | + #./docker-daemon.nix |
| 28 | + #./k8s_master.nix |
| 29 | + #./k3s_master.nix |
| 30 | + #./k3s_node.nix |
| 31 | + ]; |
| 32 | + |
| 33 | + # boot.loader.grub = { |
| 34 | + # # no need to set devices, disko will add all devices that have a EF02 partition to the list already |
| 35 | + # # devices = [ ]; |
| 36 | + # efiSupport = true; |
| 37 | + # efiInstallAsRemovable = true; |
| 38 | + # }; |
| 39 | + |
| 40 | + # Use the systemd-boot EFI boot loader. |
| 41 | + boot.loader.systemd-boot.enable = true; |
| 42 | + boot.loader.efi.canTouchEfiVariables = true; |
| 43 | + |
| 44 | + #boot.loader.efi.canTouchEfiVariables = true; |
| 45 | + |
| 46 | + # https://nixos.wiki/wiki/Linux_kernel |
| 47 | + boot.kernelPackages = pkgs.linuxPackages; |
| 48 | + #boot.kernelPackages = pkgs.linuxPackages_latest; |
| 49 | + |
| 50 | + nix = { |
| 51 | + gc = { |
| 52 | + automatic = true; # Enable automatic execution of the task |
| 53 | + dates = "weekly"; # Schedule the task to run weekly |
| 54 | + options = "--delete-older-than 10d"; # Specify options for the task: delete files older than 10 days |
| 55 | + randomizedDelaySec = "14m"; # Introduce a randomized delay of up to 14 minutes before executing the task |
| 56 | + }; |
| 57 | + settings = { |
| 58 | + auto-optimise-store = true; |
| 59 | + experimental-features = [ "nix-command" "flakes" ]; |
| 60 | + }; |
| 61 | + }; |
| 62 | + |
| 63 | + # https://nixos.wiki/wiki/Networking |
| 64 | + # https://nlewo.github.io/nixos-manual-sphinx/configuration/ipv4-config.xml.html |
| 65 | + networking.hostName = "chromebox1"; |
| 66 | + |
| 67 | + services.lldpd.enable = true; |
| 68 | + |
| 69 | + # Configure network proxy if necessary |
| 70 | + # networking.proxy.default = "http://user:password@proxy:port/"; |
| 71 | + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; |
| 72 | + |
| 73 | + networking.networkmanager.enable = false; |
| 74 | + |
| 75 | + # Set your time zone. |
| 76 | + time.timeZone = "America/Los_Angeles"; |
| 77 | + |
| 78 | + # Enable touchpad support (enabled default in most desktopManager). |
| 79 | + # services.xserver.libinput.enable = true; |
| 80 | + |
| 81 | + environment.sessionVariables = { |
| 82 | + TERM = "xterm-256color"; |
| 83 | + #MY_VARIABLE = "my-value"; |
| 84 | + #ANOTHER_VARIABLE = "another-value"; |
| 85 | + }; |
| 86 | + |
| 87 | + # Define a user account. Don't forget to set a password with ‘passwd’. |
| 88 | + users.users.das = { |
| 89 | + isNormalUser = true; |
| 90 | + description = "das"; |
| 91 | + password = "admin123"; |
| 92 | + extraGroups = [ "wheel" "libvirtd" "docker" "kubernetes" ]; |
| 93 | + # packages = with pkgs; [ |
| 94 | + # ]; |
| 95 | + # https://nixos.wiki/wiki/SSH_public_key_authentication |
| 96 | + openssh.authorizedKeys.keys = [ |
| 97 | + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGMCFUMSCFJX95eLfm7P9r72NBp9I1FiXwNwJ+x/HGPV das@t" |
| 98 | + ]; |
| 99 | + }; |
| 100 | + |
| 101 | + # Some programs need SUID wrappers, can be configured further or are |
| 102 | + # started in user sessions. |
| 103 | + # programs.mtr.enable = true; |
| 104 | + # programs.gnupg.agent = { |
| 105 | + # enable = true; |
| 106 | + # enableSSHSupport = true; |
| 107 | + # }; |
| 108 | + programs.gnupg.agent = { |
| 109 | + enable = true; |
| 110 | + enableSSHSupport = true; |
| 111 | + }; |
| 112 | + |
| 113 | + services.openssh.enable = true; |
| 114 | + |
| 115 | + services.timesyncd.enable = true; |
| 116 | + |
| 117 | + services.fstrim.enable = true; |
| 118 | + |
| 119 | + # This value determines the NixOS release from which the default |
| 120 | + # settings for stateful data, like file locations and database versions |
| 121 | + # on your system were taken. It‘s perfectly fine and recommended to leave |
| 122 | + # this value at the release version of the first install of this system. |
| 123 | + # Before changing this value read the documentation for this option |
| 124 | + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). |
| 125 | + system.stateVersion = "25.05"; # Did you read the comment? |
| 126 | + |
| 127 | + # virtualisation.libvirtd.enable = true; |
| 128 | + # programs.virt-manager.enable = true; |
| 129 | + # services.qemuGuest.enable = true; |
| 130 | + |
| 131 | + # https://wiki.nixos.org/wiki/Laptop |
| 132 | +} |
0 commit comments