Compare commits
10 Commits
6d987978c0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| b9d78079d2 | |||
| 07b9b65382 | |||
| 58bbf942d8 | |||
| aeee74c4ad | |||
| 5bcfe2dc8b | |||
| ae327d6d22 | |||
| 8f71ce170f | |||
| 5b5df9b66f | |||
| 25401f8a5b | |||
| 84ef15e3d1 |
75
default.nix
75
default.nix
@@ -2,47 +2,73 @@
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
||||
(import ./disko.nix { device1 = "/dev/nvme0n1"; device2 = "/dev/nvme1n1"; device3 = "/dev/sda"; })
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
hardware = {
|
||||
services = {
|
||||
xserver = {
|
||||
enable = false;
|
||||
videoDrivers = ["nvidia"];
|
||||
};
|
||||
displayManager = {
|
||||
enable = false;
|
||||
defaultSession = "hyprland";
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "nathan";
|
||||
};
|
||||
};
|
||||
pulseaudio.enable = false;
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
hardware.openrgb = {
|
||||
enable = true;
|
||||
motherboard = "amd";
|
||||
};
|
||||
};
|
||||
|
||||
bluetooth.enable = true;
|
||||
|
||||
hardware.nvidia = {
|
||||
open = true;
|
||||
modesetting.enable = true;
|
||||
nvidiaPersistenced = true;
|
||||
};
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/var/lib/sops/age/keys.txt";
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
|
||||
secrets = {
|
||||
"nathan/pass" = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
|
||||
remoteBuildKey = {};
|
||||
};
|
||||
};
|
||||
|
||||
sysconfig = {
|
||||
|
||||
docker.nvidia = true;
|
||||
|
||||
remoteBuildClient = false;
|
||||
|
||||
users = {
|
||||
nathan = {
|
||||
isSuperuser = true;
|
||||
extraGroups = [ "networkmanager" ];
|
||||
hashedPasswordFile = config.sops.secrets."nathan/pass".path;
|
||||
extraGroups = [ "networkmanager" "docker" ];
|
||||
ssh.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAsU69CxfQk58CvItPN426h5Alnpb60SH37wet97Vb57 nathan@laptop"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEnUhN2uHwAJF/SLRX3wlGRmfhV3zpP88JQAYB+gh8jW nathan@localhost"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
hashedPasswordFile = config.sops.secrets."nathan/pass".path;
|
||||
home-manager = {
|
||||
enable = true;
|
||||
standalone = false;
|
||||
@@ -50,25 +76,24 @@
|
||||
{
|
||||
homeconfig = {
|
||||
minimal = false;
|
||||
hyprland.enable = true;
|
||||
hyprlock.enable = true;
|
||||
hyprland.enable = false;
|
||||
hyprlock.enable = false;
|
||||
wal.enable = true;
|
||||
mpd.enable = true;
|
||||
hyprpanel.enable = true;
|
||||
hyprpanel.enable = false;
|
||||
calcurse.enable = true;
|
||||
rofi.enable = true;
|
||||
firefox.enable = true;
|
||||
rofi.enable = false;
|
||||
firefox.enable = false;
|
||||
git.enable = true;
|
||||
nh.enable = true;
|
||||
};
|
||||
|
||||
#monitor=eDP-1, addreserved, 40,0,0,0
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
monitor=eDP-1,1920x1080@60,0x0,1
|
||||
bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi'
|
||||
bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
|
||||
'';
|
||||
services.hypridle.enable = lib.mkForce false;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
wayvnc
|
||||
openrgb
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
@@ -77,8 +102,6 @@
|
||||
};
|
||||
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
||||
Reference in New Issue
Block a user