mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 22:29:06 +01:00
Move user configuration into profiles
This commit is contained in:
parent
f1e10f728e
commit
7ab6b77048
7 changed files with 41 additions and 55 deletions
|
|
@ -9,14 +9,15 @@ let
|
||||||
hostName:
|
hostName:
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs self; };
|
specialArgs = { inherit inputs self; };
|
||||||
modules = [
|
modules =
|
||||||
{ networking = { inherit hostName; }; }
|
(lib.singleton { networking = { inherit hostName; }; })
|
||||||
"${self}/hosts/${hostName}/default.nix"
|
++ (
|
||||||
"${self}/hosts/${hostName}/hardware.nix"
|
"${self}/hosts/${hostName}"
|
||||||
"${self}/hosts/${hostName}/disko.nix"
|
|> builtins.readDir
|
||||||
"${self}/users/seb"
|
|> lib.attrNames
|
||||||
]
|
|> lib.filter (file: file |> lib.hasSuffix ".nix")
|
||||||
++ lib.optional (lib.pathExists "${self}/users/seb/@${hostName}") "${self}/users/seb/@${hostName}";
|
|> lib.map (file: "${self}/hosts/${hostName}/${file}")
|
||||||
|
);
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,16 @@
|
||||||
|
|
||||||
console.keyMap = "de-latin1-nodeadkeys";
|
console.keyMap = "de-latin1-nodeadkeys";
|
||||||
|
|
||||||
users.mutableUsers = false;
|
sops.secrets."seb-password".neededForUsers = true;
|
||||||
|
users = {
|
||||||
|
mutableUsers = false;
|
||||||
|
users.seb = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Sebastian Stork";
|
||||||
|
hashedPasswordFile = config.sops.secrets."seb-password".path;
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{ self, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
imports = [ self.nixosModules.profile-core ];
|
config,
|
||||||
|
inputs,
|
||||||
|
self,
|
||||||
|
pkgs,
|
||||||
|
pkgs-unstable,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
self.nixosModules.profile-core
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
|
@ -19,4 +29,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.localsend.enable = true;
|
programs.localsend.enable = true;
|
||||||
|
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
users.users.seb.shell = pkgs.zsh;
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = { inherit inputs self pkgs-unstable; };
|
||||||
|
users.seb = "${self}/users/seb/@${config.networking.hostName}/home.nix";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
self,
|
|
||||||
pkgs-unstable,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs self pkgs-unstable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{ self, pkgs, ... }:
|
|
||||||
{
|
|
||||||
imports = [ "${self}/users/home-manager.nix" ];
|
|
||||||
home-manager.users.seb = ./home.nix;
|
|
||||||
|
|
||||||
users.users.seb.shell = pkgs.zsh;
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{ self, pkgs, ... }:
|
|
||||||
{
|
|
||||||
imports = [ "${self}/users/home-manager.nix" ];
|
|
||||||
home-manager.users.seb = ./home.nix;
|
|
||||||
|
|
||||||
users.users.seb.shell = pkgs.zsh;
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
sops.secrets."seb-password".neededForUsers = true;
|
|
||||||
|
|
||||||
users.users.seb = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Sebastian Stork";
|
|
||||||
hashedPasswordFile = config.sops.secrets."seb-password".path;
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue