This commit is contained in:
Martin Benonisen 2024-12-04 16:27:03 +01:00
parent 977e20f19f
commit 87bb70fbcd
Signed by: mbeno
SSH Key Fingerprint: SHA256:iAzOA1WUAxocdh/WRWXcSg5nw2dJ1aDCvPuT+3ZjkwI
28 changed files with 299 additions and 218 deletions

View File

@ -14,16 +14,16 @@
};
# ...
# Optional - updates underlying without waiting for nix-citizen to update
};
outputs =
{ self
, nixpkgs
, home-manager
, ...
{
self,
nixpkgs,
home-manager,
...
}@inputs:
let
system = "x86_64-linux";
@ -32,7 +32,6 @@
{
nixosConfigurations = {
zedd = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs self user; };

View File

@ -1,4 +1,9 @@
{ config, pkgs,lib, ... }:
{
config,
pkgs,
lib,
...
}:
{
# Enable OpenGL
# Load nvidia driver for Xorg and Wayland
@ -23,12 +28,10 @@
"vm.max_map_count" = 2147483642;
"fs.file-max" = 524288;
};
networking.extraHosts =
''
networking.extraHosts = ''
127.0.0.1 zedd zedd.local
'';
networking.hostName = "zedd"; # Define your hostname.
time.timeZone = "Europe/Oslo";
i18n.defaultLocale = "en_US.UTF-8";
@ -46,8 +49,7 @@
device = "/dev/data/data";
fsType = "ext4";
};
xdg.portal =
{
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
config = {
@ -57,16 +59,22 @@
];
};
};
extraPortals = (with pkgs; [
extraPortals = (
with pkgs;
[
# unstable.xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
]);
]
);
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
virtualisation.docker.enable = true;
virtualisation.docker.liveRestore = false;
system.stateVersion = "23.11"; # Did you read the comment?

View File

