From e7a3cd7eca0309d6081e6a892fbdd613d33c704a Mon Sep 17 00:00:00 2001 From: iFargle Date: Mon, 8 Jan 2024 20:39:12 +0900 Subject: [PATCH] Test a laptop specific default nixos install --- flake.nix | 2 +- nixos/laptop.nix | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 nixos/laptop.nix diff --git a/flake.nix b/flake.nix index 68a80f29..09767162 100644 --- a/flake.nix +++ b/flake.nix @@ -58,7 +58,7 @@ framework-server = libx.mkHost { hostname = "framework-server"; }; nuc-server = libx.mkHost { hostname = "nuc-server"; }; nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; desktop = "hyprland"; gpu = "nvidia"; theme = "tokyo-night"; }; - nixos-framework = libx.mkHost { hostname = "nixos-framework"; desktop = "hyprland"; gpu = "amdgpu"; theme = "green"; }; + nixos-framework = libx.mkHost { hostname = "nixos-framework"; desktop = "hyprland"; gpu = "amdgpu"; theme = "green"; type = "laptop"; }; backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; }; piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; }; quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; platform = "aarch64-linux"; type = "small"; }; diff --git a/nixos/laptop.nix b/nixos/laptop.nix new file mode 100644 index 00000000..3955a235 --- /dev/null +++ b/nixos/laptop.nix @@ -0,0 +1,75 @@ +{ lib, config, pkgs, hostname, stateVersion, username, desktop, gpu, inputs, platform, theme, ... }: { + imports = [ + # Modules + inputs.disko.nixosModules.disko + + # Services + ./common/services/openssh.nix + ./common/services/fail2ban.nix + ./common/services/tailscale.nix + + # CLI Software + ./common/software/cli/weechat.nix + + # NixOS Modules + ./common/modules/fonts.nix # Font Configs + ./common/modules/networking.nix # Initial Networking configs + ./common/modules/nixos.nix # NixOS related items + ./common/modules/remote-builders.nix # Add remote builders + + ./users/${username} + ./hosts/${hostname} + ] ++ lib.optional (builtins.isString desktop) ./common/desktops/${desktop}; + + # List packages installed in system profile + environment.systemPackages = with pkgs; [ + sbctl # Secureboot Control + wget # WebGet + killall # Killall + curl # Curl - For web requests + neofetch # system information viewer + rsync # copy/sync + git # git! + duf # replacement / prettier UI for df + ncdu # ncurses style browser for du/dust + du-dust # better UI for 'du" + home-manager # manage dotfiles + btop # like htop, but prettier + iftop # interface top - network usage + nload # network load - Network usage graphs + iotop # I/O top viewer - disk r/w, etc + sops # manage secrets + gnupg # GNU Privacy Guard + fx # Pretty print JSON + eza # like ls, but prettier + cryptsetup # used to open LUKS devices + parted # Disk partitioner / Formatter + screen # Terminal screen manager + e2fsprogs # disk format utilities, like mkfs.ext4 + bat # Like cat, but with syntax highlighting + openssl # Used to generate certs, random strings, etc + tree # CLI directory display software + nmap # network mapping / discovery software + busybox # General linux commands, nslookup, dig, etc + sshpass # ssh password helper + cbonsai # ncurses bonsai tree + busybox # Linux utilities + ethtool # Ethernet troubleshooting + ]; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + system.stateVersion = stateVersion; +}