mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 23:29:08 +01:00
Compare commits
2 commits
f1e10f728e
...
d8ce0a52ed
| Author | SHA1 | Date | |
|---|---|---|---|
| d8ce0a52ed | |||
| 7ab6b77048 |
8 changed files with 48 additions and 57 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
|
||||||
{
|
{
|
||||||
|
|
|
||||||
9
justfile
9
justfile
|
|
@ -41,7 +41,7 @@ reboot:
|
||||||
[group('remote')]
|
[group('remote')]
|
||||||
deploy +hosts:
|
deploy +hosts:
|
||||||
for host in {{ hosts }}; do \
|
for host in {{ hosts }}; do \
|
||||||
nh os switch . --hostname=$host --target-host=$host; \
|
nh os switch . --hostname=$host --target-host=$host; \
|
||||||
done
|
done
|
||||||
|
|
||||||
[group('remote')]
|
[group('remote')]
|
||||||
|
|
@ -69,4 +69,9 @@ sops-rotate-all:
|
||||||
just _sops-do "find . -type f -name 'secrets.json' -exec sops rotate --in-place {} \;"
|
just _sops-do "find . -type f -name 'secrets.json' -exec sops rotate --in-place {} \;"
|
||||||
|
|
||||||
_sops-do command:
|
_sops-do command:
|
||||||
-if command -v sops >/dev/null 2>&1; then {{ command }}; else nix develop .#sops --command bash -c "{{ command }}; exec zsh"; fi
|
if command -v sops > /dev/null 2>&1; then \
|
||||||
|
{{ command }}; \
|
||||||
|
else \
|
||||||
|
nix develop .#sops --command bash -c "{{ command }}; \
|
||||||
|
exec zsh"; \
|
||||||
|
fi
|
||||||
|
|
|
||||||
|
|
@ -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