···11+{ ... }:
22+{
33+ # networking.hostName = "nixos"; # Define your hostname.
44+ # Pick only one of the below networking options.
55+ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
66+ # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
77+ networking.hostName = "odin";
88+ # I like systemd-networkd
99+ systemd.network.enable = true;
1010+ systemd.network.networks."50-wlp2s0" = {
1111+ matchConfig.name = "wlp2s0";
1212+ networkConfig.DHCP = "yes";
1313+ linkConfig.RequiredForOnline = "no";
1414+ };
1515+ networking.useNetworkd = true;
1616+ # TODO: static IP @ 192.168.1.2
1717+1818+ # Configure network proxy if necessary
1919+ # networking.proxy.default = "http://user:password@proxy:port/";
2020+ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
2121+2222+}
+29
packages.nix
···11+{ pkgs, lib, ... }:
22+{
33+ # List packages installed in system profile. To search, run:
44+ # $ nix search wget
55+ environment.systemPackages = with pkgs; [
66+ neovim
77+ appimage-run
88+ wget
99+ kitty
1010+ w3m
1111+ fishPlugins.fzf-fish
1212+ fzf
1313+ qemu
1414+ OVMF
1515+ ];
1616+1717+ # Unfree packages need to be whitelisted here
1818+ nixpkgs.config.allowUnfreePredicate = pkg:
1919+ builtins.elem (lib.getName pkg) [
2020+ "discord"
2121+ "spotify"
2222+ "obsidian"
2323+ "tailscale"
2424+ "jetbrains-toolbox"
2525+ ];
2626+ # Logseq uses an ancient version of Electron, so we enable that
2727+ nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ];
2828+2929+}
+50
services.nix
···11+{ pkgs, ... }:
22+{
33+44+ # Fix dynamically linked libraries for unpackaged binaries
55+ programs.nix-ld = {
66+ enable = true;
77+ libraries = with pkgs; [
88+ # Add missing dynamic libraries for unpackaged programs HERE
99+ # NOT in environment.systemPackages
1010+ zlib
1111+ ];
1212+ };
1313+1414+ # Some programs need SUID wrappers, can be configured further or are
1515+ # started in user sessions.
1616+ # programs.mtr.enable = true;
1717+ programs.gnupg.agent = {
1818+ enable = true;
1919+ enableSSHSupport = true;
2020+ };
2121+2222+ # Fish shell, the best
2323+ programs.fish.enable = true;
2424+2525+ # List services that you want to enable:
2626+2727+ # Enable the OpenSSH daemon.
2828+ services.openssh.enable = true;
2929+3030+ # Open ports in the firewall.
3131+ # networking.firewall.allowedTCPPorts = [ ... ];
3232+ # networking.firewall.allowedUDPPorts = [ ... ];
3333+ # Or disable the firewall altogether.
3434+ # TODO: allow some ports
3535+ networking.firewall.enable = true;
3636+3737+ services.avahi = {
3838+ enable = true;
3939+ publish = {
4040+ enable = true;
4141+ addresses = true;
4242+ workstation = true;
4343+ };
4444+ };
4545+4646+ # This option is for enabling the bolt daemon for managing Thunderbolt/USB4 Devices.
4747+ services.hardware.bolt.enable = true;
4848+4949+5050+}
+32
users.nix
···11+{ pkgs, ... }:
22+{
33+44+ imports =
55+ [
66+ <home-manager/nixos>
77+ ];
88+99+ # Declarative only optoins.
1010+ # I don't want to allow ad-hoc modifying users on the system.
1111+ # Users must be declared either as part of a package or in this file.
1212+ users.mutableUsers = false;
1313+1414+1515+ # Define a user account. Don't forget to set a password with ‘passwd’.
1616+ users.users.noah = {
1717+ isNormalUser = true;
1818+ shell = pkgs.fish;
1919+ extraGroups = [ "wheel" "video" ]; # Enable ‘sudo’ for the user.
2020+ hashedPasswordFile = "/etc/nixos/noah-password";
2121+ openssh.authorizedKeys.keys = [
2222+ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDnp/AcaPipgw4+HnqpYioG+DgheOWBYDOnVkXi42PC0R1FMc+bm4wVP8TA9DAWczaWmllqlA8N2/LSleaqp+46r980VgqmeYEem5aHJuR+Cq/Mg2Z2wcp9VT8njH72wIPIUOXAv+dnPnCe4yvoasgvhwZZCDE4BFTIImuTxrEFPg5ayvkr7b/mUg9LbxaVSjK7fk082pqlShizIKAVcgIIa0lCFSMUs1V/eLi5D11moVcxJU/QoEBh+6Qn5BVM0taPFA4Gbi+288LobQ8RcgRBXKpP03Dt+onYuZQ3KzFjd6USi/d4M+pByrWFcpBJfMXuXJLuwsSF7SfxsuqjjlDt Portable"
2323+ ];
2424+ };
2525+ # I manage my home with home-manager
2626+ # Don't store packages in ~/.nix-profile, use /etc/profiles so we can build-vm
2727+ home-manager.useUserPackages = true;
2828+ # No more NIX_PATH, use system pkgs
2929+ home-manager.useGlobalPkgs = true;
3030+3131+ home-manager.users.noah = import ./noah-home.nix ;
3232+}