Compare commits
60 Commits
fd246d7daf
...
flake-upda
Author | SHA1 | Date | |
---|---|---|---|
bc405d562b | |||
ceea87ad5b | |||
851c8c797d | |||
f542f84b38 | |||
ed5b4cbd14 | |||
761015b478 | |||
20eaa0dae3 | |||
f5dd2ecc82 | |||
f9b71edc81 | |||
7719c812bd | |||
3c027501c5 | |||
d65b916d40 | |||
a1cde5ef34 | |||
686906cf77 | |||
37f986cefc | |||
1dcef60e92 | |||
5970fcabc8 | |||
766d18ad52 | |||
47c02828e3 | |||
5fff601b29 | |||
04236cf485 | |||
fcf95d1430 | |||
12798ff1a1 | |||
01572c6f3d | |||
cde1265492 | |||
225743b432 | |||
ac5a7b1954 | |||
b1ba5f6dfc | |||
c36161b19e | |||
593cb43662 | |||
a9045fe86a | |||
b001afa40d | |||
d54beba986 | |||
784fdf8af1 | |||
536120fadc | |||
ac47c73bf1 | |||
2d1109d012 | |||
c543bc13ea | |||
b4d1681b99 | |||
6c32ffbe94 | |||
6787243414 | |||
d350807e8c | |||
f872c8db0c | |||
8c53c66c4d | |||
0f07029660 | |||
8010d771a1 | |||
7f4c41429e | |||
6d21fe4262 | |||
c081f95aaf | |||
452a34c7e8 | |||
15c4616b91 | |||
07274a0364 | |||
3bb8db1349 | |||
65a3dcdc08 | |||
9fe40bfd13 | |||
07943d4f95 | |||
815a79ff41 | |||
32ddceba8f | |||
55ba4125d6 | |||
b9274f546f |
859
flake.lock
generated
859
flake.lock
generated
File diff suppressed because it is too large
Load Diff
@ -28,10 +28,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Various flakes
|
# Various flakes
|
||||||
alacritty-theme = {
|
|
||||||
url = "github:alacritty/alacritty-theme";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
yazi-flavors = {
|
yazi-flavors = {
|
||||||
url = "github:yazi-rs/flavors";
|
url = "github:yazi-rs/flavors";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
@ -6,8 +6,9 @@
|
|||||||
./features/direnv
|
./features/direnv
|
||||||
./features/topgrade
|
./features/topgrade
|
||||||
./features/neovim
|
./features/neovim
|
||||||
./features/kitty
|
./features/ghostty
|
||||||
./features/wezterm
|
./features/wezterm
|
||||||
|
./features/alacritty
|
||||||
./features/yazi
|
./features/yazi
|
||||||
./features/emacs
|
./features/emacs
|
||||||
|
|
||||||
@ -20,7 +21,7 @@
|
|||||||
|
|
||||||
hostName = "aspi";
|
hostName = "aspi";
|
||||||
is-nixos = true;
|
is-nixos = true;
|
||||||
terminal = "kitty";
|
terminal = "alacritty";
|
||||||
|
|
||||||
# ------- ----------
|
# ------- ----------
|
||||||
# | eDP-1 | | HDMI-A-1 |
|
# | eDP-1 | | HDMI-A-1 |
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
import = [
|
|
||||||
"~/.config/alacritty/theme/themes/smoooooth.toml"
|
|
||||||
]
|
|
@ -1,15 +1,12 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [alacritty];
|
programs.alacritty = {
|
||||||
|
enable = true;
|
||||||
home.file = {
|
settings = {};
|
||||||
".config/alacritty/theme".source = "${inputs.alacritty-theme}";
|
theme = "smoooooth";
|
||||||
".config/alacritty/alacritty.toml".source = ./alacritty.toml;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables.TERMINAL = lib.mkIf (config.terminal == "alacritty") "alacritty";
|
home.sessionVariables.TERMINAL = lib.mkIf (config.terminal == "alacritty") "alacritty";
|
||||||
|
16
homes/julian/features/ghostty/default.nix
Normal file
16
homes/julian/features/ghostty/default.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.ghostty = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
settings = {
|
||||||
|
theme = "catppuccin-mocha";
|
||||||
|
font-size = 12;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.sessionVariables.TERMINAL = lib.mkIf (config.terminal == "ghostty") "ghostty";
|
||||||
|
}
|
@ -48,23 +48,21 @@ in {
|
|||||||
wf-recorder
|
wf-recorder
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
|
||||||
(pkgs.writeShellScriptBin
|
(pkgs.writeShellScriptBin "toggle-screen-mirroring" (
|
||||||
"toggle-screen-mirroring"
|
builtins.readFile ./toggle-screen-mirroring.sh
|
||||||
(builtins.readFile
|
))
|
||||||
./toggle-screen-mirroring.sh))
|
|
||||||
|
|
||||||
(
|
(pkgs.writeShellScriptBin "correct-workspace-locations" (
|
||||||
pkgs.writeShellScriptBin
|
lib.concatStringsSep "\n" (
|
||||||
"correct-workspace-locations"
|
|
||||||
(
|
|
||||||
lib.concatStringsSep "\n"
|
|
||||||
(
|
|
||||||
builtins.concatLists (
|
builtins.concatLists (
|
||||||
map (monitor: map (ws: "hyprctl dispatch moveworkspacetomonitor ${ws} ${monitor.name}") monitor.workspaces) config.monitors
|
map (
|
||||||
)
|
monitor:
|
||||||
)
|
map (ws: "hyprctl dispatch moveworkspacetomonitor ${ws} ${monitor.name}") monitor.workspaces
|
||||||
|
)
|
||||||
|
config.monitors
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
))
|
||||||
];
|
];
|
||||||
|
|
||||||
services.cliphist = {
|
services.cliphist = {
|
||||||
@ -157,11 +155,17 @@ in {
|
|||||||
settings = {
|
settings = {
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
|
|
||||||
|
# Environment variables programs like emacs have access to
|
||||||
|
env = "TERMINAL,${config.terminal}";
|
||||||
|
|
||||||
# Monitors
|
# Monitors
|
||||||
monitor = ",preferred,auto,1";
|
monitor = ",preferred,auto,1";
|
||||||
|
|
||||||
# Autostart
|
# Autostart
|
||||||
exec-once = ["firefox"];
|
exec-once = [
|
||||||
|
(lib.getExe pkgs.firefox)
|
||||||
|
(lib.getExe pkgs.waybar)
|
||||||
|
];
|
||||||
|
|
||||||
# Look and Feel
|
# Look and Feel
|
||||||
general = {
|
general = {
|
||||||
@ -280,7 +284,7 @@ in {
|
|||||||
# opening applications
|
# opening applications
|
||||||
"$mod, D, exec, wofi --show drun,run"
|
"$mod, D, exec, wofi --show drun,run"
|
||||||
"$mod, E, exec, pcmanfm"
|
"$mod, E, exec, pcmanfm"
|
||||||
"$mod, Return, exec, kitty"
|
"$mod, Return, exec, ${config.terminal}"
|
||||||
"$mod, B, exec, firefox"
|
"$mod, B, exec, firefox"
|
||||||
"$mod, C, exec, qalculate-gtk"
|
"$mod, C, exec, qalculate-gtk"
|
||||||
|
|
||||||
|
@ -12,7 +12,14 @@
|
|||||||
|
|
||||||
"modules-center": [],
|
"modules-center": [],
|
||||||
|
|
||||||
"modules-right": ["idle_inhibitor", "disk", "cpu", "memory", "pulseaudio", "battery", "clock", "tray"],
|
"modules-right": ["idle_inhibitor", "custom/nixos-update", "disk", "cpu", "memory", "pulseaudio", "battery", "clock", "tray"],
|
||||||
|
|
||||||
|
"custom/nixos-update": {
|
||||||
|
"exec": "frajul-auto-upgrade-status",
|
||||||
|
"return-type": "json",
|
||||||
|
"interval": 2,
|
||||||
|
"on-click-right": "frajul-auto-upgrade-toggle"
|
||||||
|
},
|
||||||
|
|
||||||
"hyprland/workspaces": {
|
"hyprland/workspaces": {
|
||||||
"on-scroll-up": "hyprctl dispatch workspace m+1",
|
"on-scroll-up": "hyprctl dispatch workspace m+1",
|
||||||
@ -35,6 +42,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"idle_inhibitor": {
|
"idle_inhibitor": {
|
||||||
|
"start-activated": true,
|
||||||
"format": "{icon}",
|
"format": "{icon}",
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
"activated": "",
|
"activated": "",
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
in {
|
in {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
# systemd.enable = true;
|
||||||
settings.mainBar = builtins.fromJSON (builtins.readFile ./config.json);
|
settings.mainBar = builtins.fromJSON (builtins.readFile ./config.json);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -142,8 +142,8 @@ bindsym $mod+Shift+9 move container to workspace number $ws9; workspace $ws9
|
|||||||
bindsym $mod+Shift+0 move container to workspace number $ws10; workspace $ws10
|
bindsym $mod+Shift+0 move container to workspace number $ws10; workspace $ws10
|
||||||
|
|
||||||
# Monitor config
|
# Monitor config
|
||||||
set $monitor_left "DVI-D-0"
|
set $monitor_left "DVI-D-1"
|
||||||
set $monitor_right "DVI-D-1"
|
set $monitor_right "DVI-D-2"
|
||||||
|
|
||||||
workspace $ws1 output $monitor_left
|
workspace $ws1 output $monitor_left
|
||||||
workspace $ws2 output $monitor_left
|
workspace $ws2 output $monitor_left
|
||||||
|
@ -151,6 +151,7 @@
|
|||||||
pyright.enable = true;
|
pyright.enable = true;
|
||||||
dockerls.enable = true;
|
dockerls.enable = true;
|
||||||
lua_ls.enable = true;
|
lua_ls.enable = true;
|
||||||
|
clangd.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
# geogebra
|
# geogebra
|
||||||
cheese
|
cheese
|
||||||
handbrake
|
handbrake
|
||||||
kitty # Terminal
|
# kitty # Terminal, already available as feature
|
||||||
libnotify
|
libnotify
|
||||||
libreoffice
|
libreoffice
|
||||||
mate.engrampa
|
mate.engrampa
|
||||||
|
@ -29,6 +29,10 @@
|
|||||||
standalone
|
standalone
|
||||||
amsmath
|
amsmath
|
||||||
preview
|
preview
|
||||||
|
# needed for org mode export
|
||||||
|
wrapfig
|
||||||
|
capt-of
|
||||||
|
biblatex
|
||||||
;
|
;
|
||||||
})
|
})
|
||||||
matlab # Using nix-matlab overlay defined in flake
|
matlab # Using nix-matlab overlay defined in flake
|
||||||
@ -58,6 +62,7 @@
|
|||||||
|
|
||||||
## My scripts
|
## My scripts
|
||||||
frajul.deploy-to-pianopi
|
frajul.deploy-to-pianopi
|
||||||
|
frajul.rtklib
|
||||||
|
|
||||||
(pkgs.writeShellScriptBin "matlab-rsp" ''
|
(pkgs.writeShellScriptBin "matlab-rsp" ''
|
||||||
matlab -desktop -sd "/home/julian/git/uwa-channel-model" -softwareopengl
|
matlab -desktop -sd "/home/julian/git/uwa-channel-model" -softwareopengl
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
"flakes"
|
"flakes"
|
||||||
"ca-derivations"
|
"ca-derivations"
|
||||||
];
|
];
|
||||||
# warn-dirty = false; # TODO: do I want it? also for systems
|
warn-dirty = false; # TODO: do I want it? also for systems
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
./features/direnv
|
./features/direnv
|
||||||
./features/topgrade
|
./features/topgrade
|
||||||
./features/neovim
|
./features/neovim
|
||||||
./features/kitty
|
./features/ghostty
|
||||||
./features/wezterm
|
./features/wezterm
|
||||||
./features/yazi
|
./features/yazi
|
||||||
./features/emacs
|
./features/emacs
|
||||||
|
|
||||||
./features/hyprland
|
# ./features/hyprland
|
||||||
# ./features/i3
|
./features/i3
|
||||||
|
|
||||||
./features/suites/cli
|
./features/suites/cli
|
||||||
./features/suites/desktop
|
./features/suites/desktop
|
||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
hostName = "kardorf";
|
hostName = "kardorf";
|
||||||
is-nixos = true;
|
is-nixos = true;
|
||||||
terminal = "kitty";
|
terminal = "ghostty";
|
||||||
|
|
||||||
# --------- ---------
|
# --------- ---------
|
||||||
# | DVI-D-1 | | DVI-D-2 |
|
# | DVI-D-1 | | DVI-D-2 |
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
is-nixos = false;
|
is-nixos = false;
|
||||||
# terminal = "kitty";
|
# terminal = "kitty";
|
||||||
|
|
||||||
home.sessionPath = [ "/snap/bin" ];
|
home.sessionPath = ["/snap/bin"];
|
||||||
|
|
||||||
home.packages =
|
home.packages =
|
||||||
lib.lists.concatMap (packages-list-file: import packages-list-file {inherit pkgs;})
|
lib.lists.concatMap (packages-list-file: import packages-list-file {inherit pkgs;})
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
../common/global
|
../common/global
|
||||||
../common/users/julian
|
../common/users/julian
|
||||||
|
../common/optional/binarycaches.nix
|
||||||
|
|
||||||
../common/optional/remote-builder.nix
|
../common/optional/remote-builder.nix
|
||||||
../common/optional/boot-efi.nix
|
../common/optional/boot-efi.nix
|
||||||
@ -31,6 +32,10 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
overrideSettings = false;
|
overrideSettings = false;
|
||||||
};
|
};
|
||||||
|
frajulAutoUpgrade = {
|
||||||
|
enable = true;
|
||||||
|
flakePath = "/home/julian/.dotfiles";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
extraGroups = [
|
extraGroups = [
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"wheel"
|
"wheel"
|
||||||
|
"docker"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -30,14 +31,27 @@
|
|||||||
substituters = [
|
substituters = [
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://cache.nixos.org/"
|
"https://cache.nixos.org/"
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
];
|
];
|
||||||
trusted-public-keys = ["nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];
|
|
||||||
|
|
||||||
trusted-users = ["nix"];
|
trusted-users = ["nix"];
|
||||||
max-jobs = "auto";
|
max-jobs = "auto";
|
||||||
cores = 0;
|
cores = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.autoUpgrade = {
|
||||||
|
enable = true;
|
||||||
|
flake = "git+https://gitlab.julian-mutter.de/julian/dotfiles";
|
||||||
|
flags = [
|
||||||
|
"--recreate-lock-file" # update lock file
|
||||||
|
];
|
||||||
|
dates = "02:13";
|
||||||
|
};
|
||||||
|
|
||||||
# optimize store by hardlinking store files
|
# optimize store by hardlinking store files
|
||||||
nix.optimise.automatic = true;
|
nix.optimise.automatic = true;
|
||||||
nix.optimise.dates = ["03:15"];
|
nix.optimise.dates = ["03:15"];
|
||||||
@ -241,4 +255,17 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.gitlab-runner.enable = true;
|
||||||
|
# runner for everything else
|
||||||
|
#
|
||||||
|
sops.secrets."gitlab_runner_token".sopsFile = ./secrets.yaml;
|
||||||
|
services.gitlab-runner.services.default = {
|
||||||
|
# File should contain at least these two variables:
|
||||||
|
authenticationTokenConfigFile = config.sops.secrets."gitlab_runner_token".path;
|
||||||
|
dockerImage = "alpine:latest";
|
||||||
|
dockerVolumes = [
|
||||||
|
"/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
outputs,
|
outputs,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports =
|
imports =
|
||||||
@ -22,7 +23,12 @@
|
|||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs; [
|
||||||
|
networkmanager-openconnect
|
||||||
|
];
|
||||||
|
};
|
||||||
services.resolved.enable = true;
|
services.resolved.enable = true;
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
@ -26,26 +26,6 @@
|
|||||||
];
|
];
|
||||||
# warn-dirty = false;
|
# warn-dirty = false;
|
||||||
|
|
||||||
# Setup binary caches
|
|
||||||
nix.settings = {
|
|
||||||
substituters = [
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
"https://cache.nixos.org/"
|
|
||||||
"https://hyprland.cachix.org"
|
|
||||||
"http://binarycache.julian-mutter.de"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
||||||
"binarycache.julian-mutter.de:oJ67uRFwRhNPKL58CHzy3QQLv38Kx7OA1K+6xlEPu7E="
|
|
||||||
];
|
|
||||||
|
|
||||||
trusted-users = [
|
|
||||||
"root"
|
|
||||||
"@wheel"
|
|
||||||
]; # needed for devenv to add custom caches
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
dates = "weekly";
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# Make programs like nextcloud client access saved passwords
|
# Make programs like nextcloud client access saved passwords
|
||||||
programs.seahorse.enable = true;
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
|
programs.seahorse.enable = true;
|
||||||
|
programs.ssh.askPassword = lib.mkForce "${pkgs.seahorse}/libexec/seahorse/ssh-askpass"; # Solve conflicting definition in seahorse and plasma6
|
||||||
|
|
||||||
# Make authentication work for e.g. gparted
|
# Make authentication work for e.g. gparted
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
systemd = {
|
systemd = {
|
||||||
|
25
hosts/common/optional/binarycaches.nix
Normal file
25
hosts/common/optional/binarycaches.nix
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
outputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Setup binary caches
|
||||||
|
nix.settings = {
|
||||||
|
substituters = [
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://cache.nixos.org/"
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
"http://binarycache.julian-mutter.de"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
"binarycache.julian-mutter.de:oJ67uRFwRhNPKL58CHzy3QQLv38Kx7OA1K+6xlEPu7E="
|
||||||
|
];
|
||||||
|
|
||||||
|
trusted-users = [
|
||||||
|
"root"
|
||||||
|
"@wheel"
|
||||||
|
]; # needed for devenv to add custom caches
|
||||||
|
};
|
||||||
|
}
|
@ -5,14 +5,16 @@
|
|||||||
../common/global
|
../common/global
|
||||||
../common/users/julian
|
../common/users/julian
|
||||||
../common/users/wolfi
|
../common/users/wolfi
|
||||||
|
../common/optional/binarycaches.nix
|
||||||
|
|
||||||
|
../common/optional/xserver.nix
|
||||||
../common/optional/remote-builder.nix
|
../common/optional/remote-builder.nix
|
||||||
../common/optional/boot-efi.nix
|
../common/optional/boot-efi.nix
|
||||||
|
|
||||||
../common/optional/greetd.nix
|
# ../common/optional/greetd.nix
|
||||||
|
|
||||||
# ../common/optional/gdm.nix
|
../common/optional/gdm.nix
|
||||||
# ../common/optional/i3.nix
|
../common/optional/i3.nix
|
||||||
|
|
||||||
../common/optional/openssh.nix
|
../common/optional/openssh.nix
|
||||||
|
|
||||||
@ -32,7 +34,6 @@
|
|||||||
|
|
||||||
programs.kdeconnect.enable = true;
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
# services.xserver.desktopManager.xfce.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
|
@ -80,9 +80,10 @@
|
|||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
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;
|
||||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
|
# Use latest version of driver
|
||||||
# hardware.nvidia.modesetting.enable = true; # produces errors, display manager fails to start
|
# hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
|
||||||
|
hardware.nvidia.modesetting.enable = true; # produces errors, display manager fails to start
|
||||||
|
|
||||||
# hardware.nvidia.nvidiaSettings = true;
|
hardware.nvidia.nvidiaSettings = true;
|
||||||
hardware.nvidia.open = false;
|
hardware.nvidia.open = false;
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
../common/global
|
../common/global
|
||||||
../common/users/julian
|
../common/users/julian
|
||||||
|
../common/optional/binarycaches.nix
|
||||||
|
|
||||||
../common/optional/pipewire.nix
|
../common/optional/pipewire.nix
|
||||||
../common/optional/remote-builder.nix
|
../common/optional/remote-builder.nix
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{
|
{lib, ...}: {
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.terminal = lib.mkOption {
|
options.terminal = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
example = "alacritty";
|
example = "alacritty";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
# hydra-auto-upgrade = import ./hydra-auto-upgrade.nix;
|
# hydra-auto-upgrade = import ./hydra-auto-upgrade.nix;
|
||||||
syncthing = import ./syncthing.nix;
|
syncthing = import ./syncthing.nix;
|
||||||
|
frajulAutoUpgrade = import ./frajul-auto-upgrade.nix;
|
||||||
}
|
}
|
||||||
|
154
modules/nixos/frajul-auto-upgrade.nix
Normal file
154
modules/nixos/frajul-auto-upgrade.nix
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.modules.frajulAutoUpgrade;
|
||||||
|
|
||||||
|
flagFile = "/var/lib/frajul-auto-upgrade/flag";
|
||||||
|
lockFile = "/var/lib/frajul-auto-upgrade/lock";
|
||||||
|
lastStatusFile = "/var/lib/frajul-auto-upgrade/last-status";
|
||||||
|
lastAttemptFile = "/var/lib/frajul-auto-upgrade/last-attempt";
|
||||||
|
in {
|
||||||
|
options.modules.frajulAutoUpgrade = {
|
||||||
|
enable = lib.mkEnableOption "NixOS auto-upgrade on boot";
|
||||||
|
|
||||||
|
user = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "root";
|
||||||
|
description = "User account to run the upgrade service as.";
|
||||||
|
};
|
||||||
|
|
||||||
|
flakePath = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
description = "The path to your flake";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Ensure the flag directory exists
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /var/lib/frajul-auto-upgrade 0755 root root -"
|
||||||
|
"f ${flagFile} 0766 root root -"
|
||||||
|
"f ${lastStatusFile} 0644 root root -"
|
||||||
|
"f ${lastAttemptFile} 0644 root root -"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.writeShellScriptBin "frajul-auto-upgrade" ''
|
||||||
|
#!/bin/sh
|
||||||
|
FLAG_FILE="${flagFile}"
|
||||||
|
LOCK_FILE="${lockFile}"
|
||||||
|
LAST_STATUS_FILE="${lastStatusFile}"
|
||||||
|
LAST_ATTEMPT_FILE="${lastAttemptFile}"
|
||||||
|
|
||||||
|
TODAY=$(date +%Y-%m-%d)
|
||||||
|
|
||||||
|
if [ ! -f "$FLAG_FILE" ] || [ "$(cat "$FLAG_FILE")" != "enabled" ]; then
|
||||||
|
echo "Auto upgrade disabled. Exiting."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if already attempted today
|
||||||
|
if [ -f "$LAST_ATTEMPT_FILE" ]; then
|
||||||
|
LAST_ATTEMPT_DATE=$(cut -d' ' -f1 "$LAST_ATTEMPT_FILE")
|
||||||
|
if [ "$LAST_ATTEMPT_DATE" = "$TODAY" ]; then
|
||||||
|
echo "Update already attempted today. Skipping."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$LOCK_FILE" ]; then
|
||||||
|
echo "Already running"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo $$ > "$LOCK_FILE"
|
||||||
|
trap 'rm -f "$LOCK_FILE"' EXIT
|
||||||
|
|
||||||
|
if nix flake update --flake "${cfg.flakePath}" && nixos-rebuild switch --flake "${cfg.flakePath}"; then
|
||||||
|
echo "success" > "$LAST_STATUS_FILE"
|
||||||
|
else
|
||||||
|
echo "failure" > "$LAST_STATUS_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Write full timestamp
|
||||||
|
date '+%Y-%m-%d %H:%M:%S' > "$LAST_ATTEMPT_FILE"
|
||||||
|
'')
|
||||||
|
|
||||||
|
(pkgs.writeShellScriptBin "frajul-auto-upgrade-status" ''
|
||||||
|
#!/bin/sh
|
||||||
|
FLAG_FILE="${flagFile}"
|
||||||
|
LOCK_FILE="${lockFile}"
|
||||||
|
LAST_STATUS_FILE="${lastStatusFile}"
|
||||||
|
LAST_ATTEMPT_FILE="${lastAttemptFile}"
|
||||||
|
|
||||||
|
if [ -f "$LOCK_FILE" ]; then
|
||||||
|
ICON=" "
|
||||||
|
STATUS="running"
|
||||||
|
elif [ -f "$FLAG_FILE" ] && [ "$(cat "$FLAG_FILE")" == "enabled" ]; then
|
||||||
|
LAST_STATUS="unknown"
|
||||||
|
LAST_ATTEMPT="never"
|
||||||
|
if [ -f "$LAST_STATUS_FILE" ]; then
|
||||||
|
LAST_STATUS=$(cat "$LAST_STATUS_FILE")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$LAST_ATTEMPT_FILE" ]; then
|
||||||
|
LAST_ATTEMPT=$(cat "$LAST_ATTEMPT_FILE")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$LAST_STATUS" = "success" ]; then
|
||||||
|
ICON=""
|
||||||
|
elif [ "$LAST_STATUS" = "failure" ]; then
|
||||||
|
ICON=""
|
||||||
|
else
|
||||||
|
ICON=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
STATUS="enabled (last attempt: $LAST_ATTEMPT, $LAST_STATUS)"
|
||||||
|
else
|
||||||
|
ICON=" "
|
||||||
|
STATUS="disabled"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "{\"text\": \"$ICON\", \"tooltip\": \"NixOS Auto Update: $STATUS\"}"
|
||||||
|
'')
|
||||||
|
|
||||||
|
(pkgs.writeShellScriptBin "frajul-auto-upgrade-toggle" ''
|
||||||
|
#!/bin/sh
|
||||||
|
FLAG_FILE="${flagFile}"
|
||||||
|
LOCK_FILE="${lockFile}"
|
||||||
|
|
||||||
|
if [ ! -f "$FLAG_FILE" ] || [ "$(cat "$FLAG_FILE")" != "enabled" ]; then
|
||||||
|
echo "enabled" > "$FLAG_FILE"
|
||||||
|
else
|
||||||
|
echo "disabled" > "$FLAG_FILE"
|
||||||
|
if [ -f "$LOCK_FILE" ]; then
|
||||||
|
kill -TERM "$(cat "$LOCK_FILE")"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.services.frajul-auto-upgrade = {
|
||||||
|
description = "Frajul's NixOS Auto Upgrade";
|
||||||
|
after = ["network-online.target"];
|
||||||
|
restartIfChanged = false; # Do not start service on nixos switch
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = cfg.user;
|
||||||
|
ExecStart = "/run/current-system/sw/bin/frajul-auto-upgrade";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.timers.frajul-auto-upgrade = {
|
||||||
|
description = "Run Frajul's NixOS Auto Upgrade at boot";
|
||||||
|
wantedBy = ["timers.target"];
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "1min";
|
||||||
|
AccuracySec = "10s";
|
||||||
|
Unit = "frajul-auto-upgrade.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -12,4 +12,5 @@
|
|||||||
acer-battery-health-mode = pkgs.callPackage ./acer-battery-health-mode {};
|
acer-battery-health-mode = pkgs.callPackage ./acer-battery-health-mode {};
|
||||||
pob2 = pkgs.callPackage ./pob2 {};
|
pob2 = pkgs.callPackage ./pob2 {};
|
||||||
wl-ocr = pkgs.callPackage ./wl-ocr {};
|
wl-ocr = pkgs.callPackage ./wl-ocr {};
|
||||||
|
rtklib = pkgs.qt6Packages.callPackage ./rtklib {};
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ writeShellApplication {
|
|||||||
sleep 0.1
|
sleep 0.1
|
||||||
nheko &
|
nheko &
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
telegram-desktop &
|
Telegram &
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
discord &
|
discord &
|
||||||
'';
|
'';
|
||||||
|
40
pkgs/rtklib/default.nix
Normal file
40
pkgs/rtklib/default.nix
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
cmake,
|
||||||
|
pkg-config,
|
||||||
|
qtbase,
|
||||||
|
wrapQtAppsHook,
|
||||||
|
qtserialport,
|
||||||
|
qttools,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "RTKLIB";
|
||||||
|
version = "b34L";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "rtklibexplorer";
|
||||||
|
repo = "${pname}";
|
||||||
|
rev = "${version}";
|
||||||
|
hash = "sha256-bQcia3aRQNcZ55fvJViAxpo2Ev276HFTZ28SEXJD5Ds=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
pkg-config
|
||||||
|
wrapQtAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
qtbase
|
||||||
|
qtserialport
|
||||||
|
qttools
|
||||||
|
];
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DCMAKE_INSTALL_DATAROOTDIR=share"
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
}
|
Reference in New Issue
Block a user