Compare commits

..
94 changed files with 1079 additions and 1160 deletions

24
flake.lock generated
View file

@ -266,11 +266,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1757763404, "lastModified": 1751117291,
"narHash": "sha256-a1h+58wDOtbQXrHoZwLwB7PhXwFhBXRHhNRhAQGq/oY=", "narHash": "sha256-iOeiPypZkl6uPL5mQ4aFG4wYVs9w9BJZ2/5XHlLgyIk=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "07a5fbca27ec941c841ad93f2ac65bc529225a51", "rev": "2a4818dc2158cbdad34a701ab12d0b1cf7f52c46",
"revCount": 46, "revCount": 45,
"type": "git", "type": "git",
"url": "https://git.berlin.ccc.de/servicepoint/servicepoint-cli.git" "url": "https://git.berlin.ccc.de/servicepoint/servicepoint-cli.git"
}, },
@ -290,11 +290,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1757763091, "lastModified": 1752323001,
"narHash": "sha256-V3E6JKGzCrq5u+hp38sAdKv/EoxU+X0qfSoBIPxALi4=", "narHash": "sha256-YEcYegmlv12yN9VWrz2qt0nyL+9EeGIlrDvac8Pf7Cw=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "493b7b0343334019b372176f811a966839ba9aa5", "rev": "75a0ae7a59e687bea5f92791a2d64c048f35846d",
"revCount": 121, "revCount": 119,
"type": "git", "type": "git",
"url": "https://git.berlin.ccc.de/servicepoint/servicepoint-simulator.git" "url": "https://git.berlin.ccc.de/servicepoint/servicepoint-simulator.git"
}, },
@ -358,11 +358,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1757847061, "lastModified": 1755431984,
"narHash": "sha256-YW8fpD35tD+1zTkxk0WhP7FJSL15JlFfG7tscgkdI+A=", "narHash": "sha256-iBgSdzkta6zQ2eIRWjmJTLZ3b1e1EZiCyCPcgCdqPGU=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "ddff8c9b206564dd9b9007e4e894afa6f7860fc8", "rev": "31abcb7a9583c4ed931f658eca3e3c1970e60814",
"revCount": 30, "revCount": 28,
"type": "git", "type": "git",
"url": "https://git.berlin.ccc.de/vinzenz/zerforschen.plus" "url": "https://git.berlin.ccc.de/vinzenz/zerforschen.plus"
}, },

246
flake.nix
View file

