From 2343104396e086bd763d994c2372dbfa03ccb85f Mon Sep 17 00:00:00 2001 From: sils Date: Fri, 20 Jan 2023 18:45:09 +0100 Subject: Structure: Move configuration.nix into host specific file This ensures that nixos-rebuild uses flakes and will probably have advantages in case I'll ever want to deploy multiple machines using this config. --- configuration.nix | 66 -------------------------------------------------- flake.nix | 2 +- sysconf/thinklappi.nix | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 configuration.nix create mode 100644 sysconf/thinklappi.nix diff --git a/configuration.nix b/configuration.nix deleted file mode 100644 index 819cec8..0000000 --- a/configuration.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - config, - pkgs, - ... -}: let - compiledLayout = pkgs.runCommand "keyboard-layout" {} '' - ${pkgs.xorg.xkbcomp}/bin/xkbcomp ${./files/neoqwertz.xkb} $out - ''; -in { - imports = [ - ./hardware/basesystem.nix - ./env.nix - ./nix.nix - ./packages.nix - ./users.nix - ./zsh.nix - ./flatpak.nix # Mainly for minecraft - - # Desktop Environment to use - ./desktop/plasma.nix - ]; - - services = { - printing.enable = true; - xserver = { - layout = "de"; - #xkbVariant = ",neo"; - xkbOptions = "grp:win_space_toggle"; - displayManager.sessionCommands = "${pkgs.xorg.xkbcomp}/bin/xkbcomp ${compiledLayout} $DISPLAY"; - }; - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; - }; - - hardware = { - bluetooth.enable = true; - pulseaudio.enable = false; - }; - security.rtkit.enable = true; - - environment.systemPackages = [pkgs.xorg.xkbcomp]; - - i18n.defaultLocale = "en_US.UTF-8"; - - networking = { - hostName = "thinklappi"; - networkmanager.enable = true; - }; - - time.timeZone = "Europe/Berlin"; - - console = { - font = "Lat2-Terminus16"; - keyMap = "de"; - #useXkbConfig = true; # use xkbOptions in tty. - }; - - programs.ssh.startAgent = true; - - system.stateVersion = "23.05"; -} diff --git a/flake.nix b/flake.nix index 16f49fb..37a7906 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ }: { nixosConfigurations.thinklappi = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [./configuration.nix]; + modules = [./sysconf/thinklappi.nix]; }; }; } diff --git a/sysconf/thinklappi.nix b/sysconf/thinklappi.nix new file mode 100644 index 0000000..4904ffd --- /dev/null +++ b/sysconf/thinklappi.nix @@ -0,0 +1,66 @@ +{ + config, + pkgs, + ... +}: let + compiledLayout = pkgs.runCommand "keyboard-layout" {} '' + ${pkgs.xorg.xkbcomp}/bin/xkbcomp ${../files/neoqwertz.xkb} $out + ''; +in { + imports = [ + ../hardware/basesystem.nix + ../env.nix + ../nix.nix + ../packages.nix + ../users.nix + ../zsh.nix + ../flatpak.nix # Mainly for minecraft + + # Desktop Environment to use + ../desktop/plasma.nix + ]; + + services = { + printing.enable = true; + xserver = { + layout = "de"; + #xkbVariant = ",neo"; + xkbOptions = "grp:win_space_toggle"; + displayManager.sessionCommands = "${pkgs.xorg.xkbcomp}/bin/xkbcomp ${compiledLayout} $DISPLAY"; + }; + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + }; + + hardware = { + bluetooth.enable = true; + pulseaudio.enable = false; + }; + security.rtkit.enable = true; + + environment.systemPackages = [pkgs.xorg.xkbcomp]; + + i18n.defaultLocale = "en_US.UTF-8"; + + networking = { + hostName = "thinklappi"; + networkmanager.enable = true; + }; + + time.timeZone = "Europe/Berlin"; + + console = { + font = "Lat2-Terminus16"; + keyMap = "de"; + #useXkbConfig = true; # use xkbOptions in tty. + }; + + programs.ssh.startAgent = true; + + system.stateVersion = "23.05"; +} -- cgit 1.4.1