diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8d99e2d --- /dev/null +++ b/flake.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + inputs.nixpkgs.url = "inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-20.09"; + + outputs = { nixpkgs, ... }: { + nixosConfigurations = { + reg = nixpkgs.lib.nixosSystem { + modules = [ ./reg/configuration.nix ]; + system = "x86_64-linux"; + }; + }; +}; +} \ No newline at end of file diff --git a/reg/common.nix b/reg/common.nix index ff9311b..18ce448 100644 --- a/reg/common.nix +++ b/reg/common.nix @@ -16,7 +16,7 @@ networking.firewall.allowedUDPPorts = [ ]; environment.systemPackages = with pkgs; [ - wget kakoune htop git + wget kakoune htop git dnsutils ]; users.mutableUsers = false; diff --git a/reg/de.nix b/reg/de.nix index 947ab0d..eb1bbfc 100644 --- a/reg/de.nix +++ b/reg/de.nix @@ -9,6 +9,8 @@ ./chromium.nix ./audio.nix ./torbrowser.nix + ./pithos.nix + ./vscodium.nix ]; # allow specific unfree packages @@ -16,9 +18,13 @@ "tigervnc" "font-bh-lucidatypewriter" # tigervnc ]; + # vulkan + hardware.opengl.driSupport = true; + hardware.opengl.driSupport32Bit = true; + # Applications users.users.googlebot.packages = with pkgs; [ - firefox chromium keepassxc mumble tigervnc bluez-tools vscodium + firefox chromium keepassxc mumble tigervnc bluez-tools vscodium element-desktop mpv ]; # Networking diff --git a/reg/hardware-configuration.nix b/reg/hardware-configuration.nix new file mode 100644 index 0000000..221faa6 --- /dev/null +++ b/reg/hardware-configuration.nix @@ -0,0 +1,38 @@ +# 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" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/b3a2906b-e9a5-45bd-aac5-960297437fe9"; + fsType = "btrfs"; + options = [ "subvol=root" "noatime" "nodiratime" "discard" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/b3a2906b-e9a5-45bd-aac5-960297437fe9"; + fsType = "btrfs"; + options = [ "subvol=home" "noatime" "nodiratime" "discard" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/6C41-24A0"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/34ec322f-79c3-4993-a073-ef1da3c6ef51"; } + ]; + + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +} diff --git a/reg/pithos.nix b/reg/pithos.nix new file mode 100644 index 0000000..12d7c77 --- /dev/null +++ b/reg/pithos.nix @@ -0,0 +1,47 @@ +{ config, pkgs, ... }: + +#let +# pithos = pkgs.pithos.overrideAttrs (old: rec { +# pname = "pithos"; +# version = "1.5.1"; +# src = pkgs.fetchFromGitHub { +# owner = pname; +# repo = pname; +# rev = version; +# sha256 = "il7OAALpHFZ6wjco9Asp04zWHCD8Ni+iBdiJWcMiQA4="; +# }; +# }); +#in +{ + nixpkgs.overlays = [ + (self: super: { + pithos = super.pithos.overrideAttrs (old: rec { + pname = "pithos"; + version = "1.5.1"; + src = super.fetchFromGitHub { + owner = pname; + repo = pname; + rev = version; + sha256 = "il7OAALpHFZ6wjco9Asp04zWHCD8Ni+iBdiJWcMiQA4="; + }; + }); + }) + ]; + +# nixpkgs.config.packageOverrides = pkgs: { +# pithos = pkgs.pithos.overrideAttrs (old: rec { +# pname = "pithos"; +# version = "1.5.1"; +# pithosSrc = pkgs.fetchFromGitHub { +# owner = pname; +# repo = pname; +# rev = version; +# sha256 = "il7OAALpHFZ6wjco9Asp04zWHCD8Ni+iBdiJWcMiQA4="; +# }; +# }); +# }; + + users.users.googlebot.packages = with pkgs; [ + pithos + ]; +} diff --git a/reg/torbrowser.nix b/reg/torbrowser.nix index 9ca6ae8..c3de457 100644 --- a/reg/torbrowser.nix +++ b/reg/torbrowser.nix @@ -1,27 +1,20 @@ { config, pkgs, ... }: { -# nixpkgs.config.packageOverrides = pkgs: { -# tor-browser-bundle-bin = pkgs.tor-browser-bundle-bin.overrideAttrs (old: { -# version = "10.0.10"; -# src = builtins.fetchurl { -# url = "https://dist.torproject.org/torbrowser/10.0.10/tor-browser-linux64-10.0.10_en-US.tar.xz"; -# sha256 = "vYWZ+NsGN8YH5O61+zrUjlFv3rieaBqjBQ+a18sQcZg="; -# }; -# }); -# }; -# -# nixpkgs.overlays = [ ( -# self: super: -# { -# tor-browser-bundle-bin = super.tor-browser-bundle-bin.overrideAttrs (old: { -# version = "10.0.10"; -# lang = "en-US"; -# src = super.fetchurl { -# url = "https://dist.torproject.org/torbrowser/10.0.10/tor-browser-linux64-10.0.10_en-US.tar.xz"; -# sha256 = "vYWZ+NsGN8YH5O61+zrUjlFv3rieaBqjBQ+a18sQcZg="; -# }; -# }); -# } -# ) ]; + nixpkgs.overlays = [ + (self: super: { + tor-browser-bundle-bin = super.tor-browser-bundle-bin.overrideAttrs (old: rec { + version = "10.0.10"; + lang = "en-US"; + src = pkgs.fetchurl { + url = "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz"; + sha256 = "vYWZ+NsGN8YH5O61+zrUjlFv3rieaBqjBQ+a18sQcZg="; + }; + }); + }) + ]; + + users.users.googlebot.packages = with pkgs; [ + tor-browser-bundle-bin + ]; } diff --git a/reg/vscodium.nix b/reg/vscodium.nix new file mode 100644 index 0000000..e8a0bf2 --- /dev/null +++ b/reg/vscodium.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: + +let + extensions = with pkgs.vscode-extensions; [ + bbenoist.Nix # nix syntax support +# arrterian.nix-env-selector # nix dev envs + ]; + + vscodium-with-extensions = pkgs.vscode-with-extensions.override { + vscode = pkgs.vscodium; + vscodeExtensions = extensions; + }; +in +{ + users.users.googlebot.packages = [ + vscodium-with-extensions + ]; +}