mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
fixed refreshrate on desktop
switch to neovim as a pager added parrot and mining modules deleted amd module moved the rest of vfio configuration to vfio.nix moved git from home-manager to system configuration
This commit is contained in:
parent
67b3e39735
commit
6b7ce7d133
25 changed files with 152 additions and 165 deletions
|
|
@ -1,27 +1,27 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
settings,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = settings.version;
|
||||||
environment = {
|
environment = {
|
||||||
defaultPackages = []; #don't install anything by default
|
defaultPackages = []; #don't install anything by default
|
||||||
binsh = "${pkgs.dash}/bin/dash"; #use dash for speed
|
binsh = "${pkgs.dash}/bin/dash"; #use dash for speed
|
||||||
variables = {
|
variables = {
|
||||||
EDITOR = "vi";
|
EDITOR = "vi";
|
||||||
VISUAL = "vi";
|
VISUAL = "vi";
|
||||||
|
PAGER = "page";
|
||||||
|
SYSTEMD_PAGERSECURE = "true";
|
||||||
TERMINAL = "st";
|
TERMINAL = "st";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#nix stuff
|
#hardware stuff
|
||||||
nix = {
|
hardware = {
|
||||||
settings = {
|
enableRedistributableFirmware = true;
|
||||||
auto-optimise-store = true; #save space
|
opengl = {
|
||||||
cores = 0; # use all cores
|
enable = true;
|
||||||
keep-outputs = false; #don't make ./results files
|
driSupport = true;
|
||||||
keep-derivations = false; #^
|
driSupport32Bit = true;
|
||||||
experimental-features = "nix-command flakes";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#sound settings
|
#sound settings
|
||||||
|
|
|
||||||
30
flake.nix
30
flake.nix
|
|
@ -25,25 +25,22 @@
|
||||||
suckless,
|
suckless,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
username = "gerg";
|
settings = {
|
||||||
|
username = "gerg";
|
||||||
|
version = "23.05";
|
||||||
|
};
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config = {
|
config.allowUnfree = true;
|
||||||
allowUnfree = true;
|
|
||||||
packageOverrides = super: let
|
|
||||||
self = super.pkgs;
|
|
||||||
in {
|
|
||||||
nerdfonts-overpass = self.nerdfonts.override {
|
|
||||||
fonts = ["Overpass"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
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 {};
|
||||||
|
nerdfonts-overpass = prev.nerdfonts.override {
|
||||||
|
fonts = ["Overpass"];
|
||||||
|
};
|
||||||
discord = prev.discord.override {
|
discord = prev.discord.override {
|
||||||
withOpenASAR = true;
|
withOpenASAR = true;
|
||||||
nss = prev.nss_latest;
|
nss = prev.nss_latest;
|
||||||
|
|
@ -59,7 +56,7 @@
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
gerg-desktop = lib.nixosSystem {
|
gerg-desktop = lib.nixosSystem {
|
||||||
inherit system pkgs;
|
inherit system pkgs;
|
||||||
specialArgs = {inherit inputs username;};
|
specialArgs = {inherit inputs settings;};
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./systems/desktop.nix
|
./systems/desktop.nix
|
||||||
|
|
@ -77,6 +74,11 @@
|
||||||
nixpkgs.flake = nixpkgs;
|
nixpkgs.flake = nixpkgs;
|
||||||
suckless.flake = suckless;
|
suckless.flake = suckless;
|
||||||
};
|
};
|
||||||
|
settings = {
|
||||||
|
experimental-features = ["nix-command" "flakes"];
|
||||||
|
auto-optimise-store = true;
|
||||||
|
warn-dirty = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
|
@ -84,9 +86,9 @@
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = false;
|
useUserPackages = false;
|
||||||
extraSpecialArgs = {inherit spicetify-nix username;};
|
extraSpecialArgs = {inherit spicetify-nix settings;};
|
||||||
users = {
|
users = {
|
||||||
${username} = import ./home-manager/home.nix;
|
${settings.username} = import ./home-manager/home.nix;
|
||||||
root = import ./home-manager/root.nix;
|
root = import ./home-manager/root.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,6 @@
|
||||||
"MIN_WIDTH": 0,
|
"MIN_WIDTH": 0,
|
||||||
"MIN_HEIGHT": 0,
|
"MIN_HEIGHT": 0,
|
||||||
"OPEN_ON_STARTUP": false,
|
"OPEN_ON_STARTUP": false,
|
||||||
"MINIMIZE_TO_TRAY": false
|
"MINIMIZE_TO_TRAY": false,
|
||||||
|
"SKIP_HOST_UPDATE": true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.gitMinimal;
|
|
||||||
userName = "ISnortPennies";
|
|
||||||
userEmail = "ISnortPennies@protonmail.com";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
settings,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -9,14 +8,13 @@
|
||||||
./sxhkd.nix
|
./sxhkd.nix
|
||||||
./theme.nix
|
./theme.nix
|
||||||
./picom.nix
|
./picom.nix
|
||||||
./git.nix
|
|
||||||
./spicetify.nix
|
./spicetify.nix
|
||||||
./neovim
|
./neovim
|
||||||
];
|
];
|
||||||
xsession.numlock.enable = true;
|
xsession.numlock.enable = true;
|
||||||
home = {
|
home = {
|
||||||
homeDirectory = "/home/${username}";
|
homeDirectory = "/home/${settings.username}";
|
||||||
stateVersion = "23.05";
|
stateVersion = settings.version;
|
||||||
file = {
|
file = {
|
||||||
".background-image".source = ../images/nix-stars.png;
|
".background-image".source = ../images/nix-stars.png;
|
||||||
".config" = {
|
".config" = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
programs = {
|
programs = {
|
||||||
librewolf = {
|
librewolf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ vim.g.indentLine_setConceal = 0
|
||||||
vim.g.loaded = 1
|
vim.g.loaded = 1
|
||||||
vim.g.loaded_netrwPlugin = 1
|
vim.g.loaded_netrwPlugin = 1
|
||||||
require("nvim-tree").setup {
|
require("nvim-tree").setup {
|
||||||
open_on_setup = true,
|
open_on_setup = false,
|
||||||
sort_by = "case_sensitive",
|
sort_by = "case_sensitive",
|
||||||
view = {
|
view = {
|
||||||
adaptive_size = true,
|
adaptive_size = true,
|
||||||
|
|
@ -63,7 +63,9 @@ vim.cmd[[colorscheme moonfly]]
|
||||||
-- pretty colors
|
-- pretty colors
|
||||||
require("colorizer").setup()
|
require("colorizer").setup()
|
||||||
require("telescope").load_extension("fzy_native")
|
require("telescope").load_extension("fzy_native")
|
||||||
require("gitsigns").setup()
|
require("gitsigns").setup {
|
||||||
|
current_line_blame = true,
|
||||||
|
}
|
||||||
require("nvim-autopairs").setup()
|
require("nvim-autopairs").setup()
|
||||||
|
|
||||||
-- telescope keybinds
|
-- telescope keybinds
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,12 @@
|
||||||
{
|
{settings, ...}: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
imports = [
|
||||||
./theme.nix
|
./theme.nix
|
||||||
./git.nix
|
|
||||||
./neovim
|
./neovim
|
||||||
];
|
];
|
||||||
home = {
|
home = {
|
||||||
username = "root";
|
username = "root";
|
||||||
homeDirectory = "/root";
|
homeDirectory = "/root";
|
||||||
stateVersion = "23.05";
|
stateVersion = settings.version;
|
||||||
file = {
|
file = {
|
||||||
".config/neofetch/config.conf" = {
|
".config/neofetch/config.conf" = {
|
||||||
source = ./config/neofetch/config.conf;
|
source = ./config/neofetch/config.conf;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
|
||||||
spicetify-nix,
|
spicetify-nix,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
{
|
{pkgs, ...}: {
|
||||||
pkgs,
|
|
||||||
home-manager,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = {
|
theme = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
boot.initrd.kernelModules = ["amdgpu"];
|
|
||||||
hardware.opengl = {
|
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
boot = {
|
boot = {
|
||||||
blacklistedKernelModules = ["nouveau" "lbm-nouveau" "pcspkr"];
|
blacklistedKernelModules = ["nouveau" "lbm-nouveau" "pcspkr"];
|
||||||
kernelParams = ["fbcon=nodefer" "bgrt_disable" "quiet" "splash"];
|
kernelParams = ["fbcon=nodefer" "bgrt_disable" "quiet" "splash"];
|
||||||
|
|
|
||||||
15
modules/git.nix
Normal file
15
modules/git.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.gitMinimal;
|
||||||
|
config = {
|
||||||
|
user = {
|
||||||
|
name = "ISnortPennies";
|
||||||
|
email = "ISnortPennies@protonmail.com";
|
||||||
|
};
|
||||||
|
init = {
|
||||||
|
defaultBranch = "master";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
modules/mining.nix
Normal file
27
modules/mining.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
settings,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
boot = {
|
||||||
|
kernelModules = ["msr"];
|
||||||
|
kernelParams = ["iomem=relaxed" "msr.allow_writes=on"];
|
||||||
|
};
|
||||||
|
systemd.services.mining = {
|
||||||
|
enable = true;
|
||||||
|
path = with pkgs; [t-rex-miner afk-cmds st zsh dbus xmrig];
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
wants = ["graphical.target"];
|
||||||
|
script = ''
|
||||||
|
afk-cmds -c /home/${settings.username}/afk-cmds.json
|
||||||
|
'';
|
||||||
|
environment = {
|
||||||
|
# PATH="/run/current-system/sw/bin"; missing something with dbus
|
||||||
|
XAUTHORITY = "/home/${settings.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,14 +0,0 @@
|
||||||
{config, ...}: {
|
|
||||||
hardware = {
|
|
||||||
nvidia = {
|
|
||||||
nvidiaPersistenced = false;
|
|
||||||
nvidiaSettings = false;
|
|
||||||
modesetting.enable = true;
|
|
||||||
};
|
|
||||||
opengl = {
|
|
||||||
enable = true;
|
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
@ -13,7 +12,6 @@
|
||||||
btrfs-progs #for external harddrive
|
btrfs-progs #for external harddrive
|
||||||
vlc #play stuff
|
vlc #play stuff
|
||||||
bitwarden #store stuff
|
bitwarden #store stuff
|
||||||
gimp #edit stuff
|
|
||||||
qbittorrent #steal stuff
|
qbittorrent #steal stuff
|
||||||
discord # talk to people (gross)
|
discord # talk to people (gross)
|
||||||
feh #for wallpaper
|
feh #for wallpaper
|
||||||
|
|
@ -32,5 +30,6 @@
|
||||||
pcmanfm #file manager
|
pcmanfm #file manager
|
||||||
nix-tree #view packages
|
nix-tree #view packages
|
||||||
bc #terminal calculator
|
bc #terminal calculator
|
||||||
|
page #use nvim as a pager
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
19
modules/parrot.nix
Normal file
19
modules/parrot.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
settings,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
#discord bot stuff
|
||||||
|
virtualisation.docker.enable = false;
|
||||||
|
systemd.services.parrot = {
|
||||||
|
enable = true;
|
||||||
|
path = with pkgs; [parrot yt-dlp ffmpeg];
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
wants = ["NetworkManager-wait-online.service"];
|
||||||
|
after = ["NetworkManager-wait-online.service"];
|
||||||
|
script = "parrot";
|
||||||
|
serviceConfig = {
|
||||||
|
EnvironmentFile = "/home/${settings.username}/parrot/.env";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,15 @@
|
||||||
{config, ...}: {
|
{
|
||||||
hardware.nvidia.prime = {
|
hardware.nvidia.prime = {
|
||||||
sync.enable = true;
|
sync.enable = true;
|
||||||
amdgpuBusId = "PCI:5:0:0";
|
amdgpuBusId = "PCI:5:0:0";
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
nvidia = {
|
||||||
|
nvidiaPersistenced = false;
|
||||||
|
nvidiaSettings = false;
|
||||||
|
modesetting.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.xserver = {
|
||||||
|
videoDrivers = ["modesetting" "nvidia"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,26 @@
|
||||||
{
|
{
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
xrandrHeads = [
|
#set drivers for igpu
|
||||||
{
|
videoDrivers = ["amdgpu"];
|
||||||
output = "HDMI-0";
|
#fix nasty screen tearing
|
||||||
primary = true;
|
|
||||||
monitorConfig = ''
|
|
||||||
Option "DPMS" "false"
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
screenSection = ''
|
screenSection = ''
|
||||||
Option "metamodes" "1920x1080_144 +0+0"
|
Option "TearFree" "true"
|
||||||
'';
|
'';
|
||||||
|
#set monitor as primary
|
||||||
|
#set refreshrate to 144 instead of default(60)
|
||||||
|
#disable DPMS(screen turning off)
|
||||||
monitorSection = ''
|
monitorSection = ''
|
||||||
|
Option "Primary" "true"
|
||||||
|
Modeline "1920x1080_144" 332.75 1920 1952 2016 2080 1080 1084 1089 1111 +HSync +VSync
|
||||||
|
Option "PreferredMode" "1920x1080_144"
|
||||||
Option "DPMS" "false"
|
Option "DPMS" "false"
|
||||||
'';
|
'';
|
||||||
|
#disable screen blanking in total
|
||||||
serverFlagsSection = ''
|
serverFlagsSection = ''
|
||||||
Option "BlankTime" "0"
|
|
||||||
Option "StandbyTime" "0"
|
Option "StandbyTime" "0"
|
||||||
Option "SuspendTime" "0"
|
Option "SuspendTime" "0"
|
||||||
Option "OffTime" "0"
|
Option "OffTime" "0"
|
||||||
Option "DPMS" "false"
|
Option "BlankTime" "0"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
{
|
{pkgs, ...}: let
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
update-system = pkgs.writeShellScriptBin "update-system" ''
|
update-system = pkgs.writeShellScriptBin "update-system" ''
|
||||||
if ! [ $(id -u) = 0 ]; then
|
if ! [ $(id -u) = 0 ]; then
|
||||||
echo "RUN AS ROOT"
|
echo "RUN AS ROOT"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{username, ...}: {
|
{settings, ...}: {
|
||||||
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 = {
|
||||||
allowedTCPPorts = [139 445];
|
allowedTCPPorts = [139 445];
|
||||||
|
|
@ -10,11 +10,11 @@
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
shares = {
|
shares = {
|
||||||
Share = {
|
Share = {
|
||||||
path = "/home/${username}/Share";
|
path = "/home/${settings.username}/Share";
|
||||||
browseable = "no";
|
browseable = "no";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"guest ok" = "no";
|
"guest ok" = "no";
|
||||||
"force user" = "${username}";
|
"force user" = "${settings.username}";
|
||||||
"force group" = "users";
|
"force group" = "users";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
settings,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
boot = {
|
boot = {
|
||||||
kernelParams = ["amd_iommu=on" "iommu=pt" "vfio_iommu_type1.allow_unsafe_interrupts=1" "kvm.ignore_msrs=1"];
|
kernelParams = ["amd_iommu=on" "iommu=pt" "vfio_iommu_type1.allow_unsafe_interrupts=1" "kvm.ignore_msrs=1"];
|
||||||
kernelModules = ["vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio"];
|
kernelModules = ["amd-kvm" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio"];
|
||||||
initrd.kernelModules = ["vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio"];
|
initrd.kernelModules = ["vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio"];
|
||||||
extraModprobeConfig = ''
|
extraModprobeConfig = ''
|
||||||
options vfio-pci ids=10de:228e,10de:2504
|
options vfio-pci ids=10de:228e,10de:2504
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
runAsRoot = true;
|
runAsRoot = true;
|
||||||
ovmf.enable = true;
|
ovmf.enable = true;
|
||||||
verbatimConfig = ''
|
verbatimConfig = ''
|
||||||
user = "${username}"
|
user = "${settings.username}"
|
||||||
group = "kvm"
|
group = "kvm"
|
||||||
namespaces = []
|
namespaces = []
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,11 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
settings,
|
||||||
inputs,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
videoDrivers =
|
exportConfiguration = true; #make config debuggable
|
||||||
if (config.networking.hostName == "gerg-laptop")
|
|
||||||
then ["modesetting" "nvidia"]
|
|
||||||
else ["amdgpu"];
|
|
||||||
layout = "us";
|
layout = "us";
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
xautolock.enable = false;
|
xautolock.enable = false;
|
||||||
|
|
@ -25,7 +20,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
[greeter]
|
[greeter]
|
||||||
user = ${username}
|
user = ${settings.username}
|
||||||
show-password-label = false
|
show-password-label = false
|
||||||
password-label-text =
|
password-label-text =
|
||||||
invalid-password-text =
|
invalid-password-text =
|
||||||
|
|
@ -62,7 +57,6 @@
|
||||||
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
|
||||||
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,10 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
callPackage,
|
settings,
|
||||||
lib,
|
|
||||||
username,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
#important stuff first
|
#important stuff first
|
||||||
imports = [
|
imports = [
|
||||||
../modules/amd.nix
|
|
||||||
../modules/packages.nix
|
../modules/packages.nix
|
||||||
../modules/boot.nix
|
../modules/boot.nix
|
||||||
../modules/fonts.nix
|
../modules/fonts.nix
|
||||||
|
|
@ -18,29 +14,31 @@
|
||||||
../modules/xserver.nix
|
../modules/xserver.nix
|
||||||
../modules/smb.nix
|
../modules/smb.nix
|
||||||
../modules/zsh.nix
|
../modules/zsh.nix
|
||||||
|
../modules/git.nix
|
||||||
|
#../modules/mining.nix
|
||||||
|
../modules/parrot.nix
|
||||||
];
|
];
|
||||||
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
|
|
||||||
xmrig
|
|
||||||
t-rex-miner
|
|
||||||
vscodium
|
vscodium
|
||||||
|
gimp
|
||||||
];
|
];
|
||||||
#user managment
|
#user managment
|
||||||
users = {
|
users = {
|
||||||
defaultUserShell = pkgs.zsh;
|
defaultUserShell = pkgs.zsh;
|
||||||
users."${username}" = {
|
users."${settings.username}" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel" "audio" "networkmanager" "kvm" "libvirtd"];
|
extraGroups = ["wheel" "audio" "networkmanager" "kvm" "libvirtd"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "uas" "sd_mod"];
|
initrd = {
|
||||||
kernelModules = ["kvm-amd" "msr"];
|
kernelModules = ["amdgpu"];
|
||||||
kernelParams = ["iomem=relaxed" "msr.allow_writes=on"];
|
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "uas" "sd_mod"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
|
|
@ -53,34 +51,4 @@
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#discord bot stuff
|
|
||||||
virtualisation.docker.enable = false;
|
|
||||||
systemd.services.parrot = {
|
|
||||||
enable = true;
|
|
||||||
path = with pkgs; [parrot yt-dlp ffmpeg];
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
wants = ["NetworkManager-wait-online.service"];
|
|
||||||
after = ["NetworkManager-wait-online.service"];
|
|
||||||
script = "parrot";
|
|
||||||
serviceConfig = {
|
|
||||||
EnvironmentFile = "/home/${username}/parrot/.env";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
#mining stuff
|
|
||||||
systemd.services.mining = {
|
|
||||||
enable = false;
|
|
||||||
path = with pkgs; [t-rex-miner afk-cmds st zsh dbus xmrig];
|
|
||||||
wants = ["graphical.target"];
|
|
||||||
script = ''
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,15 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
callPackage,
|
settings,
|
||||||
lib,
|
|
||||||
username,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
#important stuff first
|
#important stuff first
|
||||||
imports = [
|
imports = [
|
||||||
../modules/boot.nix
|
../modules/boot.nix
|
||||||
../modules/prime.nix
|
|
||||||
../modules/nvidia.nix
|
|
||||||
../modules/packages.nix
|
|
||||||
../modules/fonts.nix
|
../modules/fonts.nix
|
||||||
|
../modules/git.nix
|
||||||
|
../modules/packages.nix
|
||||||
|
../modules/prime.nix
|
||||||
../modules/scripts.nix
|
../modules/scripts.nix
|
||||||
../modules/xserver.nix
|
../modules/xserver.nix
|
||||||
../modules/zsh.nix
|
../modules/zsh.nix
|
||||||
|
|
@ -22,13 +19,14 @@
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
# end important stuff
|
# end important stuff
|
||||||
environment.systemPackages = with pkgs; [
|
#environment.systemPackages = with pkgs; [
|
||||||
xorg.xf86videoamdgpu
|
# xorg.xf86videoamdgpu
|
||||||
];
|
#];
|
||||||
|
#don't think i need this^
|
||||||
# user managment
|
# user managment
|
||||||
users = {
|
users = {
|
||||||
defaultUserShell = pkgs.zsh;
|
defaultUserShell = pkgs.zsh;
|
||||||
users."${username}" = {
|
users."${settings.username}" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel" "audio" "networkmanager"];
|
extraGroups = ["wheel" "audio" "networkmanager"];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue