Compare commits

...

16 Commits

Author SHA1 Message Date
Christian Ott 6aaea6d416 update vscode 5 months ago
Christian Ott c579566ae1 add communardo vpn 5 months ago
Christian Ott 9046f3d02a nix updates 8 months ago
Christian Ott a377905297 changes 1 year ago
Christian Ott e8bde7a3bf NixOS update with necessary config changes 1 year ago
Christian Ott 73e71df821 format code 1 year ago
Christian Ott 44e64ef028 add some programs & aliases 1 year ago
Christian Ott b14e9bb8aa NixOS update 1 year ago
Christian Ott 40133957c4 NixOS update 1 year ago
Christian Ott 2a3ca89e60 add wallpaper and enable hypridle 1 year ago
Christian Ott 72b3c77574 experimets with fonts - font awesome still not working 1 year ago
Christian Ott 87c58b3eb4 add starship to terminal 1 year ago
Christian Ott 7c3a5a4312 NixOS update 1 year ago
Christian Ott 9dd273472f Temporary fix broken numpad on framework 16 1 year ago
Christian Ott 667fc59251 NixOS update 1 year ago
Christian Ott e8b3b461f4 NixOS update 2 years ago
  1. BIN
      backgrounds/island_1.jpg
  2. BIN
      backgrounds/island_2.jpg
  3. BIN
      backgrounds/island_3.jpg
  4. 59
      configuration.nix
  5. 66
      disko.nix
  6. 49
      flake.lock
  7. 45
      flake.nix
  8. 12
      greeter.nix
  9. 19
      hardware-configuration.nix
  10. 111
      home.nix
  11. 104
      hyperland/default.nix
  12. 3
      modules/dunst.nix
  13. 6
      modules/ranger.nix
  14. 11
      modules/vscode.nix
  15. 11
      modules/vscodium/default.nix
  16. 104
      modules/vscodium/vscodium.nix
  17. 38
      modules/waybar.nix

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