@ -1,6 +1,7 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager = { home-manager = {
@ -49,7 +50,7 @@
}; };
outputs = outputs =
{ inputs@{
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
@ -58,74 +59,31 @@
nixpkgs-unstable, nixpkgs-unstable,
servicepoint-cli, servicepoint-cli,
servicepoint-simulator, servicepoint-simulator,
naersk,
nix-vscode-extensions, nix-vscode-extensions,
... ...
}: }:
let let
devices = { devices = {
vinzenz-lpt2 = { vinzenz-lpt2 = "x86_64-linux";
system = "x86_64-linux"; vinzenz-pc2 = "x86_64-linux";
additional-modules = [ ronja-pc = "x86_64-linux";
self.nixosModules.user-vinzenz hetzner-vpn2 = "aarch64-linux";
forgejo-runner-1 = "aarch64-linux";
self.nixosModules.gnome
self.nixosModules.wine-gaming
self.nixosModules.steam
self.nixosModules.printing
self.nixosModules.podman
self.nixosModules.vinzenz-desktop-settings
self.nixosModules.intel-graphics
];
home-manager-users = {
inherit (self.homeConfigurations) vinzenz;
};
};
vinzenz-pc2 = {
system = "x86_64-linux";
additional-modules = [
self.nixosModules.user-vinzenz
self.nixosModules.user-ronja
self.nixosModules.gnome
self.nixosModules.wine-gaming
self.nixosModules.steam
self.nixosModules.printing
self.nixosModules.podman
self.nixosModules.vinzenz-desktop-settings
self.nixosModules.amd-graphics
];
home-manager-users = {
inherit (self.homeConfigurations) vinzenz ronja;
};
};
ronja-pc = {
system = "x86_64-linux";
additional-modules = [
self.nixosModules.user-ronja
self.nixosModules.gnome
self.nixosModules.steam
self.nixosModules.wine-gaming
self.nixosModules.vinzenz-desktop-settings
];
home-manager-users = {
inherit (self.homeConfigurations) ronja;
};
};
hetzner-vpn2 = {
system = "aarch64-linux";
};
forgejo-runner-1 = {
system = "aarch64-linux";
additional-modules = [ self.nixosModules.podman ];
};
}; };
inherit (nixpkgs) lib; homeDevices = [
forDevice = f: lib.mapAttrs (device: value: f (value // { inherit device; })) devices; "vinzenz-lpt2"
supported-systems = lib.attrsets.mapAttrsToList (k: v: v.system) devices; "vinzenz-pc2"
"ronja-pc"
];
forDevice = f: nixpkgs.lib.mapAttrs f devices;
supported-systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = forAllSystems =
f: f:
lib.genAttrs supported-systems ( nixpkgs.lib.genAttrs supported-systems (
system: system:
f rec { f rec {
inherit system; inherit system;
@ -133,141 +91,67 @@
} }
); );
in in
{ rec {
lib = {
importDir =
dir:
(lib.attrsets.mapAttrs' (
m: _:
lib.attrsets.nameValuePair (lib.strings.removeSuffix ".nix" m) { imports = [ "${dir}/${m}" ]; }
) (builtins.readDir dir));
};
overlays = {
unstable-packages = final: prev: {
unstable = import nixpkgs-unstable {
inherit (prev) system config;
};
};
};
nixosModules = (self.lib.importDir ./nixosModules) // {
niri = {
imports = [ niri.nixosModules.niri ];
nixpkgs.overlays = [ niri.overlays.niri ];
};
pkgs-unstable = {
nixpkgs.overlays = [ self.overlays.unstable-packages ];
};
pkgs-vscode-extensions = {
nixpkgs.overlays = [ nix-vscode-extensions.overlays.default ];
};
# required modules to use other modules, should not do anything on their own
default = {
imports = [ self.nixosModules.allowed-unfree-list ];
};
};
homeModules = self.lib.importDir ./homeModules;
homeConfigurations = self.lib.importDir ./homeConfigurations;
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree);
nixosConfigurations = forDevice ( nixosConfigurations = forDevice (
{ device: system:
device,
system,
home-manager-users ? { },
additional-modules ? [ ],
}:
let let
specialArgs = { specialArgs = {
inherit device; inherit inputs device;
}; };
in in
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
inherit system specialArgs; inherit system specialArgs;
modules = [ modules = [
{ { networking.hostName = device; }
networking.hostName = device;
nixpkgs = {
inherit system;
hostPlatform = lib.mkDefault system;
};
system = {
stateVersion = "22.11";
autoUpgrade.flake = "git+https://git.berlin.ccc.de/vinzenz/nixos-configuration.git";
};
./modules/globalinstalls.nix
./modules/networking.nix
./modules/nixpkgs.nix
./modules/lix.nix
./hosts/${device}/hardware.nix
./hosts/${device}/imports.nix
./hosts/${device}/configuration.nix
{
nixpkgs.overlays = [ nixpkgs.overlays = [
self.overlays.unstable-packages overlays.unstable-packages
]; ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
documentation = {
info.enable = false; # info pages and the info command
doc.enable = false; # documentation distributed in packages' /share/doc
};
} }
./nixosConfigurations/${device}
self.nixosModules.default
self.nixosModules.lix-is-nix
self.nixosModules.globalinstalls
self.nixosModules.autoupdate
self.nixosModules.openssh
self.nixosModules.tailscale
self.nixosModules.allowed-unfree-list
self.nixosModules.extra-caches
self.nixosModules.systemd-boot
zerforschen-plus.nixosModules.default
] ]
++ (nixpkgs.lib.optionals (home-manager-users != { }) [ ++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [
{
home-manager = {
extraSpecialArgs = specialArgs;
useGlobalPkgs = true;
useUserPackages = true;
};
time.timeZone = "Europe/Berlin";
home-manager.sharedModules = [
{ home.stateVersion = "22.11"; }
self.homeModules.adwaita
self.homeModules.git
self.homeModules.templates
self.homeModules.zsh-basics
self.homeModules.nano
self.homeModules.gnome-extensions
];
home-manager.users = home-manager-users;
}
self.nixosModules.pkgs-unstable
self.nixosModules.pkgs-vscode-extensions
self.nixosModules.niri
self.nixosModules.kdeconnect
self.nixosModules.en-de
self.nixosModules.gnome
self.nixosModules.modern-desktop
self.nixosModules.nix-ld
self.nixosModules.quiet-boot
self.nixosModules.firmware-updates
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
servicepoint-simulator.nixosModules.default { home-manager.extraSpecialArgs = specialArgs; }
servicepoint-cli.nixosModules.default ./modules/home-manager.nix
])
++ additional-modules; ./modules/i18n.nix
niri.nixosModules.niri
{
nixpkgs.overlays = [
niri.overlays.niri
overlays.servicepoint-packages
nix-vscode-extensions.overlays.default
];
}
]);
} }
); );
overlays = {
unstable-packages = final: prev: {
unstable = import nixpkgs-unstable {
system = prev.system;
config = prev.config;
};
};
servicepoint-packages = final: prev: {
servicepoint-cli = servicepoint-cli.legacyPackages."${prev.system}".servicepoint-cli;
servicepoint-simulator =
servicepoint-simulator.legacyPackages."${prev.system}".servicepoint-simulator;
};
};
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree);
}; };
} }

View file

@ -1,6 +1,5 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = [ ./vscode.nix ];
config = { config = {
home.packages = with pkgs; [ home.packages = with pkgs; [
## Apps ## Apps

25
home/ronja/default.nix Normal file
View file

@ -0,0 +1,25 @@
{ pkgs, ... }:
{
config = {
# Define user account
users.users.ronja = {
isNormalUser = true;
name = "ronja";
description = "Ronja";
home = "/home/ronja";
extraGroups = [
"networkmanager"
"wheel"
"games"
"podman"
"openvscode-server"
];
shell = pkgs.zsh;
};
home-manager.users.ronja.imports = [
./configuration.nix
./vscode.nix
];
};
}

View file

@ -60,8 +60,8 @@
nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
# node_version # node.js version # node_version # node.js version
# go_version # go version (https://golang.org) # go_version # go version (https://golang.org)
rust_version # rustc version (https://www.rust-lang.org) # rust_version # rustc version (https://www.rust-lang.org)
dotnet_version # .NET version (https://dotnet.microsoft.com) # dotnet_version # .NET version (https://dotnet.microsoft.com)
# php_version # php version (https://www.php.net/) # php_version # php version (https://www.php.net/)
# laravel_version # laravel php framework version (https://laravel.com/) # laravel_version # laravel php framework version (https://laravel.com/)
# java_version # java version (https://www.java.com/) # java_version # java version (https://www.java.com/)
@ -756,14 +756,14 @@
typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0 typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]##################### ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]#####################
# Yazi shell color. # Yazi shell color.
typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3 typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3
typeset -g POWERLEVEL9K_YAZI_BACKGROUND=0 typeset -g POWERLEVEL9K_YAZI_BACKGROUND=0
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐'
######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
# Nnn shell color. # Nnn shell color.
typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 typeset -g POWERLEVEL9K_NNN_FOREGROUND=0

View file

@ -56,10 +56,6 @@
icu icu
nextcloud-client nextcloud-client
lutris
foliate
]; ];
home.file = { home.file = {

51
home/vinzenz/default.nix Normal file
View file

@ -0,0 +1,51 @@
{ pkgs, ... }:
{
config = {
users.users.vinzenz = {
isNormalUser = true;
name = "vinzenz";
description = "Vinzenz";
home = "/home/vinzenz";
extraGroups = [
"networkmanager"
"wheel"
"games"
"dialout"
"podman"
"nginx"
"adbusers"
"kvm"
"input"
"video"
];
shell = pkgs.zsh;
autoSubUidGidRange = true;
};
nix.settings.trusted-users = [ "vinzenz" ];
home-manager.users.vinzenz.imports = [
./configuration.nix
./editorconfig.nix
./fuzzel.nix
./git.nix
./gnome.nix
#./niri.nix
./ssh.nix
./swaylock.nix
./vscode.nix
./waybar.nix
./zsh.nix
];
allowedUnfreePackages = [
"rider"
"pycharm-professional"
"jetbrains-toolbox"
"anydesk"
"vscode-extension-ms-dotnettools-csharp"
];
};
}

View file

@ -1,3 +1,4 @@
{ ... }:
{ {
config.editorconfig = { config.editorconfig = {
enable = true; enable = true;

View file

@ -1,3 +1,4 @@
{ ... }:
{ {
config.programs.git = { config.programs.git = {
enable = true; enable = true;

26
home/vinzenz/gnome.nix Normal file
View file

@ -0,0 +1,26 @@
{ pkgs, ... }:
{
config = {
home.packages =
with pkgs.gnomeExtensions;
[
gsconnect
# battery-health-charging
quick-settings-tweaker
solaar-extension
alphabetical-app-grid
]
++ (with pkgs; [ foliate ]);
dconf.settings = {
"org/gnome/shell" = {
enabled-extensions = [
"GPaste@gnome-shell-extensions.gnome.org"
"gsconnect@andyholmes.github.io"
"solaar-extension@sidevesh"
"AlphabeticalAppGrid@stuarthayhurst"
];
};
};
};
}

View file

@ -16,7 +16,16 @@
name = "adwaita-dark"; name = "adwaita-dark";
}; };
services.mako.enable = true; services = {
kdeconnect = {
enable = true;
# this still shows up in gnome session starting with 25.05
# indicator = true;
};
mako = {
enable = true;
};
};
programs.niri.settings = { programs.niri.settings = {
input.keyboard.xkb.layout = "de"; input.keyboard.xkb.layout = "de";

View file

@ -1,3 +1,4 @@
{ ... }:
{ {
config.programs.ssh = { config.programs.ssh = {
enable = true; enable = true;

View file

@ -20,7 +20,7 @@
my-direnvallow = "echo \"use nix\" > .envrc && direnv allow"; my-direnvallow = "echo \"use nix\" > .envrc && direnv allow";
my-ip4 = "ip addr show | grep 192"; my-ip4 = "ip addr show | grep 192";
deadnix = "nix run github:astro/deadnix -- "; deadnix = "nix run github:astro/deadnix -- ";
statix = "nix run github:oppiliappan/statix -- "; statix = "nix run git+https://git.peppe.rs/languages/statix -- ";
}; };
history = { history = {

View file

@ -1,15 +0,0 @@
{
imports = [
./configuration.nix
./editorconfig.nix
./fuzzel.nix
./git.nix
./gnome.nix
#./niri.nix
./ssh.nix
./swaylock.nix
./vscode.nix
./waybar.nix
./zsh.nix
];
}

Some files were not shown because too many files have changed in this diff Show more