updates config
This commit is contained in:
parent
13c76e23d1
commit
acbe8a473d
16 changed files with 270 additions and 22 deletions
8
flake.lock
generated
8
flake.lock
generated
|
|
@ -99,11 +99,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1772479524,
|
||||
"narHash": "sha256-U+hMRvavBzJYhdWCWGRHCK3bpcKjqTJAnyii3y09uT8=",
|
||||
"rev": "4215e62dc2cd3bc705b0a423b9719ff6be378a43",
|
||||
"lastModified": 1772525000,
|
||||
"narHash": "sha256-JVA3N5t5II0xI9+sJ44UgaN6tMrZGOox0w2xZzKYt9Q=",
|
||||
"rev": "72b1d820cb0149b40a35aa077b4b6d60cd1b23c3",
|
||||
"type": "tarball",
|
||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre957146.4215e62dc2cd/nixexprs.tar.xz"
|
||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre957475.72b1d820cb01/nixexprs.tar.xz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
|
|
|
|||
|
|
@ -22,9 +22,5 @@
|
|||
inputs:
|
||||
inputs.flake-parts.lib.mkFlake {
|
||||
inherit inputs;
|
||||
systems = [
|
||||
"aarch64-darwin"
|
||||
"x86_64-linux"
|
||||
];
|
||||
} (inputs.import-tree ./modules);
|
||||
}
|
||||
|
|
|
|||
11
hosts/dnsc-machine/default.nix
Normal file
11
hosts/dnsc-machine/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "dnsc-machine";
|
||||
environment.systemPackages = [ ];
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
41
hosts/dnsc-machine/hardware-configuration.nix
Normal file
41
hosts/dnsc-machine/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# Do not modify this file! It was generated by 'nixos-generate-config'
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/30277f94-8b7b-4e91-8438-6815170edfdd";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/4DC9-7AB7";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/9b7564e7-2deb-4432-a4fc-d18d21ef2d11"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp42s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp45s0f3u3u4.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@ let
|
|||
username = config.flake.globalConfig.username;
|
||||
in
|
||||
{
|
||||
flake.modules.darwin.system = {
|
||||
flake.modules.darwin.base = {
|
||||
system = {
|
||||
primaryUser = username;
|
||||
stateVersion = 5;
|
||||
|
|
@ -11,6 +11,8 @@ in
|
|||
/System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
|
||||
'';
|
||||
|
||||
nix.enable = false;
|
||||
|
||||
defaults = {
|
||||
NSGlobalDomain."com.apple.swipescrolldirection" = false;
|
||||
|
||||
|
|
@ -62,4 +64,54 @@ in
|
|||
|
||||
security.pam.services.sudo_local.touchIdAuth = true;
|
||||
};
|
||||
|
||||
flake.modules.nixos.base =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
security.sudo.enable = true;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
programs.mtr.enable = true;
|
||||
|
||||
services.xserver.xkb.layout = "eu";
|
||||
services.openssh.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
services.udev.packages = with pkgs; [
|
||||
vial
|
||||
];
|
||||
|
||||
users.users."${username}" = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
112
modules/base/default.nix
Normal file
112
modules/base/default.nix
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
username = config.flake.globalConfig.username;
|
||||
in
|
||||
{
|
||||
flake.modules.darwin.system =
|
||||
{ pkgs }:
|
||||
{
|
||||
system = {
|
||||
primaryUser = username;
|
||||
stateVersion = 5;
|
||||
activationScripts.postActivation.text = ''
|
||||
/System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
|
||||
'';
|
||||
|
||||
defaults = {
|
||||
NSGlobalDomain."com.apple.swipescrolldirection" = false;
|
||||
|
||||
dock = {
|
||||
autohide = true;
|
||||
autohide-delay = 0.01;
|
||||
autohide-time-modifier = 0.01;
|
||||
expose-group-apps = true;
|
||||
launchanim = false;
|
||||
minimize-to-application = true;
|
||||
orientation = "right";
|
||||
show-recents = false;
|
||||
persistent-apps = [
|
||||
"/Applications/Helium.app"
|
||||
"/Applications/Ghostty.app"
|
||||
"/System/Applications/System Settings.app/"
|
||||
];
|
||||
persistent-others = [
|
||||
"/Users/${username}/Downloads"
|
||||
];
|
||||
};
|
||||
|
||||
finder = {
|
||||
AppleShowAllExtensions = true;
|
||||
CreateDesktop = false;
|
||||
FXEnableExtensionChangeWarning = false;
|
||||
FXPreferredViewStyle = "clmv";
|
||||
ShowPathbar = true;
|
||||
ShowStatusBar = true;
|
||||
};
|
||||
|
||||
loginwindow = {
|
||||
LoginwindowText = "(λ) powered by nix-darwin";
|
||||
};
|
||||
|
||||
menuExtraClock = {
|
||||
Show24Hour = true;
|
||||
ShowDate = 0;
|
||||
};
|
||||
|
||||
screencapture = {
|
||||
location = "/Users/${username}/Downloads";
|
||||
target = "file";
|
||||
};
|
||||
|
||||
spaces.spans-displays = false;
|
||||
};
|
||||
};
|
||||
|
||||
security.pam.services.sudo_local.touchIdAuth = true;
|
||||
};
|
||||
|
||||
flake.modules.nixos.system =
|
||||
{ pkgs }:
|
||||
{
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
security.sudo.enable = true;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
programs.mtr.enable = true;
|
||||
|
||||
services.xserver.xkb.layout = "eu";
|
||||
services.openssh.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
|
||||
users.users."${username}" = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +1,11 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.flake.modules = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.lazyAttrsOf lib.types.raw);
|
||||
default = { };
|
||||
description = "Reusable NixOS/Darwin/home-manager modules keyed by type and name";
|
||||
};
|
||||
|
||||
options.flake.globalConfig = {
|
||||
username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
hostname = "dnsc-air";
|
||||
username = config.flake.globalConfig.username;
|
||||
in
|
||||
{
|
||||
|
|
@ -12,10 +13,10 @@ in
|
|||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
config.flake.modules.darwin.system
|
||||
config.flake.modules.darwin.base
|
||||
{
|
||||
networking.hostName = "dnsc-air";
|
||||
networking.computerName = "dnsc-air";
|
||||
networking.hostName = "${hostname}";
|
||||
networking.computerName = "${hostname}";
|
||||
users.users.${username}.home = "/Users/${username}";
|
||||
nix.enable = false;
|
||||
nix.settings.experimental-features = [
|
||||
|
|
|
|||
11
modules/hosts/dnsc-machine.nix
Normal file
11
modules/hosts/dnsc-machine.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
flake.nixosConfigurations.dnsc-machine = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with inputs.self.modules.nixos; [
|
||||
base
|
||||
"${inputs.self}/hosts/dnsc-machine/default.nix"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake.modules.homeManager.neovim = {
|
||||
flake.modules.homeManager.neovim = { pkgs, ... }: {
|
||||
imports = [ inputs.nixvim.homeModules.nixvim ];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
flake.modules.homeManager.neovim-editing = {
|
||||
flake.modules.homeManager.neovim-editing = { pkgs, ... }: {
|
||||
programs.nixvim = {
|
||||
plugins.sleuth.enable = true;
|
||||
plugins.nvim-surround.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
flake.modules.homeManager.neovim-formatter = {
|
||||
flake.modules.homeManager.neovim-formatter = { pkgs, ... }: {
|
||||
programs.nixvim.plugins.conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
flake.modules.homeManager.neovim-lsp = {
|
||||
flake.modules.homeManager.neovim-lsp = { pkgs, ... }: {
|
||||
programs.nixvim = {
|
||||
plugins.lspconfig.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
flake.modules.homeManager.neovim-picker = {
|
||||
flake.modules.homeManager.neovim-picker = { pkgs, ... }: {
|
||||
programs.nixvim = {
|
||||
plugins.oil = {
|
||||
enable = true;
|
||||
|
|
|
|||
7
modules/systems.nix
Normal file
7
modules/systems.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
systems = [
|
||||
"aarch64-darwin"
|
||||
"x86_64-linux"
|
||||
];
|
||||
}
|
||||
12
modules/vial/default.nix
Normal file
12
modules/vial/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
flake.modules.nixos.vial =
|
||||
{ pkgs }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
vial
|
||||
];
|
||||
services.udev.packages = with pkgs; [
|
||||
vial
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue