diff --git a/hosts/firefly/configuration.nix b/hosts/firefly/configuration.nix index 60f3be6..cc97a9e 100644 --- a/hosts/firefly/configuration.nix +++ b/hosts/firefly/configuration.nix @@ -1,32 +1,14 @@ { config, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ../workstation.nix - ]; - networking.hostName = "firefly"; # Define your hostname. - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ../workstation.nix + ]; + networking.hostName = "firefly"; # Define your hostname. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.efi.efiSysMountPoint = "/boot/efi"; - - boot.initrd.secrets = { - "/crypto_keyfile.bin" = null; - }; - - boot.kernelPackages = pkgs.linuxPackages_latest; - - - # 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 - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "22.11"; # Did you read the comment? + boot.loader.efi.efiSysMountPoint = "/boot/efi"; + system.stateVersion = "22.11"; # Did you read the comment? } diff --git a/hosts/p14s/configuration.nix b/hosts/p14s/configuration.nix index d044f72..9f856ed 100644 --- a/hosts/p14s/configuration.nix +++ b/hosts/p14s/configuration.nix @@ -1,37 +1,18 @@ -# 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 - ../workstation.nix - ]; + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ../workstation.nix + ]; - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + networking.hostName = "p14s"; # Define your hostname. - # Setup keyfile - boot.initrd.secrets = { - "/crypto_keyfile.bin" = null; - }; + users.users.dm.extraGroups = [ "video" ]; + programs.light.enable = true; + services.tlp.enable = true; - networking.hostName = "p14s"; # Define your hostname. - - users.users.dm.extraGroups = [ "video" ]; - programs.light.enable = true; - services.tlp.enable = 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 - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.05"; # Did you read the comment? + system.stateVersion = "23.05"; # Did you read the comment? } diff --git a/hosts/workstation.nix b/hosts/workstation.nix index c386ed8..4d00e5f 100644 --- a/hosts/workstation.nix +++ b/hosts/workstation.nix @@ -1,84 +1,103 @@ { config, pkgs, ... }: { - hardware.opengl.enable = true; +# Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; - networking.networkmanager.enable = true; - - time.timeZone = "Europe/Berlin"; - - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "de_DE.UTF-8"; - LC_IDENTIFICATION = "de_DE.UTF-8"; - LC_MEASUREMENT = "de_DE.UTF-8"; - LC_MONETARY = "de_DE.UTF-8"; - LC_NAME = "de_DE.UTF-8"; - LC_NUMERIC = "de_DE.UTF-8"; - LC_PAPER = "de_DE.UTF-8"; - LC_TELEPHONE = "de_DE.UTF-8"; - LC_TIME = "de_DE.UTF-8"; - }; - fonts.packages = with pkgs; [ - noto-fonts - font-awesome - ]; - - security.polkit.enable = true; - - # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - - services.openssh = { - enable = true; - settings = { - PasswordAuthentication = false; - KbdInteractiveAuthentication = false; + boot.initrd.secrets = { + "/crypto_keyfile.bin" = null; }; - }; - users.users.dm = { - isNormalUser = true; - description = "Daniel Meiburg"; - extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; [ - ]; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJipJtCrYUPokjppDdz97XHo2vEDBUzgvUU33Wst6AWt openpgp:0xF3D173A6" - ]; - }; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + boot.kernelPackages = pkgs.linuxPackages_latest; - # enable nitrokeys - services.udev.packages = [ pkgs.nitrokey-udev-rules ]; - programs = { - ssh.startAgent = false; - gnupg.agent = { - pinentryFlavor = "qt"; - enable = true; - enableSSHSupport = true; + hardware.opengl.enable = true; + + networking.networkmanager.enable = true; + + time.timeZone = "Europe/Berlin"; + + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; }; - }; - nixpkgs.config.allowUnfree = true; + fonts.packages = with pkgs; [ + noto-fonts + font-awesome + ]; + + security.polkit.enable = true; + +# Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + services.openssh = { + enable = true; + settings = { + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + }; + }; + + users.users.dm = { + isNormalUser = true; + description = "Daniel Meiburg"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + ]; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJipJtCrYUPokjppDdz97XHo2vEDBUzgvUU33Wst6AWt openpgp:0xF3D173A6" + ]; + }; + +# enable nitrokeys + services.udev.packages = [ pkgs.nitrokey-udev-rules ]; + programs = { + ssh.startAgent = false; + gnupg.agent = { + pinentryFlavor = "qt"; + enable = true; + enableSSHSupport = true; + }; + }; + + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + ]; + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + defaultEditor = true; + }; + programs.fish.enable = true; + services.getty.autologinUser = "dm"; + programs.dconf.enable = true; + + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; - environment.systemPackages = with pkgs; [ - ]; - programs.neovim = { - enable = true; - viAlias = true; - vimAlias = true; - defaultEditor = true; - }; - programs.fish.enable = true; - services.getty.autologinUser = "dm"; - programs.dconf.enable = true; }