initial config

This commit is contained in:
jopejoe1 2024-12-10 21:22:01 +01:00
commit 29ffbc171f
5 changed files with 3905 additions and 0 deletions

133
config.nix Normal file
View file

@ -0,0 +1,133 @@
{
pkgs,
lib,
...
}: {
system.stateVersion = "24.11";
nixpkgs.hostPlatform = {
system = "x86-64-linux";
config = "x86_64-unknown-linux-gnu";
};
networking.hostName = "c3terminal";
time.timeZone = "Europe/Berlin";
facter.reportPath = ./facter.json;
users.users.c3terminal = {
isNormalUser = true;
password = "test";
extraGroups = [
"wheel"
"networkmanager"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB8oyMpS2hK3gQXyHIIVS6oilgMpemLmfhKKJ6RBMwUh jopejoe1_2@joens.email"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP3pKtvhOOjG1pGJq7cVHS5uWy5IP8y1Ra/ENpmJcqOe jopejoe1@zap"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFEcNAVRN66mfKmaCpxs++0094Eh4mqXkUwDPZPkIIBB jopejoe1@joens.email"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZDUoC+1lNR2JTY1Q+vhXpuLmKMdVl2OMFLVbQ3cGkw jopejoe1@kuraokami"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKm2igbJ+Ke+dJO3r7wp5ZTreHqC39Sjctca119Bl2yc jopejoe1@zap"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPHns90pKP8pDOKM7ziCiG7ZjO3kFvScnbq7uBlUWG5H n0th1ng"
];
packages = with pkgs; [
firefox
];
};
users.users.demo = {
isNormalUser = true;
packages = with pkgs; [
firefox
];
};
users.users.root = {
password = "test";
shell = lib.mkForce (lib.getExe pkgs.bash);
extraGroups = [
"wheel"
"networkmanager"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB8oyMpS2hK3gQXyHIIVS6oilgMpemLmfhKKJ6RBMwUh jopejoe1_2@joens.email"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP3pKtvhOOjG1pGJq7cVHS5uWy5IP8y1Ra/ENpmJcqOe jopejoe1@zap"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFEcNAVRN66mfKmaCpxs++0094Eh4mqXkUwDPZPkIIBB jopejoe1@joens.email"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZDUoC+1lNR2JTY1Q+vhXpuLmKMdVl2OMFLVbQ3cGkw jopejoe1@kuraokami"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKm2igbJ+Ke+dJO3r7wp5ZTreHqC39Sjctca119Bl2yc jopejoe1@zap"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPHns90pKP8pDOKM7ziCiG7ZjO3kFvScnbq7uBlUWG5H n0th1ng"
];
packages = with pkgs; [
firefox
];
};
boot = {
loader = {
grub = {
enable = true;
};
efi = {
canTouchEfiVariables = true;
#efiSysMountPoint = "/boot";
};
};
};
services = {
xserver = {
enable = true;
};
openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
};
};
libinput.enable = true;
cage = {
enable = true;
program = "${lib.getExe pkgs.firefox} --kiosk --private-window ${./index.html}";
};
};
programs.kdeconnect = {
enable = true;
};
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/disk/by-id/wwn-0x502b2a201d1c1b1a";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}

3633
facter.json Normal file

File diff suppressed because it is too large Load diff

101
flake.lock Normal file
View file

@ -0,0 +1,101 @@
{
"nodes": {
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1733168902,
"narHash": "sha256-8dupm9GfK+BowGdQd7EHK5V61nneLfr9xR6sc5vtDi0=",
"owner": "nix-community",
"repo": "disko",
"rev": "785c1e02c7e465375df971949b8dcbde9ec362e5",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "disko",
"type": "github"
}
},
"nixlib": {
"locked": {
"lastModified": 1733620091,
"narHash": "sha256-5WoMeCkaXqTZwwCNLRzyLxEJn8ISwjx4cNqLgqKwg9s=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "f4dc9a6c02e5e14d91d158522f69f6ab4194eb5b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixos-facter-modules": {
"locked": {
"lastModified": 1732288619,
"narHash": "sha256-zSQ2cR+NRJfHUVfkv+O6Wi53wXfzX8KHiO8fRfnvc0M=",
"owner": "numtide",
"repo": "nixos-facter-modules",
"rev": "862648589993a96480c2255197a28feea712f68f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nixos-facter-modules",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1733706547,
"narHash": "sha256-BdFW7TMgES7q8I5FGX5hlz+0Xp4WyfAP3tHDwEupSWU=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "f5a0197ccfef7388885fc9455e74d6dd39e0c5e8",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-generators",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1733759999,
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"disko": "disko",
"nixos-facter-modules": "nixos-facter-modules",
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

37
flake.nix Normal file
View file

@ -0,0 +1,37 @@
{
description = "c3 Terminal Setup";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = args@{
self,
nixpkgs,
nixos-generators,
nixos-facter-modules,
disko,
...
}: {
nixosConfigurations.c3terminal = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = args;
modules = [
./config.nix
nixos-generators.nixosModules.all-formats
nixos-facter-modules.nixosModules.facter
disko.nixosModules.disko
];
};
};
}

1
index.html Normal file
View file

@ -0,0 +1 @@
Hello World