Skip to content

Commit

Permalink
Update b4d14 desktop (#4)
Browse files Browse the repository at this point in the history
* feat: update b4d14 laptop

* feat: use system wide home-manager

* feat: update user configuration

* feat: fix stylix wallpaper

* feat: update flake
  • Loading branch information
badele authored Nov 23, 2024
1 parent b11a3dd commit 7254f34
Show file tree
Hide file tree
Showing 9 changed files with 157 additions and 125 deletions.
98 changes: 41 additions & 57 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 26 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
# hardware.url = "github:badele/fork-nixos-hardware/xps-15-9530";
hardware.url = "github:NixOS/nixos-hardware/master";

impermanence = {
url = "github:nix-community/impermanence";
};
impermanence = { url = "github:nix-community/impermanence"; };

nur = {
url = "github:nix-community/NUR";
Expand Down Expand Up @@ -70,12 +68,8 @@
# Your custom packages
# Acessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system:
let
pkgs = import nixpkgs {
inherit system;
};
in
import ./nix/pkgs { inherit pkgs; });
let pkgs = import nixpkgs { inherit system; };
in import ./nix/pkgs { inherit pkgs; });
# Devshell for bootstrapping
# Acessible through 'nix develop' or 'nix-shell' (legacy)
devShells = forAllSystems (system:
Expand Down Expand Up @@ -135,7 +129,29 @@

b4d14 = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [ inputs.sops-nix.nixosModules.sops ./hosts/b4d14 ];
modules = [
inputs.sops-nix.nixosModules.sops
./hosts/b4d14

home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
verbose = true;
users = {
root = import ./users/root/b4d14.nix;
badele = {
imports = [
nur.nixosModules.nur
stylix.homeManagerModules.stylix
./users/badele/b4d14.nix
];
};
};
};
}
];
};

badxps = nixpkgs.lib.nixosSystem {
Expand Down
37 changes: 19 additions & 18 deletions hosts/b4d14/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
##########################################################
# #########################################################
# NIXOS (hosts)
##########################################################
{ inputs
, config
, pkgs
, lib
, ...
}:
{
{ inputs, config, pkgs, lib, ... }: {
imports = [
./hardware-configuration.nix

# https://github.com/NixOS/nixos-hardware/tree/master/dell/xps/15-9530
inputs.hardware.nixosModules.dell-xps-15-9530-intel
# https://github.com/NixOS/nixos-hardware/tree/master/dell/xps/15-9520
inputs.hardware.nixosModules.dell-xps-15-9520
../../nix/modules/nixos/host.nix

# Users
Expand Down Expand Up @@ -59,7 +53,15 @@
};

initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "sr_mod" "rtsx_pci_sdmmc" ];
availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"sd_mod"
"sr_mod"
"rtsx_pci_sdmmc"
];
kernelModules = [ "zfs" ];
};
};
Expand All @@ -78,8 +80,7 @@
####################################
# Hardware
####################################
videoDrivers = [ "intel" "i965" "nvidia" ];

# videoDrivers = [ "intel" "i965" "nvidia" ];

# Nvidia
# hardware.opengl.enable = true;
Expand All @@ -89,9 +90,11 @@
# hardware.bumblebee.pmMethod = See dell-xps-15-9530

# Pulseaudio
services.pipewire.enable = false;
hardware.pulseaudio = {
enable = true;
support32Bit = true; ## If compatibility with 32-bit applications is desired
support32Bit =
true; # # If compatibility with 32-bit applications is desired
#extraConfig = "load-module module-combine-sink";
};

Expand All @@ -102,9 +105,7 @@
# Programs
####################################
powerManagement.powertop.enable = true;
programs = {
dconf.enable = true;
};
programs = { dconf.enable = true; };

####################################
# Secrets
Expand All @@ -123,5 +124,5 @@
};

nixpkgs.hostPlatform.system = "x86_64-linux";
system.stateVersion = "22.11";
system.stateVersion = "24.05";
}
8 changes: 5 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ precommit-install:
@flake-update:
nix flake update

# @flake-sync-registry:
# nix flake metadata --json | jq -r '.locks.nodes."nixpkgs".locked.rev'
# nix flake metadata --json | jq -r '.locks.nodes."home-manager".locked.rev'
# Sync the nix registry with the current running nix version
@flake-sync-registry:
nix registry pin nixpkgs github:NixOS/nixpkgs/$(nix flake metadata --json | jq -r '.locks.nodes."nixpkgs".locked.rev')
# nix flake metadata --json | jq -r '.locks.nodes."nixpkgs".locked.rev'
# nix flake metadata --json | jq -r '.locks.nodes."home-manager".locked.rev'

# Check the nix homelab configuration
@flake-check:
Expand Down
2 changes: 1 addition & 1 deletion nix/home-manager/features/desktop/apps/fonts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

home.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-cjk-sans
noto-fonts-emoji
liberation_ttf
fira-code
Expand Down
Loading

0 comments on commit 7254f34

Please sign in to comment.