This commit is contained in:
Barna Máté 2025-01-11 18:13:22 +01:00
commit 26d4fb1152
16 changed files with 381 additions and 182 deletions

View file

@ -208,11 +208,11 @@
]
},
"locked": {
"lastModified": 1734366194,
"narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=",
"lastModified": 1736373539,
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f",
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github"
},
"original": {
@ -333,11 +333,11 @@
},
"nixpkgs-last": {
"locked": {
"lastModified": 1734529975,
"narHash": "sha256-ze3IJksru9dN0keqUxY0WNf8xrwfs8Ty/z9v/keyBbg=",
"lastModified": 1735563628,
"narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "72d11d40b9878a67c38f003c240c2d2e1811e72a",
"rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798",
"type": "github"
},
"original": {
@ -360,11 +360,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1734424634,
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
"lastModified": 1736344531,
"narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
"rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912",
"type": "github"
},
"original": {
@ -407,11 +407,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1734600368,
"narHash": "sha256-nbG9TijTMcfr+au7ZVbKpAhMJzzE2nQBYmRvSdXUD8g=",
"lastModified": 1736200483,
"narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b47fd6fa00c6afca88b8ee46cfdb00e104f50bca",
"rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751",
"type": "github"
},
"original": {
@ -495,11 +495,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1733940028,
"narHash": "sha256-WI4YDWvk3s3gUnt0cyt0USoTpUTEeEYm+EyQCCvrLvQ=",
"lastModified": 1734937677,
"narHash": "sha256-5qKdUBN1cq/LHa6ASIjGcDEYKDnAiaKgNtZCRbBrWEs=",
"owner": "icewind1991",
"repo": "nvidia-patch-nixos",
"rev": "91dd42b7a201b0e2b6c588faf70ffc09cd7b4a16",
"rev": "ec2e76e3cd53208c6bcbbddcc043516a24ca71b2",
"type": "github"
},
"original": {

View file

@ -63,16 +63,16 @@
}
)
./hosts/strix/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
./hosts/strix/configuration.nix
];
};
nixosConfigurations.thinkpad = nixpkgs.lib.nixosSystem {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inputs = inputs;
@ -89,12 +89,12 @@
}
)
./hosts/thinkpad/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
./hosts/thinkpad/configuration.nix
];
};

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
services.syncthing = {
enable = true;
user = "grape";

View file

@ -91,12 +91,11 @@
"flakes"
];
home-manager.users.grape =
home-manager.users."${user}" =
{ ... }:
{
home.stateVersion = "24.11";
};
nixpkgs.config.permittedInsecurePackages = [
"electron-27.3.11"
];

View file

@ -1,12 +1,6 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
#krita
#gimp
#figma-linux
#kdenlive
# video cutting easy
losslesscut-bin
];
}

View file

