Compare commits
2 commits
daa39f6d5e
...
83858d6d11
Author | SHA1 | Date | |
---|---|---|---|
|
83858d6d11 | ||
|
8911511edc |
|
@ -15,6 +15,7 @@ in
|
||||||
./nitrokey.nix
|
./nitrokey.nix
|
||||||
./nix-settings.nix
|
./nix-settings.nix
|
||||||
./upgrade-diff.nix
|
./upgrade-diff.nix
|
||||||
|
./guest.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.davfs2.enable = true;
|
services.davfs2.enable = true;
|
||||||
|
|
66
common/guest.nix
Normal file
66
common/guest.nix
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inputs = config.inputInjection.flake-inputs;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# interesting: this causes an infinite recursion
|
||||||
|
#imports = [ config.inputInjection.flake-inputs.home-manager.nixosModules.home-manager ];
|
||||||
|
|
||||||
|
options.schmittlauch.guestUser.enable = lib.options.mkEnableOption "Provide a guest user account";
|
||||||
|
|
||||||
|
config = lib.mkIf config.schmittlauch.guestUser.enable {
|
||||||
|
users.extraUsers.gast = {
|
||||||
|
isNormalUser = true;
|
||||||
|
group = "gast";
|
||||||
|
hashedPassword = "$y$j9T$pPCjU8ZvVYo0aY4jtrHPj1$NxUWOP/YTcqJ1PYaP1Hy5MwTeDcNjg0k369R5rE5M48";
|
||||||
|
};
|
||||||
|
users.groups.gast = { };
|
||||||
|
# a basic home-manager configuration to share installed packages of other accounts
|
||||||
|
# reason: keeping a separate config checkout for guests and requiring them to run
|
||||||
|
# their own `home-manager` instance does not make sense.
|
||||||
|
home-manager =
|
||||||
|
let
|
||||||
|
gast = config.users.extraUsers.gast;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
useGlobalPkgs = false; # to allow usage of home-level overlays
|
||||||
|
# FIXME: possibly expose home modules through flake outputs instead of brittle path traversals
|
||||||
|
users.gast = {
|
||||||
|
imports = [
|
||||||
|
inputs.nur.hmModules.nur
|
||||||
|
../home/modules/packages.nix
|
||||||
|
];
|
||||||
|
home = {
|
||||||
|
username = gast.name;
|
||||||
|
homeDirectory = gast.home;
|
||||||
|
stateVersion = "24.05";
|
||||||
|
};
|
||||||
|
schmittlauch = {
|
||||||
|
packages = {
|
||||||
|
graphics = true;
|
||||||
|
multimedia = true;
|
||||||
|
nixHelpers = true;
|
||||||
|
devTools = true;
|
||||||
|
pythonTools = true;
|
||||||
|
games = true;
|
||||||
|
desktopLinux = true;
|
||||||
|
kde = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
# Optionally use extraSpecialArgs
|
||||||
|
# to pass through arguments to home.nix
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs system;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
18
flake.lock
18
flake.lock
|
@ -210,11 +210,11 @@
|
||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722421184,
|
"lastModified": 1722630782,
|
||||||
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
"narHash": "sha256-hMyG9/WlUi0Ho9VkRrrez7SeNlDzLxalm9FwY7n/Noo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58",
|
"rev": "d04953086551086b44b6f3c6b7eeb26294f207da",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -258,11 +258,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722519197,
|
"lastModified": 1722791413,
|
||||||
"narHash": "sha256-VEdJmVU2eLFtLqCjTYJd1J7+Go8idAcZoT11IewFiRg=",
|
"narHash": "sha256-rCTrlCWvHzMCNcKxPE3Z/mMK2gDZ+BvvpEVyRM4tKmU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "05405724efa137a0b899cce5ab4dde463b4fd30b",
|
"rev": "8b5b6723aca5a51edf075936439d9cd3947b7b2c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -274,11 +274,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722709906,
|
"lastModified": 1722894411,
|
||||||
"narHash": "sha256-I27FkJ3qSsxc5aZSwpYHMqJwLpvQt6eV4MrwGfVjCvM=",
|
"narHash": "sha256-OUOJ/dglPQ/YAN/zYAdEzzhSUv84QF8px9JT4eQb4GA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "ac1226f223779364c73f1a450654383768dab1b7",
|
"rev": "1261ebf63933d763c7eb2e3290782cf09d045fdb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -59,7 +59,13 @@
|
||||||
flake-inputs = inputs;
|
flake-inputs = inputs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
defaultModules = system: [ inputInjection ];
|
defaultModules = system: [
|
||||||
|
inputInjection
|
||||||
|
|
||||||
|
# for some reason, `imports`-ing the home-manager module via inputInjection
|
||||||
|
# from a sub-module causes infinite recursion, so importing it here instead
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
mkSystem =
|
mkSystem =
|
||||||
system: extraModules:
|
system: extraModules:
|
||||||
nixpkgs.lib.nixosSystem rec {
|
nixpkgs.lib.nixosSystem rec {
|
||||||
|
@ -115,6 +121,7 @@
|
||||||
modules = [
|
modules = [
|
||||||
./darwin/configuration.nix
|
./darwin/configuration.nix
|
||||||
inputInjection
|
inputInjection
|
||||||
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
speed = 180;
|
speed = 180;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
schmittlauch.guestUser.enable = true;
|
||||||
|
|
||||||
networking.hostName = "thinknix";
|
networking.hostName = "thinknix";
|
||||||
|
|
||||||
# This value determines the NixOS release with which your system is to be
|
# This value determines the NixOS release with which your system is to be
|
||||||
|
|
Loading…
Reference in a new issue