From 046f89aa3da15d252d78795a22d8280246f0661c Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Tue, 23 Jan 2024 13:55:28 -0700 Subject: [PATCH] Consolidate framework configuration. --- hive/framework/configuration.nix | 87 ------------------------------- hive/framework/default.nix | 88 +++++++++++++++++++++++++++++++- 2 files changed, 86 insertions(+), 89 deletions(-) delete mode 100644 hive/framework/configuration.nix diff --git a/hive/framework/configuration.nix b/hive/framework/configuration.nix deleted file mode 100644 index 374c7e4..0000000 --- a/hive/framework/configuration.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ config, pkgs, ... }: -{ - boot.loader = { - efi.canTouchEfiVariables = true; - systemd-boot.enable = true; - }; - - environment = { - # Excludes some KDE plasma applications from the default - # install. We choose to use KDE since, with wayland support, - # is is capable of fractional scaling. - plasma5.excludePackages = with pkgs.libsForQt5; [ - elisa - gwenview - khelpcenter - konsole - okular - oxygen - plasma-browser-integration - print-manager - ]; - systemPackages = with pkgs; [ - gcc - git - ((vim_configurable.override {}).customize { - name = "vim"; - vimrcConfig.customRC = '' - set nocompatible - syntax on - - set colorcolumn=80,100 - set expandtab " Spaces instead of tabs. - set list " Show hidden characters. - set listchars=tab:>\ ,trail:-,nbsp:+ - set shiftwidth=2 " # of spaces to use for each (auto)indent. - set tabstop=2 " # of spaces a in the file counts for. - ''; - }) - ]; - variables = { - EDITOR = "vim"; - }; - }; - - fonts.packages = with pkgs; [ iosevka ]; - - hardware.bluetooth.enable = true; - - networking.hostName = "framework"; - networking.networkmanager.enable = true; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - # Recommended when using pipewire. - # https://nixos.wiki/wiki/PipeWire - security.rtkit.enable = true; - - services = { - mullvad-vpn.enable = true; - openssh.enable = true; - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - xserver = { - enable = true; - desktopManager.plasma5.enable = true; - desktopManager.xterm.enable = false; - displayManager.defaultSession = "plasmawayland"; - xkbOptions = "ctrl:swapcaps"; - }; - }; - - time.timeZone = "America/Denver"; - - virtualisation = { - libvirtd.enable = true; - docker.rootless = { - enable = true; - # Sets the `DOCKER_HOST` variable to the rootless Docker instance for normal - # users by default. - setSocketVariable = true; - }; - }; -} diff --git a/hive/framework/default.nix b/hive/framework/default.nix index 550da50..1217b91 100644 --- a/hive/framework/default.nix +++ b/hive/framework/default.nix @@ -1,11 +1,56 @@ -{ system, home-manager, ... }: +{ pkgs, system, home-manager, ... }: { imports = [ ./hardware-configuration.nix - ./configuration.nix home-manager.nixosModules.home-manager ]; + boot.loader = { + efi.canTouchEfiVariables = true; + systemd-boot.enable = true; + }; + + environment = { + # Excludes some KDE plasma applications from the default + # install. We choose to use KDE since, with wayland support, + # is is capable of fractional scaling. + plasma5.excludePackages = with pkgs.libsForQt5; [ + elisa + gwenview + khelpcenter + konsole + okular + oxygen + plasma-browser-integration + print-manager + ]; + systemPackages = with pkgs; [ + gcc + git + ((vim_configurable.override {}).customize { + name = "vim"; + vimrcConfig.customRC = '' + set nocompatible + syntax on + + set colorcolumn=80,100 + set expandtab " Spaces instead of tabs. + set list " Show hidden characters. + set listchars=tab:>\ ,trail:-,nbsp:+ + set shiftwidth=2 " # of spaces to use for each (auto)indent. + set tabstop=2 " # of spaces a in the file counts for. + ''; + }) + ]; + variables = { + EDITOR = "vim"; + }; + }; + + fonts.packages = with pkgs; [ iosevka ]; + + hardware.bluetooth.enable = true; + home-manager = { useGlobalPkgs = true; useUserPackages = true; @@ -44,9 +89,36 @@ }; }; + networking = { + hostName = "framework"; + networkmanager.enable = true; + }; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + # virt-manager requires dconf to remember settings. programs.dconf.enable = true; + # Recommended when using pipewire (https://nixos.wiki/wiki/PipeWire). + security.rtkit.enable = true; + + services = { + mullvad-vpn.enable = true; + openssh.enable = true; + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + xserver = { + enable = true; + desktopManager.plasma5.enable = true; + desktopManager.xterm.enable = false; + displayManager.defaultSession = "plasmawayland"; + xkbOptions = "ctrl:swapcaps"; + }; + }; users.users.jrpotter = { isNormalUser = true; extraGroups = [ @@ -57,5 +129,17 @@ ]; }; + time.timeZone = "America/Denver"; + + virtualisation = { + libvirtd.enable = true; + docker.rootless = { + enable = true; + # Sets the `DOCKER_HOST` variable to the rootless Docker instance for normal + # users by default. + setSocketVariable = true; + }; + }; + system.stateVersion = "23.05"; }