@ -1,12 +1,10 @@
{ pkgs, config, ... }: {
{ pkgs, config, ... }:
{
environment.systemPackages = with pkgs; [
playerctl
jamesdsp
yt-dlp
feishin
#mpv-unwrapped
qpwgraph
];
}

View file

@ -1,9 +1,5 @@
{ pkgs, config, ... }:
{
environment.systemPackages = with pkgs; [
libreoffice
onlyoffice-bin
];
}

View file

@ -1,8 +1,9 @@
{ pkgs, ... }: {
{ pkgs, user, ... }:
{
services.syncthing = {
enable = true;
user = "grape";
dataDir = "/home/grape/Documents";
configDir = "/home/grape/.syncthing";
user = "${user}";
dataDir = "/home/peach/Documents";
configDir = "/home/peach/.syncthing";
};
}

View file

@ -1,4 +1,9 @@
{ pkgs, user, ... }:
{
pkgs,
user,
dotfilepath,
...
}:
{
home-manager.users.${user} = {
programs.firefox = {
@ -9,9 +14,9 @@
id = 0;
# TODO fix impurity
extraConfig = builtins.readFile "/home/grape/dotfiles/nix/opt/firefox/user.js"; # custom userjs config
userChrome = builtins.readFile "/home/grape/dotfiles/nix/opt/firefox/userChrome.css"; # browser styles
userContent = builtins.readFile "/home/grape/dotfiles/nix/opt/firefox/userContent.css"; # browser styles
extraConfig = builtins.readFile "${dotfilepath}/hosts/thinkpad/opt/firefox/user.js"; # custom userjs config
userChrome = builtins.readFile "${dotfilepath}/hosts/thinkpad/opt/firefox/userChrome.css"; # browser styles
userContent = builtins.readFile "${dotfilepath}/hosts/thinkpad/opt/firefox/userContent.css"; # browser styles
extensions = with pkgs; [
nur.repos.rycee.firefox-addons.ublock-origin

View file

@ -1,4 +1,9 @@
{ pkgs, ... }:
{
pkgs,
dotfilepath,
user,
...
}:
let
# todo add this to flake.nix
colors = {
@ -14,11 +19,11 @@ let
seperatorColor = "#FAD000";
};
script = "~/dotfiles/scripts";
script = "~${dotfilepath}/scripts";
in
{
home-manager.users.grape.services.polybar = {
home-manager.users.${user}.services.polybar = {
config = {
@ -59,8 +64,6 @@ in
click-right = "pavucontrol";
};
"module/replay" = {
type = "custom/script";
exec = "~/.config/scripts/status.sh";
@ -80,7 +83,6 @@ in
label-background = "#191830";
label-connected = "%{F${colors.seperatorColor}}%{F-} %downspeed% %{F${colors.seperatorColor}}%{F-} %upspeed%";
label-connected-background = "${colors.bg}";
label-disconnected-background = "${colors.bg}";
@ -99,7 +101,6 @@ in
label-disconnected-background = "${colors.bg}";
};
"bar/bottom" = {
background = "#00191830";
border-color = "#00400080";
@ -121,5 +122,3 @@ in
};
}

View file

@ -1,3 +1,4 @@
{ dotfilepath, user, ... }:
let
colors = {
fg = "#FFFFFF";
@ -11,11 +12,12 @@ let
currentWorkspace = "#FAD000";
seperatorColor = "#FAD000";
};
script = "~/.config/scripts";
script = "~${dotfilepath}/scripts";
in
{
home-manager.users.grape.services.polybar = {
home-manager.users.${user}.services.polybar = {
config = {
"module/date" = {
@ -40,7 +42,7 @@ in
"module/fs-label-data" = {
type = "custom/text";
label = "DAT ";
label-foreground = "${ colors. seperatorColor}";
label-foreground = "${colors.seperatorColor}";
};
"module/ewmh" = {
@ -98,7 +100,6 @@ in
label-warn-foreground = "${colors.warn}";
};
"fs-base" = {
type = "internal/fs";
label-unmounted = "?";
@ -106,7 +107,6 @@ in
warn-precentage = "80%";
};
"module/fs-system" = {
"inherit" = "fs-base";
mount-0 = "/";
@ -164,4 +164,3 @@ in
};
}

View file

@ -6,121 +6,123 @@
}:
{
home-manager.users.grape.programs.rofi = {
enable = true;
font = "Jetbrains Mono";
theme = "/home/${user}/.config/rofi/theme.rasi";
plugins = with pkgs; [
rofi-calc
rofi-emoji
];
};
home-manager.users.${user} = {
programs.rofi = {
enable = true;
font = "Jetbrains Mono";
theme = "/home/${user}/.config/rofi/theme.rasi";
plugins = with pkgs; [
rofi-calc
rofi-emoji
];
};
home-manager.users.grape.home.file.".config/rofi/theme.rasi" = {
enable = true;
text = ''
/*******************************************************************************
* MACOS SPOTLIGHT LIKE DARK THEME FOR ROFI
* User : LR-Tech
* Theme Repo : https://github.com/lr-tech/rofi-themes-collection
*******************************************************************************/
home.file.".config/rofi/theme.rasi" = {
enable = true;
text = ''
/*******************************************************************************
* MACOS SPOTLIGHT LIKE DARK THEME FOR ROFI
* User : LR-Tech
* Theme Repo : https://github.com/lr-tech/rofi-themes-collection
*******************************************************************************/
* {
font: "JetBrains Mono Nerd 12";
* {
font: "JetBrains Mono Nerd 12";
bg0: #191830;
bg1: #7E7E7E80;
bg2: #FAD000;
bg0: #191830;
bg1: #7E7E7E80;
bg2: #FAD000;
fg0: #DEDEDE;
fg1: #FFFFFF;
fg2: #DEDEDE80;
fg0: #DEDEDE;
fg1: #FFFFFF;
fg2: #DEDEDE80;
background-color: transparent;
text-color: @fg0;
background-color: transparent;
text-color: @fg0;
margin: 0;
padding: 0;
spacing: 0;
}
margin: 0;
padding: 0;
spacing: 0;
}
window {
background-color: @bg0;
window {
background-color: @bg0;
location: center;
width: 640;
border-radius: 8;
}
location: center;
width: 640;
border-radius: 8;
}
inputbar {
font: "Montserrat 20";
padding: 12px;
spacing: 12px;
children: [ icon-search, entry ];
}
inputbar {
font: "Montserrat 20";
padding: 12px;
spacing: 12px;
children: [ icon-search, entry ];
}
icon-search {
expand: false;
filename: "search";
size: 28px;
}
icon-search {
expand: false;
filename: "search";
size: 28px;
}
icon-search, entry, element-icon, element-text {
vertical-align: 0.5;
}
icon-search, entry, element-icon, element-text {
vertical-align: 0.5;
}
entry {
font: inherit;
entry {
font: inherit;
placeholder : "Search";
placeholder-color : @fg2;
}
placeholder : "Search";
placeholder-color : @fg2;
}
message {
border: 2px 0 0;
border-color: @bg1;
background-color: @bg1;
}
message {
border: 2px 0 0;
border-color: @bg1;
background-color: @bg1;
}
textbox {
padding: 8px 24px;
}
textbox {
padding: 8px 24px;
}
listview {
lines: 10;
columns: 1;
listview {
lines: 10;
columns: 1;
fixed-height: false;
border: 1px 0 0;
border-color: @bg1;
}
fixed-height: false;
border: 1px 0 0;
border-color: @bg1;
}
element {
padding: 8px 16px;
spacing: 16px;
background-color: transparent;
}
element {
padding: 8px 16px;
spacing: 16px;
background-color: transparent;
}
element normal active {
text-color: @bg2;
}
element normal active {
text-color: @bg2;
}
element alternate active {
text-color: @bg2;
}
element alternate active {
text-color: @bg2;
}
element selected normal, element selected active {
background-color: @bg2;
text-color: @fg1;
}
element selected normal, element selected active {
background-color: @bg2;
text-color: @fg1;
}
element-icon {
size: 1em;
}
element-icon {
size: 1em;
}
element-text {
text-color: inherit;
}
'';
element-text {
text-color: inherit;
}
'';
};
};
}

View file

@ -83,28 +83,36 @@
"flakes"
];
nixpkgs.config.permittedInsecurePackages = [
"electron-27.3.11"
];
home-manager.users."${user}" =
{ ... }:
{
home.stateVersion = "24.11";
};
nixpkgs.config.permittedInsecurePackages = [
"electron-27.3.11"
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
# kernel
#boot.kernelPackages = pkgs.linuxPackages_xanmod; # Gaming
boot.initrd.luks.devices."luks-66da6971-2a98-4277-b74c-a8cecb5e3bd3".device =
"/dev/disk/by-uuid/66da6971-2a98-4277-b74c-a8cecb5e3bd3";
# Setup keyfile
boot.initrd.secrets = {
"/crypto_keyfile.bin" = null;
};
#boot.initrd.luks.devices."luks-f7e86dde-55a5-4306-a7c2-cf2d93c9ee0b".device = "/dev/disk/by-uuid/f7e86dde-55a5-4306-a7c2-cf2d93c9ee0b"; # old dead ssd rip 24.07.28
boot.initrd.luks.devices."luks-da1b2f8c-877a-4c39-8965-a4af625718c".device =
"/dev/disk/by-uuid/da1b2f8c-877a-4c39-8965-a4af6a25718c";
boot.loader.grub.enableCryptodisk = true;
networking.hostName = "strix";
boot.initrd.luks.devices."luks-bd115bee-c7d6-4c9e-8e3b-e32c39edb80f".keyFile =
"/crypto_keyfile.bin";
boot.initrd.luks.devices."luks-66da6971-2a98-4277-b74c-a8cecb5e3bd3".keyFile =
"/crypto_keyfile.bin";
networking.hostName = "nixos"; # Define your hostname.
# Enable networking
networking.networkmanager.enable = true;

View file

@ -18,6 +18,8 @@
feh
mpv
ungoogled-chromium
];
fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })

View file

@ -8,31 +8,20 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" ];
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c5e13eac-4cdf-490b-85f4-c14038313ada";
{ device = "/dev/disk/by-uuid/6d0032be-b81f-4db6-a6f1-078ae85939db";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-53201bbc-c763-4d15-8bf8-a173550fab91".device = "/dev/disk/by-uuid/53201bbc-c763-4d15-8bf8-a173550fab91";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/9DDA-7820";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/media/terra" =
{ device = "/dev/disk/by-uuid/f2b24250-0cf5-43d4-806f-7f024922781a";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-bd115bee-c7d6-4c9e-8e3b-e32c39edb80f".device = "/dev/disk/by-uuid/bd115bee-c7d6-4c9e-8e3b-e32c39edb80f";
swapDevices =
[ { device = "/dev/disk/by-uuid/b719003b-1ae0-4377-97f1-4447b4514de8"; }
[ { device = "/dev/disk/by-uuid/ddc26af8-f38f-4f2f-8c9d-44053794eda7"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
@ -40,8 +29,8 @@
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno2.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
# networking.interfaces.eno0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

206
hosts/thinkpad/opt/poly.ini Normal file
View file

@ -0,0 +1,206 @@
[bar/bottom]
background=#00191830
border-color=#00400080
border-size=10px
bottom=true
font-0=Jetbrains Mono Nerd font:size=11;3
font-1=Jetbrains Mono Nerd font:size=22;5
foreground=#FFFFFF
height=34
modules-center=cava
modules-left=audio-capsule a music-capsule
modules-right=" wired-network a wireless-network a replay"
padding-left=5
padding-right=5
radius=20
width=100%
[bar/default]
background=#00191830
border-color=#00400080
border-size=10px
bottom=false
font-0=Jetbrains Mono Nerd font:size=11;3
font-1=Jetbrains Mono Nerd font:size=22;5
foreground=#FFFFFF
height=34
modules-center=ewmh
modules-left=date s keyboard battery
modules-right="fs-data s fs-system s memory s cpu-temp cpu-usage"
padding-left=2
padding-right=2
radius=15
width=100%
[fs-base]
format-prefix-foreground=#FFFFFF
label-unmounted=?
type=internal/fs
warn-precentage=80%
[global/wm]
override-redirect=false
[module/a]
label=" "
label-foreground=#FAD000
type=custom/text
[module/audio-capsule]
click-right=pavucontrol
format-muted=%{T2}%{F#191830}%{F-}%{T-}<label-muted>%{T2}%{F#191830}%{F-}%{T-}
format-volume=%{T2}%{F#191830}%{F-}%{T-}<label-volume>%{T2}%{F#191830}%{F-}%{T-}
label-muted=muted
label-muted-background=#191830
label-muted-foreground=#FF0
label-volume=%percentage%%
label-volume-background=#191830
type=internal/alsa
use-ui-max=true
[module/battery]
adapter=AC0
battery=BAT0
full-at=95
low-at=20
poll-interval=4
type=internal/battery
[module/cava]
exec=~/home/peach/dotfiles/scripts/cava.sh
format=%{T2}%{F#191830}%{F-}%{T-}<label>%{T2}%{F#191830}%{F-}%{T-}
format-font=5
label=" %{T1}%output%%{T-}"
label-background=#191830
label-foreground=#FFFFFF
tail=true
type=custom/script
[module/cpu-temp]
base-temperature=20
format=%{T2}%{F#191830}%{F-}%{T-}%{B#191830}%{F#FAD000}CPU %{F-}<label>%{B-}
format-warn=%{T2}%{F#191830}%{F-}%{T-}%{B#191830}%{F#FAD000}CPU %{F-}<label-warn>%{B-}
hwmon-path=/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
label="%temperature% "
label-background=#191830
label-foreground=#FFFFFF
label-warn-foreground=#f00
thermal-zone=0
type=internal/temperature
warn-temperature=85
zone-type=x86_pkg_temp
[module/cpu-usage]
format=%{T2}%{F#191830}%{F-}%{T-}%{B#191830}<label>
interval=1.5
label=CPU %percentage%%
label-background=#FFFFFF
label-foreground=#FFFFFF
type=internal/cpu
[module/date]
date=%Y-%m-%d%
font-1=Jetbrains Mono Nerd font
format=%{T2}%{F#191830}%{F-}%{T-}<label>%{T2}%{F#191830}%{F-}%{T-}
interval=1
label=%time% %date%
label-background=#FFFFFF
label-foreground=#FFFFFF
time=%I:%M:%S
type=internal/date
[module/ewmh]
label-active-foreground=#FAD000
background = #191830
pin-workspaces=false
type=internal/xworkspaces
[module/fs-data]
inherit=fs-base
interval=30
label-mounted=%free%(%total%)
mount-0=/mnt/terra
[module/fs-label-data]
label="DAT "
label-foreground=#FAD000
type=custom/text
[module/fs-label-system]
label="SYS "
label-foreground=#FAD000
type=custom/text
[module/fs-system]
inherit=fs-base
interval=30
label-mounted=%free%(%total%)
mount-0=/
[module/gpu-temp]
exec=nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits
format=%{T2}%{F#191830}%{F-}%{T-}%{B#191830}%{F#FAD000}GPU %{F-}%{B-}<label>
format-suffix="°C "
interval=1.5
label-foreground=#FFFFFF
type=custom/script
[module/gpu-usage]
exec=nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits
format=<label> mb%{T2}%{F#191830}%{F-}%{T-}
interval=1.5
type=custom/script
[module/keyboard]
format=%{T2}%{F#191830}%{F-}%{T-}%{B#191830}<label-layout>%{B-}%{B#191830}%{F#FAD000} <label-indicator>%{T-}%{B-}%{T2}%{F#191830}%{F-}%{T-}
label-indicator-on-capslock=CAPS
label-layout-background=#191830
label-layout-foreground=#FFFFFF
type=internal/xkeyboard
[module/memory]
format=%{F#FAD000}RAM%{F-} <label>
interval=1
label=%used%
label-warn=%used%
label-warn-foreground=#f00
type=internal/memory
warn-percentage=60
[module/music-capsule]
exec=~/home/peach/dotfiles/scripts/music.sh
format=%{T2}%{F#191830}%{F-}%{T-}<label>%{T2}%{F#191830}%{F-}%{T-}
interval=.5
label-background=#191830
type=custom/script
[module/replay]
exec=~/.config/scripts/status.sh
format=%{T2}%{F#191830}%{F-}%{T-}%{B#191830}%{F#FAD000}REPLAY %{F-}%{B-}<label>%{T2}%{F#191830}%{F-}%{T-}
interval=1
label-background=#191830
type=custom/script
[module/wired-network]
format-connected=%{T2}%{F#191830}%{F-}%{T-}<label-connected>%{T2}%{F#191830}%{F-}%{T-}
format-disconnected=%{T2}%{F#191830}%{F-}%{T-}<label-disconnected>%{T2}%{F#191830}%{F-}%{T-}
format-packetloss=<animation-packetloss> <label-connected>
interface=eno2
interval=.5
label-background=#191830
label-connected=%{F#FAD000}%{F-} %downspeed% %{F#FAD000}%{F-} %upspeed%
label-connected-background=#191830
label-disconnected-background=#191830
type=internal/network
[module/wireless-network]
format-connected=%{T2}%{F#191830}%{F-}%{T-}<label-connected>%{T2}%{F#191830}%{F-}%{T-}
format-disconnected=%{T2}%{F#191830}%{F-}%{T-}%{F#f00}wlo1%{F-}%{T2}%{F#191830}%{F-}%{T-}
interface=wlo1
interval=.5
label-background=#191830
label-connected=%{F#FAD000}%{F-} %downspeed% %{F#FAD000}%{F-} %upspeed%
label-connected-background=#191830
label-disconnected-background=#191830
type=internal/network