Compare commits

...

7 Commits

11 changed files with 153 additions and 39 deletions

View File

@ -11,6 +11,7 @@
efiSupport = true;
device = "nodev";
configurationLimit = 5;
useOSProber = true;
};
};
@ -25,7 +26,7 @@
};
services.logind = {
lidSwitch = "lock";
lidSwitch = "suspend-then-hibernate";
extraConfig = ''
HandlePowerKey=suspend-then-hibernate
IdleAction=suspend-then-hibernate

View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1704099619,
"narHash": "sha256-QRVMkdxLmv+aKGjcgeEg31xtJEIsYq4i1Kbyw5EPS6g=",
"lastModified": 1704980875,
"narHash": "sha256-IPZmMjk5f4TBbEpzUFBc3OC1W6OwDNEXk2w/0uVXX1o=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7e398b3d76bc1503171b1364c9d4a07ac06f3851",
"rev": "5f0ab0eedc6ede69beb8f45561ffefa54edc6e65",
"type": "github"
},
"original": {
@ -21,13 +21,29 @@
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1705072780,
"narHash": "sha256-PDUkKRjy27NZdCdqcr4wh7in/AqqsHUeILGikwEcbTc=",
"owner": "mandlm",
"repo": "nixos-hardware",
"rev": "9343249680cbaafb7221c12960b9b2985ffceb3b",
"type": "github"
},
"original": {
"owner": "mandlm",
"ref": "p330",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1704420045,
"narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=",
"lastModified": 1704874635,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
"type": "github"
},
"original": {
@ -39,11 +55,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1704538339,
"narHash": "sha256-1734d3mQuux9ySvwf6axRWZRBhtcZA9Q8eftD6EZg6U=",
"lastModified": 1704722960,
"narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "46ae0210ce163b3cba6c7da08840c1d63de9c701",
"rev": "317484b1ead87b9c1b8ac5261a8d2dd748a0492d",
"type": "github"
},
"original": {
@ -56,6 +72,7 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}

View File

@ -3,13 +3,15 @@
nixpkgs.url = github:NixOS/nixpkgs/nixos-23.11;
nixpkgs-unstable.url = github:NixOS/nixpkgs/nixos-unstable;
nixos-hardware.url = github:mandlm/nixos-hardware/p330;
home-manager = {
url = github:nix-community/home-manager/release-23.11;
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager }:
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager }:
let
user = "mandlm";
theme = "dark"; # dark or light
@ -83,6 +85,7 @@
./users.nix
./machines/p330/configuration.nix
./machines/p330/hardware-configuration.nix
nixos-hardware.nixosModules.lenovo-thinkstation-p330
home-manager.nixosModules.home-manager
{
@ -124,6 +127,32 @@
}
];
};
xps = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
./greetd.nix
./users.nix
./machines/xps/configuration.nix
./machines/xps/hardware-configuration.nix
nixos-hardware.nixosModules.dell-xps-13-9320
home-manager.nixosModules.home-manager
{
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user theme; };
home-manager.users.${user} = {
imports = [
./home-${user}.nix
./machines/xps/home-${user}.nix
];
nixpkgs.config = nixpkgs-config;
nixpkgs.overlays = [ overlay-unstable ];
};
}
];
};
};
};
}

View File

@ -0,0 +1,8 @@
{ config, lib, pkgs, user, ... }:
{
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
}

View File

@ -126,7 +126,6 @@ in
startup = [
{ command = "keepassxc"; }
{ command = "nextcloud"; }
{ command = "swaymsg 'workspace 1"; }
{ command = "kitty"; }
{ command = "swaymsg 'workspace 2"; }

View File

@ -9,15 +9,10 @@
icons = "awesome6";
blocks = [
{
block = "cpu";
interval = 1;
format = " $icon $barchart $frequency ";
}
{
block = "battery";
missing_format = "";
format = " $icon $time $percentage ";
format = " $icon {($time h) |}$percentage ";
}
{
block = "time";

View File

@ -19,7 +19,6 @@
gcc
slack
thunderbird
nextcloud-client
keepassxc
tree
light
@ -41,6 +40,7 @@
programs.home-manager.enable = true;
imports = [
./home-manager/nextcloud.nix
./home-manager/firefox.nix
./home-manager/fzf.nix
./home-manager/git.nix

View File

@ -6,10 +6,8 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
boot.initrd.availableKernelModules = [ "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices = {
crypted = {
@ -46,21 +44,4 @@
[{ device = "/dev/disk/by-uuid/b90199d6-05e8-4994-bf9d-7b07f10d583e"; }];
networking.useDHCP = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# GPU acceleration
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
driSupport = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
networking.hostName = "xps";
boot.loader.grub.enableCryptodisk = true;
}

View File

@ -0,0 +1,66 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices = {
nixos = {
device = "/dev/disk/by-uuid/1d5f812e-300f-4858-a136-3dc85ac0e0c4";
preLVM = true;
};
};
fileSystems."/" =
{
device = "/dev/disk/by-uuid/058b1bb0-c825-48e6-b951-9b93b6035ca9";
fsType = "ext4";
};
fileSystems."/home" =
{
device = "/dev/disk/by-uuid/cd7339d9-c5fb-47ff-bff0-38cd1f725241";
fsType = "ext4";
};
fileSystems."/var/lib/docker" =
{
device = "/dev/disk/by-uuid/b8c81698-4410-4b16-9293-f076772ce4f9";
fsType = "ext4";
};
fileSystems."/nix" =
{
device = "/dev/disk/by-uuid/ba748b3f-178c-4e3c-9314-66cd5d070e1c";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/EE44-9788";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/028125a3-2772-4aad-b901-d08783b85f83"; }];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s13f0u1u4u4.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -0,0 +1,11 @@
{ config, lib, pkgs, user, ... }:
{
wayland.windowManager.sway.config = {
output = {
eDP-1 = {
scale = "1.3";
};
};
};
}