aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/generic.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/generic.nix')
-rw-r--r--nixos/modules/generic.nix149
1 files changed, 1 insertions, 148 deletions
diff --git a/nixos/modules/generic.nix b/nixos/modules/generic.nix
index 97391b8..02afd17 100644
--- a/nixos/modules/generic.nix
+++ b/nixos/modules/generic.nix
@@ -1,12 +1,9 @@
{
- config,
lib,
pkgs,
...
}: let
- inherit (lib) mkOverride mkDefault optionals;
- isNative = config.nixpkgs.hostPlatform == config.nixpkgs.buildPlatform;
- isArm = config.nixpkgs.hostPlatform.isAarch;
+ inherit (lib) mkOverride mkDefault;
in {
config = {
system.stateVersion = "24.05";
@@ -43,153 +40,11 @@ in {
services.fwupd.enable = mkDefault (pkgs.system == "x86_64-linux");
systemd.oomd.enable = false;
- nixpkgs = {
- config.allowUnfree = true;
- flake = {
- setNixPath = false;
- setFlakeRegistry = false;
- };
- };
- environment.systemPackages = with pkgs;
- [
- git # We need git for this repository to even work
- # Administration tools
- coreutils
- binutils
- psmisc
- progress
- lshw
- file
- vde2
- ldns
- wget
- gnumake
- exfat
- exfatprogs
- ntfs3g
- usbutils
- pciutils
- smartmontools
- parted
-
- # NCurses tools
- htop
- btop
- iotop
- mc
- screen
- tmux
- pv
-
- # ls tools
- tree
- lsof
- strace
-
- sourceHighlight # Colors for less
- unrar
- p7zip
- zip
- unzip
-
- # Network
- netcat
- traceroute
- iftop
- nethogs
- sshfs
- wakeonlan
- speedtest-cli
- librespeed-cli
- termshark
-
- lm_sensors
- ]
- ++ optionals (system == "x86_64-linux") [
- nmap
- ltrace
- ]
- ++ optionals (!isNative) [
- ncdu_1
- ]
- ++ optionals isNative [
- moreutils
- glances
- ncdu
- mlocate
- ];
-
- users = {
- mutableUsers = false;
- groups.cynerd.gid = 1000;
- users = {
- root = {
- hashedPasswordFile = "/run/secrets/root.pass";
- };
- cynerd = {
- group = "cynerd";
- extraGroups = ["users" "wheel" "dialout" "kvm" "uucp" "wireshark"];
- uid = 1000;
- subUidRanges = [
- {
- count = 65534;
- startUid = 10000;
- }
- ];
- subGidRanges = [
- {
- count = 65534;
- startGid = 10000;
- }
- ];
- isNormalUser = true;
- createHome = true;
- shell =
- if isNative
- then pkgs.zsh.out
- else pkgs.bash.out;
- hashedPasswordFile = "/run/secrets/cynerd.pass";
- openssh.authorizedKeys.keyFiles = [
- (config.personal-secrets + "/unencrypted/git-private.pub")
- ];
- };
- };
- };
- programs = {
- zsh = {
- enable = isNative;
- syntaxHighlighting.enable = isNative;
- };
- shellrc = true;
- vim.defaultEditor = isArm;
- neovim = {
- enable = !isArm;
- defaultEditor = true;
- withNodeJs = true;
- };
-
- wireshark.enable = true;
- };
-
- security.sudo.extraRules = [
- {
- groups = ["wheel"];
- commands = ["ALL"];
- }
- ];
networking = {
nftables.enable = true;
dhcpcd.extraConfig = "controlgroup wheel";
};
- services.openssh = {
- enable = true;
- settings = {
- PasswordAuthentication = false;
- PermitRootLogin = "no";
- };
- };
-
time.timeZone = "Europe/Prague";
i18n.defaultLocale = "en_US.UTF-8";
@@ -209,8 +64,6 @@ in {
chmod +x $out/bin/nixos-system
'';
- programs.fuse.userAllowOther = true;
-
documentation = {
enable = mkDefault false;
doc.enable = mkDefault false;