mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2026-05-07 09:26:25 +00:00
feat: add ideapad host
This commit is contained in:
parent
bf7e249d5b
commit
7cfc801165
10 changed files with 152 additions and 5 deletions
|
|
@ -58,6 +58,10 @@
|
||||||
specialArgs = { inherit inputs rootPath; };
|
specialArgs = { inherit inputs rootPath; };
|
||||||
modules = [ ./hosts/vps/configuration.nix ];
|
modules = [ ./hosts/vps/configuration.nix ];
|
||||||
};
|
};
|
||||||
|
ideapad = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = { inherit inputs rootPath; };
|
||||||
|
modules = [ ./hosts/ideapad/configuration.nix ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
|
|
@ -76,6 +80,11 @@
|
||||||
extraSpecialArgs = { inherit inputs rootPath; };
|
extraSpecialArgs = { inherit inputs rootPath; };
|
||||||
modules = [ ./home/hosts/y2q.nix ];
|
modules = [ ./home/hosts/y2q.nix ];
|
||||||
};
|
};
|
||||||
|
"toast@ideapad" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
extraSpecialArgs = { inherit inputs rootPath; };
|
||||||
|
modules = [ ./home/hosts/ideapad.nix ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells = forAllSystems (system:
|
devShells = forAllSystems (system:
|
||||||
|
|
|
||||||
37
home/hosts/ideapad.nix
Normal file
37
home/hosts/ideapad.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
{ inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.nixvim.homeModules.nixvim
|
||||||
|
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
|
|
||||||
|
../modules/graphical/waybar
|
||||||
|
../modules/graphical/cliphist.nix
|
||||||
|
../modules/graphical/dunst.nix
|
||||||
|
../modules/graphical/firefox.nix
|
||||||
|
../modules/graphical/fonts.nix
|
||||||
|
../modules/graphical/hypridle.nix
|
||||||
|
../modules/graphical/hyprland.nix
|
||||||
|
../modules/graphical/hyprshot-save.nix
|
||||||
|
../modules/graphical/kitty.nix
|
||||||
|
../modules/graphical/powermenu.nix
|
||||||
|
../modules/graphical/tofi.nix
|
||||||
|
../modules/graphical/udiskie.nix
|
||||||
|
../modules/graphical/xdg.nix
|
||||||
|
] ++ (
|
||||||
|
let
|
||||||
|
modulesPath = ../modules;
|
||||||
|
cliModules = builtins.attrNames (builtins.readDir (modulesPath + "/cli/"));
|
||||||
|
in
|
||||||
|
map (module: modulesPath + "/cli/${module}") cliModules
|
||||||
|
);
|
||||||
|
home = {
|
||||||
|
username = "toast";
|
||||||
|
homeDirectory = "/home/toast";
|
||||||
|
stateVersion = "24.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
systemd.user.startServices = "sd-switch";
|
||||||
|
}
|
||||||
35
hosts/ideapad/configuration.nix
Normal file
35
hosts/ideapad/configuration.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{ inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
|
./hardware-configuration.nix
|
||||||
|
] ++ [
|
||||||
|
../../modules/core/packages.nix
|
||||||
|
../../modules/core/time.nix
|
||||||
|
../../modules/core/sops.nix
|
||||||
|
../../modules/graphical/environment.nix
|
||||||
|
../../modules/graphical/greetd.nix
|
||||||
|
../../modules/graphical/hyprland.nix
|
||||||
|
../../modules/graphical/thunar.nix
|
||||||
|
../../modules/graphical/xfconf.nix
|
||||||
|
../../modules/graphical/xserver.nix
|
||||||
|
../../modules/programs/nh.nix
|
||||||
|
../../modules/programs/nix-ld.nix
|
||||||
|
../../modules/programs/ssh.nix
|
||||||
|
../../modules/programs/ydotool.nix
|
||||||
|
../../modules/programs/zsh.nix
|
||||||
|
../../modules/services/tailscale.nix
|
||||||
|
../../modules/services/udisks2.nix
|
||||||
|
../../modules/services/zerotierone.nix
|
||||||
|
../../modules/services/openssh.nix
|
||||||
|
./modules/boot.nix
|
||||||
|
./modules/network.nix
|
||||||
|
./modules/users.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
}
|
||||||
34
hosts/ideapad/hardware-configuration.nix
Normal file
34
hosts/ideapad/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
# 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" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/da94d155-0fae-4f33-bca3-cdc55aabe718";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/8EC8-E915";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/3d1e5589-d677-4c37-803e-45e2866d59b4"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
|
|
||||||
12
hosts/ideapad/modules/boot.nix
Normal file
12
hosts/ideapad/modules/boot.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.supportedFilesystems = [ "ntfs" ];
|
||||||
|
|
||||||
|
boot.lanzaboote = {
|
||||||
|
enable = true;
|
||||||
|
pkiBundle = "/var/lib/sbctl";
|
||||||
|
};
|
||||||
|
}
|
||||||
5
hosts/ideapad/modules/network.nix
Normal file
5
hosts/ideapad/modules/network.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
networking.hostName = "ideapad";
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
}
|
||||||
11
hosts/ideapad/modules/users.nix
Normal file
11
hosts/ideapad/modules/users.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
users.users.toast = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "toast";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" "ydotool" ];
|
||||||
|
packages = with pkgs; [];
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
}
|
||||||
3
hosts/nixos/modules/services/xserver.nix
Normal file
3
hosts/nixos/modules/services/xserver.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,11 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
|
||||||
|
./modules/boot.nix
|
||||||
|
./modules/network.nix
|
||||||
|
./modules/users.nix
|
||||||
|
|
||||||
../../modules/core/filesystem.nix
|
../../modules/core/filesystem.nix
|
||||||
../../modules/core/sops.nix
|
../../modules/core/sops.nix
|
||||||
../../modules/services/tailscale.nix
|
../../modules/services/tailscale.nix
|
||||||
|
|
@ -13,10 +18,7 @@
|
||||||
../../modules/services/trilium-server.nix
|
../../modules/services/trilium-server.nix
|
||||||
../../modules/services/vaultwarden.nix
|
../../modules/services/vaultwarden.nix
|
||||||
../../modules/services/zipline.nix
|
../../modules/services/zipline.nix
|
||||||
./modules/boot.nix
|
./modules/services/tailscale.nix
|
||||||
./modules/network.nix
|
|
||||||
./modules/users.nix
|
|
||||||
./modules/tailscale.nix
|
|
||||||
./modules/services/restic.nix
|
./modules/services/restic.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,5 @@
|
||||||
{
|
{
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
xkb.layout = "us";
|
xkb.layout = "us";
|
||||||
videoDrivers = [ "nvidia" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue