From a4cd48ad9334727d3ae21f8ed55d89aec365a3d4 Mon Sep 17 00:00:00 2001 From: Gabriel <68819302+obsidianical@users.noreply.github.com> Date: Tue, 2 Aug 2022 09:55:12 +0200 Subject: [PATCH] meow --- common.nix | 145 ++++++++++++++++++ modules/default.nix | 6 + monosodium-glutamate-g/configuration.nix | 82 ++++++++++ monosodium-glutamate-g/flake.nix | 28 ++++ .../hardware-configuration.nix | 46 ++++++ 5 files changed, 307 insertions(+) create mode 100644 common.nix create mode 100644 modules/default.nix create mode 100644 monosodium-glutamate-g/configuration.nix create mode 100644 monosodium-glutamate-g/flake.nix create mode 100644 monosodium-glutamate-g/hardware-configuration.nix diff --git a/common.nix b/common.nix new file mode 100644 index 0000000..513b323 --- /dev/null +++ b/common.nix @@ -0,0 +1,145 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +let smol = import {config.allowUnfree = true;}; +in { + nixpkgs.config.allowUnfree = true; + + nix = { + package = pkgs.nixFlakes; + extraOptions = '' + experimental-features = nix-command flakes + keep-outputs = true + keep-derivations = true + ''; + }; + + imports = [ + ]; + + time.timeZone = "Europe/Berlin"; + + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + networking.networkmanager.wifi.backend = "iwd"; + networking.extraHosts = "100.122.76.64 listenwithme.tailnet.ckie.dev"; + + services.xserver = { + enable = true; + + desktopManager = { + xterm.enable = false; + }; + + displayManager = { + defaultSession = "none+i3"; + gdm.enable = true; + }; + + windowManager.i3 = { + enable = true; + package = pkgs.i3-gaps; + extraPackages = with pkgs; [ + gnome.gdm i3lock-fancy rofi rofimoji volumeicon feh xorg.xinput dunst + arandr lxappearance gruvbox-dark-gtk gruvbox-dark-icons-gtk + gruvterial-theme flameshot tesseract5 imagemagick xclip polybar kitty + xkeysnail gtk-engine-murrine playerctl xmacro + ]; + }; + }; + programs.dconf.enable = true; + programs.qt5ct.enable = true; + + virtualisation.libvirtd.enable = true; + + hardware.opengl.enable = true; + + services.xserver.layout = "us"; + services.xserver.xkbVariant = "altgr-intl"; + hardware.uinput.enable = true; + + services.printing.enable = true; + services.tailscale.enable = true; + + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + hardware.bluetooth.enable = true; + hardware.keyboard.uhk.enable = true; + + environment.sessionVariables = rec { + QT_QPA_PLATFORMTHEME = "qt5ct"; + }; + + users.users.jade = { + isNormalUser = true; + extraGroups = [ "wheel" "input" "uinput" "libvirtd" ]; + packages = with pkgs; [ + ]; + }; + + + # missing: menu-qalc picom-jonaburg + environment.systemPackages = with pkgs; [ + neovim wget git neofetch pciutils pavucontrol font-manager zip unzip gnutar + iw btop xdotool xorg.xwininfo nodejs gparted networkmanagerapplet + mailspring betterdiscordctl fluffychat pulseaudioFull speedtest-cli + librewolf polymc jdk8 jdk11 jdk vlc xfce.thunar xfce.tumbler + xfce.thunar-archive-plugin gnome.file-roller uhk-agent spotify spotify-tray + spotify-tui cool-retro-term lutris libsecret gh xorg.xhost helvum + xdg-desktop-portal-gtk nheko smol.discord obsidian jetbrains.clion + jetbrains.webstorm jetbrains.datagrip jetbrains.idea-ultimate + jetbrains.pycharm-professional nix-prefetch-scripts audacity rustup + easyeffects virt-manager manim evince direnv nix-direnv python3Full + python39Packages.pip python39Packages.setuptools python39Packages.ipykernel + fzf openrgb krita gimp inkscape blender virglrenderer ddccontrol-db + glab firebird-emu + ]; + + environment.pathsToLink = [ + "/share/nix-direnv" + ]; + + services.flatpak.enable = true; + xdg.portal.enable = true; + xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + + fonts.fonts = with pkgs; [ + nerdfonts montserrat noto-fonts + ]; + + programs.mtr.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + programs.zsh.enable = true; + users.defaultUserShell = pkgs.zsh; + + services.openssh.enable = true; + services.blueman.enable = true; + + services.gnome.gnome-keyring.enable = true; + programs.seahorse.enable = true; + security.pam.services.jade.enableGnomeKeyring = true; + + # Copy the NixOS configuration file and link it from the resulting system + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + # system.copySystemConfiguration = true; + + # networking.firewall.allowedTCPPorts = [ 4713 ]; + systemd.services."NetworkManager-wait-online".enable = false; + + # release channel + system.stateVersion = "22.05"; # Did you read the comment? +} + diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..fca5958 --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,6 @@ +{ ... }: + +{ + imports = [ + ]; +} diff --git a/monosodium-glutamate-g/configuration.nix b/monosodium-glutamate-g/configuration.nix new file mode 100644 index 0000000..1c487bc --- /dev/null +++ b/monosodium-glutamate-g/configuration.nix @@ -0,0 +1,82 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ../common.nix + ]; + + # monitor control + services.ddccontrol.enable = true; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + # latest linux kernel + boot.kernelPackages = pkgs.linuxPackages_latest; + + networking.hostName = "monosodium-glutamate-g"; + + services.xserver.layout = "us"; + services.xserver.xkbVariant = "altgr-intl"; + + hardware.bluetooth.enable = true; + hardware.keyboard.uhk.enable = true; + + users.users.jade = { + isNormalUser = true; + extraGroups = [ "wheel" "input" "uinput" "libvirtd" ]; + packages = with pkgs; [ + ]; + }; + + + # missing: menu-qalc picom-jonaburg + environment.systemPackages = with pkgs; [ + # TODO: clean up. + ]; + + environment.pathsToLink = [ + "/share/nix-direnv" + ]; + + services.flatpak.enable = true; + xdg.portal.enable = true; + xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + + fonts.fonts = with pkgs; [ + nerdfonts montserrat noto-fonts + ]; + + programs.mtr.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + programs.zsh.enable = true; + users.defaultUserShell = pkgs.zsh; + + services.openssh.enable = true; + services.blueman.enable = true; + + services.gnome.gnome-keyring.enable = true; + programs.seahorse.enable = true; + security.pam.services.jade.enableGnomeKeyring = true; + + # Copy the NixOS configuration file and link it from the resulting system + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + # system.copySystemConfiguration = true; + + # networking.firewall.allowedTCPPorts = [ 4713 ]; + systemd.services."NetworkManager-wait-online".enable = false; + + # release channel + system.stateVersion = "22.05"; # Did you read the comment? +} + diff --git a/monosodium-glutamate-g/flake.nix b/monosodium-glutamate-g/flake.nix new file mode 100644 index 0000000..f6decfc --- /dev/null +++ b/monosodium-glutamate-g/flake.nix @@ -0,0 +1,28 @@ +{ + description = "home manager config apparently"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpks.follows = "nixpkgs"; + } + }; + + outputs = { self, nixpkgs, home-manager }: { + nixosConfigurations = { + monosodium-glutamate-g = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + # ./host/myhost/configuration.nix + ./configuration.nix + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.jade = import ./home.nix; + } + ]; + }; + }; + }; +} diff --git a/monosodium-glutamate-g/hardware-configuration.nix b/monosodium-glutamate-g/hardware-configuration.nix new file mode 100644 index 0000000..1c92a40 --- /dev/null +++ b/monosodium-glutamate-g/hardware-configuration.nix @@ -0,0 +1,46 @@ +# 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 = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/72ffbc9d-a319-42d7-8d26-13c921a679db"; + fsType = "btrfs"; + options = [ "subvol=@root" "compress=zstd:3" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/72ffbc9d-a319-42d7-8d26-13c921a679db"; + fsType = "btrfs"; + options = [ "subvol=@home" "compress=zstd:3"]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/D63E-18C9"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # 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.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + # high-resolution display + hardware.video.hidpi.enable = lib.mkDefault true; +}