mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
added formatter and reformated
This commit is contained in:
parent
733eda4798
commit
e1987d6461
24 changed files with 286 additions and 284 deletions
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
system.stateVersion = "23.05";
|
||||
environment = {
|
||||
defaultPackages = [];
|
||||
defaultPackages = [ ];
|
||||
binsh = "${pkgs.dash}/bin/dash";
|
||||
variables = {
|
||||
EDITOR = "nvim";
|
||||
|
|
@ -45,16 +45,16 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
# Select internationalisation properties.
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true;
|
||||
};
|
||||
#should be false
|
||||
#should be false
|
||||
sound.enable = false;
|
||||
|
||||
# rtkit is optional but recommended
|
||||
# rtkit is optional but recommended
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
#enable ssh
|
||||
#enable ssh
|
||||
programs = {
|
||||
mtr.enable = true;
|
||||
gnupg.agent = {
|
||||
|
|
|
|||
20
flake.nix
20
flake.nix
|
|
@ -8,7 +8,7 @@
|
|||
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
|
||||
username = "gerg";
|
||||
system = "x86_64-linux";
|
||||
|
|
@ -16,7 +16,8 @@
|
|||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = super: let self = super.pkgs; in {
|
||||
packageOverrides = super:
|
||||
let self = super.pkgs; in {
|
||||
nerdfonts-overpass = self.nerdfonts.override {
|
||||
fonts = [ "Overpass" ];
|
||||
};
|
||||
|
|
@ -24,9 +25,9 @@
|
|||
};
|
||||
overlays = [
|
||||
(final: prev: rec {
|
||||
t-rex-miner = final.callPackage ./pkgs/t-rex-miner {};
|
||||
afk-cmds = final.callPackage ./pkgs/afk-cmds {};
|
||||
parrot = final.callPackage ./pkgs/parrot {};
|
||||
t-rex-miner = final.callPackage ./pkgs/t-rex-miner { };
|
||||
afk-cmds = final.callPackage ./pkgs/afk-cmds { };
|
||||
parrot = final.callPackage ./pkgs/parrot { };
|
||||
discord = prev.discord.override {
|
||||
withOpenASAR = true;
|
||||
nss = prev.nss_latest;
|
||||
|
|
@ -36,15 +37,18 @@
|
|||
];
|
||||
};
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
in
|
||||
{
|
||||
formatter.x86_64-linux = pkgs.nixpkgs-fmt;
|
||||
nixosConfigurations = {
|
||||
gerg-desktop = lib.nixosSystem {
|
||||
inherit system pkgs;
|
||||
specialArgs = {inherit inputs username;};
|
||||
specialArgs = { inherit inputs username; };
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./systems/desktop.nix
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{config, pkgs, username, ...}:
|
||||
{ config, pkgs, username, ... }:
|
||||
{
|
||||
imports = [
|
||||
./librewolf.nix
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{pkgs, ...}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs = {
|
||||
librewolf = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
vim-moonfly = pkgs.vimUtils.buildVimPlugin {
|
||||
vim-moonfly = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "vim-moonfly";
|
||||
version = "1.0.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
|
|
@ -10,7 +10,7 @@ vim-moonfly = pkgs.vimUtils.buildVimPlugin {
|
|||
rev = "065c99b95355b33dfaa05bde11ad758e519b04a3";
|
||||
sha256 = "sha256-TEYN8G/VNxitpPJPM7+O9AGLm6V7bPkiTlFG5op55pI=";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
# home.packages = with pkgs; [rustc cargo rust-analyzer clang-tools];
|
||||
|
|
@ -19,10 +19,11 @@ in
|
|||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
extraPackages = with pkgs; [gcc ripgrep fd];
|
||||
extraPackages = with pkgs; [ gcc ripgrep fd ];
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
nvim-treesitter.withAllGrammars
|
||||
rainbow nvim-ts-rainbow # rainbow for tree-sitter
|
||||
rainbow
|
||||
nvim-ts-rainbow # rainbow for tree-sitter
|
||||
nvim-colorizer-lua # colors
|
||||
nvim-tree-lua # file browser
|
||||
nvim-web-devicons # for tree-lua
|
||||
|
|
@ -30,7 +31,7 @@ in
|
|||
undotree # better undotree
|
||||
indentLine # indentlines
|
||||
vim-smoothie #smooth scrolling
|
||||
#non-trash auto completion
|
||||
#non-trash auto completion
|
||||
nvim-cmp
|
||||
cmp-buffer
|
||||
cmp-nvim-lsp
|
||||
|
|
@ -48,7 +49,8 @@ in
|
|||
vim-moonfly #color scheme
|
||||
lightline-vim #bottom bar
|
||||
];
|
||||
extraConfig = let
|
||||
extraConfig =
|
||||
let
|
||||
luaRequire = module:
|
||||
builtins.readFile (builtins.toString
|
||||
./config
|
||||
|
|
@ -58,7 +60,8 @@ in
|
|||
"lspconfig"
|
||||
"nvim-cmp"
|
||||
]);
|
||||
in ''
|
||||
in
|
||||
''
|
||||
lua << EOF
|
||||
${luaConfig}
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
{pkgs , ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
|
|
@ -8,7 +7,7 @@
|
|||
settings = {
|
||||
"settings" = {
|
||||
screenchange.reload = true;
|
||||
pseudo.transparency =false;
|
||||
pseudo.transparency = false;
|
||||
};
|
||||
"colors" = {
|
||||
background = "#000000";
|
||||
|
|
@ -174,7 +173,7 @@
|
|||
padding = 0;
|
||||
};
|
||||
ramp.signal = {
|
||||
text = ["" "" "" "" ""];
|
||||
text = [ "" "" "" "" "" ];
|
||||
foreground = "\${colors.foreground}";
|
||||
background = "\${colors.background}";
|
||||
padding = 1;
|
||||
|
|
@ -215,8 +214,8 @@
|
|||
type = "internal/battery";
|
||||
full.at = 100;
|
||||
low.at = 20;
|
||||
# battery = "BAT0";
|
||||
# adapter = "ACAD";
|
||||
# battery = "BAT0";
|
||||
# adapter = "ACAD";
|
||||
poll.interval = 5;
|
||||
format = {
|
||||
charging = "\"%{A1:xfce4-power-menu -c:}<animation-charging>%{A}\"";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{config, pkgs, ...}:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./theme.nix
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
fonts = {
|
||||
fonts = with pkgs; [overpass nerdfonts-overpass material-design-icons];
|
||||
fonts = with pkgs; [ overpass nerdfonts-overpass material-design-icons ];
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
serif = ["Overpass" "Overpass Nerd Font" "Material Design Icons"];
|
||||
sansSerif = ["Overpass" "Overpass Nerd Font" "Material Design Icons"];
|
||||
monospace = ["Overpass Mono" "OverpassMono Nerd Font" "Material Design Icons" ];
|
||||
serif = [ "Overpass" "Overpass Nerd Font" "Material Design Icons" ];
|
||||
sansSerif = [ "Overpass" "Overpass Nerd Font" "Material Design Icons" ];
|
||||
monospace = [ "Overpass Mono" "OverpassMono Nerd Font" "Material Design Icons" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
pcmanfm #file manager
|
||||
haskellPackages.squeeze #file compression
|
||||
nix-tree #view packages
|
||||
docker
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,16 +35,10 @@ let
|
|||
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" ''
|
||||
curl -F 'clbin=<-' https://clbin.com
|
||||
'';
|
||||
in {
|
||||
environment.systemPackages = [ update-system clean-store apply-system polybar-tray full-upgrade pastebin];
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ update-system apply-system full-upgrade clean-store pastebin ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{username, ...}:
|
||||
{ username, ... }:
|
||||
{
|
||||
services.samba-wsdd.enable = true; # make shares visible for windows 10 clients
|
||||
networking.firewall = {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
systemd.services.libvirtd.preStart = let
|
||||
systemd.services.libvirtd.preStart =
|
||||
let
|
||||
qemuHook = pkgs.writeScript "qemu-hook" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
|
||||
|
|
@ -45,7 +46,8 @@
|
|||
fi
|
||||
fi
|
||||
'';
|
||||
in ''
|
||||
in
|
||||
''
|
||||
mkdir -p /var/lib/libvirt/hooks
|
||||
chmod 755 /var/lib/libvirt/hooks
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{config, pkgs, username, ... }:
|
||||
{ config, pkgs, username, ... }:
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
videoDrivers =
|
||||
if (config.networking.hostName == "gerg-laptop")
|
||||
then ["modesetting" "nvidia"]
|
||||
then [ "modesetting" "nvidia" ]
|
||||
else [ "amdgpu" ];
|
||||
layout = "us";
|
||||
libinput.enable = true;
|
||||
|
|
@ -19,44 +19,44 @@
|
|||
greeters.mini = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
[greeter]
|
||||
user = ${username}
|
||||
show-password-label = false
|
||||
password-label-text =
|
||||
invalid-password-text =
|
||||
show-input-cursor = false
|
||||
password-alignment = center
|
||||
password-input-width = 19
|
||||
show-image-on-all-monitors = true
|
||||
[greeter]
|
||||
user = ${username}
|
||||
show-password-label = false
|
||||
password-label-text =
|
||||
invalid-password-text =
|
||||
show-input-cursor = false
|
||||
password-alignment = center
|
||||
password-input-width = 19
|
||||
show-image-on-all-monitors = true
|
||||
|
||||
|
||||
[greeter-hotkeys]
|
||||
mod-key = meta
|
||||
shutdown-key = s
|
||||
restart-key = r
|
||||
hibernate-key = h
|
||||
suspend-key = u
|
||||
[greeter-hotkeys]
|
||||
mod-key = meta
|
||||
shutdown-key = s
|
||||
restart-key = r
|
||||
hibernate-key = h
|
||||
suspend-key = u
|
||||
|
||||
|
||||
[greeter-theme]
|
||||
font = "OverpassMono Nerd Font"
|
||||
font-size = 1.1em
|
||||
font-weight = bold
|
||||
font-style = normal
|
||||
text-color = "#7AA2F7"
|
||||
error-color = "#DB4B4B"
|
||||
background-image = "/etc/nixos/images/nix-stars.png"
|
||||
background-color = "#000000"
|
||||
window-color = "#000000"
|
||||
border-color = "#000000"
|
||||
border-width = 2px
|
||||
layout-space = 15
|
||||
password-character = -1
|
||||
password-color = "#7AA2F7"
|
||||
password-background-color = "#24283B"
|
||||
password-border-color = "#000000"
|
||||
password-border-width = 2px
|
||||
password-border-radius = 0.341125em
|
||||
[greeter-theme]
|
||||
font = "OverpassMono Nerd Font"
|
||||
font-size = 1.1em
|
||||
font-weight = bold
|
||||
font-style = normal
|
||||
text-color = "#7AA2F7"
|
||||
error-color = "#DB4B4B"
|
||||
background-image = "/etc/nixos/images/nix-stars.png"
|
||||
background-color = "#000000"
|
||||
window-color = "#000000"
|
||||
border-color = "#000000"
|
||||
border-width = 2px
|
||||
layout-space = 15
|
||||
password-character = -1
|
||||
password-color = "#7AA2F7"
|
||||
password-background-color = "#24283B"
|
||||
password-border-color = "#000000"
|
||||
password-border-width = 2px
|
||||
password-border-radius = 0.341125em
|
||||
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format="$sudo \n $directory$git_branch$character";
|
||||
format = "$sudo \n $directory$git_branch$character";
|
||||
character = {
|
||||
success_symbol = "[ ](#9ece6a bold)";
|
||||
error_symbol = "[ ](#db4b4b bold)";
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
git_branch = {
|
||||
style = "bold red";
|
||||
};
|
||||
sudo ={
|
||||
sudo = {
|
||||
format = "[ ](#7aa2f7)";
|
||||
disabled = false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
pkgs = import <nixpkgs> { };
|
||||
in
|
||||
with pkgs;
|
||||
mkShell rec {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "afk-cmds";
|
||||
version= "1.0.0";
|
||||
version = "1.0.0";
|
||||
|
||||
src = ./afk-cmds;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "parrot";
|
||||
version= "1.4.2";
|
||||
version = "1.4.2";
|
||||
# buildFeatures = ["let_else"];
|
||||
src = fetchFromGitHub {
|
||||
owner = "aquelemiguel";
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
, glibc
|
||||
}:
|
||||
let
|
||||
wrapper = ''
|
||||
wrapper = ''
|
||||
#!/bin/sh
|
||||
export LD_LIBRARY_PATH=${stdenv.cc.cc.lib}/lib/:${glibc}/lib/:/run/opengl-driver/lib/
|
||||
exec ${glibc}/lib64/ld-linux-x86-64.so.2 \
|
||||
$out/t-rex --no-watchdog \$@
|
||||
'';
|
||||
'';
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "t-rex-miner";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
(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 {
|
||||
src = ./st;
|
||||
});
|
||||
dwm = (super.dwm.override {}).overrideAttrs (oldAttrs: rec {
|
||||
dwm = (super.dwm.override { }).overrideAttrs (oldAttrs: rec {
|
||||
src = ./dwm;
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
pkgs = import <nixpkgs> { };
|
||||
in
|
||||
with pkgs;
|
||||
mkShell rec {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ config, pkgs, callPackage, lib, username, ... }:
|
||||
{
|
||||
#important stuff first
|
||||
#important stuff first
|
||||
imports =
|
||||
[
|
||||
../modules/amd.nix
|
||||
|
|
@ -17,14 +17,14 @@
|
|||
networking.hostName = "gerg-desktop";
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
#end important stuff
|
||||
#end important stuff
|
||||
environment.systemPackages = with pkgs; [
|
||||
#afk-cmds
|
||||
xmrig
|
||||
t-rex-miner
|
||||
vscodium
|
||||
];
|
||||
#user managment
|
||||
#user managment
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users."${username}" = {
|
||||
|
|
@ -34,12 +34,12 @@
|
|||
};
|
||||
boot = {
|
||||
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" ];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" ={
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/e5c9634f-0273-4fd3-b35f-49899984340f";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
|
@ -52,18 +52,18 @@
|
|||
#mining stuff
|
||||
systemd.services.mining = {
|
||||
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" ];
|
||||
script = ''
|
||||
afk-cmds -c /home/gerg/afk-cmds.json
|
||||
afk-cmds -c /home/${username}/afk-cmds.json
|
||||
'';
|
||||
environment = {
|
||||
# PATH="/run/current-system/sw/bin"; missing something with dbus
|
||||
XAUTHORITY="/home/${username}/.Xauthority";
|
||||
DISPLAY=":0";
|
||||
XDG_DATA_DIRS="/nix/var/nix/profiles/default/share:/run/current-system/sw/share";
|
||||
DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus";
|
||||
NO_AT_BRIDGE="1";
|
||||
XAUTHORITY = "/home/${username}/.Xauthority";
|
||||
DISPLAY = ":0";
|
||||
XDG_DATA_DIRS = "/nix/var/nix/profiles/default/share:/run/current-system/sw/share";
|
||||
DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/user/1000/bus";
|
||||
NO_AT_BRIDGE = "1";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, callPackage, lib, ... }:
|
||||
{ config, pkgs, callPackage, lib, username, ... }:
|
||||
{
|
||||
#important stuff first
|
||||
imports =
|
||||
|
|
@ -20,12 +20,12 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
xorg.xf86videoamdgpu
|
||||
];
|
||||
# user managment
|
||||
# user managment
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users.gerg = {
|
||||
users."${username}" = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "audio" "networkmanager"];
|
||||
extraGroups = [ "wheel" "audio" "networkmanager" ];
|
||||
};
|
||||
};
|
||||
boot = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue