Fixed firefox and rofi

This commit is contained in:
Julien Malka 2021-12-20 17:33:08 +01:00
parent 89c429169d
commit 1c6b3c4a33
5 changed files with 172 additions and 115 deletions

55
flake.lock generated
View file

@ -33,11 +33,11 @@
}, },
"hardware": { "hardware": {
"locked": { "locked": {
"lastModified": 1639240632, "lastModified": 1639986101,
"narHash": "sha256-BAXhgnPOW1COIfZ9EOOFTdolalYS73MFHSRajgrSdZw=", "narHash": "sha256-Ow0+pkY7qMw6lMAvR1mEdUT9svJnrkbaRoqp4bkMTpg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "2a7063461c3751d83869a2a0a8ebc59e34bec5b2", "rev": "3f92db38374b2977aea8daf4c4fe2fa0eddbd60c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -89,11 +89,11 @@
}, },
"locked": { "locked": {
"dir": "contrib", "dir": "contrib",
"lastModified": 1639886342, "lastModified": 1639947653,
"narHash": "sha256-OkI09enAc4ID1zrxLkHR5b+WgUL2r2C9BIG4+gwVDFU=", "narHash": "sha256-odG+fhjB0OavINI9ELUPhBHUmKQ+lqlSkcmHdgFbhTY=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "abdf3a8128b78fb98ee944bc5d3086c680d779ed", "rev": "67bb01ae27db3cbba9e2e908c4e6612040f650aa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -110,11 +110,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1639901638, "lastModified": 1639988082,
"narHash": "sha256-ZMP2xjjo3tHlWfgCd3Odn6qKNpNbvbawjcVpww54A1U=", "narHash": "sha256-9YPZgGP/C9AKLxSYmw9R8tn64bZ0WM2OYIui+2PLwPw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "8f7a0bbc9080f55c000344658a071994aa9c6b4b", "rev": "116189ff27ac056faa8ec3f7ecc6dc3f6f565b67",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -125,11 +125,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1639699734, "lastModified": 1639876010,
"narHash": "sha256-tlX6WebGmiHb2Hmniff+ltYp+7dRfdsBxw9YczLsP60=", "narHash": "sha256-naGsoUfsY92NaIGiFI8XFXBnesw8BQGe694xcfaLMDI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "03ec468b14067729a285c2c7cfa7b9434a04816c", "rev": "395879c28386e1abf20c7ecacd45880759548391",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -141,11 +141,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1639699734, "lastModified": 1639876010,
"narHash": "sha256-tlX6WebGmiHb2Hmniff+ltYp+7dRfdsBxw9YczLsP60=", "narHash": "sha256-naGsoUfsY92NaIGiFI8XFXBnesw8BQGe694xcfaLMDI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "03ec468b14067729a285c2c7cfa7b9434a04816c", "rev": "395879c28386e1abf20c7ecacd45880759548391",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -173,11 +173,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1639920980, "lastModified": 1639990555,
"narHash": "sha256-icSJWsr5M1oMxsCm4adeMD9C4arv2usSlb7tNodO/Q8=", "narHash": "sha256-O8BvwcDT+htaYP4ujsNjx+hX5mxPwtfNJii5OYLOoHY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "6b26266ec67c021bf3e9b6bb3e4ca0cdb5b1543c", "rev": "7dd4caa60877e32dcdb5f24cf212133c98e7f163",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -192,7 +192,24 @@
"homepage": "homepage", "homepage": "homepage",
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nur": "nur" "nur": "nur",
"unstable": "unstable"
}
},
"unstable": {
"locked": {
"lastModified": 1639876010,
"narHash": "sha256-naGsoUfsY92NaIGiFI8XFXBnesw8BQGe694xcfaLMDI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "395879c28386e1abf20c7ecacd45880759548391",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
} }
} }
}, },

View file

@ -19,13 +19,17 @@
hardware = { hardware = {
url = "github:NixOS/nixos-hardware"; url = "github:NixOS/nixos-hardware";
}; };
unstable = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
}; };
outputs = { self, home-manager, nixpkgs, neovim-nightly-overlay, nur, ... }@inputs: outputs = { self, home-manager, nixpkgs, unstable, neovim-nightly-overlay, nur, ... }@inputs:
let let
utils = import ./utils.nix { inherit nixpkgs home-manager inputs; }; utils = import ./utils.nix { inherit nixpkgs home-manager inputs; nixpkgs-unstable = unstable; };
pkgs = import nixpkgs { }; #pkgs = import nixpkgs { };
in in
with utils; with utils;
{ {

View file

@ -95,7 +95,7 @@ bindsym $mod+q kill
# start rofi # start rofi
bindsym $mod+space exec ~/.config/rofi/bin/launcher_text bindsym $mod+space exec rofi -show run
# change focus # change focus

View file

@ -1,14 +1,46 @@
{ config, pkgs, lib, modulesPath, inputs, ... }: { config, pkgs, lib, modulesPath, inputs, ... }:
{ {
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [
(import "${inputs.hardware}/lenovo/thinkpad/p14s/amd/gen2") (modulesPath + "/installer/scan/not-detected.nix")
# (import "${inputs.hardware}/lenovo/thinkpad/p14s/amd/gen2")
]; ];
boot.initrd.kernelModules = [ "amdgpu" ];
hardware.opengl.extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
amdvlk
];
hardware.opengl = {
driSupport = lib.mkDefault true;
driSupport32Bit = lib.mkDefault true;
};
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableAllFirmware;
boot.kernelParams = [ "acpi_backlight=native" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot = {
kernelModules = [ "acpi_call" "kvm-amd" "amdgpu" ];
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
};
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
@ -19,15 +51,15 @@
hardware.pulseaudio.support32Bit = true; hardware.pulseaudio.support32Bit = true;
networking.hostName = "macintosh"; # Define your hostname. networking.hostName = "macintosh"; # Define your hostname.
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
networking.useDHCP = false; networking.useDHCP = false;
networking.interfaces.enp2s0f0.useDHCP = true; networking.interfaces.enp2s0f0.useDHCP = true;
networking.interfaces.enp5s0.useDHCP = true; networking.interfaces.enp5s0.useDHCP = true;
networking.interfaces.wlp3s0.useDHCP = true; networking.interfaces.wlp3s0.useDHCP = true;
programs.steam.enable = true; programs.steam.enable = true;
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
console = { console = {
font = "Lat2-Terminus16"; font = "Lat2-Terminus16";
@ -35,129 +67,129 @@ programs.steam.enable = true;
}; };
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
hardware.trackpoint = { hardware.trackpoint = {
enable = true; enable = true;
speed = 80; speed = 80;
sensitivity = 220; sensitivity = 220;
emulateWheel = true; emulateWheel = true;
device = "TPPS/2 Elan TrackPoint"; device = "TPPS/2 Elan TrackPoint";
}; };
programs.gnupg.agent.enable = true; programs.gnupg.agent.enable = true;
services = { services = {
tlp.enable = true; tlp.enable = true;
xserver = { xserver = {
videoDrivers = [ "amdgpu" ];
enable = true; enable = true;
layout = "fr"; layout = "fr";
libinput.enable = false; libinput.enable = false;
libinput.touchpad.tapping = false; libinput.touchpad.tapping = false;
displayManager.lightdm.enable = true; displayManager.sddm.enable = true;
desktopManager.xterm.enable = true; desktopManager.xterm.enable = true;
}; };
};
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget wget
firefox git
git
rxvt_unicode rxvt_unicode
xorg.xbacklight xorg.xbacklight
]; ];
environment.variables.EDITOR = "urxvt"; environment.variables.EDITOR = "urxvt";
programs.dconf.enable = true; programs.dconf.enable = true;
networking.firewall.enable = false; networking.firewall.enable = false;
system.stateVersion = "21.11"; # Did you read the comment? system.stateVersion = "21.11"; # Did you read the comment?
boot.initrd.availableKernelModules = [ "nvme" "ehci_pci" "xhci_pci" "sdhci_pci" ]; boot.initrd.availableKernelModules = [ "nvme" "ehci_pci" "xhci_pci" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "amdgpu"];
boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/3e01f61b-c580-4078-94be-192f7aed5c5a"; {
device = "/dev/disk/by-uuid/3e01f61b-c580-4078-94be-192f7aed5c5a";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2799-DF20"; {
device = "/dev/disk/by-uuid/2799-DF20";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/44dadc95-a61e-40db-93d7-ada237f1e53b"; } [{ device = "/dev/disk/by-uuid/44dadc95-a61e-40db-93d7-ada237f1e53b"; }];
# HOME
luj.hmgr.julien = {
luj.programs.neovim.enable = true;
luj.i3.enable = true;
luj.polybar.enable = true;
home.packages = with pkgs; [
unstable.rofi
unstable.firefox
feh
meld
vlc
nerdfonts
font-awesome
python3
texlive.combined.scheme-full
nodejs
fira-code
neomutt
htop
evince
mosh
signal-desktop
flameshot
ctags
ungoogled-chromium
]; ];
home.keyboard = {
# HOME layout = "fr";
luj.hmgr.julien = {
luj.programs.neovim.enable = true;
luj.i3.enable = true;
luj.polybar.enable = true;
home.packages = with pkgs; [
feh
meld
vlc
nerdfonts
font-awesome
python3
texlive.combined.scheme-full
nodejs
fira-code
neomutt
htop
evince
mosh
signal-desktop
flameshot
ctags
ungoogled-chromium
];
home.keyboard = {
layout = "fr";
};
gtk = {
enable = true;
theme = {
name = "Nordic";
package = pkgs.nordic;
}; };
gtk = {
enable = true;
theme = {
name = "Nordic";
package = pkgs.nordic;
};
};
qt = {
enable = true;
platformTheme = "gtk";
};
fonts.fontconfig.enable = true;
xsession.enable = true;
home.stateVersion = "21.11";
}; };
qt = {
enable = true;
platformTheme = "gtk";
};
fonts.fontconfig.enable = true;
xsession.enable = true;
programs.rofi.enable = true;
home.stateVersion = "21.11";
};

View file

@ -1,8 +1,11 @@
{ nixpkgs, home-manager, inputs }: { nixpkgs, home-manager, nixpkgs-unstable, inputs }:
with builtins; with builtins;
let mapAttrNames = f: set: let mapAttrNames = f: set:
listToAttrs (map (attr: { name = f attr; value = set.${attr}; }) (attrNames set)); listToAttrs (map (attr: { name = f attr; value = set.${attr}; }) (attrNames set));
overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
};
in in
{ {
@ -19,6 +22,7 @@ in
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
nixpkgs.overlays = [ nixpkgs.overlays = [
inputs.neovim-nightly-overlay.overlay inputs.neovim-nightly-overlay.overlay
overlay-unstable
(final: prev: (final: prev:
{ {
mosh = prev.mosh.overrideAttrs (old: { mosh = prev.mosh.overrideAttrs (old: {