@ -2,16 +2,23 @@
# your system. Help is available in the configuration.nix(5) man page, on # your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). # https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ronema, xdph, ... }: {
inputs,
pkgs,
ronema,
...
}:
{ {
imports = imports = [
[ # Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
"${builtins.fetchTarball { "${
builtins.fetchTarball {
url = "https://github.com/nix-community/disko/archive/refs/tags/v1.6.1.tar.gz"; url = "https://github.com/nix-community/disko/archive/refs/tags/v1.6.1.tar.gz";
sha256 = "1p9vsml07bm3riw703dv83ihlmgyc11qv882qa6bqzqdgn86y8z4"; sha256 = "1p9vsml07bm3riw703dv83ihlmgyc11qv882qa6bqzqdgn86y8z4";
}}/module.nix" }
}/module.nix"
./disko.nix ./disko.nix
]; ];
@ -31,11 +38,16 @@
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
networking.networkmanager.plugins = [ pkgs.networkmanager-openvpn ]; networking.networkmanager.plugins = [ pkgs.networkmanager-openvpn ];
networking.networkmanager.dns = "dnsmasq"; networking.networkmanager.dns = "dnsmasq";
# address=/git.christianott.ch/git.christianott.ch/tux.social/woelkli.christianott.ch/office.christianott.ch/192.168.15.4
environment.etc."NetworkManager/dnsmasq.d/00-cave.conf".text = '' environment.etc."NetworkManager/dnsmasq.d/00-cave.conf".text = ''
server=/.mibex.ch/172.31.13.27 server=/.mibex.ch/172.31.13.27
server=/.communardo.de/192.168.50.75
address=/mail.communardo.de/195.243.59.178
address=/git.christianott.ch/git.christianott.ch/tux.social/woelkli.christianott.ch/office.christianott.ch/192.168.15.4
server=/huus/192.168.15.2 server=/huus/192.168.15.2
server=192.168.15.2 server=192.168.15.2
server=192.168.50.1
server=1.1.1.1 server=1.1.1.1
''; '';
# Set your time zone. # Set your time zone.
@ -54,9 +66,11 @@
# }; # };
# https://nixos.wiki/wiki/Fonts fonts with icons # https://nixos.wiki/wiki/Fonts fonts with icons
fonts.packages = with pkgs; fonts.packages = with pkgs; [
[ font-awesome
(nerdfonts.override {fonts = ["JetBrainsMono" "CascadiaCode" "FiraCode"];}) nerd-fonts.jetbrains-mono
nerd-fonts.caskaydia-cove
nerd-fonts.fira-code
]; ];
fonts.fontconfig = { fonts.fontconfig = {
defaultFonts = { defaultFonts = {
@ -73,8 +87,8 @@
programs.hyprland.portalPackage = pkgs.xdg-desktop-portal-wlr; programs.hyprland.portalPackage = pkgs.xdg-desktop-portal-wlr;
# Enable the GNOME Desktop Environment. # Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = false; services.displayManager.gdm.enable = false;
services.xserver.desktopManager.gnome.enable = true; services.desktopManager.gnome.enable = true;
services.fwupd.enable = true; services.fwupd.enable = true;
@ -113,7 +127,7 @@
jack.enable = true; jack.enable = true;
pulse.enable = true; pulse.enable = true;
}; };
hardware.pulseaudio.enable = false; services.pulseaudio.enable = false;
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
services.libinput = { services.libinput = {
@ -124,7 +138,11 @@
# Define a user account. Don't forget to set a password with ‘passwd’. # Define a user account. Don't forget to set a password with ‘passwd’.
users.users.chrigi = { users.users.chrigi = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker"]; extraGroups = [
"wheel"
"networkmanager"
"docker"
];
initialPassword = "password"; initialPassword = "password";
packages = with pkgs; [ packages = with pkgs; [
firefox firefox
@ -157,7 +175,8 @@
wget wget
curl curl
btop btop
vscodium vscodium-insider
pciutils pciutils
usbutils usbutils
openvpn openvpn
@ -181,7 +200,11 @@
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true; security.pam.services.greetd.enableGnomeKeyring = true;
nix.gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 7d"; }; nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
@ -226,9 +249,11 @@
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
nix = { nix = {
package = pkgs.nixFlakes; # package = pkgs.nix;
settings.experimental-features = ["nix-command" "flakes"]; settings.experimental-features = [
"nix-command"
"flakes"
];
}; };
} }

@ -30,9 +30,17 @@
bypassWorkqueues = true; bypassWorkqueues = true;
keyFile = "/tmp/yk/yk_mini.key"; keyFile = "/tmp/yk/yk_mini.key";
}; };
additionalKeyFiles = [ "/tmp/yk/yk_the_big_one.key" "/tmp/yk/yk_on_key.key" "/tmp/yk/yk_round.key" ]; additionalKeyFiles = [
"/tmp/yk/yk_the_big_one.key"
"/tmp/yk/yk_on_key.key"
"/tmp/yk/yk_round.key"
];
# https://github.com/sgillespie/nixos-yubikey-luks # https://github.com/sgillespie/nixos-yubikey-luks
extraFormatArgs = [ "--cipher=aes-xts-plain64" "--key-size=512" "--hash=sha512" ]; extraFormatArgs = [
"--cipher=aes-xts-plain64"
"--key-size=512"
"--hash=sha512"
];
initrdUnlock = false; # we have to add it manually because of the yubikeys initrdUnlock = false; # we have to add it manually because of the yubikeys
content = { content = {
type = "btrfs"; type = "btrfs";
@ -41,23 +49,48 @@
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";
# https://unix.stackexchange.com/questions/752741/what-is-the-mount-option-space-cache-v2 # https://unix.stackexchange.com/questions/752741/what-is-the-mount-option-space-cache-v2
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"]; mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
}; };
"/home" = { "/home" = {
mountpoint = "/home"; mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"]; mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
}; };
"/nix" = { "/nix" = {
mountpoint = "/nix"; mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"]; mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
}; };
"/var" = { "/var" = {
mountpoint = "/var"; mountpoint = "/var";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"]; mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
}; };
"/docker-btrfs" = { "/docker-btrfs" = {
mountpoint = "/var/lib/docker/btrfs"; mountpoint = "/var/lib/docker/btrfs";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"]; mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
}; };
}; };
}; };
@ -91,8 +124,16 @@
bypassWorkqueues = true; bypassWorkqueues = true;
keyFile = "/tmp/yk/yk_mini.key"; keyFile = "/tmp/yk/yk_mini.key";
}; };
additionalKeyFiles = [ "/tmp/yk/yk_the_big_one.key" "/tmp/yk/yk_on_key.key" "/tmp/yk/yk_round.key" ]; additionalKeyFiles = [
extraFormatArgs = [ "--cipher=aes-xts-plain64" "--key-size=512" "--hash=sha512" ]; "/tmp/yk/yk_the_big_one.key"
"/tmp/yk/yk_on_key.key"
"/tmp/yk/yk_round.key"
];
extraFormatArgs = [
"--cipher=aes-xts-plain64"
"--key-size=512"
"--hash=sha512"
];
initrdUnlock = false; # we have to add it manually because of the yubikeys initrdUnlock = false; # we have to add it manually because of the yubikeys
content = { content = {
type = "btrfs"; type = "btrfs";
@ -100,7 +141,12 @@
subvolumes = { subvolumes = {
"/backup" = { "/backup" = {
mountpoint = "/backup"; mountpoint = "/backup";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"]; mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
}; };
}; };
}; };

