format code

current_state
Christian Ott 1 year ago
parent 44e64ef028
commit 73e71df821
  1. 48
      configuration.nix
  2. 66
      disko.nix
  3. 25
      flake.nix
  4. 10
      greeter.nix
  5. 19
      hardware-configuration.nix
  6. 27
      home.nix
  7. 24
      hyperland/default.nix
  8. 3
      modules/dunst.nix
  9. 6
      modules/ranger.nix
  10. 36
      modules/waybar.nix

@ -2,16 +2,25 @@
# 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`).
{ config, lib, pkgs, ronema, xdph, ... }:
{
config,
lib,
pkgs,
ronema,
xdph,
...
}:
{
imports =
[ # Include the results of the hardware scan.
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
"${builtins.fetchTarball {
"${
builtins.fetchTarball {
url = "https://github.com/nix-community/disko/archive/refs/tags/v1.6.1.tar.gz";
sha256 = "1p9vsml07bm3riw703dv83ihlmgyc11qv882qa6bqzqdgn86y8z4";
}}/module.nix"
}
}/module.nix"
./disko.nix
];
@ -55,10 +64,15 @@
# };
# https://nixos.wiki/wiki/Fonts fonts with icons
fonts.packages = with pkgs;
[
fonts.packages = with pkgs; [
font-awesome
(nerdfonts.override {fonts = ["JetBrainsMono" "CascadiaCode" "FiraCode"];})
(nerdfonts.override {
fonts = [
"JetBrainsMono"
"CascadiaCode"
"FiraCode"
];
})
];
fonts.fontconfig = {
defaultFonts = {
@ -126,7 +140,11 @@
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.chrigi = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker"];
extraGroups = [
"wheel"
"networkmanager"
"docker"
];
initialPassword = "password";
packages = with pkgs; [
firefox
@ -183,7 +201,11 @@
services.gnome.gnome-keyring.enable = 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
# started in user sessions.
@ -229,8 +251,10 @@
nix = {
# package = pkgs.nix;
settings.experimental-features = ["nix-command" "flakes"];
settings.experimental-features = [
"nix-command"
"flakes"
];
};
}

@ -30,9 +30,17 @@
bypassWorkqueues = true;
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
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
content = {
type = "btrfs";
@ -41,23 +49,48 @@
"/root" = {
mountpoint = "/";
# 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" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"];
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"];
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
};
"/var" = {
mountpoint = "/var";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"];
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
};
"/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;
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" ];
extraFormatArgs = [ "--cipher=aes-xts-plain64" "--key-size=512" "--hash=sha512" ];
additionalKeyFiles = [
"/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
content = {
type = "btrfs";
@ -100,7 +141,12 @@
subvolumes = {
"/backup" = {
mountpoint = "/backup";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"];
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
};
};
};

@ -10,7 +10,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = github:nix-community/home-manager;
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
ronema = {
@ -19,7 +19,17 @@
};
};
outputs = { self, nixpkgs, nixos-hardware, home-manager, nix-colors, ronema, xdph, ... }@inputs:
outputs =
{
self,
nixpkgs,
nixos-hardware,
home-manager,
nix-colors,
ronema,
xdph,
...
}@inputs:
let
username = "chrigi";
lib = nixpkgs.lib;
@ -29,7 +39,8 @@
inherit system;
config.allowUnfree = true;
};
in {
in
{
nixosConfigurations.nix-fw16 = lib.nixosSystem {
specialArgs = {
inherit pkgs ronema xdph;
@ -38,14 +49,16 @@
./configuration.nix
./greeter.nix
nixos-hardware.nixosModules.framework-16-7040-amd
home-manager.nixosModules.home-manager {
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./home.nix;
home-manager.extraSpecialArgs = {inherit username nix-colors; };
home-manager.extraSpecialArgs = {
inherit username nix-colors;
};
}
];
};
};
}

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
@ -16,7 +21,8 @@ let
terminal = true;
};
in {
in
{
services.greetd = {
enable = true;

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

@ -1,4 +1,10 @@
{ config, pkgs, nix-colors, username, ... }:
{
config,
pkgs,
nix-colors,
username,
...
}:
{
imports = [
@ -14,7 +20,6 @@
home.username = "${username}";
home.homeDirectory = "/home/${username}";
# Packages that should be installed to the user profile.
home.packages = with pkgs; [
kitty
@ -42,10 +47,15 @@
nextcloud-client
font-awesome
(nerdfonts.override {fonts = ["JetBrainsMono" "CascadiaCode" "FiraCode"];})
(nerdfonts.override {
fonts = [
"JetBrainsMono"
"CascadiaCode"
"FiraCode"
];
})
];
programs.ssh = {
enable = true;
@ -62,7 +72,13 @@
programs.bash = {
enable = true;
historyIgnore = [ "l" "ls" "ll" "cd" "exit" ];
historyIgnore = [
"l"
"ls"
"ll"
"cd"
"exit"
];
historyControl = [ "erasedups" ];
shellAliases = {
grep = "grep --color=auto";
@ -81,7 +97,6 @@
'';
};
programs.starship = {
enable = true;
enableBashIntegration = true;

@ -1,4 +1,9 @@
{ config, pkgs, username, ... }:
{
config,
pkgs,
username,
...
}:
let
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
@ -62,7 +67,7 @@ in
blur_passes = 1;
blur_size = 7;
noise = 0.0117;
noise = 1.17e-2;
contrast = 0.8916;
brightness = 0.8172;
vibrancy = 0.1696;
@ -204,7 +209,6 @@ in
"$mod, mouse:273, resizewindow"
];
bind =
[
"$mod, F, exec, firefox"
@ -222,18 +226,22 @@ in
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = let
builtins.concatLists (
builtins.genList (
x:
let
ws =
let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
in
[
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
]
) 10
)
10)
);
windowrulev2 = [
# https://jbmorley.co.uk/posts/2024-02-13-1password-and-hyprland/

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

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

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
programs.waybar = {
enable = true;
package = pkgs.waybar;
@ -93,7 +94,18 @@ programs.waybar = {
format = "{icon}";
tooltip = true;
format-alt = "<small>{percent}%</small>";
format-icons = ["󱩎" "󱩏" "󱩐" "󱩑" "󱩒" "󱩓" "󱩔" "󱩕" "󱩖" "󰛨"];
format-icons = [
"󱩎"
"󱩏"
"󱩐"
"󱩑"
"󱩒"
"󱩓"
"󱩔"
"󱩕"
"󱩖"
"󰛨"
];
# on-scroll-up = "brightnessctl set 1%+";
# on-scroll-down = "brightnessctl set 1%-";
# smooth-scrolling-threshold = "2400";
@ -108,7 +120,13 @@ programs.waybar = {
tooltip-format = "{essid}";
interval = 1;
on-click = "ronema";
format-icons = ["󰤯" "󰤟" "󰤢" "󰤥" "󰤨"];
format-icons = [
"󰤯"
"󰤟"
"󰤢"
"󰤥"
"󰤨"
];
};
"bluetooth" = {
@ -130,7 +148,11 @@ programs.waybar = {
format-icons = {
headphone = "";
default = ["" "" "󰕾"];
default = [
""
""
"󰕾"
];
};
# on-click = "pamixer -t";
# on-scroll-up = "pamixer -i 1";
@ -157,7 +179,11 @@ programs.waybar = {
format-full = "󰂄";
format-alt = "<small>{capacity}%</small> ";
format-icons = ["󱊡" "󱊢" "󱊣"];
format-icons = [
"󱊡"
"󱊢"
"󱊣"
];
};
# "custom/weather" = {

Loading…
Cancel
Save

Powered by TurnKey Linux.