From f8411ac7e9b65c5e45947ef98bb94467cf5da2ac Mon Sep 17 00:00:00 2001 From: Alexander Kobjolke Date: Tue, 1 Aug 2023 15:34:19 +0200 Subject: [PATCH 1/3] thrall: Combine two inlined modules --- flake.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 633ac3e..02cdac8 100644 --- a/flake.nix +++ b/flake.nix @@ -47,16 +47,13 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - ({ inputs, ... }: { + ({ inputs, lib, ... }: { nixpkgs = { config.allowUnfree = true; overlays = with inputs; [ emacs.overlay ]; }; + nix.registry = lib.mapAttrs (_: value: { flake = value; }) inputs; }) - { - nix.registry = - nixpkgs.lib.mapAttrs (_: value: { flake = value; }) inputs; - } snm.nixosModule ./modules/security.nix ./hosts/thrall From 53b6e8d5b4373ad2c362db4dda3e494df2f5b13d Mon Sep 17 00:00:00 2001 From: Alexander Kobjolke Date: Tue, 1 Aug 2023 16:03:32 +0200 Subject: [PATCH 2/3] dregil: Use home-manager to set keyboard --- hosts/dregil/configuration.nix | 79 ++++++++++++-------------- hosts/dregil/default.nix | 7 +-- outputs/homeConfigurations/default.nix | 5 ++ 3 files changed, 44 insertions(+), 47 deletions(-) diff --git a/hosts/dregil/configuration.nix b/hosts/dregil/configuration.nix index 0c532fd..6a2defc 100644 --- a/hosts/dregil/configuration.nix +++ b/hosts/dregil/configuration.nix @@ -11,14 +11,12 @@ let export __VK_LAYER_NV_optimus=NVIDIA_only exec "$@" ''; -in -{ - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - # - ]; +in { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + # + ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; @@ -30,7 +28,8 @@ in networking.hostName = "dregil"; # Define your hostname. # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + networking.networkmanager.enable = + true; # Easiest to use and most distros use this by default. # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; @@ -38,7 +37,8 @@ in console = { font = "Lat2-Terminus16"; - useXkbConfig = true; # use xkbOptions in tty. + #useXkbConfig = true; # use xkbOptions in tty. + keyMap = "dvorak"; }; # Enable the X11 windowing system. @@ -47,36 +47,36 @@ in exportConfiguration = true; # Configure keymap in X11 - layout = "dvorak"; + layout = "us"; xkbOptions = "terminate:ctrl_alt_bksp,caps:escape,compose:ralt"; videoDrivers = [ "nvidia" ]; # "modesetting" ]; - displayManager.lightdm = { - enable = true; - }; + displayManager.lightdm = { enable = true; }; desktopManager.xfce.enable = true; - + desktopManager.plasma5.enable = true; + # Enable touchpad support (enabled default in most desktopManager). libinput = { enable = true; touchpad.disableWhileTyping = true; touchpad.naturalScrolling = true; - mouse.naturalScrolling = config.services.xserver.libinput.touchpad.naturalScrolling; + mouse.naturalScrolling = + config.services.xserver.libinput.touchpad.naturalScrolling; }; }; fonts = { enableDefaultFonts = true; fonts = with pkgs; [ - corefonts - noto-fonts - noto-fonts-emoji - fira-code - fira-code-symbols - nerdfonts + corefonts + noto-fonts + noto-fonts-emoji + fira-code + fira-code-symbols + nerdfonts ]; }; @@ -90,42 +90,37 @@ in # Define a user account. Don't forget to set a password with ‘passwd’. users.users.alex = { isNormalUser = true; - extraGroups = [ "wheel" # Enable ‘sudo’ for the user. - "input" - ]; - }; + extraGroups = [ + "wheel" # Enable ‘sudo’ for the user. + "input" + ]; + }; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - wget - ripgrep - git - nvidia-offload - pinentry + wget + ripgrep + git + nvidia-offload + pinentry ]; # adjust channels to nixpkgs used on this system via this flake environment.etc."nix/inputs/nixpkgs".source = inputs.nixpkgs-unstable.outPath; - nix.nixPath = [ - "nixpkgs=${inputs.nixpkgs-unstable}" - ]; + nix.nixPath = [ "nixpkgs=${inputs.nixpkgs-unstable}" ]; # 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; + enable = true; + enableSSHSupport = true; }; - programs.neovim = { - enable = true; - }; + programs.neovim = { enable = true; }; - programs.steam = { - enable = true; - }; + programs.steam = { enable = true; }; # List services that you want to enable: diff --git a/hosts/dregil/default.nix b/hosts/dregil/default.nix index 678c04d..e834431 100644 --- a/hosts/dregil/default.nix +++ b/hosts/dregil/default.nix @@ -6,12 +6,9 @@ let pkgs = import inputs.nixpkgs-unstable { inherit system; - config = { - allowUnfree = true; - }; + config = { allowUnfree = true; }; }; -in -nixosSystem { +in nixosSystem { inherit system pkgs; specialArgs = { inherit inputs; }; modules = [ diff --git a/outputs/homeConfigurations/default.nix b/outputs/homeConfigurations/default.nix index 29afa6b..60102c2 100644 --- a/outputs/homeConfigurations/default.nix +++ b/outputs/homeConfigurations/default.nix @@ -13,6 +13,11 @@ in { ../../home/cli.nix { home = { + language.base = "en_US@UTF-8"; + + keyboard.type = "us"; + keyboard.variant = "dvorak"; + packages = with pkgs; [ alacritty # fast terminal firefox # the browser with the fox From 2559a2e10461e369219ff70e5e003838e904b1cf Mon Sep 17 00:00:00 2001 From: Alexander Kobjolke Date: Tue, 1 Aug 2023 16:04:06 +0200 Subject: [PATCH 3/3] dregil: Add an account for Anne --- hosts/dregil/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/dregil/default.nix b/hosts/dregil/default.nix index e834431..f76b4f6 100644 --- a/hosts/dregil/default.nix +++ b/hosts/dregil/default.nix @@ -15,5 +15,7 @@ in nixosSystem { ../../modules/security.nix ../../modules/common-system.nix ./configuration.nix + inputs.home-manager-unstable.nixosModules.home-manager + ../../home/anne ]; }