cleanup and format

This commit is contained in:
Thilo Billerbeck 2024-02-27 02:54:02 +01:00
parent 1121201acd
commit 07a1841fda
37 changed files with 336 additions and 427 deletions

View file

@ -1,24 +1,27 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ]; boot = {
boot.initrd.kernelModules = [ ]; initrd = {
boot.kernelModules = [ "kvm-amd" ]; availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
boot.extraModulePackages = [ ]; kernelModules = [ ];
};
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
};
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/2e1227f6-8725-43a3-aeb6-961df4ed9b25"; device = "/dev/disk/by-uuid/2e1227f6-8725-43a3-aeb6-961df4ed9b25";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-6f077715-c436-4254-acb2-66d8be0a0c55".device = "/dev/disk/by-uuid/6f077715-c436-4254-acb2-66d8be0a0c55"; boot.initrd.luks.devices."luks-6f077715-c436-4254-acb2-66d8be0a0c55".device =
"/dev/disk/by-uuid/6f077715-c436-4254-acb2-66d8be0a0c55";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/877C-C918"; device = "/dev/disk/by-uuid/877C-C918";
fsType = "vfat"; fsType = "vfat";
}; };
@ -33,5 +36,6 @@
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,13 +1,12 @@
{ inputs, pkgs, ... }: { inputs, pkgs, ... }:
{ {
home-manager.useGlobalPkgs = true; home-manager = {
home-manager.useUserPackages = true; useGlobalPkgs = true;
home-manager.extraSpecialArgs = { inherit inputs; }; useUserPackages = true;
home-manager.users.thilo = { extraSpecialArgs = { inherit inputs; };
imports = [ users.thilo = {
./../../home-manager/modules/machine.nix imports = [ ./../../home-manager/modules/machine.nix ];
];
machine = { machine = {
username = "thilo"; username = "thilo";
@ -34,11 +33,11 @@
obs-command-source obs-command-source
obs-move-transition obs-move-transition
advanced-scene-switcher advanced-scene-switcher
]; */ ];
*/
}; };
home.sessionVariables = { home.sessionVariables = { LD_LIBRARY_PATH = "${pkgs.libGL}/lib"; };
LD_LIBRARY_PATH = "${pkgs.libGL}/lib";
}; };
}; };
} }

View file

@ -1,35 +1,26 @@
{ { pkgs, ... }:
config,
pkgs,
lib,
...
}:
{ {
imports = imports = [ # Include the results of the hardware scan.
[ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./../../nixos/common.nix ./../../nixos/common.nix
]; ];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader = {
boot.loader.efi.canTouchEfiVariables = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# Setup keyfile # Setup keyfile
boot.initrd.secrets = { boot.initrd.secrets = { "/crypto_keyfile.bin" = null; };
"/crypto_keyfile.bin" = null;
};
networking.hostName = "thilo-laptop"; # Define your hostname. networking.hostName = "thilo-laptop"; # Define your hostname.
# Configure console keymap # Configure console keymap
console.keyMap = "de"; console.keyMap = "de";
environment.gnome.excludePackages = with pkgs; [ environment.gnome.excludePackages = with pkgs; [ tracker tracker-miners ];
tracker
tracker-miners
];
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
@ -50,10 +41,7 @@
fwupd.enable = true; fwupd.enable = true;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ brlaser brgenml1lpr ];
brlaser
brgenml1lpr
];
system.stateVersion = "23.05"; system.stateVersion = "23.05";
} }

View file

