diff --git a/flake.lock b/flake.lock index 488ce5a..5762d62 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/flake.nix b/flake.nix index 0f3aa35..070b90b 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,8 @@ in { nixosConfigurations = { + + zedd = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit inputs self user; }; diff --git a/hosts/zedd/configuration.nix b/hosts/zedd/configuration.nix index 099a6d7..bca5c49 100644 --- a/hosts/zedd/configuration.nix +++ b/hosts/zedd/configuration.nix @@ -22,7 +22,6 @@ networking.hostName = "zedd"; # Define your hostname. - networking.networkmanager.enable = true; time.timeZone = "Europe/Oslo"; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/system/default.nix b/system/default.nix index 8da58f5..3b472fe 100644 --- a/system/default.nix +++ b/system/default.nix @@ -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 ]; } diff --git a/system/hardware.nix b/system/hardware.nix index fe0133f..365b37d 100644 --- a/system/hardware.nix +++ b/system/hardware.nix @@ -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"; }; } diff --git a/system/nix-alien.nix b/system/nix-alien.nix new file mode 100644 index 0000000..e744320 --- /dev/null +++ b/system/nix-alien.nix @@ -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; +} diff --git a/system/programs.nix b/system/programs.nix index f79bf74..ff4d3f5 100644 --- a/system/programs.nix +++ b/system/programs.nix @@ -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 = { diff --git a/system/services.nix b/system/services.nix index 1020d9c..5b8cc18 100644 --- a/system/services.nix +++ b/system/services.nix @@ -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 diff --git "a/user/\\" "b/user/\\" new file mode 100644 index 0000000..bda6a46 --- /dev/null +++ "b/user/\\" @@ -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 +]; +}; +}; +}; +} diff --git a/user/default.nix b/user/default.nix index 3d28a6d..a986560 100644 --- a/user/default.nix +++ b/user/default.nix @@ -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; diff --git a/user/packages/default.nix b/user/packages/default.nix index d69570b..30ccfc0 100644 --- a/user/packages/default.nix +++ b/user/packages/default.nix @@ -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 ]; diff --git a/user/programs/rofi/config.rasi b/user/programs/rofi/config.rasi index ae53f5e..b0f25e0 100644 --- a/user/programs/rofi/config.rasi +++ b/user/programs/rofi/config.rasi @@ -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" \ No newline at end of file +@theme "${pkgs.rofi-unwrapped}/share/rofi/themes/android_notification.rasi" diff --git a/user/programs/rofi/default.nix b/user/programs/rofi/default.nix index dbd1ffa..b4fecd4 100644 --- a/user/programs/rofi/default.nix +++ b/user/programs/rofi/default.nix @@ -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" + ''; } + diff --git a/user/zsh/default.nix b/user/zsh/default.nix index ce83e71..b3b71fa 100644 --- a/user/zsh/default.nix +++ b/user/zsh/default.nix @@ -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