did the update

This commit is contained in:
Steph 2024-09-22 15:49:14 +02:00
parent 18cc9a8ff6
commit f4cb7b2dae
8 changed files with 156 additions and 145 deletions

BIN
Morskie Oko.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

View File

@ -41,6 +41,7 @@
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.logind.lidSwitchExternalPower = "ignore";
services.fwupd.enable = true;
services.xserver = {
xkb.layout = "us";
@ -78,35 +79,14 @@
description = "Steph";
extraGroups = [ "networkmanager" "wheel" "dialout" "podman" "docker" ];
packages = with pkgs; [
tdesktop
vscodium
ungoogled-chromium
widevine-cdm
libreoffice
nextcloud-client
tuba
dino
minetest
mumble
obs-studio
foliate
pinta
sequeler
endeavour
zotero
prismlauncher
element-desktop
stack
sqlite
sqlite.dev
gparted
inkscape
fragments
];
};
networking.firewall.allowedTCPPorts = [ 8080 ];
networking.extraHosts = ''
86.95.92.180 apprise.prod.gaiaplant.app
192.145.59.184 marshallingyard.steph.tools
'';
services.avahi.enable = false;
@ -127,43 +107,20 @@
];
environment.systemPackages = with pkgs; [
neovim
git
wget
file
unzip
zip
nodejs-18_x
steam-run
podman
docker-compose
ripgrep
bottom
skim
eza
bat
lf
fd
htop
vim
wl-clipboard
tmux
fprintd
libfprint-2-tod1-vfs0090
direnv
nix-direnv
openvpn
udev
usbutils
evolution-ews
evolution
gnome.gnome-tweaks
gnomeExtensions.tray-icons-reloaded
gnomeExtensions.clipboard-history
gnomeExtensions.alphabetical-app-grid
gnomeExtensions.caffeine
aspell
aspellDicts.en
@ -174,18 +131,14 @@
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
services.fprintd.enable = true;
services.power-profiles-daemon.enable = false;
services.tlp.enable = true;
services.flatpak.enable = true;
services.power-profiles-daemon.enable = true;
services.tlp.enable = false;
system.stateVersion = "22.05"; # Did you read the comment?
systemd.services."99setbacklight" = let set-backlight-script = (pkgs.writeShellApplication {
name = "set-backlight-script";
text = ''
for d in /sys/class/backlight/*; do
cd "$d"
echo $(( $(cat max_brightness) / 2)) > brightness

30
flake.lock generated
View File

@ -9,11 +9,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1719827611,
"narHash": "sha256-+NLFz+ZU7eE8QK9dsKyPXM8Us55jhFsaYNCZfALs344=",
"lastModified": 1726804989,
"narHash": "sha256-4RIdhGnFatuLS3vSIDjEqGNDosgQnl0s1ulYkc2BQHs=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "e823b25cdc14da38ec0d00775a2ba781e7f9a75a",
"rev": "73b5520c829857efa0445552ea9fe4d42d213d1e",
"type": "gitlab"
},
"original": {
@ -26,11 +26,11 @@
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1719758591,
"narHash": "sha256-3DE/UnxJxRWjtWPZuuiT3TIG7HrHf+srpmiCTFkrAQs=",
"lastModified": 1723137499,
"narHash": "sha256-MOE9NeU2i6Ws1GhGmppMnjOHkNLl2MQMJmGhaMzdoJM=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "8fb5267c5b3434f76983e29749aba7cd636e03ca",
"rev": "fb5b578a4f49ae8705e5fea0419242ed1b8dba70",
"type": "github"
},
"original": {
@ -61,11 +61,11 @@
]
},
"locked": {
"lastModified": 1719827385,
"narHash": "sha256-qs+nU20Sm8czHg3bhGCqiH+8e13BJyRrKONW34g3i50=",
"lastModified": 1726592409,
"narHash": "sha256-2Y6CDvD/BD43WLS77PHu6dUHbdUfFhuzkY8oJAecD/U=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "391ca6e950c2525b4f853cbe29922452c14eda82",
"rev": "2ab00f89dd3ecf8012f5090e6d7ca1a7ea30f594",
"type": "github"
},
"original": {
@ -77,11 +77,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1719707984,
"narHash": "sha256-RoxIr/fbndtuKqulGvNCcuzC6KdAib85Q8gXnjzA1dw=",
"lastModified": 1726447378,
"narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7dca15289a1c2990efbe4680f0923ce14139b042",
"rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
"type": "github"
},
"original": {
@ -93,11 +93,11 @@
},
"nur": {
"locked": {
"lastModified": 1719865591,
"narHash": "sha256-Fq9KxLJjrHGXtCX1rylzW5Ls65fo4Rgl8f2Kqv5Gpo8=",
"lastModified": 1726811691,
"narHash": "sha256-QjeSsVQo6q7gmWpAreIebQC4fLv4cIgQiPsJjgHmb6E=",
"owner": "nix-community",
"repo": "NUR",
"rev": "c3b0c669d39c3e03dbfba8c008487b5d2d62657d",
"rev": "cf02274315ba8e91aa8c4bc5e336760af35f42e5",
"type": "github"
},
"original": {

View File

@ -1,5 +1,5 @@
{
description = "A very basic flake";
description = "My OS config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";

144
home.nix
View File

@ -2,88 +2,72 @@
imports = [
./programs/firefox.nix
./programs/tmux.nix
./programs/bash.nix
];
home.stateVersion = "22.05";
home.packages = [ pkgs.fortune ];
home.packages = with pkgs; [
bat
bottom
dino
direnv
element-desktop
endeavour
eza
fd
file
foliate
fortune
fragments
git
gparted
htop
inkscape
lf
libreoffice
minetest
mpv
mumble
neovim
nextcloud-client
nix-direnv
nodejs-18_x
obs-studio
openvpn
pinta
prismlauncher
ripgrep
sequeler
skim
sqlite
sqlite.dev
stack
steam-run
syncplay
tdesktop
thunderbird
tmux
tuba
ungoogled-chromium
unzip
vim
vscodium
wget
widevine-cdm
wl-clipboard
zip
zotero
thunderbird
signal-desktop
entr
pandoc
texliveFull
];
programs.home-manager.enable = true;
programs.bash.enable = true;
programs.bash.bashrcExtra = ''
# Prompt
if [ -n "$PS1" ]; then
# A temporary variable to contain our prompt command
NEW_PROMPT_COMMAND='
MY_PWD="$PWD"
[[ "$MY_PWD" =~ ^"$HOME"(/|$) ]] && MY_PWD="~''${MY_PWD#$HOME}"
TRIMMED_PWD=''${MY_PWD: -40};
TRIMMED_PWD=''${TRIMMED_PWD:-$MY_PWD}
[[ "''${#MY_PWD}" -ge 41 ]] && TRIMMED_PWD="…$TRIMMED_PWD"
SHELL_PREFIX=""
[[ -n "$IN_NIX_SHELL" ]] && SHELL_PREFIX="$SHELL_PREFIX "
[[ -n "$AWS_VAULT" ]] && SHELL_PREFIX="$SHELL_PREFIX 🔓"
[[ -n "$FLUTTER_ENV" ]] && SHELL_PREFIX="$SHELL_PREFIX "
[[ -n "$REACTNATIVE_ENV" ]] && SHELL_PREFIX="$SHELL_PREFIX "
'
# If there's an existing prompt command, let's not
# clobber it
if [ -n "''${PROMPT_COMMAND// /}" ]; then
PROMPT_COMMAND="$PROMPT_COMMAND
$NEW_PROMPT_COMMAND"
else
PROMPT_COMMAND="$NEW_PROMPT_COMMAND"
fi
# We're done with our temporary variable
unset NEW_PROMPT_COMMAND
# Set PS1 with our new variable
# \h - hostname, \u - username
# PS1='\u@\h:$TRIMMED_PWD\$ '
export PS1="[\t \[\e[32m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]]"'$SHELL_PREFIX'" \[\e[36m\]"'$TRIMMED_PWD'"\[\e[m\] \$ "
fi
eval "$(direnv hook bash)"
export NIXPKGS_ALLOW_UNFREE=1
'';
programs.bash.shellAliases = {
chmod = "chmod --preserve-root";
chown = "chown --preserve-root";
ls = "ls -Isnap --color";
df = "df -h -x squashfs -x tmpfs -x devtmpfs -x overlay -x revokefs-fuse";
free = "free -h";
toupper = "tr [:lower:] [:upper:]";
tolower = "tr [:upper:] [:lower:]";
rebuild = ''
nixos-rebuild switch --flake "$HOME/.local/os#" --use-remote-sudo
'';
":r" = "!!";
};
programs.bash.sessionVariables = {
NIX_SHELL_PRESERVE_PROMPT = 1;
};
programs.tmux.enable = true;
programs.tmux.terminal = "xterm-256color";
programs.tmux.baseIndex = 1;
programs.tmux.clock24 = true;
programs.tmux.prefix = "C-a";
programs.tmux.escapeTime = 0;
programs.tmux.extraConfig = ''
set-option -g status-position top
setw -g automatic-rename on
set -g renumber-windows on
set -g set-titles on
set -g set-titles-string "#T"
'';
dconf.settings = {
"org/gnome/desktop/wm/keybindings" = {
move-to-workspace-left = ["<Alt><Super>Left"];
@ -120,12 +104,22 @@ $NEW_PROMPT_COMMAND"
];
# disabled-extensions = builtins.filter (x: ! builtins.elem x enabled-extensions) disabled-extensions;
favorite-apps = [
"thunderbird.desktop"
"signal-desktop.desktop"
"element-desktop.desktop"
"org.telegram.desktop.desktop"
"im.dino.Dino.desktop"
"firefox.desktop"
"chromium-browser.desktop"
"org.gnome.Console.desktop"
"org.gnome.Nautilus.desktop"
];
};
"org/gnome/desktop/background" = {
"picture-uri" = "${config.home.homeDirectory}/.background-image";
};
};
home.file.".background-image".source = "${./.}/Morskie Oko.jpg";
}

48
programs/bash.nix Normal file
View File

@ -0,0 +1,48 @@
{config, lib, pkgs, inputs, ...} : {
programs.bash.enable = true;
programs.bash.bashrcExtra = ''
if [ -n "$PS1" ]; then
NEW_PROMPT_COMMAND='
MY_PWD="$PWD"
[[ "$MY_PWD" =~ ^"$HOME"(/|$) ]] && MY_PWD="~''${MY_PWD#$HOME}"
TRIMMED_PWD=''${MY_PWD: -40};
TRIMMED_PWD=''${TRIMMED_PWD:-$MY_PWD}
[[ "''${#MY_PWD}" -ge 41 ]] && TRIMMED_PWD="…$TRIMMED_PWD"
SHELL_PREFIX=""
[[ -n "$IN_NIX_SHELL" ]] && SHELL_PREFIX="$SHELL_PREFIX "
[[ -n "$AWS_VAULT" ]] && SHELL_PREFIX="$SHELL_PREFIX 🔓"
[[ -n "$FLUTTER_ENV" ]] && SHELL_PREFIX="$SHELL_PREFIX "
[[ -n "$REACTNATIVE_ENV" ]] && SHELL_PREFIX="$SHELL_PREFIX "
'
if [ -n "''${PROMPT_COMMAND// /}" ]; then
PROMPT_COMMAND="$PROMPT_COMMAND
$NEW_PROMPT_COMMAND"
else
PROMPT_COMMAND="$NEW_PROMPT_COMMAND"
fi
unset NEW_PROMPT_COMMAND
export PS1="[\t \[\e[32m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]]"'$SHELL_PREFIX'" \[\e[36m\]"'$TRIMMED_PWD'"\[\e[m\] \$ "
fi
eval "$(direnv hook bash)"
'';
programs.bash.shellAliases = {
chmod = "chmod --preserve-root";
chown = "chown --preserve-root";
ls = "ls -Isnap --color";
df = "df -h -x squashfs -x tmpfs -x devtmpfs -x overlay -x revokefs-fuse";
free = "free -h";
toupper = "tr [:lower:] [:upper:]";
tolower = "tr [:upper:] [:lower:]";
rebuild = ''
nixos-rebuild switch --flake "$HOME/.local/os#" --use-remote-sudo
'';
":r" = "!!";
};
programs.bash.sessionVariables = {
NIX_SHELL_PRESERVE_PROMPT = 1;
NIXPKGS_ALLOW_UNFREE = 1;
};
}

View File

@ -16,6 +16,7 @@
"extensions.autoDisableScopes" = 0; # Auto enable new extentions
"browser.toolbars.bookmarks.visibility" = "never";
"gnomeTheme.hideSingleTab" = true;
"signon.rememberSignons" = false;
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin

15
programs/tmux.nix Normal file
View File

@ -0,0 +1,15 @@
{config, lib, pkgs, inputs, ...} : {
programs.tmux.enable = true;
programs.tmux.terminal = "xterm-256color";
programs.tmux.baseIndex = 1;
programs.tmux.clock24 = true;
programs.tmux.prefix = "C-a";
programs.tmux.escapeTime = 0;
programs.tmux.extraConfig = ''
set-option -g status-position top
setw -g automatic-rename on
set -g renumber-windows on
set -g set-titles on
set -g set-titles-string "#T"
'';
}