@ -1,4 +1,10 @@
{ inputs, self, pks, ... }: {
{
inputs,
self,
pks,
...
}:
{
imports = [
./configuration.nix
./hardware-configuration.nix

View File

@ -1,32 +1,42 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"vmd"
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
fileSystems."/" = {
device = "/dev/disk/by-uuid/d05743bb-9448-483b-8002-caa0da402820";
fsType = "ext4";
};
fileSystems."/boot" =
{
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/4B24-7005";
fsType = "vfat";
};
# 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

View File

@ -1 +1,10 @@
{ imports = [ ./users.nix ./services ./hardware.nix ./fonts.nix ./security.nix ./programs.nix ]; }
{
imports = [
./users.nix
./services
./hardware.nix
./fonts.nix
./security.nix
./programs.nix
];
}

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ twemoji-color-font ];
fonts.packages = with pkgs; [
fira-code

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
environment.sessionVariables = { LIBVA_DRIVER_NAME = "nvidia"; };
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "nvidia";
};
nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
@ -8,12 +10,7 @@
hardware = {
enableRedistributableFirmware = true;
cpu.intel.updateMicrocode = true;
pulseaudio = {
enable =true;
support32Bit = true;
};
graphics =
{
graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [

View File

@ -1,9 +1,7 @@
{ ... }:
let
nix-alien-pkgs = import
(
builtins.fetchTarball "https://github.com/thiagokokada/nix-alien/tarball/master"
)
nix-alien-pkgs =
import (builtins.fetchTarball "https://github.com/thiagokokada/nix-alien/tarball/master")
{ };
in
{

View File

@ -1,4 +1,10 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
services.flatpak.enable = true;
programs.nix-ld.enable = true;
programs.nix-ld.libraries = [
@ -20,7 +26,6 @@
};
};
};
programs.thunar.enable = true;
programs.gnupg.agent = {

View File

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
# Enable sudo
security.sudo = {
enable = true;

View File

@ -1,5 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
security.rtkit.enable = true;
services.pipewire = {
enable = true;

View File

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
services.fwupd.enable = true;
programs.dconf.enable = true;
@ -15,10 +16,9 @@
enable = true;
settings.PasswordAuthentication = true;
};
imports =
[ ./networking.nix
imports = [
./networking.nix
./audio.nix
./xserver.nix
./vscode.nix
];
}

View File

@ -1,5 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
networking = {
wireless = {
enable = false;

View File

@ -1,8 +1,7 @@
{ config, pkgs, ... }: {
services = {
displayManager =
{ config, pkgs, ... }:
{
services = {
displayManager = {
defaultSession = "none+i3";
autoLogin.enable = true;
autoLogin.user = "mbeno";
@ -44,8 +43,7 @@
";
}
];
screenSection =
''
screenSection = ''
Option "metamodes" "DP-2: 2560x1440_144 +0+0, DP-0: 1920x1080_144 +2560+0"
'';
windowManager.i3 = {

View File

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
programs.zsh.enable = true;
environment.shells = with pkgs; [ zsh ];
@ -6,7 +7,12 @@
shell = pkgs.zsh;
isNormalUser = true;
description = "Martin";
extraGroups = [ "networkmanager" "wheel" "docker" "audio" ];
extraGroups = [
"networkmanager"
"wheel"
"docker"
"audio"
];
packages = with pkgs; [
alacritty
mumble

View File

@ -1,10 +1,18 @@
{ pkgs, inputs, user, ... }: {
{
pkgs,
inputs,
user,
...
}:
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = { inherit pkgs inputs user; };
users.${user} = { pkgs, ... }: {
users.${user} =
{ pkgs, ... }:
{
imports = [
./programs/neovim
# ./programs/firefox

View File

@ -1,4 +1,5 @@
{ pkgs, inputs, ... }: {
{ pkgs, inputs, ... }:
{
home.packages = with pkgs; [
# Generic tools
age
@ -76,6 +77,7 @@
nodejs
nodePackages.pnpm
typescript
nixfmt-rfc-style
# Py stuff
(python312.withPackages (
@ -98,6 +100,5 @@
gcc
gnumake
];
}

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
services.dunst = {
@ -57,7 +62,9 @@
browser = "/usr/bin/env firefox -new-tab";
};
fullscreen_delay_everything = { fullscreen = "delay"; };
fullscreen_delay_everything = {
fullscreen = "delay";
};
urgency_critical = {
background = "#d64e4e";

View File

@ -1,6 +1,8 @@
{ pkgs
, inputs
, ...
{
pkgs,
inputs,
...
}:
# games
{ }
{
}

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs = {
neovim = {
enable = true;

View File

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
xdg.configFile."rofi/config.rasi".text = ''
/*Dracula theme based on the Purple official rofi theme*/
@ -138,4 +139,3 @@
@theme "${pkgs.rofi-unwrapped}/share/rofi/themes/android_notification.rasi"
'';
}

View File

@ -1,7 +1,14 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}:
with lib;
let cfg = config.tmux.enable;
in {
let
cfg = config.tmux.enable;
in
{
options.tmux.enable = mkEnableOption "tmux";
config = mkIf cfg {
programs.tmux = {

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs.vscode = {
enable = true;
enableUpdateCheck = true;
@ -17,6 +18,7 @@
ms-python.python
];
userSettings = {
"window.titleBarStyle" = "custom";
"editor.formatOnSave" = true;

View File

@ -1,4 +1,5 @@
{ pkgs, config, ... }: {
{ pkgs, config, ... }:
{
home.file.".local/bin/rofi-launcher" = {
source = ./rofi-launcher.sh;
executable = true;

View File

@ -1,7 +1,6 @@
{ pkgs, config, ... }:
let
sshotp = pkgs.writeScriptBin "sshotp"
''
sshotp = pkgs.writeScriptBin "sshotp" ''
#!/usr/bin/env expect
set stty_init -echo
set timeout 300
@ -20,7 +19,10 @@ let
'';
ssh-dresden = pkgs.writeShellApplication {
name = "ssh-dresden";
runtimeInputs = [ pkgs.rbw pkgs.expect ];
runtimeInputs = [
pkgs.rbw
pkgs.expect
];
text = ''
#!/usr/bin/env bash
totp=$(rbw get -f "TOTP" rlogin)
@ -41,4 +43,3 @@ in
};
};
}

View File

@ -1,4 +1,5 @@
{ user, ... }: {
{ user, ... }:
{
sops = {
age.keyFile = "/home/${user}/.config/sops/age/keys.txt";
defaultSopsFile = ../../secrets/${user}/secret.yaml;

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs.ssh = {
enable = true;
controlMaster = "auto";

View File

@ -1,4 +1,10 @@
{ user, pkgs, config, ... }: {
{
user,
pkgs,
config,
...
}:
{
home.packages = with pkgs; [ fd ];
programs.zsh = {
enable = true;
@ -53,12 +59,17 @@
zplug = {
enable = true;
plugins = [
{ name = "plugins/git"; tags = [ "from:oh-my-zsh" ]; }
{ name = "modules/prompt"; tags = [ "from:prezto" ]; }
{
name = "plugins/git";
tags = [ "from:oh-my-zsh" ];
}
{
name = "modules/prompt";
tags = [ "from:prezto" ];
}
{ name = "zsh-users/zsh-autosuggestions"; }
{
name =
"zsh-users/zsh-history-substring-search";
name = "zsh-users/zsh-history-substring-search";
}
];
};