feat: add justyna-p300, dcpj4110dw driver, nixos-anywhere compatibility
This commit is contained in:
parent
0611e8179b
commit
e8b2876885
14 changed files with 610 additions and 33 deletions
11
nix/os/devices/justyna-p300/boot.nix
Normal file
11
nix/os/devices/justyna-p300/boot.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{lib, ...}: {
|
||||
boot.loader.grub.efiInstallAsRemovable = lib.mkForce false;
|
||||
boot.loader.efi.canTouchEfiVariables = lib.mkForce false;
|
||||
boot.loader.grub.efiSupport = lib.mkForce false;
|
||||
|
||||
boot.loader.grub.version = 2;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
|
||||
# boot.initrd.availableKernelModules = stage1Modules;
|
||||
boot.extraModprobeConfig = "";
|
||||
}
|
12
nix/os/devices/justyna-p300/configuration.nix
Normal file
12
nix/os/devices/justyna-p300/configuration.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
../../profiles/common/configuration.nix
|
||||
../../profiles/graphical/configuration.nix
|
||||
|
||||
./system.nix
|
||||
./hw.nix
|
||||
./pkg.nix
|
||||
./user.nix
|
||||
./boot.nix
|
||||
];
|
||||
}
|
30
nix/os/devices/justyna-p300/default.nix
Normal file
30
nix/os/devices/justyna-p300/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{repoFlake}: let
|
||||
nodeName = "justyna-p300";
|
||||
# system = "i686-linux";
|
||||
system = "x86_64-linux";
|
||||
|
||||
nodeFlake = repoFlake.inputs.get-flake ./.;
|
||||
in {
|
||||
meta.nodeSpecialArgs.${nodeName} = {
|
||||
inherit nodeName nodeFlake;
|
||||
packages' = repoFlake.packages.${system};
|
||||
};
|
||||
|
||||
meta.nodeNixpkgs.${nodeName} = import nodeFlake.inputs.nixpkgs.outPath {
|
||||
inherit system;
|
||||
};
|
||||
|
||||
# TODO: build a module with "meta" and "freeformtype" for all the others
|
||||
|
||||
${nodeName} = {
|
||||
deployment.targetHost = nodeName;
|
||||
deployment.replaceUnknownProfiles = false;
|
||||
# deployment.allowLocalDeployment = true;
|
||||
|
||||
imports = [
|
||||
(repoFlake + "/nix/os/devices/${nodeName}/configuration.nix")
|
||||
|
||||
nodeFlake.inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
}
|
86
nix/os/devices/justyna-p300/flake.lock
generated
Normal file
86
nix/os/devices/justyna-p300/flake.lock
generated
Normal file
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
"nodes": {
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682299489,
|
||||
"narHash": "sha256-bqHo0/82KB+IyBMyjBd6QdyZWJl/YZeGggjBsAgRFlY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "8ab9e5609929379ab15f03fd3bdc1f85419e5a3a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681092193,
|
||||
"narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-22.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1682303062,
|
||||
"narHash": "sha256-x+KAADp27lbxeoPXLUMxKcRsUUHDlg+qVjt5PjgBw9A=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f5364316e314436f6b9c8fd50592b18920ab18f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"disko": "disko",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
13
nix/os/devices/justyna-p300/flake.nix
Normal file
13
nix/os/devices/justyna-p300/flake.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||
|
||||
inputs.home-manager = {
|
||||
url = "github:nix-community/home-manager/release-22.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
inputs.disko.url = github:nix-community/disko;
|
||||
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
outputs = _: {};
|
||||
}
|
48
nix/os/devices/justyna-p300/hw.nix
Normal file
48
nix/os/devices/justyna-p300/hw.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
repoFlake,
|
||||
nodeFlake,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
nodeFlake.inputs.disko.nixosModules.disko
|
||||
];
|
||||
|
||||
disko.devices.disk.sda = {
|
||||
device = "/dev/sda";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
partitions = [
|
||||
{
|
||||
name = "boot";
|
||||
start = "0";
|
||||
end = "1M";
|
||||
part-type = "primary";
|
||||
flags = ["bios_grub"];
|
||||
}
|
||||
{
|
||||
name = "root";
|
||||
start = "1M";
|
||||
end = "100%";
|
||||
part-type = "primary";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"]; # Override existing partition
|
||||
subvolumes = {
|
||||
# Subvolume name is different from mountpoint
|
||||
"/rootfs" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
"/nix" = {
|
||||
mountOptions = ["noatime"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
65
nix/os/devices/justyna-p300/pkg.nix
Normal file
65
nix/os/devices/justyna-p300/pkg.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
packages',
|
||||
...
|
||||
}: let
|
||||
homeEnv = keyboard: {
|
||||
imports = [
|
||||
../../../home-manager/profiles/common.nix
|
||||
|
||||
../../../home-manager/configuration/graphical-gnome3.nix
|
||||
|
||||
../../../home-manager/programs/firefox.nix
|
||||
../../../home-manager/programs/libreoffice.nix
|
||||
../../../home-manager/programs/neovim.nix
|
||||
];
|
||||
|
||||
home.keyboard = keyboard;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
rhythmbox
|
||||
lollypop
|
||||
dia
|
||||
|
||||
rustdesk
|
||||
|
||||
kotatogram-desktop
|
||||
jitsi-meet-electron
|
||||
signal-desktop
|
||||
];
|
||||
};
|
||||
in {
|
||||
services.gnome = builtins.mapAttrs (attr: value: lib.mkForce value) {
|
||||
gnome-remote-desktop.enable = true;
|
||||
};
|
||||
|
||||
services.printing.drivers = lib.mkForce (with packages'; [
|
||||
dcpj4110dwDriver
|
||||
dcpj4110dwCupswrapper
|
||||
]);
|
||||
|
||||
services.printing.extraConf = ''
|
||||
LogLevel debug
|
||||
'';
|
||||
|
||||
home-manager.users.steveej = homeEnv {
|
||||
layout = "en";
|
||||
options = ["nodeadkey"];
|
||||
variant = "altgr-intl";
|
||||
};
|
||||
|
||||
home-manager.users.elias = homeEnv {
|
||||
layout = "de";
|
||||
options = [];
|
||||
variant = "";
|
||||
};
|
||||
|
||||
home-manager.users.justyna = homeEnv {
|
||||
layout = "de";
|
||||
options = [];
|
||||
variant = "";
|
||||
};
|
||||
|
||||
system.stateVersion = "21.11";
|
||||
}
|
44
nix/os/devices/justyna-p300/system.nix
Normal file
44
nix/os/devices/justyna-p300/system.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
# iperf3
|
||||
5201
|
||||
];
|
||||
|
||||
networking.firewall.logRefusedConnections = false;
|
||||
networking.usePredictableInterfaceNames = false;
|
||||
|
||||
services.fprintd.enable = true;
|
||||
security.pam.services = {
|
||||
login.fprintAuth = true;
|
||||
sudo.fprintAuth = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
layout = lib.mkForce "de";
|
||||
xkbVariant = lib.mkForce "";
|
||||
xkbOptions = lib.mkForce "";
|
||||
displayManager.autoLogin.enable = true;
|
||||
displayManager.autoLogin.user = lib.mkForce "justyna";
|
||||
displayManager.gdm.enable = lib.mkForce true;
|
||||
displayManager.lightdm.enable = lib.mkForce false;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
|
||||
# dbus.packages = [ pkgs.gnome3.dconf ];
|
||||
# udev.packages = [ pkgs.gnome3.gnome-settings-daemon ];
|
||||
};
|
||||
|
||||
security.pki.certificateFiles = ["${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"];
|
||||
|
||||
services.xserver.videoDrivers = ["modesetting"];
|
||||
|
||||
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
|
||||
}
|
21
nix/os/devices/justyna-p300/user.nix
Normal file
21
nix/os/devices/justyna-p300/user.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
passwords = import ../../../variables/passwords.crypt.nix;
|
||||
keys = import ../../../variables/keys.nix;
|
||||
inherit (import ../../lib/default.nix {}) mkUser;
|
||||
in {
|
||||
users.extraUsers.elias = mkUser {
|
||||
uid = 1001;
|
||||
openssh.authorizedKeys.keys = keys.users.steveej.openssh;
|
||||
hashedPassword = passwords.users.elias;
|
||||
};
|
||||
|
||||
users.extraUsers.justyna = mkUser {
|
||||
uid = 1002;
|
||||
openssh.authorizedKeys.keys = keys.users.steveej.openssh;
|
||||
hashedPassword = passwords.users.justyna;
|
||||
};
|
||||
}
|
18
nix/os/devices/steveej-t14/flake.lock
generated
18
nix/os/devices/steveej-t14/flake.lock
generated
|
@ -24,11 +24,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1681759395,
|
||||
"narHash": "sha256-7aaRtLxLAy8qFVIA26ulB+Q5nDVzuQ71qi0s0wMjAws=",
|
||||
"lastModified": 1682303062,
|
||||
"narHash": "sha256-x+KAADp27lbxeoPXLUMxKcRsUUHDlg+qVjt5PjgBw9A=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "cd749f58ba83f7155b7062dd49d08e5e47e44d50",
|
||||
"rev": "f5364316e314436f6b9c8fd50592b18920ab18f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -40,11 +40,11 @@
|
|||
},
|
||||
"nixpkgs-master": {
|
||||
"locked": {
|
||||
"lastModified": 1681895322,
|
||||
"narHash": "sha256-dtduardGFljEIh0Whlnhzda7Au0s1WnnSdzh2ZhCu9c=",
|
||||
"lastModified": 1682405840,
|
||||
"narHash": "sha256-Eo9Pz3QqwNkt2VNJHgLKKdu5Yjq0IAOQyDBevCmh52g=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "57aad37a2eab85fb5522cbc8568fe27872071a1c",
|
||||
"rev": "abdbf67a29e2985aa4ef669d8cf7a0de06d5b799",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -56,11 +56,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1681770396,
|
||||
"narHash": "sha256-tq+GZOkRA3uF3I/jIzuBGfnTRQFT4QnnRCWJ8DKSaMg=",
|
||||
"lastModified": 1682385804,
|
||||
"narHash": "sha256-iK6k4jQ8jV3Lo79WkHQDugL/qTVqeynWXbdIcetZuMo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4df48038a44e9f3a3da8e9b42ca182726b743de4",
|
||||
"rev": "392218684aea34e48419ad57e690c6fd08aa3ea4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue