revamp of structure
This commit is contained in:
parent
275586f9c2
commit
b5365e6ab3
26 changed files with 383 additions and 393 deletions
|
|
@ -1,19 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./users.nix
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
allowed-users = [ "@wheel" ];
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.username = "strix";
|
||||
home.homeDirectory = "/home/strix";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
ghostty
|
||||
thunderbird
|
||||
vscode
|
||||
steam
|
||||
bitwarden-desktop
|
||||
signal-desktop
|
||||
nixd
|
||||
treefmt
|
||||
tealdeer
|
||||
claude-code
|
||||
gnome-extension-manager
|
||||
lmstudio
|
||||
sccache
|
||||
];
|
||||
|
||||
home.file.".cargo/config.toml".text = ''
|
||||
[target.'cfg(target_os = "linux")']
|
||||
linker = "${pkgs.clang}/bin/clang"
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold-wrapped}/bin/mold"]
|
||||
'';
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "nanotech";
|
||||
};
|
||||
sessionVariables = {
|
||||
SSH_AUTH_SOCK = "/home/strix/.bitwarden-ssh-agent.sock";
|
||||
};
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user.name = "strix";
|
||||
user.email = "strix@saluco.nl";
|
||||
init = { defaultBranch = "main"; };
|
||||
};
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = [
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||
];
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||
name = "terminal";
|
||||
command = "ghostty";
|
||||
binding = "<Super>Return";
|
||||
};
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
home.stateVersion = "26.11";
|
||||
}
|
||||
|
|
@ -1,27 +1,16 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../common
|
||||
../../modules/nixos
|
||||
../../modules/boot
|
||||
../../modules/
|
||||
../../modules/boot/plymouth.nix
|
||||
../../modules/boot/secure-boot.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "p14s";
|
||||
|
||||
# secure boot shit
|
||||
environment.systemPackages = [ pkgs.sbctl ];
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/var/lib/sbctl";
|
||||
autoGenerateKeys.enable = true;
|
||||
autoEnrollKeys = {
|
||||
enable = true;
|
||||
autoReboot = true;
|
||||
};
|
||||
configurationLimit = 5;
|
||||
};
|
||||
|
||||
# swap & hibernate
|
||||
boot.initrd.luks.devices."luks-d51bdb99-5966-40d3-a920-83ea78a73699" = {
|
||||
device = "/dev/disk/by-uuid/d51bdb99-5966-40d3-a920-83ea78a73699";
|
||||
|
|
@ -29,17 +18,31 @@
|
|||
};
|
||||
boot.kernelParams = [ "resume=/dev/disk/by-uuid/d51bdb99-5966-40d3-a920-83ea78a73699" ];
|
||||
|
||||
# vm definition
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation = {
|
||||
memorySize = 8192;
|
||||
cores = 6;
|
||||
};
|
||||
boot.initrd.checkJournalingFS = false;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
spice-vdagent
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
mesa
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
mesa
|
||||
vulkan-loader
|
||||
];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
22
|
||||
8080
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [ 8080 ];
|
||||
networking.firewall.trustedInterfaces = [
|
||||
"virbr0"
|
||||
"docker0"
|
||||
];
|
||||
|
||||
system.stateVersion = "26.05"; # yes
|
||||
}
|
||||
143
flake.nix
143
flake.nix
|
|
@ -5,72 +5,89 @@
|
|||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v1.1.0";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
inputs.lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v1.1.0";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
filter = with nixpkgs.lib;
|
||||
folder: fileset.toList (fileset.fileFilter
|
||||
(file:
|
||||
hasSuffix "nix"
|
||||
file.name)
|
||||
folder);
|
||||
nixosConfig = {modules ? []}: nixpkgs.lib.nixosSystem {
|
||||
modules = modules;
|
||||
specialArgs = { inherit inputs filter home-manager; };
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations.p14s = nixosConfig {
|
||||
modules = [
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
./devices/p14s
|
||||
./styles/desktop.nix
|
||||
];
|
||||
};
|
||||
|
||||
apps.x86_64-linux.default = {
|
||||
type = "app";
|
||||
program = toString (nixpkgs.legacyPackages.x86_64-linux.writeShellScript "rebuild" ''
|
||||
exec sudo nixos-rebuild switch --flake . "$@"
|
||||
'');
|
||||
};
|
||||
|
||||
apps.x86_64-linux.registerDevice = {
|
||||
type = "app";
|
||||
program = toString (nixpkgs.legacyPackages.x86_64-linux.writeShellScript "rebuild" ''
|
||||
[ -d ./devices/$HOST ] && exit 1
|
||||
mkdir -p ./devices/$HOST
|
||||
nixos-generate-config --show-hardware-config > ./devices/$HOST/hardware-config.nix
|
||||
cat>./devices/$HOST/default.nix<<EOF
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
../../common
|
||||
./hardware-configuration.nix
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
lanzaboote,
|
||||
...
|
||||
}:
|
||||
let
|
||||
filter =
|
||||
with nixpkgs.lib;
|
||||
folder: fileset.toList (fileset.fileFilter (file: hasSuffix "nix" file.name) folder);
|
||||
nixosConfig =
|
||||
name:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
./modules/nixos
|
||||
./devices/${name}
|
||||
./users/strix
|
||||
];
|
||||
networking.hostName = "$HOST";
|
||||
system.stateVersion = "${nixpkgs.lib.trivial.release}"; # yes
|
||||
}
|
||||
EOF
|
||||
'');
|
||||
};
|
||||
specialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
filter
|
||||
home-manager
|
||||
lanzaboote
|
||||
;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations.p14s = nixosConfig "p14s";
|
||||
|
||||
devShells.x86_64-linux.default =
|
||||
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
in pkgs.mkShell {
|
||||
shellHook = ''
|
||||
echo "Building VM..."
|
||||
rm -rf *.qcow2
|
||||
nixos-rebuild build-vm --flake . && ./result/bin/run-*-vm
|
||||
exit
|
||||
'';
|
||||
};
|
||||
apps.x86_64-linux.default = {
|
||||
type = "app";
|
||||
program = toString (
|
||||
nixpkgs.legacyPackages.x86_64-linux.writeShellScript "rebuild" ''
|
||||
exec sudo nixos-rebuild switch --flake . "$@"
|
||||
''
|
||||
);
|
||||
};
|
||||
|
||||
};
|
||||
apps.x86_64-linux.registerDevice = {
|
||||
type = "app";
|
||||
program = toString (
|
||||
nixpkgs.legacyPackages.x86_64-linux.writeShellScript "rebuild" ''
|
||||
[ -d ./devices/$HOST ] && exit 1
|
||||
mkdir -p ./devices/$HOST
|
||||
nixos-generate-config --show-hardware-config > ./devices/$HOST/hardware-config.nix
|
||||
cat>./devices/$HOST/default.nix<<EOF
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
../../common
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
networking.hostName = "$HOST";
|
||||
system.stateVersion = "${nixpkgs.lib.trivial.release}"; # yes
|
||||
}
|
||||
EOF
|
||||
''
|
||||
);
|
||||
};
|
||||
|
||||
devShells.x86_64-linux.default =
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
in
|
||||
pkgs.mkShell {
|
||||
shellHook = ''
|
||||
echo "Building VM..."
|
||||
rm -rf *.qcow2
|
||||
nixos-rebuild build-vm --flake . && ./result/bin/run-*-vm
|
||||
exit
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
4
modules/boot/default.nix
Normal file
4
modules/boot/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
}
|
||||
25
modules/boot/plymouth.nix
Normal file
25
modules/boot/plymouth.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{pkgs,...}:
|
||||
{
|
||||
boot.consoleLogLevel = 3;
|
||||
boot.initrd.verbose = false;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"udev.log_priority=3"
|
||||
"rd.udev.log_level=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
];
|
||||
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "bgrt";
|
||||
package = pkgs.plymouth.overrideAttrs (old: {
|
||||
postInstall = (old.postInstall or "") + ''
|
||||
sed -i \
|
||||
-e 's/DialogClearsFirmwareBackground=true/DialogClearsFirmwareBackground=false/' \
|
||||
-e 's/DialogVerticalAlignment=.382/DialogVerticalAlignment=.55/' \
|
||||
-e 's/TitleVerticalAlignment=.382/TitleVerticalAlignment=.55/' \
|
||||
$out/share/plymouth/themes/bgrt/bgrt.plymouth
|
||||
'';
|
||||
});
|
||||
};
|
||||
}
|
||||
20
modules/boot/secure-boot.nix
Normal file
20
modules/boot/secure-boot.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, pkgs, inputs, ... }:
|
||||
{
|
||||
inputs = [
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
];
|
||||
|
||||
environment.systemPackages = [ pkgs.sbctl ];
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/var/lib/sbctl";
|
||||
autoGenerateKeys.enable = true;
|
||||
autoEnrollKeys = {
|
||||
enable = true;
|
||||
autoReboot = true;
|
||||
};
|
||||
configurationLimit = 5;
|
||||
};
|
||||
}
|
||||
6
modules/boot/systemd-boot.nix
Normal file
6
modules/boot/systemd-boot.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.timeout = 0;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
11
modules/desktop/audio.nix
Normal file
11
modules/desktop/audio.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ }:
|
||||
{
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
||||
7
modules/desktop/default.nix
Normal file
7
modules/desktop/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ }:
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.firefox.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
services.fprintd.enable = true;
|
||||
}
|
||||
12
modules/desktop/gnome.nix
Normal file
12
modules/desktop/gnome.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{}:
|
||||
{
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
}
|
||||
6
modules/desktop/printing.nix
Normal file
6
modules/desktop/printing.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.printing = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
9
modules/develop/default.nix
Normal file
9
modules/develop/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
cargo
|
||||
sccache
|
||||
];
|
||||
|
||||
environment.sessionVariables."RUSTC_WRAPPER" = "sccache";
|
||||
}
|
||||
9
modules/home-manager/git.nix
Normal file
9
modules/home-manager/git.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
init = { defaultBranch = "main"; };
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/home-manager/gnome.nix
Normal file
15
modules/home-manager/gnome.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ ... }: {
|
||||
dconf.settings = {
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = [
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||
];
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||
name = "terminal";
|
||||
command = "ghostty";
|
||||
binding = "<Super>Return";
|
||||
};
|
||||
};
|
||||
}
|
||||
8
modules/home-manager/mold.nix
Normal file
8
modules/home-manager/mold.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".cargo/config.toml".text = ''
|
||||
[target.'cfg(target_os = "linux")']
|
||||
linker = "${pkgs.clang}/bin/clang"
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold-wrapped}/bin/mold"]
|
||||
'';
|
||||
}
|
||||
13
modules/home-manager/zsh.nix
Normal file
13
modules/home-manager/zsh.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ username, ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "nanotech";
|
||||
};
|
||||
sessionVariables = {
|
||||
SSH_AUTH_SOCK = "/home/${username}/.bitwarden-ssh-agent.sock";
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/networking/default.nix
Normal file
5
modules/networking/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
{
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.enable = true;
|
||||
}
|
||||
35
modules/nixos/default.nix
Normal file
35
modules/nixos/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./i18n.nix
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
htop
|
||||
];
|
||||
|
||||
environment.shellAliases = {
|
||||
vim = "nvim";
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
allowed-users = [ "@wheel" ];
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables."NIX_AUTO_RUN" = "1";
|
||||
}
|
||||
16
modules/nixos/i18n.nix
Normal file
16
modules/nixos/i18n.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ ... }:
|
||||
{
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nl_NL.UTF-8";
|
||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||
LC_MONETARY = "nl_NL.UTF-8";
|
||||
LC_NAME = "nl_NL.UTF-8";
|
||||
LC_NUMERIC = "nl_NL.UTF-8";
|
||||
LC_PAPER = "nl_NL.UTF-8";
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_TIME = "nl_NL.UTF-8";
|
||||
};
|
||||
}
|
||||
13
modules/virtualisation/default.nix
Normal file
13
modules/virtualisation/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
autoPrune = {
|
||||
dates = "weekly";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.dnsmasq ];
|
||||
}
|
||||
|
|
@ -1,136 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.timeout = 0;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.consoleLogLevel = 3;
|
||||
boot.initrd.verbose = false;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"udev.log_priority=3"
|
||||
"rd.udev.log_level=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
];
|
||||
boot.initrd.checkJournalingFS = false;
|
||||
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "bgrt";
|
||||
package = pkgs.plymouth.overrideAttrs (old: {
|
||||
postInstall = (old.postInstall or "") + ''
|
||||
sed -i \
|
||||
-e 's/DialogClearsFirmwareBackground=true/DialogClearsFirmwareBackground=false/' \
|
||||
-e 's/DialogVerticalAlignment=.382/DialogVerticalAlignment=.55/' \
|
||||
-e 's/TitleVerticalAlignment=.382/TitleVerticalAlignment=.55/' \
|
||||
$out/share/plymouth/themes/bgrt/bgrt.plymouth
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nl_NL.UTF-8";
|
||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||
LC_MONETARY = "nl_NL.UTF-8";
|
||||
LC_NAME = "nl_NL.UTF-8";
|
||||
LC_NUMERIC = "nl_NL.UTF-8";
|
||||
LC_PAPER = "nl_NL.UTF-8";
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_TIME = "nl_NL.UTF-8";
|
||||
};
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
programs.virt-manager.enable = true;
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
autoPrune = {
|
||||
dates = "weekly";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
htop
|
||||
dnsmasq
|
||||
sccache
|
||||
];
|
||||
|
||||
environment.shellAliases = {
|
||||
vim = "nvim";
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
RUSTC_WRAPPER = "sccache";
|
||||
NIX_AUTO_RUN = "1";
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
services.fprintd.enable = true;
|
||||
services.mullvad-vpn.enable = true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
22
|
||||
8080
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [ 8080 ];
|
||||
networking.firewall.trustedInterfaces = [ "virbr0" "docker0" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
mesa
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
mesa
|
||||
vulkan-loader
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "26.05"; # yes
|
||||
|
||||
# services.qemuGuest.enable = false;
|
||||
# services.spice-vdagentd.enable = false;
|
||||
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation = {
|
||||
memorySize = 8192;
|
||||
cores = 6;
|
||||
};
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.consoleLogLevel = 3;
|
||||
boot.initrd.verbose = false;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"rd.udev.log_level=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nl_NL.UTF-8";
|
||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||
LC_MONETARY = "nl_NL.UTF-8";
|
||||
LC_NAME = "nl_NL.UTF-8";
|
||||
LC_NUMERIC = "nl_NL.UTF-8";
|
||||
LC_PAPER = "nl_NL.UTF-8";
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_TIME = "nl_NL.UTF-8";
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
];
|
||||
|
||||
environment.shellAliases = {
|
||||
vim = "nvim";
|
||||
};
|
||||
|
||||
environment.variables.NIX_AUTO_RUN = "1";
|
||||
|
||||
services.openssh.enable = true;
|
||||
services.fprintd.enable = true;
|
||||
services.mullvad-vpn.enable = true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
# open ports tcp
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
# open ports udp
|
||||
];
|
||||
|
||||
}
|
||||
|
|
@ -1,22 +1,33 @@
|
|||
{ home-manager, inputs, filter, pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
home-manager,
|
||||
inputs,
|
||||
filter,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../util/profile-icons.nix
|
||||
../../util/profile-icons.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs filter; };
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs filter;
|
||||
username = "strix";
|
||||
};
|
||||
home-manager.users.strix = ./home.nix;
|
||||
}
|
||||
];
|
||||
|
||||
users.users."strix" = {
|
||||
isNormalUser = true;
|
||||
icon = "${./profile.png}";
|
||||
shell = pkgs.zsh;
|
||||
description = "Strix";
|
||||
initialPassword = "changeme";
|
||||
shell = pkgs.zsh;
|
||||
|
||||
description = "Sx. Aluco";
|
||||
icon = "${./profile.png}";
|
||||
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
|
|
@ -28,4 +39,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
services.mullvad-vpn.enable = true;
|
||||
|
||||
}
|
||||
39
users/strix/home.nix
Normal file
39
users/strix/home.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../../modules/home-manager/git.nix
|
||||
../../modules/home-manager/gnome.nix
|
||||
../../modules/home-manager/mold.nix
|
||||
../../modules/home-manager/zsh.nix
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
home.username = "strix";
|
||||
home.homeDirectory = "/home/strix";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
ghostty
|
||||
thunderbird
|
||||
vscode
|
||||
steam
|
||||
bitwarden-desktop
|
||||
signal-desktop
|
||||
nixd
|
||||
treefmt
|
||||
tealdeer
|
||||
claude-code
|
||||
gnome-extension-manager
|
||||
lmstudio
|
||||
sccache
|
||||
];
|
||||
|
||||
programs.git.settings = {
|
||||
user.name = "strix";
|
||||
user.email = "strix@saluco.nl";
|
||||
};
|
||||
|
||||
home.stateVersion = "26.11";
|
||||
}
|
||||
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
Loading…
Add table
Add a link
Reference in a new issue