Format using nixfmt

This commit is contained in:
Torjus Håkestad 2024-07-17 22:22:04 +02:00
parent a85c6f2f4b
commit 90ccaa07bd
54 changed files with 671 additions and 409 deletions

View File

@ -21,13 +21,14 @@
};
outputs =
{ self
, nixpkgs
, nixpkgs-stable
, sops-nix
, ghettoptt
, huecli
, ...
{
self,
nixpkgs,
nixpkgs-stable,
sops-nix,
ghettoptt,
huecli,
...
}@inputs:
let
system = "x86_64-linux";
@ -44,54 +45,69 @@
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
forAllSystems =
f: nixpkgs.lib.genAttrs allSystems (system: f { pkgs = import nixpkgs { inherit system; }; });
in
{
nixosConfigurations = {
prismo = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs self user; };
specialArgs = {
inherit inputs self user;
};
modules = [ ./hosts/prismo ];
};
magicman = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs self user; };
specialArgs = {
inherit inputs self user;
};
modules = [
({ config, pkgs, ... }: {
nixpkgs.overlays = [
overlay-stable
ghettoptt.overlays.default
huecli.overlays.default
];
})
(
{ config, pkgs, ... }:
{
nixpkgs.overlays = [
overlay-stable
ghettoptt.overlays.default
huecli.overlays.default
];
}
)
./hosts/magicman
sops-nix.nixosModules.sops
];
};
gunter = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs self user sops-nix; };
specialArgs = {
inherit
inputs
self
user
sops-nix
;
};
modules = [
({ config, pkgs, ... }: {
nixpkgs.overlays = [
overlay-stable
ghettoptt.overlays.default
huecli.overlays.default
];
})
(
{ config, pkgs, ... }:
{
nixpkgs.overlays = [
overlay-stable
ghettoptt.overlays.default
huecli.overlays.default
];
}
)
./hosts/gunter
sops-nix.nixosModules.sops
];
};
};
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
pre-commit
];
};
});
devShells = forAllSystems (
{ pkgs }:
{
default = pkgs.mkShell { packages = with pkgs; [ pre-commit ]; };
}
);
};
}

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs = {
neovim = {
enable = true;

View File

@ -1,38 +1,48 @@
{ pkgs, inputs, user, ... }: {
{
pkgs,
inputs,
user,
...
}:
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = { inherit pkgs inputs user; };
users.${user} = { pkgs, ... }: {
imports = [
inputs.sops-nix.homeManagerModules.sops
./sops
./editor/neovim
./programs/firefox
./programs/tmux
./programs/dunst
./programs/kitty
./programs/rofi
./programs/obs-studio
./programs/vscode
./scripts
./zsh
./packages
./hyprland/gunter.nix
./ssh
./services/backup-home.nix
./services/ghettoptt.nix
];
firefox.enable = true;
tmux.enable = true;
hyprland.enable = true;
home = {
username = "${user}";
homeDirectory = "/home/${user}";
stateVersion = "23.11";
};
programs.home-manager.enable = true;
extraSpecialArgs = {
inherit pkgs inputs user;
};
users.${user} =
{ pkgs, ... }:
{
imports = [
inputs.sops-nix.homeManagerModules.sops
./sops
./editor/neovim
./programs/firefox
./programs/tmux
./programs/dunst
./programs/kitty
./programs/rofi
./programs/obs-studio
./programs/vscode
./scripts
./zsh
./packages
./hyprland/gunter.nix
./ssh
./services/backup-home.nix
./services/ghettoptt.nix
];
firefox.enable = true;
tmux.enable = true;
hyprland.enable = true;
home = {
username = "${user}";
homeDirectory = "/home/${user}";
stateVersion = "23.11";
};
programs.home-manager.enable = true;
};
};
}

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.pointerCursor = {
gtk.enable = true;
# x11.enable = true;

View File

@ -1 +1,8 @@
{ imports = [ ./hyprland_gunter.nix ./waybar ./xdg.nix ./cursor.nix ]; }
{
imports = [
./hyprland_gunter.nix
./waybar
./xdg.nix
./cursor.nix
];
}

View File

@ -1,8 +1,12 @@
{ config, osConfig, pkgs, ... }: {
{
config,
osConfig,
pkgs,
...
}:
{
home.packages = with pkgs; [
hypridle
];
home.packages = with pkgs; [ hypridle ];
xdg.configFile = {
"hypr/hypridle.conf" = {
source = config.lib.file.mkOutOfStoreSymlink ./. + "/hypridle_${osConfig.system.name}.conf";

View File

@ -1,4 +1,11 @@
{ inputs, pkgs, lib, config, ... }: {
{
inputs,
pkgs,
lib,
config,
...
}:
{
imports = [
./hyprlock.nix
./hypridle.nix
@ -121,9 +128,7 @@
"special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false"
];
bindm = [
"ALT,mouse:272,movewindow"
];
bindm = [ "ALT,mouse:272,movewindow" ];
bindr = [
# mumble ptt release

View File

@ -1,4 +1,11 @@
{ inputs, pkgs, lib, config, ... }: {
{
inputs,
pkgs,
lib,
config,
...
}:
{
imports = [
./hyprlock.nix
./hypridle.nix
@ -30,17 +37,13 @@
"$shiftMainMod" = "SUPER_SHIFT";
"$term" = "kitty";
monitor = [
"eDP-1,1920x1080@60,0x0,1"
];
monitor = [ "eDP-1,1920x1080@60,0x0,1" ];
input = {
kb_layout = "no";
follow_mouse = 1;
};
env = [
"XDG_SESSION_TYPE,wayland"
];
env = [ "XDG_SESSION_TYPE,wayland" ];
decoration = {
rounding = 10;
@ -97,9 +100,7 @@
"special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false"
];
bindm = [
"ALT,mouse:272,movewindow"
];
bindm = [ "ALT,mouse:272,movewindow" ];
bindr = [
# mumble ptt release

View File

@ -1,4 +1,11 @@
{ inputs, pkgs, lib, config, ... }: {
{
inputs,
pkgs,
lib,
config,
...
}:
{
options.hyprland.enable = lib.mkEnableOption "Hyprland";
config = {
home.packages = with pkgs; [
@ -26,17 +33,13 @@
"$shiftMainMod" = "SUPER_SHIFT";
"$term" = "kitty";
monitor = [
];
monitor = [ ];
input = {
kb_layout = "no";
follow_mouse = 1;
};
env = [
"XDG_SESSION_TYPE,wayland"
];
env = [ "XDG_SESSION_TYPE,wayland" ];
decoration = {
rounding = 0;
@ -92,9 +95,7 @@
"name:main 2, monitor:$mon_center, persistent:true, default:true"
];
bindm = [
"ALT,mouse:272,movewindow"
];
bindm = [ "ALT,mouse:272,movewindow" ];
bindr = [
# mumble ptt release

View File

@ -1,8 +1,12 @@
{ config, osConfig, pkgs, ... }: {
{
config,
osConfig,
pkgs,
...
}:
{
home.packages = with pkgs; [
hyprlock
];
home.packages = with pkgs; [ hyprlock ];
xdg.configFile = {
"hypr/hyprlock.conf" = {
source = config.lib.file.mkOutOfStoreSymlink ./. + "/hyprlock_${osConfig.system.name}.conf";

View File

@ -1 +1,8 @@
{ imports = [ ./hyprland_magicman.nix ./waybar ./xdg.nix ./cursor.nix ]; }
{
imports = [
./hyprland_magicman.nix
./waybar
./xdg.nix
./cursor.nix
];
}

View File

@ -1 +1,8 @@
{ imports = [ ./hyprland_prismo.nix ./waybar ./xdg.nix ./cursor.nix ]; }
{
imports = [
./hyprland_prismo.nix
./waybar
./xdg.nix
./cursor.nix
];
}

View File

@ -1,4 +1,9 @@
{ pkgs, lib, osConfig, ... }:
{
pkgs,
lib,
osConfig,
...
}:
let
flakestat = pkgs.writeShellApplication {
name = "flakestat";
@ -11,9 +16,7 @@ let
arrhist = pkgs.stdenv.mkDerivation {
name = "arrhist";
propagatedBuildInputs = [
(pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
requests
]))
(pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ requests ]))
];
src = ./arrhist.py;
dontUnpack = true;
@ -29,13 +32,14 @@ in
sops.secrets."radarr_api_key" = { };
xdg.configFile."waybar/macchiato.css" = {
source = pkgs.fetchFromGitHub
{
source =
pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "waybar";
rev = "f74ab1eecf2dcaf22569b396eed53b2b2fbe8aff";
sha256 = "WLJMA2X20E5PCPg0ZPtSop0bfmu+pLImP9t8A8V4QK8=";
} + "/themes/macchiato.css";
}
+ "/themes/macchiato.css";
};
programs.waybar = {
@ -165,17 +169,16 @@ in
"position" = "top";
modules-left = [ "custom/flakestat" ];
modules-center = [ "hyprland/workspaces" ];
modules-right =
[
(lib.mkIf (withArrhist) "custom/arrhist")
"pulseaudio"
"pulseaudio#microphone"
"memory"
"cpu"
(lib.mkIf (withBattery) "battery")
"clock"
"tray"
];
modules-right = [
(lib.mkIf (withArrhist) "custom/arrhist")
"pulseaudio"
"pulseaudio#microphone"
"memory"
"cpu"
(lib.mkIf (withBattery) "battery")
"clock"
"tray"
];
"hyprland/workspaces" = {
"format" = "{name}";
"on-click" = "activate";
@ -186,7 +189,13 @@ in
"scroll-step" = 5;
"format" = "{icon} {volume}%";
"format-muted" = "";
"format-icons" = { "default" = [ "" "" "" ]; };
"format-icons" = {
"default" = [
""
""
""
];
};
"on-scroll-up" = "pamixer -i ${volInterval}";
"on-scroll-down" = "pamixer -d ${volInterval}";
"on-click" = "pamixer -t";
@ -209,7 +218,9 @@ in
"memory" = {
"interval" = 3;
"format" = " {percentage}%";
"states" = { "warning" = 85; };
"states" = {
"warning" = 85;
};
};
"cpu" = {
"interval" = 3;
@ -240,7 +251,8 @@ in
"return-type" = "json";
"interval" = 600;
};
} // lib.optionalAttrs (withArrhist) {
}
// lib.optionalAttrs (withArrhist) {
"custom/arrhist" = {
"exec" = "${arrhist}/bin/arrhist";
"return-type" = "json";

View File

@ -1,4 +1,5 @@
{ config, ... }: {
{ config, ... }:
{
xdg.configFile = {
"hypr/hyprpaper.conf" = {
source = config.lib.file.mkOutOfStoreSymlink ./. + "/hyprpaper.conf";

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
mod = "Mod4";
in

View File

@ -1,39 +1,49 @@
{ pkgs, inputs, user, ... }: {
{
pkgs,
inputs,
user,
...
}:
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = { inherit pkgs inputs user; };
users.${user} = { pkgs, ... }: {
imports = [
inputs.sops-nix.homeManagerModules.sops
./sops
./editor/neovim
./programs/firefox
./programs/tmux
./programs/dunst
./programs/kitty
./programs/rofi
./programs/obs-studio
./programs/vscode
./programs/pywal
./programs/zellij
./scripts
./scripts/batlvl.nix
./zsh
./packages
./hyprland/magicman.nix
./ssh
];
firefox.enable = true;
tmux.enable = true;
hyprland.enable = true;
home = {
username = "${user}";
homeDirectory = "/home/${user}";
stateVersion = "23.11";
};
programs.home-manager.enable = true;
extraSpecialArgs = {
inherit pkgs inputs user;
};
users.${user} =
{ pkgs, ... }:
{
imports = [
inputs.sops-nix.homeManagerModules.sops
./sops
./editor/neovim
./programs/firefox
./programs/tmux
./programs/dunst
./programs/kitty
./programs/rofi
./programs/obs-studio
./programs/vscode
./programs/pywal
./programs/zellij
./scripts
./scripts/batlvl.nix
./zsh
./packages
./hyprland/magicman.nix
./ssh
];
firefox.enable = true;
tmux.enable = true;
hyprland.enable = true;
home = {
username = "${user}";
homeDirectory = "/home/${user}";
stateVersion = "23.11";
};
programs.home-manager.enable = true;
};
};
}

View File

@ -79,10 +79,12 @@ in
typescript
# Py stuff
(python312.withPackages (p: with p; [
requests
ipython
]))
(python312.withPackages (
p: with p; [
requests
ipython
]
))
poetry
ruff
@ -97,16 +99,10 @@ in
# Stuff with overrides
# Blender
(blender.override {
cudaSupport = withCuda;
})
(blender.override { cudaSupport = withCuda; })
# Btop
(btop.override {
cudaSupport = withCuda;
})
(btop.override { cudaSupport = withCuda; })
# PrismLauncher
(prismlauncher.override {
withWaylandGLFW = true;
})
(prismlauncher.override { withWaylandGLFW = true; })
];
}

View File

@ -1,38 +1,48 @@
{ pkgs, inputs, user, ... }: {
{
pkgs,
inputs,
user,
...
}:
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = { inherit pkgs inputs user; };
users.${user} = { pkgs, ... }: {
imports = [
inputs.sops-nix.homeManagerModules.sops
./sops
./editor/neovim
./programs/firefox
./programs/tmux
./programs/dunst
./programs/kitty
./programs/rofi
./programs/obs-studio
./programs/vscode
./scripts
./zsh
./packages
./hyprland
./ssh
./services/backup-home.nix
./services/ghettoptt.nix
];
firefox.enable = true;
tmux.enable = true;
hyprland.enable = true;
home = {
username = "${user}";
homeDirectory = "/home/${user}";
stateVersion = "23.11";
};
programs.home-manager.enable = true;
extraSpecialArgs = {
inherit pkgs inputs user;
};
users.${user} =
{ pkgs, ... }:
{
imports = [
inputs.sops-nix.homeManagerModules.sops
./sops
./editor/neovim
./programs/firefox
./programs/tmux
./programs/dunst
./programs/kitty
./programs/rofi
./programs/obs-studio
./programs/vscode
./scripts
./zsh
./packages
./hyprland
./ssh
./services/backup-home.nix
./services/ghettoptt.nix
];
firefox.enable = true;
tmux.enable = true;
hyprland.enable = true;
home = {
username = "${user}";
homeDirectory = "/home/${user}";
stateVersion = "23.11";
};
programs.home-manager.enable = true;
};
};
}

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
services.dunst = {
@ -36,7 +41,7 @@
corner_radius = 10;
# follow = "mouse";
font = "Source Sans Pro 10";
format = "<b>%s</b>\\n%b"; #format = "<span foreground='#f3f4f5'><b>%s %p</b></span>\n%b"
format = "<b>%s</b>\\n%b"; # format = "<span foreground='#f3f4f5'><b>%s %p</b></span>\n%b"
frame_color = "#232323";
frame_width = 1;
offset = "15x15";
@ -57,7 +62,9 @@
browser = "/usr/bin/env firefox -new-tab";
};
fullscreen_delay_everything = { fullscreen = "delay"; };
fullscreen_delay_everything = {
fullscreen = "delay";
};
urgency_critical = {
background = "#d64e4e";

View File

@ -1,6 +1,17 @@
{ pkgs, config, lib, inputs, user, ... }: {
{
pkgs,
config,
lib,
inputs,
user,
...
}:
{
options.firefox.enable = lib.mkEnableOption "Firefox";
config =
lib.mkIf config.firefox.enable { programs.firefox = { enable = true; }; };
config = lib.mkIf config.firefox.enable {
programs.firefox = {
enable = true;
};
};
}

View File

@ -1,24 +1,27 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
xdg.configFile."kitty/kitty.conf" = {
source = config.lib.file.mkOutOfStoreSymlink ./. + "/kitty.conf";
target = "kitty/kitty.conf";
};
xdg.configFile."kitty/themes/macchiato.conf" = {
source = pkgs.fetchFromGitHub
{
source =
pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "kitty";
rev = "d7d61716a83cd135344cbb353af9d197c5d7cec1";
sha256 = "mRFa+40fuJCUrR1o4zMi7AlgjRtFmii4fNsQyD8hIjM=";
} + "/themes/macchiato.conf";
}
+ "/themes/macchiato.conf";
};
xdg.configFile."kitty/themes/latte.conf" = {
source = pkgs.fetchFromGitHub
{
source =
pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "kitty";
rev = "d7d61716a83cd135344cbb353af9d197c5d7cec1";
sha256 = "mRFa+40fuJCUrR1o4zMi7AlgjRtFmii4fNsQyD8hIjM=";
} + "/themes/latte.conf";
}
+ "/themes/latte.conf";
};
}

View File

@ -1,40 +1,46 @@
{ pkgs, lib, osConfig, ... }:
{
pkgs,
lib,
osConfig,
...
}:
let
withCuda = osConfig.system.name == "gunter";
onnxruntime-gpu = (pkgs.onnxruntime.override {
cudaSupport = withCuda;
}).overrideAttrs
(old: {
# TODO: Remove when fixed in nixpkgs
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/libraries/onnxruntime/default.nix#L154
buildInputs = old.buildInputs ++ [ pkgs.cudaPackages.nccl ];
});
onnxruntime-gpu = (pkgs.onnxruntime.override { cudaSupport = withCuda; }).overrideAttrs (old: {
# TODO: Remove when fixed in nixpkgs
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/libraries/onnxruntime/default.nix#L154
buildInputs = old.buildInputs ++ [ pkgs.cudaPackages.nccl ];
});
obs-backgrounremoval-gpu = ((pkgs.obs-studio-plugins.obs-backgroundremoval.override {
onnxruntime = onnxruntime-gpu;
}).overrideAttrs (old: {
version = "1.1.14-beta";
src = pkgs.fetchFromGitHub {
owner = "occ-ai";
repo = "obs-backgroundremoval";
rev = "94be8c35fe077be93a6f5ef347a802295a36dddd";
hash = "sha256-qnxDNeTWQYiRMqT6jNp8GC8ef6aaAAY+OXAak54dVc8=";
};
cmakeFlags =
if withCuda then
(lib.lists.remove "-DDISABLE_ONNXRUNTIME_GPU=ON" old.cmakeFlags)
else old.cmakeFlags;
}));
obs-backgrounremoval-gpu = (
(pkgs.obs-studio-plugins.obs-backgroundremoval.override { onnxruntime = onnxruntime-gpu; })
.overrideAttrs
(old: {
version = "1.1.14-beta";
src = pkgs.fetchFromGitHub {
owner = "occ-ai";
repo = "obs-backgroundremoval";
rev = "94be8c35fe077be93a6f5ef347a802295a36dddd";
hash = "sha256-qnxDNeTWQYiRMqT6jNp8GC8ef6aaAAY+OXAak54dVc8=";
};
cmakeFlags =
if withCuda then
(lib.lists.remove "-DDISABLE_ONNXRUNTIME_GPU=ON" old.cmakeFlags)
else
old.cmakeFlags;
})
);
in
{
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
obs-pipewire-audio-capture
obs-shaderfilter
] ++ lib.optionals withCuda [
obs-backgrounremoval-gpu
];
plugins =
with pkgs.obs-studio-plugins;
[
obs-pipewire-audio-capture
obs-shaderfilter
]
++ lib.optionals withCuda [ obs-backgrounremoval-gpu ];
};
}

View File

@ -1,26 +1,28 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
programs.pywal.enable = true;
xdg.configFile = {
"wal/templates/colors-hyprland.conf" = {
text = ''$foreground = 0xff{foreground.strip}
$background = 0xff{background.strip}
$color0 = 0xff{color0.strip}
$color1 = 0xff{color1.strip}
$color2 = 0xff{color2.strip}
$color3 = 0xff{color3.strip}
$color4 = 0xff{color4.strip}
$color5 = 0xff{color5.strip}
$color6 = 0xff{color6.strip}
$color7 = 0xff{color7.strip}
$color8 = 0xff{color8.strip}
$color9 = 0xff{color9.strip}
$color10 = 0xff{color10.strip}
$color11 = 0xff{color11.strip}
$color12 = 0xff{color12.strip}
$color13 = 0xff{color13.strip}
$color14 = 0xff{color14.strip}
$color15 = 0xff{color15.strip}
text = ''
$foreground = 0xff{foreground.strip}
$background = 0xff{background.strip}
$color0 = 0xff{color0.strip}
$color1 = 0xff{color1.strip}
$color2 = 0xff{color2.strip}
$color3 = 0xff{color3.strip}
$color4 = 0xff{color4.strip}
$color5 = 0xff{color5.strip}
$color6 = 0xff{color6.strip}
$color7 = 0xff{color7.strip}
$color8 = 0xff{color8.strip}
$color9 = 0xff{color9.strip}
$color10 = 0xff{color10.strip}
$color11 = 0xff{color11.strip}
$color12 = 0xff{color12.strip}
$color13 = 0xff{color13.strip}
$color14 = 0xff{color14.strip}
$color15 = 0xff{color15.strip}
'';
};
};

View File

@ -1,24 +1,27 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
xdg.configFile."rofi/config.rasi" = {
source = ./config.rasi;
};
xdg.configFile."rofi/macchiato.rasi" = {
source = pkgs.fetchFromGitHub
{
source =
pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "rofi";
rev = "5350da41a11814f950c3354f090b90d4674a95ce";
sha256 = "DNorfyl3C4RBclF2KDgwvQQwixpTwSRu7fIvihPN8JY=";
} + "/basic/.local/share/rofi/themes/catppuccin-macchiato.rasi";
}
+ "/basic/.local/share/rofi/themes/catppuccin-macchiato.rasi";
};
xdg.configFile."rofi/latte.rasi" = {
source = pkgs.fetchFromGitHub
{
source =
pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "rofi";
rev = "5350da41a11814f950c3354f090b90d4674a95ce";
sha256 = "DNorfyl3C4RBclF2KDgwvQQwixpTwSRu7fIvihPN8JY=";
} + "/basic/.local/share/rofi/themes/catppuccin-latte.rasi";
}
+ "/basic/.local/share/rofi/themes/catppuccin-latte.rasi";
};
}

View File

@ -1,7 +1,14 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}:
with lib;
let cfg = config.tmux.enable;
in {
let
cfg = config.tmux.enable;
in
{
options.tmux.enable = mkEnableOption "tmux";
config = mkIf cfg {
programs.tmux = {

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs.vscode = {
enable = true;
enableUpdateCheck = true;

View File

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
programs.zellij = {
enable = true;
# enableZshIntegration = true;

View File

@ -2,13 +2,10 @@
let
batlvl = pkgs.writeShellApplication {
name = "batlvl";
runtimeInputs = [
];
runtimeInputs = [ ];
text = builtins.readFile ./batlvl.sh;
};
in
{
home.packages = [
batlvl
];
home.packages = [ batlvl ];
}

View File

@ -1,7 +1,6 @@
{ pkgs, config, ... }: {
imports = [
./lockhelper.nix
];
{ pkgs, config, ... }:
{
imports = [ ./lockhelper.nix ];
home.file.".local/bin/hl-no-opacity" = {
source = ./hl-no-opacity.sh;
executable = true;

View File

@ -10,7 +10,5 @@ let
};
in
{
home.packages = [
lockhelper
];
home.packages = [ lockhelper ];
}

View File

@ -95,7 +95,10 @@ in
systemd.user.services.backup-home = {
Unit = {
Description = "Backup home directory";
After = [ "network.target" "sops-nix.service" ];
After = [
"network.target"
"sops-nix.service"
];
};
Service = {
Type = "oneshot";
@ -112,7 +115,10 @@ in
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" "graphical-session.target" ];
WantedBy = [
"timers.target"
"graphical-session.target"
];
};
};
}

View File

@ -1,4 +1,5 @@
{ user, ... }: {
{ user, ... }:
{
sops = {
age.keyFile = "/home/${user}/.config/sops/age/keys.txt";
defaultSopsFile = ../../secrets/torjus/secret.yaml;

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs.ssh = {
enable = true;
controlMaster = "auto";

View File

@ -1,4 +1,5 @@
{ user, pkgs, ... }: {
{ user, pkgs, ... }:
{
home.packages = with pkgs; [ fd ];
programs.direnv = {
enable = true;
@ -38,8 +39,14 @@
zplug = {
enable = true;
plugins = [
({ name = "plugins/git"; tags = [ "from:oh-my-zsh" ]; })
({ name = "modules/prompt"; tags = [ "from:prezto" ]; })
({
name = "plugins/git";
tags = [ "from:oh-my-zsh" ];
})
({
name = "modules/prompt";
tags = [ "from:prezto" ];
})
];
};
};

View File

@ -1,4 +1,10 @@
{ config, lib, inputs, pkgs, ... }:
{
config,
lib,
inputs,
pkgs,
...
}:
{
imports = [
@ -35,7 +41,9 @@
enable = true;
configurationLimit = 10;
};
loader.efi = { canTouchEfiVariables = true; };
loader.efi = {
canTouchEfiVariables = true;
};
supportedFilesystems = [ "nfs" ];
};
@ -112,19 +120,26 @@
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = (with pkgs; [
# unstable.xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
]);
extraPortals = (
with pkgs;
[
# unstable.xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
]
);
};
# Enable flakes
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" "torjus" ];
substituters = [
"https://cuda-maintainers.cachix.org"
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
"torjus"
];
substituters = [ "https://cuda-maintainers.cachix.org" ];
trusted-public-keys = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];

View File

@ -1,4 +1,10 @@
{ inputs, self, pks, ... }: {
{
inputs,
self,
pks,
...
}:
{
imports = [
./configuration.nix
./hardware-configuration.nix

View File

@ -1,37 +1,45 @@
# 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,
...
}:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "v4l2loopback" ];
boot.extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [
"kvm-amd"
"v4l2loopback"
];
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/a7d4b697-fffa-4bcb-9dd7-cbbd6121a50c";
fsType = "xfs";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/a7d4b697-fffa-4bcb-9dd7-cbbd6121a50c";
fsType = "xfs";
};
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/be82b184-3cc7-483b-9069-f7797f51c853";
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/DC0C-AAB3";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/DC0C-AAB3";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/2284e9c6-c168-4d4f-ba6a-d270f1ae245d"; }];
swapDevices = [ { device = "/dev/disk/by-uuid/2284e9c6-c168-4d4f-ba6a-d270f1ae245d"; } ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@ -1,22 +1,25 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
nfs-utils
];
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ nfs-utils ];
services.rpcbind.enable = true;
systemd.mounts = [{
type = "nfs";
mountConfig = {
Options = "rw,soft,noatime";
};
what = "nas.home.2rjus.net:/mnt/hdd-pool/media";
where = "/mnt/nas/media";
}];
systemd.mounts = [
{
type = "nfs";
mountConfig = {
Options = "rw,soft,noatime";
};
what = "nas.home.2rjus.net:/mnt/hdd-pool/media";
where = "/mnt/nas/media";
}
];
systemd.automounts = [{
wantedBy = [ "multi-user.target" ];
automountConfig = {
TimeoutIdleSec = "5min";
};
where = "/mnt/nas/media";
}];
systemd.automounts = [
{
wantedBy = [ "multi-user.target" ];
automountConfig = {
TimeoutIdleSec = "5min";
};
where = "/mnt/nas/media";
}
];
}

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
services.ollama = {
enable = true;
acceleration = "cuda";

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
environment.shells = with pkgs; [ zsh ];
services.xserver.desktopManager.xfce.enable = true;

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs.streamdeck-ui = {
enable = true;
};

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./hardware-configuration.nix ];
@ -19,14 +24,14 @@
enable = true;
configurationLimit = 3;
};
boot.loader.efi = { canTouchEfiVariables = true; };
boot.loader.efi = {
canTouchEfiVariables = true;
};
boot.initrd.systemd.enable = true;
boot.plymouth = {
enable = true;
themePackages = with pkgs; [
catppuccin-plymouth
];
themePackages = with pkgs; [ catppuccin-plymouth ];
theme = "catppuccin-macchiato";
extraConfig = ''
UseFirmwareBackground=false
@ -62,11 +67,15 @@
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
"bluez5.roles" = [
"hsp_hs"
"hsp_ag"
"hfp_hf"
"hfp_ag"
];
};
};
# Setup hyprland
services.xserver.enable = true;
services.xserver.displayManager = {
@ -102,17 +111,26 @@
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = (with pkgs; [
# xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
]);
extraPortals = (
with pkgs;
[
# xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
]
);
};
programs.steam.enable = true;
# Enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.trusted-users = [ "root" "torjus" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.trusted-users = [
"root"
"torjus"
];
nixpkgs.config.allowUnfree = true;
# Install system-wide packages

View File

@ -1,4 +1,10 @@
{ inputs, self, pks, ... }: {
{
inputs,
self,
pks,
...
}:
{
imports = [
./configuration.nix
./hardware-configuration.nix

View File

@ -1,35 +1,42 @@
# 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,
...
}:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"thunderbolt"
"nvme"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
boot.initrd.kernelModules = [ "i915" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/31b20f4c-24bb-4fd1-9a3e-8ccc19fe3d64";
fsType = "xfs";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/31b20f4c-24bb-4fd1-9a3e-8ccc19fe3d64";
fsType = "xfs";
};
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/4bbadd2c-94dd-4d80-94bf-9332d24b57bd";
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/7FF3-B061";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/7FF3-B061";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/6f2c4906-ad88-4d7e-88ec-61cdda41ce28"; }];
swapDevices = [ { device = "/dev/disk/by-uuid/6f2c4906-ad88-4d7e-88ec-61cdda41ce28"; } ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./hardware-configuration.nix ];
@ -9,7 +14,6 @@
sops.age.generateKey = true;
sops.secrets."gotify_tokens/backup-home" = { };
# Bootloader stuff
boot.kernelParams = [
"quiet"
@ -20,7 +24,9 @@
enable = true;
configurationLimit = 10;
};
boot.loader.efi = { canTouchEfiVariables = true; };
boot.loader.efi = {
canTouchEfiVariables = true;
};
# Networking stuff
networking.hostName = "prismo"; # Define your hostname.
@ -65,14 +71,20 @@
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = (with pkgs; [
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
]);
extraPortals = (
with pkgs;
[
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
]
);
};
# Enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfree = true;
# Install system-wide packages

View File

@ -1,4 +1,10 @@
{ inputs, self, pks, ... }: {
{
inputs,
self,
pks,
...
}:
{
imports = [
./configuration.nix
./hardware-configuration.nix

View File

@ -1,19 +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,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
kernelModules = [ ];
luks.devices."cryptroot".device =
"/dev/disk/by-uuid/f71b0ace-f38f-435f-a07a-007f9cfe4919";
luks.devices."cryptroot".device = "/dev/disk/by-uuid/f71b0ace-f38f-435f-a07a-007f9cfe4919";
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
@ -29,8 +39,7 @@
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/67da36a8-69df-4541-88cd-cba7cbc40b4c"; }];
swapDevices = [ { device = "/dev/disk/by-uuid/67da36a8-69df-4541-88cd-cba7cbc40b4c"; } ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
@ -41,6 +50,5 @@
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,4 +1,9 @@
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "openpomodoro-cli";
@ -13,7 +18,10 @@ buildGoModule rec {
vendorHash = "sha256-BR9d/PMQ1ZUYWSDO5ID2bkTN+A+VbaLTlz5t0vbkO60=";
ldflags = [ "-s" "-w" ];
ldflags = [
"-s"
"-w"
];
GOWORK = "off";

View File

@ -1,10 +1,18 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ twemoji-color-font ];
fonts.packages = with pkgs; [
fira-code
fira-code-symbols
font-awesome
(nerdfonts.override { fonts = [ "JetBrainsMono" "FiraCode" "DroidSansMono" "DejaVuSansMono" ]; })
(nerdfonts.override {
fonts = [
"JetBrainsMono"
"FiraCode"
"DroidSansMono"
"DejaVuSansMono"
];
})
noto-fonts
noto-fonts-cjk
noto-fonts-emoji

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
services.fwupd = {
enable = true;
};

View File

@ -29,5 +29,9 @@
wantedBy = [ "multi-user.target" ];
};
networking.firewall.allowedTCPPorts = [ 9100 9558 8989 ];
networking.firewall.allowedTCPPorts = [
9100
9558
8989
];
}

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
# Enable sudo
security.sudo = {
enable = true;

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
services = {
dbus.enable = true;
pipewire = {

View File

@ -21,7 +21,6 @@
"libvirtd"
];
# Install some user packages
packages = with pkgs; [
];
packages = with pkgs; [ ];
};
}