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
|
|
@ -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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ config, pkgs, callPackage, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
environment.systemPackages = with pkgs; [
|
||||
bottom #view tasks
|
||||
efibootmgr #efi editor
|
||||
maim #screenshooter
|
||||
|
|
@ -29,7 +29,6 @@
|
|||
pcmanfm #file manager
|
||||
haskellPackages.squeeze #file compression
|
||||
nix-tree #view packages
|
||||
docker
|
||||
];
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
{
|
||||
services.xserver = {
|
||||
xrandrHeads = [
|
||||
{
|
||||
output = "HDMI-0";
|
||||
primary = true;
|
||||
monitorConfig = ''
|
||||
Option "DPMS" "false"
|
||||
{
|
||||
output = "HDMI-0";
|
||||
primary = true;
|
||||
monitorConfig = ''
|
||||
Option "DPMS" "false"
|
||||
'';
|
||||
}
|
||||
}
|
||||
];
|
||||
screenSection = ''
|
||||
Option "metamodes" "1920x1080_144 +0+0"
|
||||
'';
|
||||
monitorSection = ''
|
||||
Option "DPMS" "false"
|
||||
'';
|
||||
'';
|
||||
serverFlagsSection = ''
|
||||
Option "BlankTime" "0"
|
||||
Option "StandbyTime" "0"
|
||||
Option "SuspendTime" "0"
|
||||
Option "OffTime" "0"
|
||||
Option "DPMS" "false"
|
||||
'';
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ let
|
|||
exit 1
|
||||
fi
|
||||
nix flake update /etc/nixos/#
|
||||
'';
|
||||
'';
|
||||
|
||||
clean-store = pkgs.writeShellScriptBin "clean-store" ''
|
||||
if ! [ $(id -u) = 0 ]; then
|
||||
|
|
@ -16,7 +16,7 @@ let
|
|||
fi
|
||||
rm /nix/var/nix/gcroots/auto/*
|
||||
nix-collect-garbage -d
|
||||
'';
|
||||
'';
|
||||
|
||||
apply-system = pkgs.writeShellScriptBin "apply-system" ''
|
||||
if ! [ $(id -u) = 0 ]; then
|
||||
|
|
@ -24,7 +24,7 @@ let
|
|||
exit 1
|
||||
fi
|
||||
nixos-rebuild switch --flake /etc/nixos/#
|
||||
'';
|
||||
'';
|
||||
|
||||
full-upgrade = pkgs.writeShellScriptBin "full-upgrade" ''
|
||||
if ! [ $(id -u) = 0 ]; then
|
||||
|
|
@ -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,10 +1,10 @@
|
|||
{username, ...}:
|
||||
{ username, ... }:
|
||||
{
|
||||
services.samba-wsdd.enable = true; # make shares visible for windows 10 clients
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 139 445 ];
|
||||
allowedUDPPorts = [ 137 138 ];
|
||||
};
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 139 445 ];
|
||||
allowedUDPPorts = [ 137 138 ];
|
||||
};
|
||||
services.samba = {
|
||||
enable = true;
|
||||
securityType = "user";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
|
||||
initrd.kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
|
||||
extraModprobeConfig = ''
|
||||
options vfio-pci ids=10de:228e,10de:2504
|
||||
options vfio-pci ids=10de:228e,10de:2504
|
||||
'';
|
||||
};
|
||||
virtualisation = {
|
||||
|
|
@ -15,41 +15,43 @@
|
|||
runAsRoot = true;
|
||||
ovmf.enable = true;
|
||||
verbatimConfig = ''
|
||||
user = "${username}"
|
||||
group = "kvm"
|
||||
namespaces = []
|
||||
user = "${username}"
|
||||
group = "kvm"
|
||||
namespaces = []
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
systemd.services.libvirtd.preStart = let
|
||||
qemuHook = pkgs.writeScript "qemu-hook" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
systemd.services.libvirtd.preStart =
|
||||
let
|
||||
qemuHook = pkgs.writeScript "qemu-hook" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
|
||||
GUEST_NAME="$1"
|
||||
OPERATION="$2"
|
||||
SUB_OPERATION="$3"
|
||||
GUEST_NAME="$1"
|
||||
OPERATION="$2"
|
||||
SUB_OPERATION="$3"
|
||||
|
||||
if [ "$GUEST_NAME" == "Windows" ]; then
|
||||
if [ "$OPERATION" == "start" ]; then
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=8-15,24-31
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=8-15,24-31
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=8-15,24-31
|
||||
if [ "$GUEST_NAME" == "Windows" ]; then
|
||||
if [ "$OPERATION" == "start" ]; then
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=8-15,24-31
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=8-15,24-31
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=8-15,24-31
|
||||
fi
|
||||
|
||||
if [ "$OPERATION" == "stopped" ]; then
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=0-31
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=0-31
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=0-31
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
in
|
||||
''
|
||||
mkdir -p /var/lib/libvirt/hooks
|
||||
chmod 755 /var/lib/libvirt/hooks
|
||||
|
||||
if [ "$OPERATION" == "stopped" ]; then
|
||||
systemctl set-property --runtime -- user.slice AllowedCPUs=0-31
|
||||
systemctl set-property --runtime -- system.slice AllowedCPUs=0-31
|
||||
systemctl set-property --runtime -- init.scope AllowedCPUs=0-31
|
||||
fi
|
||||
fi
|
||||
# Copy hook files
|
||||
ln -sf ${qemuHook} /var/lib/libvirt/hooks/qemu
|
||||
'';
|
||||
in ''
|
||||
mkdir -p /var/lib/libvirt/hooks
|
||||
chmod 755 /var/lib/libvirt/hooks
|
||||
|
||||
# Copy hook files
|
||||
ln -sf ${qemuHook} /var/lib/libvirt/hooks/qemu
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{config, pkgs, username, ... }:
|
||||
{ config, pkgs, username, ... }:
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
videoDrivers =
|
||||
videoDrivers =
|
||||
if (config.networking.hostName == "gerg-laptop")
|
||||
then ["modesetting" "nvidia"]
|
||||
then [ "modesetting" "nvidia" ]
|
||||
else [ "amdgpu" ];
|
||||
layout = "us";
|
||||
libinput.enable = true;
|
||||
|
|
@ -18,47 +18,47 @@
|
|||
enable = true;
|
||||
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
|
||||
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-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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue