Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { inputs
- , outputs
- , lib
- , config
- , pkgs
- , ...
- }: {
- imports = [
- ./hardware-configuration.nix
- ];
- nixpkgs = {
- overlays = [
- outputs.overlays.additions
- outputs.overlays.modifications
- outputs.overlays.unstable-packages
- ];
- config = {
- allowUnfree = true;
- };
- };
- # This will add each flake input as a registry
- # To make nix3 commands consistent with the flake
- nix.registry = (lib.mapAttrs (_: flake: { inherit flake; })) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
- # Weekly garbage collection
- nix.gc = {
- automatic = true;
- dates = "weekly";
- };
- # This will additionally add inputs to the system's legacy channels
- # Making legacy nix commands consistent as well, awesome!
- nix.nixPath = [ "/etc/nix/path" ];
- environment.etc =
- lib.mapAttrs'
- (name: value: {
- name = "nix/path/${name}";
- value.source = value.flake;
- })
- config.nix.registry;
- nix.settings = {
- experimental-features = "nix-command flakes";
- auto-optimise-store = true;
- };
- environment.systemPackages = with pkgs; [
- vim
- wget
- ];
- programs = {
- firefox.enable = true;
- direnv = {
- enable = true;
- nix-direnv.enable = true;
- };
- gnupg.agent = {
- enable = true;
- enableSSHSupport = true;
- };
- };
- # Bootloader.
- boot.loader.systemd-boot.enable = true;
- boot.loader.systemd-boot.configurationLimit = 10;
- boot.loader.efi.canTouchEfiVariables = true;
- # Bluetooth
- hardware.bluetooth.enable = true;
- hardware.bluetooth.powerOnBoot = true;
- networking.hostName = "nixos";
- # Enable networking
- networking.networkmanager.enable = true;
- # Set your time zone.
- time.timeZone = "Europe/Berlin";
- # Select internationalisation properties.
- 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";
- };
- # Configure X11. Switch to Hyprland later
- services.xserver = {
- enable = true;
- xkb.layout = "us";
- xkb.variant = "";
- };
- services.displayManager.sddm.enable = true;
- services.desktopManager.plasma6.enable = true;
- # Enable CUPS to print documents.
- services.printing.enable = true;
- # Enable sound with pipewire.
- services.pulseaudio.enable = false;
- security.rtkit.enable = true;
- services.pipewire = {
- enable = true;
- alsa.enable = true;
- alsa.support32Bit = true;
- pulse.enable = true;
- };
- # Virtualisation
- #virtualisation.libvirtd.enable = true;
- virtualisation.virtualbox.host.enable = true;
- users.extraGroups.vboxusers.members = [ "klucas" ];
- virtualisation.virtualbox.host.enableExtensionPack = true;
- virtualisation.virtualbox.guest.enable = true;
- virtualisation.virtualbox.guest.dragAndDrop = true;
- # User account
- users.users.klucas = {
- isNormalUser = true;
- description = "Kevin Lucas";
- extraGroups = [ "networkmanager" "wheel" "vboxusers" "vboxsf" ];
- shell = pkgs.zsh;
- };
- programs.zsh.enable = true;
- # TODO: Move to a separate module
- fonts.packages = with pkgs; [
- source-sans
- source-serif
- nerd-fonts.sauce-code-pro
- nerd-fonts.fira-code
- nerd-fonts.droid-sans-mono
- ];
- fonts.fontconfig = {
- enable = true;
- defaultFonts = {
- serif = [ "Source Serif 4" ];
- sansSerif = [ "Source Sans 3" ];
- monospace = [ "Fira Code" ];
- };
- };
- system.stateVersion = "23.11";
- }
Advertisement
Add Comment
Please, Sign In to add comment