@ -1,34 +1,38 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { config, lib, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "uas" "usb_storage" "sd_mod" ]; boot = {
boot.initrd.kernelModules = [ ]; initrd = {
boot.kernelModules = [ "kvm-amd" ]; availableKernelModules =
boot.extraModulePackages = [ ]; [ "nvme" "xhci_pci" "ahci" "usbhid" "uas" "usb_storage" "sd_mod" ];
kernelModules = [ ];
};
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
};
fileSystems."/" = fileSystems = {
{ device = "/dev/disk/by-uuid/34eb30d5-5faa-409f-81ee-7b996d37534a"; "/" = {
device = "/dev/disk/by-uuid/34eb30d5-5faa-409f-81ee-7b996d37534a";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@" ]; options = [ "subvol=@" ];
}; };
fileSystems."/data" = "/data" = {
{
device = "/dev/disk/by-uuid/91f64815-1d3c-4032-960f-0a53eb3b01ab"; device = "/dev/disk/by-uuid/91f64815-1d3c-4032-960f-0a53eb3b01ab";
fsType = "btrfs"; fsType = "btrfs";
}; };
fileSystems."/boot" = "/boot" = {
{ device = "/dev/disk/by-uuid/0EB3-BFB0"; device = "/dev/disk/by-uuid/0EB3-BFB0";
fsType = "vfat"; fsType = "vfat";
}; };
};
swapDevices = [ ]; swapDevices = [ ];
@ -40,5 +44,6 @@
# networking.interfaces.enp8s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp8s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,13 +1,12 @@
{ inputs, pkgs, ... }: { inputs, pkgs, ... }:
{ {
home-manager.useGlobalPkgs = true; home-manager = {
home-manager.useUserPackages = true; useGlobalPkgs = true;
home-manager.extraSpecialArgs = { inherit inputs; }; useUserPackages = true;
home-manager.users.thilo = { extraSpecialArgs = { inherit inputs; };
imports = [ users.thilo = {
./../../home-manager/modules/machine.nix imports = [ ./../../home-manager/modules/machine.nix ];
];
machine = { machine = {
username = "thilo"; username = "thilo";
@ -26,12 +25,9 @@
services.kdeconnect.enable = true; services.kdeconnect.enable = true;
services.kdeconnect.indicator = true; services.kdeconnect.indicator = true;
home.sessionVariables = { home.sessionVariables = { LD_LIBRARY_PATH = "${pkgs.libGL}/lib"; };
LD_LIBRARY_PATH = "${pkgs.libGL}/lib";
};
home.packages = with pkgs; [ home.packages = with pkgs; [ libsForQt5.discover ];
libsForQt5.discover };
];
}; };
} }

View file

@ -1,11 +1,7 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config { pkgs, ... }:
, pkgs
, lib
, ...
}:
{ {
imports = [ imports = [
@ -15,12 +11,18 @@
]; ];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot = {
boot.loader.efi.canTouchEfiVariables = true; loader = {
boot.loader.systemd-boot.extraInstallCommands = '' systemd-boot = {
enable = true;
extraInstallCommands = ''
${pkgs.gnused}/bin/sed -i "/default/c\default @saved" /boot/loader/loader.conf ${pkgs.gnused}/bin/sed -i "/default/c\default @saved" /boot/loader/loader.conf
''; '';
boot.kernelPackages = pkgs.linuxPackages_latest; };
efi.canTouchEfiVariables = true;
};
kernelPackages = pkgs.linuxPackages_latest;
};
networking.hostName = "thilo-pc"; networking.hostName = "thilo-pc";
@ -37,10 +39,7 @@
}; };
hardware.opengl = { hardware.opengl = {
extraPackages = with pkgs; [ extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl ];
vaapiVdpau
libvdpau-va-gl
];
}; };
system.stateVersion = "23.05"; system.stateVersion = "23.05";

View file

@ -1,9 +1,7 @@
{ inputs, ... }: { ... }:
{ {
imports = [ imports = [ ./../../home-manager/modules/machine.nix ];
./../../home-manager/modules/machine.nix
];
machine = { machine = {
username = "thilo"; username = "thilo";
@ -12,4 +10,4 @@
noiseSuppression.enable = false; noiseSuppression.enable = false;
isGraphical = false; isGraphical = false;
}; };
} }

View file

@ -2,12 +2,8 @@
description = "Nixos config"; description = "Nixos config";
inputs = { inputs = {
nixpkgs = { nixpkgs = { url = "github:NixOS/nixpkgs/nixos-unstable"; };
url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-update = { url = "github:ryantm/nixpkgs-update"; };
};
nixpkgs-update = {
url = "github:ryantm/nixpkgs-update";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -20,19 +16,16 @@
muse-sounds-manager.url = "github:thilobillerbeck/muse-sounds-manager-nix"; muse-sounds-manager.url = "github:thilobillerbeck/muse-sounds-manager-nix";
}; };
outputs = { self, nixpkgs, home-manager, nixgl, ... }@inputs: outputs = { nixpkgs, home-manager, nixgl, ... }@inputs:
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "${system}"; system = "${system}";
overlays = [ nixgl.overlay ]; overlays = [ nixgl.overlay ];
}; };
in in {
{
nixConfig = { nixConfig = {
extra-substituters = [ extra-substituters = [ "https://nix-community.cachix.org" ];
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
]; ];
@ -55,7 +48,8 @@
]; ];
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
}; };
homeConfigurations."thilo@thilo-pc-win" = home-manager.lib.homeManagerConfiguration { homeConfigurations."thilo@thilo-pc-win" =
home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = [ ./configs/wsl/home.nix ]; modules = [ ./configs/wsl/home.nix ];
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };

View file

@ -1,6 +1,5 @@
{ lib, pkgs, config, ... }: { lib, pkgs, config, ... }:
with lib; with lib; {
{
imports = [ imports = [
./../programs/alacritty.nix ./../programs/alacritty.nix
./../programs/bat.nix ./../programs/bat.nix
@ -71,7 +70,8 @@ with lib;
''; '';
".ssh/config_source" = { ".ssh/config_source" = {
source = ./../dotfiles/ssh-config; source = ./../dotfiles/ssh-config;
onChange = ''cat ~/.ssh/config_source > ~/.ssh/config && chmod 600 ~/.ssh/config''; onChange =
"cat ~/.ssh/config_source > ~/.ssh/config && chmod 600 ~/.ssh/config";
}; };
".gitignore".source = ./../dotfiles/.gitignore; ".gitignore".source = ./../dotfiles/.gitignore;
".config/pipewire/pipewire.conf.d/99-noise-suppression.conf".text = '' ".config/pipewire/pipewire.conf.d/99-noise-suppression.conf".text = ''

View file

@ -2,20 +2,20 @@
with lib; with lib;
let let
electronFlags = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --disable-gpu-shader-disk-cache -n"; electronFlags =
"--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --disable-gpu-shader-disk-cache -n";
in { in {
config = { config = {
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { (_: prev: {
quickemu = prev.quickemu.overrideAttrs (old: { quickemu = prev.quickemu.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ patches = (old.patches or [ ]) ++ [ ./../patches/quickemu.patch ];
./../patches/quickemu.patch
];
}); });
}) })
]; ];
home.packages = with pkgs; [ home.packages = with pkgs;
[
up up
htop htop
rustc rustc
@ -50,9 +50,7 @@ in {
(pkgs.writeShellScriptBin "nix-build-default" '' (pkgs.writeShellScriptBin "nix-build-default" ''
nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }' nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'
'') '')
(callPackage ./../pkgs/toggl-time-grouper/package.nix { (callPackage ./../pkgs/toggl-time-grouper/package.nix { inherit lib; })
inherit lib;
})
nixpkgs-fmt nixpkgs-fmt
toolbox toolbox
distrobox distrobox
@ -89,10 +87,8 @@ in {
spotify spotify
vesktop vesktop
(lutris.override { (lutris.override {
extraLibraries = pkgs: [ extraLibraries = _: [ gnome3.adwaita-icon-theme ];
gnome3.adwaita-icon-theme extraPkgs = _: [
];
extraPkgs = pkgs: [
wineWowPackages.full wineWowPackages.full
winetricks winetricks
gnome3.adwaita-icon-theme gnome3.adwaita-icon-theme
@ -118,12 +114,14 @@ in {
syncthingtray syncthingtray
reaper reaper
yabridge yabridge
] else [ ]) ++ (if config.machine.isGnome then [ ] else
[ ]) ++ (if config.machine.isGnome then [
gnomeExtensions.blur-my-shell gnomeExtensions.blur-my-shell
gnomeExtensions.dash-to-panel gnomeExtensions.dash-to-panel
gnomeExtensions.user-themes gnomeExtensions.user-themes
gnomeExtensions.vitals gnomeExtensions.vitals
gnomeExtensions.custom-accent-colors gnomeExtensions.custom-accent-colors
] else [ ]); ] else
[ ]);
}; };
} }

View file

@ -1,7 +1,4 @@
{ lib { lib, stdenv, fetchFromGitHub }:
, stdenv
, fetchFromGitHub
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "docker-craft-cms-dev-env"; pname = "docker-craft-cms-dev-env";
@ -20,7 +17,8 @@ stdenv.mkDerivation rec {
''; '';
meta = with lib; { meta = with lib; {
description = "Docker image for local development of sites based on Craft CMS"; description =
"Docker image for local development of sites based on Craft CMS";
homepage = "https://github.com/codemonauts/docker-craft-cms-dev-env"; homepage = "https://github.com/codemonauts/docker-craft-cms-dev-env";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ ]; maintainers = with maintainers; [ ];

View file

@ -1,8 +1,4 @@
{ lib { lib, buildNpmPackage, fetchFromGitHub }:
, stdenv
, buildNpmPackage
, fetchFromGitHub
}:
buildNpmPackage rec { buildNpmPackage rec {
pname = "spx-gc"; pname = "spx-gc";
@ -25,7 +21,8 @@ buildNpmPackage rec {
''; '';
meta = with lib; { meta = with lib; {
description = "SPX is a graphics control client for live video productions and live streams using CasparCG, OBS, vMix, or similar software"; description =
"SPX is a graphics control client for live video productions and live streams using CasparCG, OBS, vMix, or similar software";
homepage = "https://github.com/TuomoKu/SPX-GC#npminstall"; homepage = "https://github.com/TuomoKu/SPX-GC#npminstall";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ ]; maintainers = with maintainers; [ ];

View file

@ -1,4 +1,4 @@
{ lib, python3Packages }: { python3Packages }:
with python3Packages; with python3Packages;
buildPythonApplication { buildPythonApplication {
name = "toggl-time-grouper"; name = "toggl-time-grouper";

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, ... }:
{ {
programs.alacritty = { programs.alacritty = {

View file

@ -1,5 +1 @@
{ config, pkgs, lib, ... }: { programs.bat = { enable = true; }; }
{
programs.bat = { enable = true; };
}

View file

@ -1,5 +1,3 @@
{ config, pkgs, lib, ... }:
{ {
programs.beets = { programs.beets = {
enable = false; enable = false;

View file

@ -31,21 +31,14 @@ let
"--ozone-platform-hint=auto" "--ozone-platform-hint=auto"
"--enable-hardware-overlays" "--enable-hardware-overlays"
]; ];
extensions = map extensions = map (eid: { id = eid; }) chromium_extension;
(eid: { in {
id = eid;
})
chromium_extension;
in
{
programs.chromium = { programs.chromium = {
inherit dictionaries commandLineArgs extensions;
enable = isEnabled; enable = isEnabled;
dictionaries = dictionaries;
commandLineArgs = commandLineArgs;
extensions = extensions;
}; };
programs.google-chrome = { programs.google-chrome = {
inherit commandLineArgs;
enable = isEnabled; enable = isEnabled;
commandLineArgs = commandLineArgs;
}; };
} }

View file

@ -1,5 +1 @@
{ config, pkgs, lib, ... }: { programs.command-not-found = { enable = true; }; }
{
programs.command-not-found = { enable = true; };
}

View file

@ -1,5 +1,3 @@
{ config, pkgs, lib, ... }:
{ {
programs.dircolors = { programs.dircolors = {
enable = true; enable = true;

View file

@ -1,5 +1,3 @@
{ config, pkgs, lib, ... }:
{ {
programs.direnv = { programs.direnv = {
enable = true; enable = true;

View file

@ -1,5 +1,3 @@
{ config, pkgs, lib, ... }:
{ {
programs.fzf = { programs.fzf = {
enable = true; enable = true;

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { pkgs, ... }:
{ {
programs.git = { programs.git = {
@ -27,7 +27,5 @@
branch = { autosetuprebase = "always"; }; branch = { autosetuprebase = "always"; };
}; };
}; };
programs.git-credential-oauth = { programs.git-credential-oauth = { enable = true; };
enable = true;
};
} }

View file

@ -1,7 +1 @@
{ config, pkgs, lib, ... }: { programs.go = { enable = true; }; }
{
programs.go = {
enable = true;
};
}

View file

@ -1,5 +1 @@
{ config, pkgs, lib, ... }: { programs.hstr = { enable = true; }; }
{
programs.hstr = { enable = true; };
}

View file

@ -1,5 +1,3 @@
{ config, pkgs, lib, ... }:
{ {
programs.htop = { programs.htop = {
enable = true; enable = true;

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { pkgs, ... }:
{ {
programs.neovim = { programs.neovim = {

View file

@ -1,5 +1,3 @@
{ config, pkgs, lib, ... }:
{ {
programs.starship = { programs.starship = {
enable = true; enable = true;

View file

@ -1,7 +1 @@
{ config, pkgs, lib, ... }: { services.syncthing = { enable = true; }; }
{
services.syncthing = {
enable = true;
};
}

View file

@ -1,7 +1,10 @@
{ config, pkgs, lib, ... }: { config, ... }:
let let
configPath = if config.machine.isGeneric then "${config.home.homeDirectory}/.config/home-manager" else "${config.home.homeDirectory}/.nixos-config"; configPath = if config.machine.isGeneric then
"${config.home.homeDirectory}/.config/home-manager"
else
"${config.home.homeDirectory}/.nixos-config";
in { in {
programs.topgrade = { programs.topgrade = {
enable = true; enable = true;
@ -13,18 +16,13 @@ in {
pre_sudo = false; pre_sudo = false;
cleanup = true; cleanup = true;
skip_notify = true; skip_notify = true;
disable = [ disable = [ "bun" "tldr" "flutter" ];
"bun"
"tldr"
"flutter"
];
}; };
git.repos = [ git.repos = [ configPath ];
configPath
];
firmware = { upgrade = true; }; firmware = { upgrade = true; };
pre_commands = { pre_commands = {
flakeUpgrade = "cd ${configPath} && nix flake update --commit-lock-file --verbose --repair"; flakeUpgrade =
"cd ${configPath} && nix flake update --commit-lock-file --verbose --repair";
}; };
}; };
}; };

View file

@ -1,6 +1,2 @@
{ config, pkgs, lib, ... }: { programs.yt-dlp = { enable = true; }; }
{
programs.yt-dlp = { enable = true; };
}

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { pkgs, ... }:
let let
omz-plugins = [ omz-plugins = [
"git" "git"

View file

@ -1,5 +1,4 @@
{ pkgs, lib, ... }:
{ config, pkgs, lib, ... }:
let let
chromeArgs = lib.strings.concatStringsSep " " [ chromeArgs = lib.strings.concatStringsSep " " [
@ -16,15 +15,15 @@ let
"--ozone-platform-hint=auto" "--ozone-platform-hint=auto"
"--enable-features=WaylandWindowDecorations" "--enable-features=WaylandWindowDecorations"
]; ];
code-wrapper = (pkgs.writeShellScriptBin "code" '' code-wrapper = pkgs.writeShellScriptBin "code" ''
exec /usr/bin/code ${codeArgs} "$@" exec /usr/bin/code ${codeArgs} "$@"
''); '';
chrome-wrapper = (pkgs.writeShellScriptBin "google-chrome" '' chrome-wrapper = pkgs.writeShellScriptBin "google-chrome" ''
exec /usr/bin/google-chrome ${chromeArgs} "$@" exec /usr/bin/google-chrome ${chromeArgs} "$@"
''); '';
chrome-stable-wrapper = (pkgs.writeShellScriptBin "google-chrome-stable" '' chrome-stable-wrapper = pkgs.writeShellScriptBin "google-chrome-stable" ''
exec /usr/bin/google-chrome-stable ${chromeArgs} "$@" exec /usr/bin/google-chrome-stable ${chromeArgs} "$@"
''); '';
in { in {
home.packages = with pkgs; [ home.packages = with pkgs; [
code-wrapper code-wrapper

View file

@ -8,10 +8,7 @@
sandbox = relaxed sandbox = relaxed
''; '';
settings = { settings = {
trusted-users = [ trusted-users = [ "root" "thilo" ];
"root"
"thilo"
];
trusted-substituters = [ trusted-substituters = [
"https://cache.nixos.org" "https://cache.nixos.org"
"https://nix-community.cachix.org" "https://nix-community.cachix.org"

View file

@ -1,31 +1,22 @@
{ config { config, pkgs, lib, inputs, ... }:
, pkgs
, lib
, inputs
, ...
}:
{ {
imports = [ imports = [ ./../nix.nix ];
./../nix.nix
];
nix = { nix = {
# This will add each flake input as a registry # This will add each flake input as a registry
# To make nix3 commands consistent with your flake # To make nix3 commands consistent with your flake
registry = lib.mapAttrs (_: value: {flake = value;}) inputs; registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
# This will additionally add your inputs to the system's legacy channels # This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome! # Making legacy nix commands consistent as well, awesome!
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry; nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}")
config.nix.registry;
}; };
nixpkgs = { nixpkgs = {
config = { config = {
permittedInsecurePackages = [ permittedInsecurePackages = [ "electron-24.8.6" "electron-25.9.0" ];
"electron-24.8.6"
"electron-25.9.0"
];
allowUnfree = true; allowUnfree = true;
}; };
}; };
@ -85,12 +76,7 @@
noisetorch.enable = true; noisetorch.enable = true;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ git zsh kitty steamtinkerlaunch ];
git
zsh
kitty
steamtinkerlaunch
];
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -103,9 +89,7 @@
pulse.enable = true; pulse.enable = true;
jack.enable = true; jack.enable = true;
}; };
tailscale = { tailscale = { enable = true; };
enable = true;
};
flatpak.enable = true; flatpak.enable = true;
avahi = { avahi = {
enable = true; enable = true;
@ -117,12 +101,16 @@
}; };
}; };
hardware.opengl.driSupport = true; hardware = {
hardware.opengl.driSupport32Bit = true; pulseaudio.enable = false;
opengl = {
driSupport = true;
driSupport32Bit = true;
};
};
security.polkit.enable = true; security.polkit.enable = true;
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
time.hardwareClockInLocalTime = true; time.hardwareClockInLocalTime = true;