added formatter and reformated

This commit is contained in:
ISnortPennies 2023-01-19 18:51:32 -05:00
parent 733eda4798
commit e1987d6461
24 changed files with 286 additions and 284 deletions

View file

@ -2,7 +2,7 @@
{ {
system.stateVersion = "23.05"; system.stateVersion = "23.05";
environment = { environment = {
defaultPackages = []; defaultPackages = [ ];
binsh = "${pkgs.dash}/bin/dash"; binsh = "${pkgs.dash}/bin/dash";
variables = { variables = {
EDITOR = "nvim"; EDITOR = "nvim";
@ -45,16 +45,16 @@
]; ];
}; };
}; };
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
console = { console = {
font = "Lat2-Terminus16"; font = "Lat2-Terminus16";
useXkbConfig = true; useXkbConfig = true;
}; };
#should be false #should be false
sound.enable = false; sound.enable = false;
# rtkit is optional but recommended # rtkit is optional but recommended
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
@ -64,7 +64,7 @@
pulse.enable = true; pulse.enable = true;
jack.enable = true; jack.enable = true;
}; };
#enable ssh #enable ssh
programs = { programs = {
mtr.enable = true; mtr.enable = true;
gnupg.agent = { gnupg.agent = {

View file

@ -8,7 +8,7 @@
spicetify-nix.url = "github:the-argus/spicetify-nix"; spicetify-nix.url = "github:the-argus/spicetify-nix";
}; };
outputs = {self, nixpkgs, home-manager, spicetify-nix}@inputs: outputs = { self, nixpkgs, home-manager, spicetify-nix }@inputs:
let let
username = "gerg"; username = "gerg";
system = "x86_64-linux"; system = "x86_64-linux";
@ -16,7 +16,8 @@
inherit system; inherit system;
config = { config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = super: let self = super.pkgs; in { packageOverrides = super:
let self = super.pkgs; in {
nerdfonts-overpass = self.nerdfonts.override { nerdfonts-overpass = self.nerdfonts.override {
fonts = [ "Overpass" ]; fonts = [ "Overpass" ];
}; };
@ -24,9 +25,9 @@
}; };
overlays = [ overlays = [
(final: prev: rec { (final: prev: rec {
t-rex-miner = final.callPackage ./pkgs/t-rex-miner {}; t-rex-miner = final.callPackage ./pkgs/t-rex-miner { };
afk-cmds = final.callPackage ./pkgs/afk-cmds {}; afk-cmds = final.callPackage ./pkgs/afk-cmds { };
parrot = final.callPackage ./pkgs/parrot {}; parrot = final.callPackage ./pkgs/parrot { };
discord = prev.discord.override { discord = prev.discord.override {
withOpenASAR = true; withOpenASAR = true;
nss = prev.nss_latest; nss = prev.nss_latest;
@ -36,15 +37,18 @@
]; ];
}; };
lib = nixpkgs.lib; lib = nixpkgs.lib;
in { in
{
formatter.x86_64-linux = pkgs.nixpkgs-fmt;
nixosConfigurations = { nixosConfigurations = {
gerg-desktop = lib.nixosSystem { gerg-desktop = lib.nixosSystem {
inherit system pkgs; inherit system pkgs;
specialArgs = {inherit inputs username;}; specialArgs = { inherit inputs username; };
modules = [ modules = [
./configuration.nix ./configuration.nix
./systems/desktop.nix ./systems/desktop.nix
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager
{
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;

View file

@ -1,4 +1,4 @@
{config, pkgs, username, ...}: { config, pkgs, username, ... }:
{ {
imports = [ imports = [
./librewolf.nix ./librewolf.nix

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { pkgs, ... }:
{ {
programs = { programs = {
librewolf = { librewolf = {

View file

@ -1,7 +1,7 @@
{pkgs, ... }: { pkgs, ... }:
let let
vim-moonfly = pkgs.vimUtils.buildVimPlugin { vim-moonfly = pkgs.vimUtils.buildVimPlugin {
pname = "vim-moonfly"; pname = "vim-moonfly";
version = "1.0.0"; version = "1.0.0";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@ -10,7 +10,7 @@ vim-moonfly = pkgs.vimUtils.buildVimPlugin {
rev = "065c99b95355b33dfaa05bde11ad758e519b04a3"; rev = "065c99b95355b33dfaa05bde11ad758e519b04a3";
sha256 = "sha256-TEYN8G/VNxitpPJPM7+O9AGLm6V7bPkiTlFG5op55pI="; sha256 = "sha256-TEYN8G/VNxitpPJPM7+O9AGLm6V7bPkiTlFG5op55pI=";
}; };
}; };
in in
{ {
# home.packages = with pkgs; [rustc cargo rust-analyzer clang-tools]; # home.packages = with pkgs; [rustc cargo rust-analyzer clang-tools];
@ -19,10 +19,11 @@ in
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
vimdiffAlias = true; vimdiffAlias = true;
extraPackages = with pkgs; [gcc ripgrep fd]; extraPackages = with pkgs; [ gcc ripgrep fd ];
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
nvim-treesitter.withAllGrammars nvim-treesitter.withAllGrammars
rainbow nvim-ts-rainbow # rainbow for tree-sitter rainbow
nvim-ts-rainbow # rainbow for tree-sitter
nvim-colorizer-lua # colors nvim-colorizer-lua # colors
nvim-tree-lua # file browser nvim-tree-lua # file browser
nvim-web-devicons # for tree-lua nvim-web-devicons # for tree-lua
@ -30,7 +31,7 @@ in
undotree # better undotree undotree # better undotree
indentLine # indentlines indentLine # indentlines
vim-smoothie #smooth scrolling vim-smoothie #smooth scrolling
#non-trash auto completion #non-trash auto completion
nvim-cmp nvim-cmp
cmp-buffer cmp-buffer
cmp-nvim-lsp cmp-nvim-lsp
@ -48,7 +49,8 @@ in
vim-moonfly #color scheme vim-moonfly #color scheme
lightline-vim #bottom bar lightline-vim #bottom bar
]; ];
extraConfig = let extraConfig =
let
luaRequire = module: luaRequire = module:
builtins.readFile (builtins.toString builtins.readFile (builtins.toString
./config ./config
@ -58,7 +60,8 @@ in
"lspconfig" "lspconfig"
"nvim-cmp" "nvim-cmp"
]); ]);
in '' in
''
lua << EOF lua << EOF
${luaConfig} ${luaConfig}
EOF EOF

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{pkgs , ... }:
{ {
services.polybar = { services.polybar = {
enable = true; enable = true;
@ -8,7 +7,7 @@
settings = { settings = {
"settings" = { "settings" = {
screenchange.reload = true; screenchange.reload = true;
pseudo.transparency =false; pseudo.transparency = false;
}; };
"colors" = { "colors" = {
background = "#000000"; background = "#000000";
@ -174,7 +173,7 @@
padding = 0; padding = 0;
}; };
ramp.signal = { ramp.signal = {
text = ["󰤯" "󰤟" "󰤢" "󰤥" "󰤨"]; text = [ "󰤯" "󰤟" "󰤢" "󰤥" "󰤨" ];
foreground = "\${colors.foreground}"; foreground = "\${colors.foreground}";
background = "\${colors.background}"; background = "\${colors.background}";
padding = 1; padding = 1;
@ -215,8 +214,8 @@
type = "internal/battery"; type = "internal/battery";
full.at = 100; full.at = 100;
low.at = 20; low.at = 20;
# battery = "BAT0"; # battery = "BAT0";
# adapter = "ACAD"; # adapter = "ACAD";
poll.interval = 5; poll.interval = 5;
format = { format = {
charging = "\"%{A1:xfce4-power-menu -c:}<animation-charging>%{A}\""; charging = "\"%{A1:xfce4-power-menu -c:}<animation-charging>%{A}\"";

View file

@ -1,4 +1,4 @@
{config, pkgs, ...}: { config, pkgs, ... }:
{ {
imports = [ imports = [
./theme.nix ./theme.nix

View file

@ -1,13 +1,13 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
fonts = { fonts = {
fonts = with pkgs; [overpass nerdfonts-overpass material-design-icons]; fonts = with pkgs; [ overpass nerdfonts-overpass material-design-icons ];
fontconfig = { fontconfig = {
enable = true; enable = true;
defaultFonts = { defaultFonts = {
serif = ["Overpass" "Overpass Nerd Font" "Material Design Icons"]; serif = [ "Overpass" "Overpass Nerd Font" "Material Design Icons" ];
sansSerif = ["Overpass" "Overpass Nerd Font" "Material Design Icons"]; sansSerif = [ "Overpass" "Overpass Nerd Font" "Material Design Icons" ];
monospace = ["Overpass Mono" "OverpassMono Nerd Font" "Material Design Icons" ]; monospace = [ "Overpass Mono" "OverpassMono Nerd Font" "Material Design Icons" ];
}; };
}; };
}; };

View file

@ -29,7 +29,6 @@
pcmanfm #file manager pcmanfm #file manager
haskellPackages.squeeze #file compression haskellPackages.squeeze #file compression
nix-tree #view packages nix-tree #view packages
docker
]; ];
} }

View file

@ -35,16 +35,10 @@ let
apply-system apply-system
''; '';
polybar-tray = pkgs.writeShellScriptBin "polybar-tray" ''
u=$(xprop -name "Polybar tray window" _NET_WM_PID | awk '{print $3}')
if [ $u -Z ]
then polybar tray &
else kill $u
fi
'';
pastebin = pkgs.writeShellScriptBin "pastebin" '' pastebin = pkgs.writeShellScriptBin "pastebin" ''
curl -F 'clbin=<-' https://clbin.com curl -F 'clbin=<-' https://clbin.com
''; '';
in { in
environment.systemPackages = [ update-system clean-store apply-system polybar-tray full-upgrade pastebin]; {
environment.systemPackages = [ update-system apply-system full-upgrade clean-store pastebin ];
} }

View file

@ -1,4 +1,4 @@
{username, ...}: { username, ... }:
{ {
services.samba-wsdd.enable = true; # make shares visible for windows 10 clients services.samba-wsdd.enable = true; # make shares visible for windows 10 clients
networking.firewall = { networking.firewall = {

View file

@ -23,7 +23,8 @@
}; };
}; };
environment.systemPackages = with pkgs; [ virt-manager ]; environment.systemPackages = with pkgs; [ virt-manager ];
systemd.services.libvirtd.preStart = let systemd.services.libvirtd.preStart =
let
qemuHook = pkgs.writeScript "qemu-hook" '' qemuHook = pkgs.writeScript "qemu-hook" ''
#!${pkgs.stdenv.shell} #!${pkgs.stdenv.shell}
@ -45,7 +46,8 @@
fi fi
fi fi
''; '';
in '' in
''
mkdir -p /var/lib/libvirt/hooks mkdir -p /var/lib/libvirt/hooks
chmod 755 /var/lib/libvirt/hooks chmod 755 /var/lib/libvirt/hooks

View file

@ -1,10 +1,10 @@
{config, pkgs, username, ... }: { config, pkgs, username, ... }:
{ {
services.xserver = { services.xserver = {
enable = true; enable = true;
videoDrivers = videoDrivers =
if (config.networking.hostName == "gerg-laptop") if (config.networking.hostName == "gerg-laptop")
then ["modesetting" "nvidia"] then [ "modesetting" "nvidia" ]
else [ "amdgpu" ]; else [ "amdgpu" ];
layout = "us"; layout = "us";
libinput.enable = true; libinput.enable = true;
@ -19,44 +19,44 @@
greeters.mini = { greeters.mini = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
[greeter] [greeter]
user = ${username} user = ${username}
show-password-label = false show-password-label = false
password-label-text = password-label-text =
invalid-password-text = invalid-password-text =
show-input-cursor = false show-input-cursor = false
password-alignment = center password-alignment = center
password-input-width = 19 password-input-width = 19
show-image-on-all-monitors = true show-image-on-all-monitors = true
[greeter-hotkeys] [greeter-hotkeys]
mod-key = meta mod-key = meta
shutdown-key = s shutdown-key = s
restart-key = r restart-key = r
hibernate-key = h hibernate-key = h
suspend-key = u suspend-key = u
[greeter-theme] [greeter-theme]
font = "OverpassMono Nerd Font" font = "OverpassMono Nerd Font"
font-size = 1.1em font-size = 1.1em
font-weight = bold font-weight = bold
font-style = normal font-style = normal
text-color = "#7AA2F7" text-color = "#7AA2F7"
error-color = "#DB4B4B" error-color = "#DB4B4B"
background-image = "/etc/nixos/images/nix-stars.png" background-image = "/etc/nixos/images/nix-stars.png"
background-color = "#000000" background-color = "#000000"
window-color = "#000000" window-color = "#000000"
border-color = "#000000" border-color = "#000000"
border-width = 2px border-width = 2px
layout-space = 15 layout-space = 15
password-character = -1 password-character = -1
password-color = "#7AA2F7" password-color = "#7AA2F7"
password-background-color = "#24283B" password-background-color = "#24283B"
password-border-color = "#000000" password-border-color = "#000000"
password-border-width = 2px password-border-width = 2px
password-border-radius = 0.341125em password-border-radius = 0.341125em
''; '';
}; };

View file

@ -17,7 +17,7 @@
enable = true; enable = true;
settings = { settings = {
add_newline = false; add_newline = false;
format="$sudo \n $directory$git_branch$character"; format = "$sudo \n $directory$git_branch$character";
character = { character = {
success_symbol = "[ ](#9ece6a bold)"; success_symbol = "[ ](#9ece6a bold)";
error_symbol = "[ ](#db4b4b bold)"; error_symbol = "[ ](#db4b4b bold)";
@ -28,7 +28,7 @@
git_branch = { git_branch = {
style = "bold red"; style = "bold red";
}; };
sudo ={ sudo = {
format = "[ ](#7aa2f7)"; format = "[ ](#7aa2f7)";
disabled = false; disabled = false;
}; };

View file

@ -1,5 +1,5 @@
let let
pkgs = import <nixpkgs> {}; pkgs = import <nixpkgs> { };
in in
with pkgs; with pkgs;
mkShell rec { mkShell rec {

View file

@ -15,7 +15,7 @@
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "afk-cmds"; pname = "afk-cmds";
version= "1.0.0"; version = "1.0.0";
src = ./afk-cmds; src = ./afk-cmds;

View file

@ -8,7 +8,7 @@
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "parrot"; pname = "parrot";
version= "1.4.2"; version = "1.4.2";
# buildFeatures = ["let_else"]; # buildFeatures = ["let_else"];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "aquelemiguel"; owner = "aquelemiguel";

View file

@ -4,12 +4,12 @@
, glibc , glibc
}: }:
let let
wrapper = '' wrapper = ''
#!/bin/sh #!/bin/sh
export LD_LIBRARY_PATH=${stdenv.cc.cc.lib}/lib/:${glibc}/lib/:/run/opengl-driver/lib/ export LD_LIBRARY_PATH=${stdenv.cc.cc.lib}/lib/:${glibc}/lib/:/run/opengl-driver/lib/
exec ${glibc}/lib64/ld-linux-x86-64.so.2 \ exec ${glibc}/lib64/ld-linux-x86-64.so.2 \
$out/t-rex --no-watchdog \$@ $out/t-rex --no-watchdog \$@
''; '';
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "t-rex-miner"; pname = "t-rex-miner";

View file

@ -1,9 +1,10 @@
(final: super: rec { (final: super: rec {
st = (super.st.override { extraLibs = with super; [ xorg.libXcursor harfbuzz ]; st = (super.st.override {
extraLibs = with super; [ xorg.libXcursor harfbuzz ];
}).overrideAttrs (oldAttrs: rec { }).overrideAttrs (oldAttrs: rec {
src = ./st; src = ./st;
}); });
dwm = (super.dwm.override {}).overrideAttrs (oldAttrs: rec { dwm = (super.dwm.override { }).overrideAttrs (oldAttrs: rec {
src = ./dwm; src = ./dwm;
}); });
}) })

View file

@ -1,5 +1,5 @@
let let
pkgs = import <nixpkgs> {}; pkgs = import <nixpkgs> { };
in in
with pkgs; with pkgs;
mkShell rec { mkShell rec {

View file

@ -1,6 +1,6 @@
{ config, pkgs, callPackage, lib, username, ... }: { config, pkgs, callPackage, lib, username, ... }:
{ {
#important stuff first #important stuff first
imports = imports =
[ [
../modules/amd.nix ../modules/amd.nix
@ -17,14 +17,14 @@
networking.hostName = "gerg-desktop"; networking.hostName = "gerg-desktop";
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
hardware.cpu.amd.updateMicrocode = true; hardware.cpu.amd.updateMicrocode = true;
#end important stuff #end important stuff
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
#afk-cmds #afk-cmds
xmrig xmrig
t-rex-miner t-rex-miner
vscodium vscodium
]; ];
#user managment #user managment
users = { users = {
defaultUserShell = pkgs.zsh; defaultUserShell = pkgs.zsh;
users."${username}" = { users."${username}" = {
@ -34,12 +34,12 @@
}; };
boot = { boot = {
initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "uas" "sd_mod" ]; initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "uas" "sd_mod" ];
kernelModules = [ "kvm-amd" "msr"]; kernelModules = [ "kvm-amd" "msr" ];
kernelParams = [ "iomem=relaxed" "msr.allow_writes=on" ]; kernelParams = [ "iomem=relaxed" "msr.allow_writes=on" ];
}; };
fileSystems = { fileSystems = {
"/" ={ "/" = {
device = "/dev/disk/by-uuid/e5c9634f-0273-4fd3-b35f-49899984340f"; device = "/dev/disk/by-uuid/e5c9634f-0273-4fd3-b35f-49899984340f";
fsType = "ext4"; fsType = "ext4";
}; };
@ -52,18 +52,18 @@
#mining stuff #mining stuff
systemd.services.mining = { systemd.services.mining = {
enable = false; enable = false;
path = with pkgs; [t-rex-miner afk-cmds st zsh dbus xmrig]; path = with pkgs; [ t-rex-miner afk-cmds st zsh dbus xmrig ];
wantedBy = [ "graphical.target" ]; wantedBy = [ "graphical.target" ];
script = '' script = ''
afk-cmds -c /home/gerg/afk-cmds.json afk-cmds -c /home/${username}/afk-cmds.json
''; '';
environment = { environment = {
# PATH="/run/current-system/sw/bin"; missing something with dbus # PATH="/run/current-system/sw/bin"; missing something with dbus
XAUTHORITY="/home/${username}/.Xauthority"; XAUTHORITY = "/home/${username}/.Xauthority";
DISPLAY=":0"; DISPLAY = ":0";
XDG_DATA_DIRS="/nix/var/nix/profiles/default/share:/run/current-system/sw/share"; XDG_DATA_DIRS = "/nix/var/nix/profiles/default/share:/run/current-system/sw/share";
DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/user/1000/bus";
NO_AT_BRIDGE="1"; NO_AT_BRIDGE = "1";
}; };
}; };
} }

View file

@ -1,4 +1,4 @@
{ config, pkgs, callPackage, lib, ... }: { config, pkgs, callPackage, lib, username, ... }:
{ {
#important stuff first #important stuff first
imports = imports =
@ -20,12 +20,12 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
xorg.xf86videoamdgpu xorg.xf86videoamdgpu
]; ];
# user managment # user managment
users = { users = {
defaultUserShell = pkgs.zsh; defaultUserShell = pkgs.zsh;
users.gerg = { users."${username}" = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "audio" "networkmanager"]; extraGroups = [ "wheel" "audio" "networkmanager" ];
}; };
}; };
boot = { boot = {