Add hardware config and fix hummelberg build
This commit is contained in:
parent
1452c2a43d
commit
b2f0797b01
15 changed files with 68 additions and 52 deletions
|
@ -1,12 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let users = {
|
let
|
||||||
|
users = {
|
||||||
fhauser = {
|
fhauser = {
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Fabian Hauser";
|
description = "Fabian Hauser";
|
||||||
group = "fhauser";
|
group = "fhauser";
|
||||||
extraGroups = [ "wheel" "video" "docker" "networkmanager" "libvirtd" "adbusers" ];
|
extraGroups =
|
||||||
|
[ "wheel" "video" "docker" "networkmanager" "libvirtd" "adbusers" ];
|
||||||
hashedPassword =
|
hashedPassword =
|
||||||
"$6$rounds=20000$TYZ8CojfBLwejcwn$smEJe6/anL9NGf.Ytfny14nBfhr4TRPv2XK1lgHz7yg.zQow1HACePirEjsjxzFC6vTHGaT8t2NxobUsHbWLg1";
|
"$6$rounds=20000$TYZ8CojfBLwejcwn$smEJe6/anL9NGf.Ytfny14nBfhr4TRPv2XK1lgHz7yg.zQow1HACePirEjsjxzFC6vTHGaT8t2NxobUsHbWLg1";
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }: {
|
{ config, lib, pkgs, modulesPath, hardwareModules, ... }: {
|
||||||
|
|
||||||
imports = [
|
imports = with hardwareModules; [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
<nixos-hardware/lenovo/thinkpad/t14>
|
lenovo-thinkpad-t14
|
||||||
<nixos-hardware/common/cpu/intel>
|
common-cpu-intel
|
||||||
<nixos-hardware/common/pc/ssd>
|
common-pc-ssd
|
||||||
<nixos-hardware/common/pc/laptop>
|
common-pc-laptop
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
|
@ -1,10 +1,9 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }: {
|
{ config, lib, pkgs, nixos-hardware, modulesPath, ... }: {
|
||||||
|
|
||||||
imports = [
|
imports = with nixos-hardware.nixosModules;
|
||||||
|
[
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
<nixos-hardware/lenovo/thinkpad/t470s>
|
# TODO: Not relevant anymore anyway
|
||||||
<nixos-hardware/common/pc/ssd>
|
|
||||||
<nixos-hardware/common/pc/laptop>
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules =
|
24
flake.lock
generated
24
flake.lock
generated
|
@ -41,6 +41,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1649660850,
|
||||||
|
"narHash": "sha256-x8ZE4B+EuA9dCEJKNzT59yQjzotVMnGYU5GMoqMLk3A=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "f4160a629bac3538939a3005c8b5c7fb320bcf59",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs-nixos-2111": {
|
"nixpkgs-nixos-2111": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1647490331,
|
"lastModified": 1647490331,
|
||||||
|
@ -91,11 +106,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1649408932,
|
"lastModified": 1649497218,
|
||||||
"narHash": "sha256-JhTW1OtS5fACcRXLqcTTQyYO5vLkO+bceCqeRms13SY=",
|
"narHash": "sha256-groqC9m1P4hpnL6jQvZ3C8NEtduhdkvwGT0+0LUrcYw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "42948b300670223ca8286aaf916bc381f66a5313",
|
"rev": "fd364d268852561223a5ada15caad669fd72800e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -111,7 +126,7 @@
|
||||||
"nixpkgs-nixos-unstable": "nixpkgs-nixos-unstable"
|
"nixpkgs-nixos-unstable": "nixpkgs-nixos-unstable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-MlaNIPEmdzbmd94VgUiWMAtha9RPx8MCo3ph/4/DONA=",
|
"narHash": "sha256-td+qvLGjYw0oRFYsMR4LKciDWyOoPGJJJ2phMFwN1ME=",
|
||||||
"path": "/etc/nixos/qois-infrastructure",
|
"path": "/etc/nixos/qois-infrastructure",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
|
@ -124,6 +139,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"fabianhauser-etaxes-sg": "fabianhauser-etaxes-sg",
|
"fabianhauser-etaxes-sg": "fabianhauser-etaxes-sg",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"qois-infrastructure": "qois-infrastructure"
|
"qois-infrastructure": "qois-infrastructure"
|
||||||
|
|
24
flake.nix
24
flake.nix
|
@ -2,6 +2,7 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-21.11";
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-21.11";
|
||||||
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
home-manager.url = "github:nix-community/home-manager/release-21.11";
|
home-manager.url = "github:nix-community/home-manager/release-21.11";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs-stable";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||||
qois-infrastructure.url = "path:/etc/nixos/qois-infrastructure";
|
qois-infrastructure.url = "path:/etc/nixos/qois-infrastructure";
|
||||||
|
@ -9,14 +10,17 @@
|
||||||
fabianhauser-etaxes-sg.inputs.nixpkgs.follows = "nixpkgs-stable";
|
fabianhauser-etaxes-sg.inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs-unstable, nixpkgs-stable, home-manager, qois-infrastructure, fabianhauser-etaxes-sg, ... }@inputs:
|
outputs = { self, nixpkgs-unstable, nixpkgs-stable, home-manager
|
||||||
let system = "x86_64-linux";
|
, qois-infrastructure, fabianhauser-etaxes-sg, nixos-hardware, ... }@inputs:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
pkgsUnstable = import nixpkgs-unstable {
|
pkgsUnstable = import nixpkgs-unstable {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true; # For vscode
|
config.allowUnfree = true; # For vscode
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
checks.${system}.formatCheck = let pkgs = pkgsUnstable; in pkgs.runCommand "nixfmt-check" { } ''
|
checks.${system}.formatCheck = let pkgs = pkgsUnstable;
|
||||||
|
in pkgs.runCommand "nixfmt-check" { } ''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
cd ${self}
|
cd ${self}
|
||||||
${pkgs.findutils}/bin/find . -type f -name '*.nix' -exec ${pkgs.nixfmt}/bin/nixfmt --check {} +
|
${pkgs.findutils}/bin/find . -type f -name '*.nix' -exec ${pkgs.nixfmt}/bin/nixfmt --check {} +
|
||||||
|
@ -31,18 +35,26 @@
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = { inherit pkgsUnstable; pkgsEtaxesSg = fabianhauser-etaxes-sg.packages.${system}; };
|
extraSpecialArgs = {
|
||||||
|
inherit pkgsUnstable;
|
||||||
|
pkgsEtaxesSg = fabianhauser-etaxes-sg.packages.${system};
|
||||||
|
};
|
||||||
users.fhauser = import ./home/fhauser/default.nix;
|
users.fhauser = import ./home/fhauser/default.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mapHostnameToAttr = host:
|
mapHostnameToAttr = host:
|
||||||
nixpkgs-stable.lib.nixosSystem {
|
nixpkgs-stable.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [ qois-infrastructure.nixosModule home-manager.nixosModules.home-manager home-manager-config ./host/${host}/default.nix ];
|
specialArgs.hardwareModules = nixos-hardware.nixosModules;
|
||||||
|
modules = [
|
||||||
|
qois-infrastructure.nixosModule
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
home-manager-config
|
||||||
|
./host/${host}/default.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
in pkgsUnstable.lib.genAttrs hosts mapHostnameToAttr;
|
in pkgsUnstable.lib.genAttrs hosts mapHostnameToAttr;
|
||||||
|
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
fhauser = home-manager.lib.homeManagerConfiguration rec {
|
fhauser = home-manager.lib.homeManagerConfiguration rec {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgsEtaxesSg; with pkgs;
|
packages = with pkgsEtaxesSg;
|
||||||
|
with pkgs;
|
||||||
[ # Networking
|
[ # Networking
|
||||||
unison
|
unison
|
||||||
transmission # GUI Tools, maybe extract...
|
transmission # GUI Tools, maybe extract...
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ pkgs, pkgsUnstable, ... }: {
|
{ pkgs, pkgsUnstable, ... }: {
|
||||||
#TODO: ENV variabls for agent
|
#TODO: ENV variabls for agent
|
||||||
home.sessionVariables.SSH_AUTH_SOCK =
|
home.sessionVariables.SSH_AUTH_SOCK = "/run/user/1000/gnupg/S.gpg-agent.ssh";
|
||||||
"/run/user/1000/gnupg/S.gpg-agent.ssh";
|
|
||||||
programs.gpg = {
|
programs.gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgsUnstable.gnupg;
|
package = pkgsUnstable.gnupg;
|
||||||
|
|
|
@ -73,7 +73,4 @@ let
|
||||||
ed
|
ed
|
||||||
${xhost}/bin/xhost
|
${xhost}/bin/xhost
|
||||||
'';
|
'';
|
||||||
in {
|
in { home.packages = [ passbemenu threema-vpn threema-env wsudo ]; }
|
||||||
home.packages =
|
|
||||||
[ passbemenu threema-vpn threema-env wsudo ];
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs, lib, config, ... }: let
|
{ pkgs, lib, config, ... }:
|
||||||
|
let
|
||||||
adhereTheSwayTarget = {
|
adhereTheSwayTarget = {
|
||||||
Install.WantedBy = lib.mkForce [ "sway-session.target" ];
|
Install.WantedBy = lib.mkForce [ "sway-session.target" ];
|
||||||
Unit.PartOf = lib.mkForce [ "sway-session.target" ];
|
Unit.PartOf = lib.mkForce [ "sway-session.target" ];
|
||||||
|
|
|
@ -2,15 +2,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs;
|
||||||
[
|
[ neverball wesnoth pingus superTux superTuxKart extremetuxracer zeroad ]
|
||||||
neverball
|
++ (with pkgs.gnome; [ # Selection of gnome games
|
||||||
wesnoth
|
|
||||||
pingus
|
|
||||||
superTux
|
|
||||||
superTuxKart
|
|
||||||
extremetuxracer
|
|
||||||
zeroad
|
|
||||||
] ++ (with pkgs.gnome; [ # Selection of gnome games
|
|
||||||
five-or-more
|
five-or-more
|
||||||
four-in-a-row
|
four-in-a-row
|
||||||
gnome-chess
|
gnome-chess
|
||||||
|
|
|
@ -6,14 +6,10 @@
|
||||||
#./printing.nix
|
#./printing.nix
|
||||||
#./backup.nix #TODO: Extract applications from desktop role
|
#./backup.nix #TODO: Extract applications from desktop role
|
||||||
|
|
||||||
../../hardware/thinkpad-p14s.nix
|
|
||||||
|
|
||||||
../../defaults/base
|
../../defaults/base
|
||||||
../../defaults/cifs-auth-fix
|
../../defaults/cifs-auth-fix
|
||||||
../../defaults/desktop
|
../../defaults/desktop
|
||||||
#../../defaults/games
|
../../defaults/hardware/thinkpad-p14s.nix
|
||||||
../../defaults/user-configuration
|
|
||||||
../../defaults/user-configuration/fhauser
|
|
||||||
#../../defaults/printing
|
#../../defaults/printing
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,11 @@
|
||||||
#./printing.nix
|
#./printing.nix
|
||||||
#./backup.nix #TODO: Extract applications from desktop role
|
#./backup.nix #TODO: Extract applications from desktop role
|
||||||
|
|
||||||
../../hardware/amd-board.nix
|
|
||||||
../../hardware/ecc-memory.nix
|
|
||||||
|
|
||||||
../../defaults/base
|
../../defaults/base
|
||||||
../../defaults/cifs-auth-fix
|
../../defaults/cifs-auth-fix
|
||||||
../../defaults/desktop
|
../../defaults/desktop
|
||||||
|
../../defaults/hardware/amd-board.nix
|
||||||
|
../../defaults/hardware/ecc-memory.nix
|
||||||
#../../defaults/printing
|
#../../defaults/printing
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
self: super: {
|
self: super:
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue