From 98daf2ed7cb7a493475ec91ea51bcdbf6626e9f2 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 22 Feb 2023 13:01:05 +0100 Subject: [PATCH] Add Oni System to configuration --- common.nix | 10 +++++++- flake.nix | 28 +++++++++++++++++++++- home/jopejoe1.nix | 10 +++++++- oni.nix | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 3 deletions(-) create mode 100644 oni.nix diff --git a/common.nix b/common.nix index 9cb1e48..f05b0f2 100644 --- a/common.nix +++ b/common.nix @@ -111,23 +111,31 @@ extraGroups = [ "wheel" "networkmanger" "scanner" "lp"]; packages = with pkgs; [ kate - tela-icon-theme carla xdg-ninja prismlauncher nixpkgs-review nurl nix-init + discord + ark + gitkraken + prismlauncher ]; }; environment.systemPackages = with pkgs; [ partition-manager gparted + tela-icon-theme + dracula-theme ]; programs = { dconf.enable = true; + droidcam.enable = true; + sysdig.enable = true; + xwayland = true; }; security.rtkit.enable = true; diff --git a/flake.nix b/flake.nix index db8107a..0aea5f9 100644 --- a/flake.nix +++ b/flake.nix @@ -28,9 +28,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, nixos-hardware, prismlauncher, home-manager, nur, ... }: { + outputs = { self, nixpkgs, nixos-hardware, prismlauncher, home-manager, nur, ... }@attrs: { nixosConfigurations.yokai = nixpkgs.lib.nixosSystem { system = "aarch64-linux"; + specialArgs = attrs; modules = [ ./yokai.nix ./common.nix @@ -54,5 +55,30 @@ } ]; }; + nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = attrs; + modules = [ + ./oni.nix + ./common.nix + home-manager.nixosModules.home-manager + nur.nixosModules.nur + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.jopejoe1 = import ./home/jopejoe1.nix; + users.root = import ./home/root.nix; + }; + nixpkgs = { + config.allowUnfree = true; + overlays = [ + prismlauncher.overlay + nur.overlay + ]; + }; + } + ]; + }; }; } diff --git a/home/jopejoe1.nix b/home/jopejoe1.nix index 8616ce9..a1f3cfd 100644 --- a/home/jopejoe1.nix +++ b/home/jopejoe1.nix @@ -110,7 +110,15 @@ rb = "sudo git -C /etc/nixos pull && sudo nix flake update /etc/nixos/ && sudo nixos-rebuild switch && sudo git -C /etc/nixos add . && sudo git -C /etc/nixos commit -m 'Updated flake.lock' && sudo git -C /etc/nixos push"; }; }; - zsh.shellAliases = config.programs.bash.shellAliases; + zsh = { + enable = true; + shellAliases = config.programs.bash.shellAliases; + enableAutosuggestions = true; + enableCompletion = true; + enableSyntaxHighlighting = true; + enableVteIntegration = true; + dotDir = ".config/zsh"; + }; fish.shellAbbrs = config.programs.bash.shellAliases; thunderbird = { enable = false; diff --git a/oni.nix b/oni.nix new file mode 100644 index 0000000..ea85929 --- /dev/null +++ b/oni.nix @@ -0,0 +1,59 @@ +{ config, pkgs, lib, modulesPath, ... }: + +{ + boot = { + loader = { + systemd-boot.enable = true; + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; + }; + }; + initrd = { + availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "usb_storage" "sd_mod" "sr_mod" ]; + kernelModules = [ ]; + }; + kernelPackages = pkgs.linuxKernel.packages.linux_zen; + kernelModules = [ "kvm-amd" ]; + extraModulePackages = [ ]; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/c013c58e-540f-4547-b218-f7d34b07f7df"; + fsType = "ext4"; + }; + "/boot/efi" = { + device = "/dev/disk/by-uuid/F1C3-4668"; + fsType = "vfat"; + }; + }; + + swapDevices = [ { + device = "/dev/disk/by-uuid/8a721407-d8bc-4d2d-970a-7ff462107dc3"; + } ]; + + networking.hostName = "oni"; + + time.timeZone = "Europe/Berlin"; + + services.xserver = { + layout = "de"; + xkbVariant = ""; + }; + + console.keyMap = "de"; + + networking = { + useDHCP = lib.mkDefault true; + interfaces = { + enp2s0.useDHCP = lib.mkDefault true; + wlp3s0.useDHCP = lib.mkDefault true; + }; + }; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; +}