From 041cfc3ec6e631135530b8c936b4af666bd27972 Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Fri, 2 Feb 2024 19:59:41 +0100 Subject: [PATCH] Add convertible "ludwig" --- flake.nix | 13 ++++ home/features/desktop/common/default.nix | 3 +- home/features/desktop/common/notes.nix | 6 ++ home/ludwig.nix | 23 +++++++ hosts/adalbert/default.nix | 1 - hosts/common/optional/desktop/global.nix | 2 +- hosts/common/optional/desktop/gnome.nix | 33 +++++++++ hosts/common/optional/desktop/japanese.nix | 2 +- hosts/ludwig/default.nix | 78 ++++++++++++++++++++++ hosts/ludwig/hardware-configuration.nix | 48 +++++++++++++ 10 files changed, 205 insertions(+), 4 deletions(-) create mode 100644 home/features/desktop/common/notes.nix create mode 100644 home/ludwig.nix create mode 100644 hosts/ludwig/default.nix create mode 100644 hosts/ludwig/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 2ace8ef..e894ce1 100644 --- a/flake.nix +++ b/flake.nix @@ -76,6 +76,12 @@ ./hosts/adalbert ]; }; + ludwig = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs vars;}; + modules = [ + ./hosts/ludwig + ]; + }; }; # Standalone home-manager configuration entrypoint @@ -89,5 +95,12 @@ ]; }; }; + "ghoscht@ludwig" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance + extraSpecialArgs = {inherit inputs outputs vars;}; + modules = [ + ./home/ludwig.nix + ]; + }; }; } diff --git a/home/features/desktop/common/default.nix b/home/features/desktop/common/default.nix index c11c3a0..186c10e 100644 --- a/home/features/desktop/common/default.nix +++ b/home/features/desktop/common/default.nix @@ -8,6 +8,7 @@ ./easyeffects.nix ./nextcloud.nix ./flatpak.nix + ./notes.nix ]; home.packages = with pkgs; [ @@ -15,6 +16,6 @@ feishin-appimage # self-packaged feishin while electron build fails signal-desktop # secure messenger webcord-vencord # more "privacy friendly" discord client - obsidian + anki ]; } diff --git a/home/features/desktop/common/notes.nix b/home/features/desktop/common/notes.nix new file mode 100644 index 0000000..e5cc5f1 --- /dev/null +++ b/home/features/desktop/common/notes.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + xournalpp + obsidian + ]; +} diff --git a/home/ludwig.nix b/home/ludwig.nix new file mode 100644 index 0000000..359aec9 --- /dev/null +++ b/home/ludwig.nix @@ -0,0 +1,23 @@ +{ + inputs, + outputs, + ... +}: let +in { + imports = [ + ./global + ./features/desktop/awesome + # ./features/desktop/gnome + ./features/coding + inputs.nix-colors.homeManagerModules.default + ]; + + colorScheme = inputs.nix-colors.colorSchemes.catppuccin-mocha; + nixpkgs = { + config = { + permittedInsecurePackages = [ + "electron-25.9.0" + ]; + }; + }; +} diff --git a/hosts/adalbert/default.nix b/hosts/adalbert/default.nix index 637d276..b7371a2 100644 --- a/hosts/adalbert/default.nix +++ b/hosts/adalbert/default.nix @@ -74,7 +74,6 @@ programs = { adb.enable = true; dconf.enable = true; - kdeconnect.enable = true; }; hardware = { diff --git a/hosts/common/optional/desktop/global.nix b/hosts/common/optional/desktop/global.nix index d991eb5..e45c40c 100644 --- a/hosts/common/optional/desktop/global.nix +++ b/hosts/common/optional/desktop/global.nix @@ -4,7 +4,7 @@ pkgs, ... }: { - imports = [./pipewire.nix ../printing.nix ./flatpak.nix ./xdg.nix ./xremap.nix]; + imports = [./pipewire.nix ../printing.nix ./flatpak.nix ./xremap.nix]; # Enable networking networking.networkmanager.enable = true; diff --git a/hosts/common/optional/desktop/gnome.nix b/hosts/common/optional/desktop/gnome.nix index c57bf1c..ea0c93c 100644 --- a/hosts/common/optional/desktop/gnome.nix +++ b/hosts/common/optional/desktop/gnome.nix @@ -11,6 +11,39 @@ desktopManager.gnome = { enable = true; }; + libinput.enable = true; + modules = [pkgs.xf86_input_wacom]; + wacom.enable = true; }; + udev.packages = with pkgs; [ + gnome.gnome-settings-daemon + ]; + }; + + environment = { + systemPackages = with pkgs; [ + # System-Wide Packages + gnome.adwaita-icon-theme + gnome.dconf-editor + gnome.gnome-tweaks + gnomeExtensions.gesture-improvements + ]; + gnome.excludePackages = + (with pkgs; [ + # Ignored Packages + gnome-tour + ]) + ++ (with pkgs.gnome; [ + atomix + epiphany + geary + gedit + gnome-characters + gnome-contacts + gnome-initial-setup + hitori + iagno + tali + ]); }; } diff --git a/hosts/common/optional/desktop/japanese.nix b/hosts/common/optional/desktop/japanese.nix index e10d8e7..1486733 100644 --- a/hosts/common/optional/desktop/japanese.nix +++ b/hosts/common/optional/desktop/japanese.nix @@ -6,7 +6,7 @@ fcitx5-gtk ]; }; - fonts.fonts = with pkgs; [ + fonts.packages = with pkgs; [ noto-fonts-cjk-sans ]; } diff --git a/hosts/ludwig/default.nix b/hosts/ludwig/default.nix new file mode 100644 index 0000000..89d8829 --- /dev/null +++ b/hosts/ludwig/default.nix @@ -0,0 +1,78 @@ +# This is your system's configuration file. +# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) +{ + inputs, + outputs, + lib, + config, + pkgs, + ... +}: { + # You can import other NixOS modules here + imports = [ + # If you want to use modules your own flake exports (from modules/nixos): + # outputs.nixosModules.example + + # Or modules from other flakes (such as nixos-hardware): + inputs.hardware.nixosModules.common-cpu-intel + inputs.hardware.nixosModules.common-pc-ssd + + # You can also split up your configuration and import pieces of it here: + # ./users.nix + + # Import your generated (nixos-generate-config) hardware configuration + ./hardware-configuration.nix + + ../common/global + ../common/optional/desktop/awesome.nix + ../common/optional/desktop/gnome.nix + + ../common/optional/systemd-boot.nix + ../common/optional/wireshark.nix + ../common/optional/gnome-keyring.nix + ../common/optional/docker.nix + ../common/optional/desktop/japanese.nix + ../common/optional/udisks.nix + ../common/optional/tailscale.nix + ]; + + nixpkgs = { + # You can add overlays here + overlays = [ + # Add overlays your own flake exports (from overlays and pkgs dir): + outputs.overlays.additions + outputs.overlays.modifications + outputs.overlays.unstable-packages + + # You can also add overlays exported from other flakes: + # neovim-nightly-overlay.overlays.default + + # Or define it inline, for example: + # (final: prev: { + # hi = final.hello.overrideAttrs (oldAttrs: { + # patches = [ ./change-hello-to-hi.patch ]; + # }); + # }) + ]; + # Configure your nixpkgs instance + config = { + # Disable if you don't want unfree packages + allowUnfree = true; + }; + }; + + networking.hostName = "ludwig"; + + programs = { + adb.enable = true; + dconf.enable = true; + }; + + hardware = { + opengl.enable = true; + opentabletdriver.enable = true; + }; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + system.stateVersion = "23.11"; +} diff --git a/hosts/ludwig/hardware-configuration.nix b/hosts/ludwig/hardware-configuration.nix new file mode 100644 index 0000000..210d4c1 --- /dev/null +++ b/hosts/ludwig/hardware-configuration.nix @@ -0,0 +1,48 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/e36453a3-629d-4704-a42e-180bf3640722"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices = { + "luks-5f04c1e9-c3fe-42fb-97d1-0833bf66435a".device = "/dev/disk/by-uuid/5f04c1e9-c3fe-42fb-97d1-0833bf66435a"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/A2B4-1BBE"; + fsType = "vfat"; + }; + + # swapDevices = [ + # {device = "/dev/disk/by-uuid/b16f0d66-5aec-4e0e-8162-c8e87e19888c";} + # ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}