From 979eb68ca0d1fe4918622542ea88ad7a5db7da36 Mon Sep 17 00:00:00 2001 From: sefidel Date: Wed, 15 Feb 2023 00:44:41 +0900 Subject: feat(nixos/kompakt): remove comments & format --- nixos/kompakt/configuration.nix | 75 +++----------------------------- nixos/kompakt/hardware-configuration.nix | 18 +++++--- 2 files changed, 18 insertions(+), 75 deletions(-) (limited to 'nixos/kompakt') diff --git a/nixos/kompakt/configuration.nix b/nixos/kompakt/configuration.nix index 7202a03..92cb5db 100644 --- a/nixos/kompakt/configuration.nix +++ b/nixos/kompakt/configuration.nix @@ -1,17 +1,12 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - { config, pkgs, ... }: { imports = - [ # Include the results of the hardware scan. + [ ./hardware-configuration.nix ../modules/apple-silicon-support ]; - # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = false; @@ -23,54 +18,26 @@ boot.supportedFilesystems = [ "zfs" ]; - networking.hostName = "kompakt"; # Define your hostname. + networking.hostName = "kompakt"; networking.hostId = "9c8c0140"; boot.initrd.postDeviceCommands = lib.mkAfter '' zfs rollback -r rpool/local/root@blank ''; - # Pick only one of the below networking options. networking.wireless.iwd.enable = true; - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - # Set your time zone. time.timeZone = "Asia/Seoul"; - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; console = { - font = "ter-v32n"; - packages = with pkgs; [ terminus_font ]; + font = "ter-v32n"; + packages = with pkgs; [ terminus_font ]; }; - # Enable the X11 windowing system. - # services.xserver.enable = true; - - - - - # Configure keymap in X11 - # services.xserver.layout = "us"; - # services.xserver.xkbOptions = { - # "eurosign:e"; - # "caps:escape" # map caps to escape. - # }; - - # Enable CUPS to print documents. - # services.printing.enable = true; + services.printing.enable = true; - # Enable sound. - # sound.enable = true; - # hardware.pulseaudio.enable = true; - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; + sound.enable = true; sops.defaultSopsFile = ./secrets/secrets.yaml; sops.secrets.root-password.neededForUsers = true; @@ -78,7 +45,6 @@ users.mutableUsers = false; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users = { root.passwordFile = config.sops.secrets.root-password.path; sefidel = { @@ -90,24 +56,6 @@ }; }; - # List packages installed in system profile. To search, run: - # $ nix search wget - # environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget - # ]; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. services.openssh.enable = true; environment.persistence."/persist".directories = [ @@ -115,17 +63,6 @@ "/etc/nixos" ]; - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - # system.copySystemConfiguration = true; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/nixos/kompakt/hardware-configuration.nix b/nixos/kompakt/hardware-configuration.nix index 27c7ad8..66b6571 100644 --- a/nixos/kompakt/hardware-configuration.nix +++ b/nixos/kompakt/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "usb_storage" ]; @@ -14,27 +15,32 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "rpool/local/root"; + { + device = "rpool/local/root"; fsType = "zfs"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/01AC-1BF6"; + { + device = "/dev/disk/by-uuid/01AC-1BF6"; fsType = "vfat"; }; fileSystems."/nix" = - { device = "rpool/local/nix"; + { + device = "rpool/local/nix"; fsType = "zfs"; }; fileSystems."/persist" = - { device = "rpool/safe/persist"; + { + device = "rpool/safe/persist"; fsType = "zfs"; }; fileSystems."/home" = - { device = "rpool/safe/home"; + { + device = "rpool/safe/home"; fsType = "zfs"; }; -- cgit 1.4.1