This commit is contained in:
Martin Benonisen 2024-09-13 18:42:10 +02:00
parent c56c8d8fef
commit ab676a4e01
Signed by: mbeno
SSH Key Fingerprint: SHA256:iAzOA1WUAxocdh/WRWXcSg5nw2dJ1aDCvPuT+3ZjkwI
14 changed files with 270 additions and 30 deletions

View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1721714663,
"narHash": "sha256-ZDW5+rlROxaOuoEfIQM7Gqhoa+WALEYdYIiZhyJjAu0=",
"lastModified": 1726222338,
"narHash": "sha256-KuA8ciNR8qCF3dQaCaeh0JWyQUgEwkwDHr/f49Q5/e8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7560dc942a6fbd37ebd1310b3dbda513de2d4b82",
"rev": "503af483e1b328691ea3a434d331995595fb2e3d",
"type": "github"
},
"original": {
@ -22,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1721562059,
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=",
"lastModified": 1726062873,
"narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe",
"rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f",
"type": "github"
},
"original": {

View File

@ -28,6 +28,8 @@
in
{
nixosConfigurations = {
zedd = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs self user; };

View File

@ -22,7 +22,6 @@
networking.hostName = "zedd"; # Define your hostname.
networking.networkmanager.enable = true;
time.timeZone = "Europe/Oslo";
i18n.defaultLocale = "en_US.UTF-8";

View File

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

View File

@ -1,5 +1,13 @@
{ config, pkgs, ... }:
{
networking.wireless = {
enable = true;
networks = {
"bennynet" = {
pskRaw = "85e8f17e02f4b4df5ddc9b95d1a4256b3c2608fcc8dfa1860b693d06c2a0bf1f";
};
};
};
nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
@ -15,6 +23,12 @@
intel-media-driver
intel-vaapi-driver
libvdpau-va-gl
rocm-opencl-icd
rocm-opencl-runtime
];
extraPackages32 = with pkgs.pkgsi686Linux; [
intel-media-driver
intel-vaapi-driver
];
};
@ -23,11 +37,11 @@
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
pulseaudio.enable = false;
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; };
environment.sessionVariables = { LIBVA_DRIVER_NAME = "i965"; };
}

16
system/nix-alien.nix Normal file
View File

@ -0,0 +1,16 @@
{ ... }:
let
nix-alien-pkgs = import
(
builtins.fetchTarball "https://github.com/thiagokokada/nix-alien/tarball/master"
)
{ };
in
{
environment.systemPackages = with nix-alien-pkgs; [
nix-alien
];
# Optional, but this is needed for `nix-alien-ld` command
programs.nix-ld.enable = true;
}

View File

@ -39,6 +39,7 @@
magicOrExtension = ''\x7fELF....AI\x02'';
};
environment.systemPackages = with pkgs; [
sipcalc
xdg-utils
pass
xdg-desktop-portal
@ -66,6 +67,8 @@
v4l-utils
nmap
wineWowPackages.stable
rustc
cargo
];
systemd = {

View File

@ -2,6 +2,11 @@
security.rtkit.enable = true;
networking.firewall.enable = false;
services.gnome.gnome-keyring.enable = true;
security.pam.services.i3.enableGnomeKeyring = true;
environment.extraInit = ''
xset s off -dpms
'';
security.polkit.enable = true;
services = {
prometheus = {
@ -48,10 +53,11 @@
};
logind.extraConfig = "IdleAction=ignore";
xserver = {
exportConfiguration = true;
enable = true;
xkb.layout = "us,no";
xkb.variant = "qwerty";
xkb.options = "grp:win_space_toggle";
xkb.options = "grp:lalt_lshift_toggle";
desktopManager = {
xterm.enable = false;
};
@ -90,6 +96,7 @@
extraPackages = with pkgs; [
dmenu #application launcher most people use
i3status # gives you the default i3 status bar
i3lock
# i3lock #default i3 screen locker
i3blocks #if you are planning on using i3blocks over i3status
polybar

46
user/\ Normal file
View File

@ -0,0 +1,46 @@
{
description = "Benny nixos config flake";
inputs = {
# nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-alien {
url = "github:thiagokokada/nix-alien";
inputs.nixpkgs.follows = "home-manager";
};
}
# ...
# Optional - updates underlying without waiting for nix-citizen to update
};
outputs =
{ self
, nixpkgs
, home-manager
, ...
}@inputs:
let
system = "x86_64-linux";
user = "mbeno";
in
{
nixosConfigurations = {
zedd = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs self user; };
modules = [
({ config, pkgs, ... }: { })
./hosts/zedd
];
};
};
};
}