@ -23,11 +23,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1725863684, "lastModified": 1751824240,
"narHash": "sha256-HmdTBpuCsw35Ii35JUKO6AE6nae+kJliQb0XGd4hoLE=", "narHash": "sha256-aDDC0CHTlL7QDKWWhdbEgVPK6KwWt+ca0QkmHYZxMzI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "be47a2bdf278c57c2d05e747a13ed31cef54a037", "rev": "fd9e55f5fac45a26f6169310afca64d56b681935",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -132,11 +132,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1725716377, "lastModified": 1751432711,
"narHash": "sha256-7NzW9O/cAw7iWzRfh7Oo/SuSudL4a1YTKS6yoh3tMck=", "narHash": "sha256-136MeWtckSHTN9Z2WRNRdZ8oRP3vyx3L8UxeBYE+J9w=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "04a1cda0c1725094a4db703cccbb956b7558f5a6", "rev": "497ae1357f1ac97f1aea31a4cb74ad0d534ef41f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -148,11 +148,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1725634671, "lastModified": 1751637120,
"narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", "narHash": "sha256-xVNy/XopSfIG9c46nRmPaKfH1Gn/56vQ8++xWA8itO4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", "rev": "5c724ed1388e53cc231ed98330a60eb2f7be4be3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -177,6 +177,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-small": {
"locked": {
"lastModified": 1751743520,
"narHash": "sha256-gk83D6+0KpugopnV6vrumpVHDrqESFjVr39O9u7NNy8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "833775e5731dcd1fd3eb0b61fa7ed2a4fafb4e3e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"ronema": { "ronema": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -184,16 +200,14 @@
] ]
}, },
"locked": { "locked": {
"dirtyRev": "328bd77536cec39d17b5e5027c5778efeb650fed-dirty", "lastModified": 1732525400,
"dirtyShortRev": "328bd77-dirty", "narHash": "sha256-q051SKAI9oSSkwG998w8J20EaKHV/loopSUTIsbft1M=",
"lastModified": 1718446613, "path": "/home/chrigi/private-dev/rofi-network-manager",
"narHash": "sha256-ocRS47pPPjxpLWOtLwSfNnBQh5KT4O/5U5VLGySSodg=", "type": "path"
"type": "git",
"url": "file:///home/chrigi/private-dev/rofi-network-manager"
}, },
"original": { "original": {
"type": "git", "path": "/home/chrigi/private-dev/rofi-network-manager",
"url": "file:///home/chrigi/private-dev/rofi-network-manager" "type": "path"
} }
}, },
"root": { "root": {
@ -202,6 +216,7 @@
"nix-colors": "nix-colors", "nix-colors": "nix-colors",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-small": "nixpkgs-small",
"ronema": "ronema", "ronema": "ronema",
"xdph": "xdph" "xdph": "xdph"
} }

@ -3,6 +3,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nix-colors.url = "github:misterio77/nix-colors"; nix-colors.url = "github:misterio77/nix-colors";
xdph = { xdph = {
@ -10,7 +11,7 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
home-manager = { home-manager = {
url = github:nix-community/home-manager; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
ronema = { ronema = {
@ -19,33 +20,63 @@
}; };
}; };
outputs = { self, nixpkgs, nixos-hardware, home-manager, nix-colors, ronema, xdph, ... }@inputs: outputs =
{
self,
nixpkgs,
nixpkgs-small,
nixos-hardware,
home-manager,
nix-colors,
ronema,
xdph,
...
}@inputs:
let let
username = "chrigi"; username = "chrigi";
lib = nixpkgs.lib; lib = nixpkgs.lib;
system = "x86_64-linux"; system = "x86_64-linux";
nixpkgsDrvRootPath = nixpkgs + "/pkgs/applications/editors/vscode";
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
overlays = [
(final: prev: {
vscodium-insider = pkgs.callPackage ./modules/vscodium/vscodium.nix { inherit nixpkgsDrvRootPath; };
})
];
};
pkgs-small = import nixpkgs-small {
inherit system;
config.allowUnfree = true;
}; };
in { in
{
nixosConfigurations.nix-fw16 = lib.nixosSystem { nixosConfigurations.nix-fw16 = lib.nixosSystem {
specialArgs = { specialArgs = {
inherit pkgs ronema xdph; inherit
inputs
pkgs
ronema
xdph
;
}; };
modules = [ modules = [
./configuration.nix ./configuration.nix
./greeter.nix ./greeter.nix
nixos-hardware.nixosModules.framework-16-7040-amd nixos-hardware.nixosModules.framework-16-7040-amd
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.${username} = import ./home.nix; home-manager.users.${username} = import ./home.nix;
home-manager.extraSpecialArgs = {inherit username nix-colors; }; home-manager.extraSpecialArgs = {
inherit pkgs-small username nix-colors;
};
} }
]; ];
}; };
}; };
} }

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
let let
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet"; tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
@ -7,7 +12,7 @@ let
# https://github.com/bytemouse/config/blob/48d9be51a9666c9b62f4b8e84322b9d892ee0aea/modules/gnome.nix#L11 # https://github.com/bytemouse/config/blob/48d9be51a9666c9b62f4b8e84322b9d892ee0aea/modules/gnome.nix#L11
gnome-script = pkgs.writeShellScriptBin "gnome-script" '' gnome-script = pkgs.writeShellScriptBin "gnome-script" ''
export XDG_SESSION_TYPE=wayland export XDG_SESSION_TYPE=wayland
${pkgs.dbus}/bin/dbus-run-session ${pkgs.gnome.gnome-session}/bin/gnome-session ${pkgs.dbus}/bin/dbus-run-session ${pkgs.gnome-session}/bin/gnome-session
''; '';
gnome-desktop = pkgs.makeDesktopItem { gnome-desktop = pkgs.makeDesktopItem {
name = "gnome-desktop"; name = "gnome-desktop";
@ -16,7 +21,8 @@ let
terminal = true; terminal = true;
}; };
in { in
{
services.greetd = { services.greetd = {
enable = true; enable = true;

@ -1,18 +1,29 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’ # Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
disabledModules = [ "system/boot/luksroot.nix" ]; disabledModules = [ "system/boot/luksroot.nix" ];
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
./my-luksroot.nix ./my-luksroot.nix
]; ];
boot.initrd = { boot.initrd = {
kernelModules = ["vfat" "nls_cp437" "nls_iso8859-1" "usbhid"]; kernelModules = [
"vfat"
"nls_cp437"
"nls_iso8859-1"
"usbhid"
];
luks = { luks = {
yubikeySupport = true; yubikeySupport = true;

@ -1,5 +1,15 @@
{ config, pkgs, nix-colors, username, ... }: {
config,
pkgs,
pkgs-small,
nix-colors,
username,
...
}:
let
in
{ {
imports = [ imports = [
nix-colors.homeManagerModules.default nix-colors.homeManagerModules.default
@ -14,10 +24,9 @@
home.username = "${username}"; home.username = "${username}";
home.homeDirectory = "/home/${username}"; home.homeDirectory = "/home/${username}";
# Packages that should be installed to the user profile. # Packages that should be installed to the user profile.
home.packages = with pkgs; [ home.packages = with pkgs; [
kitty pkgs-small.kitty
eza eza
git git
git-lfs git-lfs
@ -25,15 +34,66 @@
jq jq
direnv direnv
skypeforlinux kdePackages.okular
zip
ant
tmux
nixd # Nix language server for vscode
nixfmt-rfc-style
signal-desktop signal-desktop
teams-for-linux
slack slack
jetbrains-toolbox jetbrains-toolbox
nextcloud-client nextcloud-client
pkgs-small.presenterm
font-awesome
nerd-fonts.jetbrains-mono
nerd-fonts.caskaydia-cove
nerd-fonts.fira-code
(pkgs.appimageTools.wrapType2 {
name = "atlassify";
pname = "atlassify";
version = "1.17.0";
src = fetchurl {
url = "https://github.com/setchy/atlassify/releases/download/v1.17.0/Atlassify-1.17.0.AppImage";
hash = "sha256-mfcxrd9axnmQMofth1M5ov2a4ppFE0ga0Gxjwbx2v9o=";
};
extraPkgs =
pkgs:
(appimageTools.defaultFhsEnvArgs.multiPkgs pkgs)
++ [
libsecret
]; ];
})
(pkgs.stdenv.mkDerivation {
pname = "flowkeeper";
version = "0.9.1";
src = pkgs.fetchurl {
url = "https://github.com/flowkeeper-org/fk-desktop/releases/download/v0.9.1/Flowkeeper";
sha256 = "sha256-HCEG7LSM7h2Yz6BbvQ0KdmfYnKZOG+TZxMvE5o8gYiA=";
};
dontUnpack = true;
installPhase = ''
install -Dm755 $src $out/bin/flowkeeper
'';
meta = {
description = "Flowkeeper time tracker";
platforms = pkgs.lib.platforms.linux;
};
})
];
programs.ssh = { programs.ssh = {
enable = true; enable = true;
@ -47,6 +107,49 @@
enable = true; enable = true;
lfs.enable = true; lfs.enable = true;
}; };
programs.bash = {
enable = true;
historyIgnore = [
"l"
"ls"
"ll"
"cd"
"exit"
];
historyControl = [ "erasedups" ];
shellAliases = {
grep = "grep --color=auto";
".." = "cd ..";
"cdm" = "cd ~/mibex-plugins/monorepo";
};
initExtra = ''
# Custom colored bash prompt
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
'';
profileExtra = ''
# Include user's private bin if present
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
'';
};
programs.atuin = {
enable = true;
settings = {
auto_sync = true;
sync_frequency = "5m";
sync_address = "https://atuin.christianott.ch";
search_mode = "fuzzy";
};
};
programs.starship = {
enable = true;
enableBashIntegration = true;
};
# This value determines the home Manager release that your # This value determines the home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
# when a new home Manager release introduces backwards # when a new home Manager release introduces backwards

@ -1,4 +1,9 @@
{ config, pkgs, username, ... }: {
config,
pkgs,
username,
...
}:
let let
volumeChange = pkgs.writeShellScript "volume-change" '' volumeChange = pkgs.writeShellScript "volume-change" ''
# FROM: https://github.com/jsimonrichard/nix-config/blob/master/modules/my-config/desktop/hyprland/home-manager/desktop/hyprland/keybinds.nix # FROM: https://github.com/jsimonrichard/nix-config/blob/master/modules/my-config/desktop/hyprland/home-manager/desktop/hyprland/keybinds.nix
@ -32,22 +37,40 @@ in
networkmanagerapplet networkmanagerapplet
grim grim
grimblast grimblast
swappy
slurp
wl-clipboard
hyprpaper
# (pkgs.waybar.overrideAttrs (oldAttrs: { # (pkgs.waybar.overrideAttrs (oldAttrs: {
# mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; # mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
# })) # }))
]; ];
services.hyprpaper = {
enable = true;
settings = {
ipc = false;
splash = false;
splash_offset = 5;
splash_color = "rgb(ebdbb8)";
preload = [ "$HOME/.nixos-config/backgrounds/island_1.jpg" ];
wallpaper = [ ",$HOME/.nixos-config/backgrounds/island_1.jpg" ];
};
};
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
settings = { settings = {
background = { background = {
monitor = ""; monitor = "";
# path = screenshot # path = screenshot
path = "$HOME/.nixos-config/backgrounds/island_2.jpg";
color = "rgba(152, 179, 166, 0.9)"; color = "rgba(152, 179, 166, 0.9)";
blur_passes = 1; blur_passes = 1;
blur_size = 7; blur_size = 7;
noise = 0.0117; noise = 1.17e-2;
contrast = 0.8916; contrast = 0.8916;
brightness = 0.8172; brightness = 0.8172;
vibrancy = 0.1696; vibrancy = 0.1696;
@ -113,6 +136,53 @@ in
}; };
}; };
services.hypridle = {
enable = true;
settings = {
general = {
before_sleep_cmd = "loginctl lock-session";
lock_cmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
# unlock_cmd = "loginctl unlock-session";
after_sleep_cmd = "hyprctl dispatch dpms on && notify-send \"Back from idle.\" \"Welcome back!\"";
};
listener = [
{
timeout = 5;
on-timeout = "pidof hyprlock && hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{
timeout = 150; # 2.5min.
on-timeout = "light -O && light -S 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = "light -I"; # monitor backlight restore.
}
{
timeout = 300;
on-timeout = "playerctl pause";
}
{
timeout = 270;
on-timeout = "notify-send \"Idle\" \"You're idle... locking in 30s.\"";
}
{
timeout = 300; # 5min
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
}
{
timeout = 330; # 5.5min
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
{
timeout = 1800; # 30min
on-timeout = "systemctl suspend"; # suspend pc
}
];
};
};
wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
monitor = [ monitor = [
@ -123,7 +193,8 @@ in
"$mod" = "SUPER"; "$mod" = "SUPER";
input = { input = {
kb_options = "compose:rctrl"; kb_options = "compose:rctrl,numpad:mac"; # workaround for split numpad https://github.com/hyprwm/Hyprland/issues/6886
numlock_by_default = true;
}; };
exec-once = [ exec-once = [
"dunst" "dunst"
@ -131,6 +202,8 @@ in
"${pkgs.networkmanagerapplet}/bin/nm-applet --sm-disable --indicator" "${pkgs.networkmanagerapplet}/bin/nm-applet --sm-disable --indicator"
"blueman-applet" "blueman-applet"
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"systemctl --user start hyprpaper.service" # they are enabled, but don't start because they try to start before WAYLAND_DISPLAY is set
]; ];
@ -139,7 +212,6 @@ in
"$mod, mouse:273, resizewindow" "$mod, mouse:273, resizewindow"
]; ];
bind = bind =
[ [
"$mod, F, exec, firefox" "$mod, F, exec, firefox"
@ -147,6 +219,7 @@ in
", Print, exec, grimblast copy area" ", Print, exec, grimblast copy area"
"$mod, l, exec, hyprlock" # Add a keybinding to lock the screen "$mod, l, exec, hyprlock" # Add a keybinding to lock the screen
"$mod, C, exec, code" "$mod, C, exec, code"
"$mod, P, exec, sleep 2; grim -g \"$(slurp)\" - | swappy -f -"
"$mod, E, exec, hyprctl dispatch exit" "$mod, E, exec, hyprctl dispatch exit"
"$mod, r, exec, rofi -show run" "$mod, r, exec, rofi -show run"
"$mod, code:51, exec, 1password" # super + \ "$mod, code:51, exec, 1password" # super + \
@ -157,18 +230,22 @@ in
++ ( ++ (
# workspaces # workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10} # binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList ( builtins.concatLists (
x: let builtins.genList (
ws = let x:
let
ws =
let
c = (x + 1) / 10; c = (x + 1) / 10;
in in
builtins.toString (x + 1 - (c * 10)); builtins.toString (x + 1 - (c * 10));
in [ in
[
"$mod, ${ws}, workspace, ${toString (x + 1)}" "$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
] ]
) 10
) )
10)
); );
windowrulev2 = [ windowrulev2 = [
# https://jbmorley.co.uk/posts/2024-02-13-1password-and-hyprland/ # https://jbmorley.co.uk/posts/2024-02-13-1password-and-hyprland/
@ -184,6 +261,15 @@ in
"bordercolor rgba(ed8796FF), class:org.kde.polkit-kde-authentication-agent-1" "bordercolor rgba(ed8796FF), class:org.kde.polkit-kde-authentication-agent-1"
"dimaround, class:org.kde.polkit-kde-authentication-agent-1" "dimaround, class:org.kde.polkit-kde-authentication-agent-1"
"stayfocused, class:org.kde.polkit-kde-authentication-agent-1" "stayfocused, class:org.kde.polkit-kde-authentication-agent-1"
# nextcloud
"float,class:(com.nextcloud.desktopclient.nextcloud)"
"size 400 800,class:(com.nextcloud.desktopclient.nextcloud)"
"move 100%-412 44,class:(com.nextcloud.desktopclient.nextcloud)"
# to try if it has sideeffects
"noinitialfocus, initialClass:com.nextcloud.desktopclient.nextcloud"
"noinitialfocus, initialClass:atlassify"
]; ];
# Bind flags # Bind flags
# l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active. # l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active.

@ -2,7 +2,8 @@
inputs, inputs,
config, config,
... ...
}:{ }:
{
services.dunst = { services.dunst = {
enable = true; enable = true;
settings = { settings = {

@ -7,13 +7,15 @@
pkgs.ueberzugpp pkgs.ueberzugpp
]; ];
extraConfig = "default_linemode devicons"; extraConfig = "default_linemode devicons";
plugins = [{ plugins = [
{
name = "devicons"; name = "devicons";
src = builtins.fetchGit { src = builtins.fetchGit {
url = "https://github.com/alexanderjeurissen/ranger_devicons.git"; url = "https://github.com/alexanderjeurissen/ranger_devicons.git";
rev = "a8d626485ca83719e1d8d5e32289cd96a097c861"; rev = "a8d626485ca83719e1d8d5e32289cd96a097c861";
}; };
}]; }
];
settings = { settings = {
preview_images_method = "ueberzug"; preview_images_method = "ueberzug";
show_hidden = true; show_hidden = true;

@ -1,11 +0,0 @@
{
config,
pkgs,
...
}: {
programs.vscode {
enable = true;
};
}

@ -0,0 +1,11 @@
{ inputs, pkgs, ... }:
let
nixpkgsDrvRootPath = inputs.nixpkgs + "/pkgs/applications/editors/vscode";
in
{
nixpkgs.overlays = [
{
vscodium = pkgs.callPackage ./vscodium-insiders.nix { inherit nixpkgsDrvRootPath; };
}
];
}

@ -0,0 +1,104 @@
{
lib,
stdenv,
callPackage,
nixpkgsDrvRootPath,
fetchurl,
nixosTests,
commandLineArgs ? "",
sourceExecutableName ? "codium-insiders",
useVSCodeRipgrep ? stdenv.hostPlatform.isDarwin,
}:
let
inherit (stdenv.hostPlatform) system;
throwSystem = throw "Unsupported system: ${system}";
plat =
{
x86_64-linux = "linux-x64";
x86_64-darwin = "darwin-x64";
aarch64-linux = "linux-arm64";
aarch64-darwin = "darwin-arm64";
armv7l-linux = "linux-armhf";
}
.${system} or throwSystem;
archive_fmt = if stdenv.hostPlatform.isDarwin then "zip" else "tar.gz";
hash =
{
x86_64-linux = "sha256-LpLGu8COJ7lk6QoAdmTNG4CMP0aMDNg43A+50Fm1tP4=";
x86_64-darwin = "sha256-d+8vt5grnLwD/cIIGgb2ogpgZrZLZs+2bqfBrRzLfJw=";
aarch64-linux = "sha256-D93Eh5TPRgd9OxJ4pWsOryS5mOz2amQOHOnO+K99hAg=";
aarch64-darwin = "sha256-xKBWAb23jUi8pI7mZpHOP2eF3PZFh0MWj+BM+alKF18=";
armv7l-linux = "sha256-EqJNi/qMM08voA/Ltle3/28zbgIz/Ae42IE5oXLxcKU=";
}
.${system} or throwSystem;
sourceRoot = lib.optionalString (!stdenv.hostPlatform.isDarwin) ".";
in
callPackage "${toString nixpkgsDrvRootPath}/generic.nix" rec {
inherit
sourceRoot
commandLineArgs
useVSCodeRipgrep
sourceExecutableName
;
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.103.05263-insider";
pname = "vscodium";
executableName = "codium-insiders";
longName = "VSCodium";
shortName = "vscodium";
src = fetchurl {
url = "https://github.com/VSCodium/vscodium-insiders/releases/download/${version}/VSCodium-${plat}-${version}.${archive_fmt}";
inherit hash;
};
tests = nixosTests.vscodium;
updateScript = ./update-vscodium.sh;
# Editing the `codium` binary (and shell scripts) within the app bundle causes the bundle's signature
# to be invalidated, which prevents launching starting with macOS Ventura, because VSCodium is notarized.
# See https://eclecticlight.co/2022/06/17/app-security-changes-coming-in-ventura/ for more information.
dontFixup = stdenv.hostPlatform.isDarwin;
meta = {
description = ''
Open source source code editor developed by Microsoft for Windows,
Linux and macOS (VS Code without MS branding/telemetry/licensing)
'';
longDescription = ''
Open source source code editor developed by Microsoft for Windows,
Linux and macOS. It includes support for debugging, embedded Git
control, syntax highlighting, intelligent code completion, snippets,
and code refactoring. It is also customizable, so users can change the
editor's theme, keyboard shortcuts, and preferences
'';
homepage = "https://github.com/VSCodium/vscodium";
downloadPage = "https://github.com/VSCodium/vscodium/releases";
license = lib.licenses.mit;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [
synthetica
bobby285271
ludovicopiero
];
mainProgram = "codium";
platforms = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
"armv7l-linux"
];
# requires libc.so.6 and other glibc specifics
broken = stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isGnu;
};
}

@ -2,7 +2,8 @@
config, config,
pkgs, pkgs,
... ...
}: { }:
{
programs.waybar = { programs.waybar = {
enable = true; enable = true;
package = pkgs.waybar; package = pkgs.waybar;
@ -93,7 +94,18 @@ programs.waybar = {
format = "{icon}"; format = "{icon}";
tooltip = true; tooltip = true;
format-alt = "<small>{percent}%</small>"; format-alt = "<small>{percent}%</small>";
format-icons = ["󱩎" "󱩏" "󱩐" "󱩑" "󱩒" "󱩓" "󱩔" "󱩕" "󱩖" "󰛨"]; format-icons = [
"󱩎"
"󱩏"
"󱩐"
"󱩑"
"󱩒"
"󱩓"
"󱩔"
"󱩕"
"󱩖"
"󰛨"
];
# on-scroll-up = "brightnessctl set 1%+"; # on-scroll-up = "brightnessctl set 1%+";
# on-scroll-down = "brightnessctl set 1%-"; # on-scroll-down = "brightnessctl set 1%-";
# smooth-scrolling-threshold = "2400"; # smooth-scrolling-threshold = "2400";
@ -108,7 +120,13 @@ programs.waybar = {
tooltip-format = "{essid}"; tooltip-format = "{essid}";
interval = 1; interval = 1;
on-click = "ronema"; on-click = "ronema";
format-icons = ["󰤯" "󰤟" "󰤢" "󰤥" "󰤨"]; format-icons = [
"󰤯"
"󰤟"
"󰤢"
"󰤥"
"󰤨"
];
}; };
"bluetooth" = { "bluetooth" = {
@ -130,7 +148,11 @@ programs.waybar = {
format-icons = { format-icons = {
headphone = ""; headphone = "";
default = ["" "" "󰕾"]; default = [
""
""
"󰕾"
];
}; };
# on-click = "pamixer -t"; # on-click = "pamixer -t";
# on-scroll-up = "pamixer -i 1"; # on-scroll-up = "pamixer -i 1";
@ -157,7 +179,11 @@ programs.waybar = {
format-full = "󰂄"; format-full = "󰂄";
format-alt = "<small>{capacity}%</small> "; format-alt = "<small>{capacity}%</small> ";
format-icons = ["󱊡" "󱊢" "󱊣"]; format-icons = [
"󱊡"
"󱊢"
"󱊣"
];
}; };
# "custom/weather" = { # "custom/weather" = {
@ -252,7 +278,7 @@ programs.waybar = {
style = '' style = ''
* { * {
/* `otf-font-awesome` is required to be installed for icons */ /* `otf-font-awesome` is required to be installed for icons */
font-family: CascadiaCode Nerd Font, Material Design Icons, JetBrainsMono Nerd Font, Iosevka Nerd Font ; font-family: CaskaydiaCove NFM, JetBrainsMono Nerd Font, Iosevka Nerd Font;
font-size: 14px; font-size: 14px;
border: none; border: none;
border-radius: 0; border-radius: 0;

Loading…
Cancel
Save

Powered by TurnKey Linux.