diff --git a/README.md b/README.md new file mode 100644 index 0000000..edd602a --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# nixos-configuration + +When adding a new host: +1. install NixOS via the graphical installer +2. `mv /etc/hardware-configuration ./devicename-hardware-configuration.nix` +3. copy an existing devicename.nix +5. change import to new-devicename-hardware-configuration.nix +4. `ln -s ./new-devicename.nix /etc/nixos/configuration` +5. apply diff --git a/common.nix b/common.nix index 0e03e65..34bb1f9 100644 --- a/common.nix +++ b/common.nix @@ -9,16 +9,7 @@ ./home.nix ]; - nixpkgs.config = { - # override insync build version - packageOverrides = pkgs: { - my = import (builtins.fetchTarball https://github.com/kaesaecracker/nixpkgs/archive/db254c650b7f5b6657c6579afba1568f7f997195.tar.gz) { - config = config.nixpkgs.config; - }; - }; - - allowUnfree = true; - }; + nixpkgs.config.allowUnfree = true; boot = { # supportedFilesystems = [ "btrfs" ]; @@ -83,10 +74,6 @@ # Enable the X11 windowing system / wayland depending on DE enable = true; - # Enable the GNOME Desktop Environment. - displayManager.gdm.enable = true; - desktopManager.gnome.enable = true; - # Configure keymap in X11 layout = "de"; xkbVariant = ""; @@ -104,10 +91,6 @@ permitRootLogin = "no"; }; - gnome = { - tracker-miners.enable = false; - tracker.enable = false; - }; }; # Configure console keymap @@ -161,24 +144,6 @@ package = pkgs.gitFull; }; - environment = { - # List packages installed in system profile. - systemPackages = with pkgs; [ - # The Nano editor is also installed by default - ]; - - # remove gnome default apps - gnome.excludePackages = with pkgs.gnome; [ - cheese # photo booth - epiphany # web browser - evince # document viewer - geary # email client - seahorse # password manager - gnome-clocks - gnome-maps - gnome-weather - gnome-music - pkgs.gnome-connections - ]; - }; + # List packages installed in system profile. + # environment.systemPackages = []; } diff --git a/gnome.nix b/gnome.nix new file mode 100644 index 0000000..3abbd72 --- /dev/null +++ b/gnome.nix @@ -0,0 +1,32 @@ +{ + config, + pkgs, + ... +}: { + services = { + xserver = { + # Enable the GNOME Desktop Environment. + displayManager.gdm.enable = true; + desktopManager.gnome.enable = true; + }; + + gnome = { + tracker-miners.enable = false; + tracker.enable = false; + }; + }; + + # remove some gnome default apps + environment.gnome.excludePackages = with pkgs.gnome; [ + cheese # photo booth + epiphany # web browser + evince # document viewer + geary # email client + seahorse # password manager + gnome-clocks + gnome-maps + gnome-weather + gnome-music + pkgs.gnome-connections +]; +} diff --git a/home.nix b/home.nix index 53ca13b..93b76d2 100644 --- a/home.nix +++ b/home.nix @@ -3,6 +3,13 @@ pkgs, ... }: { + # override insync build version + nixpkgs.config.packageOverrides = pkgs: { + my = import (builtins.fetchTarball https://github.com/kaesaecracker/nixpkgs/archive/db254c650b7f5b6657c6579afba1568f7f997195.tar.gz) { + config = config.nixpkgs.config; + }; + }; + # Define user account users.users.vinzenz = { isNormalUser = true; @@ -118,6 +125,9 @@ extensions = [pkgs.vscode-extensions.bbenoist.nix]; userSettings = { "files.insertFinalNewline" = true; + "[nix]" = { + "editor.tabSize" = 2; + }; }; }; }; diff --git a/vinzenz-lpt.nix b/vinzenz-lpt.nix index 2ad0e9d..fa1218c 100644 --- a/vinzenz-lpt.nix +++ b/vinzenz-lpt.nix @@ -2,7 +2,8 @@ networking.hostName = "vinzenz-lpt"; imports = [ - ./common.nix ./vinzenz-lpt-hardware-configuration.nix + ./common.nix + ./gnome.nix ]; }