View File

@ -7,7 +7,7 @@
users.${user} = { pkgs, ... }: {
imports = [
./programs/neovim
./programs/firefox
# ./programs/firefox
./programs/tmux
./programs/dunst
./programs/rofi
@ -16,12 +16,12 @@
./programs/games
./scripts
./zsh
./packages
./ssh
./services/ssh-office.nix
./packages
];
tmux.enable = true;
firefox.enable = true;
# firefox.enable = true;
xdg.enable = true;
services.picom = {
enable = true;

View File

@ -4,17 +4,21 @@
age
discord
jellyfin-media-player
firefox-bin
pdfpc
openssl
qpwgraph
mixxx
imagemagick
maim
sidequest
opera
direnv
android-studio
libpng
p7zip
lshw
powershell
vlc
expat
xdeltaUnstable
@ -43,7 +47,6 @@
lutris
pamixer
pinentry
pre-commit
pulseaudio
pulsemixer
rbw
@ -87,20 +90,26 @@
typescript
# Py stuff
(python312.withPackages (p: with p; [
requests
mypy
pydantic
typer
patool
pyunpack
ipython
]))
poetry
(python312.withPackages (
p: with p; [
pip
virtualenv
ipython
distutils
setuptools
mypy
pydantic
poetry-core
]
))
ruff
# Rust
rustup
rustc
cargo
gcc
];

View File

@ -133,4 +133,4 @@ element-text, element-icon {
}
//@theme "/usr/share/rofi/themes/android_notification.rasi"
//@import "/home/mbeno/.config/polybar/hack/scripts/rofi/launcher.rasi"
@theme "/nix/store/2dx025n6ndchkdi21d280js9izzkf066-rofi-1.7.5/share/rofi/themes/android_notification.rasi"
@theme "${pkgs.rofi-unwrapped}/share/rofi/themes/android_notification.rasi"

View File

@ -1,5 +1,141 @@
{ config, pkgs, ... }: {
xdg.configFile."rofi/config.rasi" = {
source = ./config.rasi;
};
xdg.configFile."rofi/config.rasi".text = ''
/*Dracula theme based on the Purple official rofi theme*/
configuration {
show-icons: true;
display-drun: "";
disable-history: false;
}
* {
font: "Jetbrains Mono 12";
foreground: #f8f8f2;
background-color: #282a36;
active-background: #6272a4;
urgent-background: #ff5555;
urgent-foreground: #282a36;
selected-background: @active-background;
selected-urgent-background: @urgent-background;
selected-active-background: @active-background;
separatorcolor: @active-background;
bordercolor: @active-background;
}
#window {
background-color: @background-color;
border: 3;
border-radius: 6;
border-color: @bordercolor;
padding: 15;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 0px;
border-color: @separatorcolor;
padding: 1px;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 0px;
border-color: @bordercolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 3px ;
}
#element.normal.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @foreground;
}
#element.selected.normal {
background-color: @selected-background;
text-color: @foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @foreground;
}
#element.alternate.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @foreground;
}
#scrollbar {
width: 2px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-background;
text-color: @foreground;
}
#inputbar {
spacing: 0;
text-color: @foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @foreground;
}
#entry {
spacing: 0;
text-color: @foreground;
}
#prompt {
spacing: 0;
text-color: @foreground;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ">";
margin: 0px 0.3em 0em 0em ;
text-color: @foreground;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
//@theme "/usr/share/rofi/themes/android_notification.rasi"
//@import "/home/mbeno/.config/polybar/hack/scripts/rofi/launcher.rasi"
@theme "${pkgs.rofi-unwrapped}/share/rofi/themes/android_notification.rasi"
'';
}

View File

@ -7,6 +7,12 @@
enableCompletion = true;
syntaxHighlighting.enable = true;
shellAliases = {
nclean = ''
sudo nix-channel --update
sudo nix-env -u --always
sudo rm /nix/var/nix/gcroots/auto/*
sudo nix-collect-garbage -d
'';
nrebuild = "nix flake update /home/mbeno/git/nixos && sudo nixos-rebuild switch --recreate-lock-file --flake /home/${user}/git/nixos && nvd diff $(ls -d1v /nix/var/nix/profiles/system-*-link|tail -n 2) && source ~/.zshrc";
nlog = ''
revpath="/nix/var/nix/profiles";
@ -23,6 +29,8 @@
};
initExtra = ''
set --unexport COLUMNS
set --unexport LINES
bindkey -v
bindkey '^R' history-incremental-search-backward
bindkey '^[[A' history-substring-search-up