add hardware config
This commit is contained in:
parent
1a5d89af7a
commit
7cc67eda0f
7 changed files with 66 additions and 40 deletions
17
flake.lock
generated
17
flake.lock
generated
|
|
@ -20,6 +20,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1680876084,
|
||||||
|
"narHash": "sha256-eP9yxP0wc7XuVaODugh+ajgbFGaile2O1ihxiLxOuvU=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "3006d2860a6ed5e01b0c3e7ffb730e9b293116e2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681920287,
|
"lastModified": 1681920287,
|
||||||
|
|
@ -39,6 +55,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,22 +3,23 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, ... }:
|
outputs = { self, nixpkgs, home-manager, nixos-hardware, ... }:
|
||||||
let
|
let
|
||||||
username = "e";
|
username = "e";
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = (
|
nixosConfigurations = (
|
||||||
import ./hosts {
|
import ./hosts {
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
inherit nixos-hardware;
|
||||||
inherit nixpkgs home-manager username;
|
inherit nixpkgs home-manager username;
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,16 @@
|
||||||
{
|
{
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
networking.networkmanager.enable = true;
|
||||||
time.timeZone = "America/Chicago";
|
time.timeZone = "America/Chicago";
|
||||||
users.users.${username} = {
|
users.users.${username} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"plugdev"
|
||||||
|
"video"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
environment.systemPackages = with pkgs; [
|
users.groups.plugdev = {};
|
||||||
curl
|
system.stateVersion = "22.11";
|
||||||
];
|
|
||||||
system.stateVersion = "22.11"; # Did you read the comment?
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
{ lib, nixpkgs, username, home-manager, ... }:
|
{ lib, nixpkgs, username, home-manager, nixos-hardware, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
system = "x86_64-linux"; # System architecture
|
system = "x86_64-linux";
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true; # Allow proprietary software
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
t14 = lib.nixosSystem { # Laptop profile
|
t14 = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit username;
|
inherit username;
|
||||||
|
|
@ -22,6 +22,7 @@ in
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./t14/configuration.nix
|
./t14/configuration.nix
|
||||||
|
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,25 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./nano.nix
|
./nano.nix
|
||||||
];
|
|
||||||
networking.hostName = "t14"; # Define your hostname.
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
cryptsetup
|
|
||||||
];
|
|
||||||
fonts = {
|
|
||||||
fonts = with pkgs; [
|
|
||||||
spleen
|
|
||||||
];
|
];
|
||||||
};
|
networking.hostName = "t14";
|
||||||
programs.light.enable = true;
|
environment.systemPackages = with pkgs; [
|
||||||
services.pipewire = {
|
cryptsetup
|
||||||
enable = true;
|
];
|
||||||
alsa.enable = true;
|
fonts = {
|
||||||
pulse.enable = true;
|
fonts = with pkgs; [
|
||||||
};
|
spleen
|
||||||
nixpkgs.config.allowUnfree = true;
|
];
|
||||||
system.stateVersion = "22.11"; # Did you read the comment?
|
};
|
||||||
}
|
programs.light.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
system.stateVersion = "22.11";
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
discord
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
autotiling-rs
|
autotiling-rs
|
||||||
gammastep
|
gammastep
|
||||||
grim
|
sway-contrib.grimshot
|
||||||
];
|
];
|
||||||
systemd.user.services.autotiling = {
|
systemd.user.services.autotiling = {
|
||||||
Install = {
|
Install = {
|
||||||
|
|
@ -65,6 +65,17 @@
|
||||||
"${modifier}+space" = "exec ${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu | ${pkgs.findutils}/bin/xargs swaymsg exec --";
|
"${modifier}+space" = "exec ${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu | ${pkgs.findutils}/bin/xargs swaymsg exec --";
|
||||||
"${modifier}+bracketleft" = "exec --no-startup-id grimshot --notify save area /tmp/scrot-$(date \"+%Y-%m-%d\"T\"%H:%M:%S\").png";
|
"${modifier}+bracketleft" = "exec --no-startup-id grimshot --notify save area /tmp/scrot-$(date \"+%Y-%m-%d\"T\"%H:%M:%S\").png";
|
||||||
"${modifier}+bracketright" = "exec --no-startup-id grimshot --notify copy area";
|
"${modifier}+bracketright" = "exec --no-startup-id grimshot --notify copy area";
|
||||||
|
"XF86MonBrightnessDown" = "exec light -U 10";
|
||||||
|
"XF86MonBrightnessUp" = "exec light -A 10";
|
||||||
|
"XF86AudioRaiseVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%'";
|
||||||
|
"XF86AudioLowerVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%'";
|
||||||
|
"XF86AudioMute" = "exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'";
|
||||||
|
};
|
||||||
|
assigns = {
|
||||||
|
"9" = [
|
||||||
|
{ class = "discord";}
|
||||||
|
{ class = "Signal";}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
bars = [
|
bars = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue