20 Commits

Author SHA1 Message Date
9735d3f0c0 frajul-auto-upgrade: restore flake.lock if update failed 2025-09-09 21:47:35 +02:00
8f1b0ade4d user: add to rtkit groups to maybe fix audio 2025-09-09 21:47:08 +02:00
db05024dc6 builder: add fallback to substituters 2025-09-09 21:46:36 +02:00
21053dac8c install dig 2025-09-09 21:46:19 +02:00
1ab0bf54fa neovim: fix telescope file_browser, add lsps 2025-09-09 21:46:13 +02:00
5070d4dbfc Add yukari user 2025-09-01 17:24:27 +02:00
12466b4426 frajul-auto-upgrade: re-add lock file usage
Some checks failed
Update Nix Flake / update-flake (push) Failing after 13s
2025-08-03 16:05:46 +02:00
23155d57b7 update flake
Some checks failed
Update Nix Flake / update-flake (push) Failing after 18s
2025-07-26 08:13:42 +02:00
a9e30bd84b Set fallback for binary caches
This makes builds not fail when my own binary cache is offline for some reason
2025-07-26 08:13:02 +02:00
e62f6e9dce Fix frajul-auto-upgrade git permission issue 2025-07-26 08:12:43 +02:00
c543bc13ea hm: disable warn-dirty
Some checks failed
Update Nix Flake / update-flake (push) Failing after 16s
2025-07-12 15:52:17 +02:00
b4d1681b99 hyprland: fix waybar by running it with exec-once 2025-07-12 15:51:43 +02:00
6c32ffbe94 frajul-auto-upgrade: only run once a day
Some checks failed
Update Nix Flake / update-flake (push) Failing after 14s
2025-07-11 16:22:17 +02:00
6787243414 flake: update 2025-07-11 13:15:42 +02:00
d350807e8c builder: do enable auto-upgrades 2025-07-11 13:15:25 +02:00
f872c8db0c aspi: enable frajul auto upgrade module and integrate into waybar 2025-07-11 13:15:02 +02:00
8c53c66c4d Add frajul-auto-upgrade module 2025-07-11 13:14:48 +02:00
0f07029660 Add openconnect plugin to networkmanager
Some checks failed
Update Nix Flake / update-flake (push) Failing after 17s
2025-07-10 17:50:34 +02:00
8010d771a1 builder: add gitlab-runner
Some checks failed
Update Nix Flake / update-flake (push) Failing after 17s
2025-07-09 21:34:52 +02:00
7f4c41429e update flake
Some checks failed
Update Nix Flake / update-flake (push) Failing after 15s
2025-07-04 14:44:51 +02:00
17 changed files with 440 additions and 107 deletions

175
flake.lock generated
View File

@@ -1,21 +1,5 @@
{ {
"nodes": { "nodes": {
"alacritty-theme": {
"flake": false,
"locked": {
"lastModified": 1747350674,
"narHash": "sha256-1LRR4ciM/f1Fu9sLcq53b6eXK1qggvvkSY8iqF0Yw50=",
"owner": "alacritty",
"repo": "alacritty-theme",
"rev": "59a96ef4c734f97a1aadaa619b31cc1ca90a0fbc",
"type": "github"
},
"original": {
"owner": "alacritty",
"repo": "alacritty-theme",
"type": "github"
}
},
"base16-schemes": { "base16-schemes": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -54,11 +38,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1727447169, "lastModified": 1749105467,
"narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=", "narHash": "sha256-hXh76y/wDl15almBcqvjryB50B0BaiXJKk20f314RoE=",
"owner": "serokell", "owner": "serokell",
"repo": "deploy-rs", "repo": "deploy-rs",
"rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76", "rev": "6bc76b872374845ba9d645a2f012b764fecd765f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -74,11 +58,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747742835, "lastModified": 1753140376,
"narHash": "sha256-kYL4GCwwznsypvsnA20oyvW8zB/Dvn6K5G/tgMjVMT4=", "narHash": "sha256-7lrVrE0jSvZHrxEzvnfHFE/Wkk9DDqb+mYCodI5uuB8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "df522e787fdffc4f32ed3e1fca9ed0968a384d62", "rev": "545aba02960caa78a31bd9a8709a0ad4b6320a5c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -90,11 +74,11 @@
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1733328505,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -127,11 +111,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1743550720, "lastModified": 1753121425,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5", "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -159,21 +143,6 @@
} }
}, },
"flake-utils_2": { "flake-utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_3"
}, },
@@ -191,9 +160,27 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_5" "systems": "systems_6"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
@@ -216,11 +203,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747763032, "lastModified": 1753470191,
"narHash": "sha256-9j3oCbemeH7bTVXJ3pDWxOptbxDx2SdK1jY2AHpjQiw=", "narHash": "sha256-hOUWU5L62G9sm8NxdiLWlLIJZz9H52VuFiDllHdwmVA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "29dda415f5b2178278283856c6f9f7b48a2a4353", "rev": "a1817d1c0e5eabe7dfdfe4caa46c94d9d8f3fdb6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -258,16 +245,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737371634, "lastModified": 1748294338,
"narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=", "narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "ixx", "repo": "ixx",
"rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648", "rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NuschtOS", "owner": "NuschtOS",
"ref": "v0.0.7", "ref": "v0.0.8",
"repo": "ixx", "repo": "ixx",
"type": "github" "type": "github"
} }
@@ -340,11 +327,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713543440, "lastModified": 1752054764,
"narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=", "narHash": "sha256-Ob/HuUhANoDs+nvYqyTKrkcPXf4ZgXoqMTQoCK0RFgQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixgl", "repo": "nixgl",
"rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a", "rev": "a8e1ce7d49a149ed70df676785b07f63288f53c5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -361,11 +348,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747753308, "lastModified": 1753455814,
"narHash": "sha256-5cRyA80iqGoOjvbAVlyz3zPiO4sCHOn3EgwnJjF36v8=", "narHash": "sha256-c78Dm4hxF9z1grjKbkKPvkOccIIxIl+optGRL0UDnf4=",
"owner": "doronbehar", "owner": "doronbehar",
"repo": "nix-matlab", "repo": "nix-matlab",
"rev": "cd3b767f8c6e92e33e730aadb247d7c083af3fb3", "rev": "550d8ad0c21c63991e873bf4dcfe3d69adc1a2f1",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -376,11 +363,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1747723695, "lastModified": 1753122741,
"narHash": "sha256-lSXzv33yv1O9r9Ai1MtYFDX3OKhWsZMn/5FFb4Rni/k=", "narHash": "sha256-nFxE8lk9JvGelxClCmwuJYftbHqwnc01dRN4DVLUroM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "6ac6ec6fcb410e15a60ef5ec94b8a2b35b5dd282", "rev": "cc66fddc6cb04ab479a1bb062f4d4da27c936a22",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -391,11 +378,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1702272962, "lastModified": 1743014863,
"narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=", "narHash": "sha256-jAIUqsiN2r3hCuHji80U7NNEafpIMBXiwKlSrjWMlpg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d", "rev": "bd3bac8bfb542dbde7ffffb6987a1a1f9d41699f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -422,11 +409,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1747676747, "lastModified": 1751274312,
"narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "72841a4a8761d1aed92ef6169a636872c986c76d", "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -450,11 +437,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1747542820, "lastModified": 1753250450,
"narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", "narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", "rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -471,14 +458,14 @@
"nixpkgs" "nixpkgs"
], ],
"nuschtosSearch": "nuschtosSearch", "nuschtosSearch": "nuschtosSearch",
"systems": "systems_4" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1747743401, "lastModified": 1753487377,
"narHash": "sha256-AXk6mf9ySe44faNUGhD1mZud/kB7X+Nipzo2YxHet4s=", "narHash": "sha256-dEr3pYtC4/1PhP5ADIV8Fjjmxv6WC6UisQAUqtwdews=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "47dba84e0d068a2b8c07faa0ec737ea98a226537", "rev": "3d09c8eaceb7a78ef9f5568024da1616f00c33e3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -497,11 +484,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1745046075, "lastModified": 1753385846,
"narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=", "narHash": "sha256-XDu9T2o6Rxe0acpchwQ2aXaRfE/uEYALpVbf+9QDEO4=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "search", "repo": "search",
"rev": "066afe8643274470f4a294442aadd988356a478f", "rev": "5c7e4eff303cba8447ffb443522b3c72bc47a9ba",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -512,7 +499,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"alacritty-theme": "alacritty-theme",
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"disko": "disko", "disko": "disko",
"home-manager": "home-manager", "home-manager": "home-manager",
@@ -527,7 +513,7 @@
"nixvim": "nixvim", "nixvim": "nixvim",
"sheet-organizer": "sheet-organizer", "sheet-organizer": "sheet-organizer",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"systems": "systems_6", "systems": "systems_7",
"yazi-flavors": "yazi-flavors" "yazi-flavors": "yazi-flavors"
} }
}, },
@@ -560,11 +546,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747603214, "lastModified": 1752544651,
"narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=", "narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd", "rev": "2c8def626f54708a9c38a5861866660395bb3461",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -649,6 +635,21 @@
} }
}, },
"systems_6": { "systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_7": {
"locked": { "locked": {
"lastModified": 1689347949, "lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@@ -668,11 +669,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1731533236,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -684,11 +685,11 @@
"yazi-flavors": { "yazi-flavors": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1746876067, "lastModified": 1751970029,
"narHash": "sha256-7facwGT4DoaMwdkBrMzPlqDbrbSjwW57qRD34iP48+0=", "narHash": "sha256-RtunaCs1RUfzjefFLFu5qLRASbyk5RUILWTdavThRkc=",
"owner": "yazi-rs", "owner": "yazi-rs",
"repo": "flavors", "repo": "flavors",
"rev": "02f3fc64b78223c1005672e105f6d0e97c0db79e", "rev": "d3fd3a5d774b48b3f88845f4f0ae1b82f106d331",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -162,7 +162,10 @@ in {
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 = {

View File

@@ -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": "",

View File

@@ -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);
}; };

View File

@@ -49,7 +49,7 @@
key = "<leader><space>"; key = "<leader><space>";
} }
{ {
action = "<cmd>Telescope file_browser<cr>"; action = "<cmd>Telescope file_browser path=%:p:h<cr>";
key = "<leader>."; key = "<leader>.";
} }
{ {
@@ -140,18 +140,21 @@
}; };
lsp = { lsp = {
enable = true; enable = true; # includes lsp-config, default settings for the lsps
servers = { servers = {
rust_analyzer = { rust_analyzer = {
enable = true; enable = true;
installCargo = true; installCargo = true;
installRustc = true; installRustc = true;
}; };
nixd.enable = true; nixd.enable = true; # nix
pyright.enable = true; pyright.enable = true; # python
dockerls.enable = true; dockerls.enable = true; # docker
lua_ls.enable = true; lua_ls.enable = true; # lua
clangd.enable = true; clangd.enable = true; # c, c++
dartls.enable = true; # dart, flutter
digestif.enable = true; # latex
tinymist.enable = true; # typst
}; };
}; };
}; };

View File

@@ -40,6 +40,7 @@
wireguard-tools # wg-quick wireguard-tools # wg-quick
xorg.xkill xorg.xkill
zip zip
dig
## My scripts ## My scripts
frajul.edit-config frajul.edit-config

View File

@@ -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
}; };
}; };

View File

@@ -39,5 +39,8 @@
]; ];
# nix.settings. # warn-dirty = false; # TODO: do I want this # nix.settings. # warn-dirty = false; # TODO: do I want this
#
# Ensure we can still build when missing-server is not accessible
fallback = true;
}; };
} }

View File

@@ -4,6 +4,7 @@
../common/global ../common/global
../common/users/julian ../common/users/julian
../common/users/yukari
../common/optional/binarycaches.nix ../common/optional/binarycaches.nix
../common/optional/remote-builder.nix ../common/optional/remote-builder.nix
@@ -32,8 +33,14 @@
enable = true; enable = true;
overrideSettings = false; overrideSettings = false;
}; };
frajulAutoUpgrade = {
enable = true;
flakePath = "/home/julian/.dotfiles";
};
}; };
services.desktopManager.plasma6.enable = true;
services.blueman.enable = true; services.blueman.enable = true;
services.upower.enable = true; services.upower.enable = true;

View File

@@ -17,6 +17,7 @@
extraGroups = [ extraGroups = [
"networkmanager" "networkmanager"
"wheel" "wheel"
"docker"
]; ];
}; };
@@ -40,6 +41,18 @@
trusted-users = ["nix"]; trusted-users = ["nix"];
max-jobs = "auto"; max-jobs = "auto";
cores = 0; cores = 0;
# Ensure we can still build when missing-server is not accessible
fallback = true;
};
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
@@ -245,4 +258,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

View File

@@ -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;

View File

@@ -21,5 +21,8 @@
"root" "root"
"@wheel" "@wheel"
]; # needed for devenv to add custom caches ]; # needed for devenv to add custom caches
# Ensure we can still build when missing-server is not accessible
fallback = true;
}; };
} }

View File

@@ -17,6 +17,8 @@ in {
"networkmanager" "networkmanager"
"wheel" "wheel"
"audio" "audio"
"realtime"
"rtkit"
"network" "network"
"video" "video"
"podman" "podman"

View File

@@ -0,0 +1,100 @@
{
pkgs,
config,
lib,
outputs,
...
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
users.mutableUsers = false;
users.users.yukari = {
description = "Yukari";
group = "yukari";
isNormalUser = true;
shell = pkgs.fish;
extraGroups = ifTheyExist [
"networkmanager"
"audio"
"network"
"video"
"podman"
"docker"
"git"
"gamemode"
];
createHome = true;
hashedPassword = "$y$j9T$rGuTL0rfiy7ht8L58BGCw0$fN.KwHjYlIitFEPHndKvV06ezgeWzP3/58o1kkviZwB";
packages = [pkgs.home-manager];
};
users.groups.yukari = {};
home-manager.users.yukari = {
imports =
[
../../../../homes/julian/features/fonts
../../../../homes/julian/features/suites/cli
]
++ (builtins.attrValues outputs.homeManagerModules);
home = {
username = lib.mkDefault "yukari";
homeDirectory = lib.mkDefault "/home/${config.home.username}";
stateVersion = lib.mkDefault "23.11";
sessionPath = ["$HOME/.local/bin"];
packages = with pkgs; [
arandr
calibre # ebook manager and viewer
# digikam
discord
discord-ptb # in case discord updates take their time
# dvdisaster
# element-desktop
# rocketchat-desktop
thunderbird
tdesktop # telegram
# schildichat-desktop # not updated regularly
nheko
evince # Simple pdf reader, good for focusing on document content
firefox
vivaldi
# geogebra
cheese
handbrake
# kitty # Terminal, already available as feature
libnotify
libreoffice
mate.engrampa
nomacs # Image viewer
kdePackages.okular # Pdf reader with many features, good for commenting documents
pavucontrol
pdfsam-basic # Split, merge, etc for pdfs
qalculate-gtk # Nice gui calculator
qpdfview
# qutebrowser
# realvnc-vnc-viewer
rpi-imager # make isos
# rustdesk
tor-browser
unstable.path-of-building # Path of Building
# frajul.pob-dev-version # Path of Building
vlc
wineWowPackages.stable # 32-bit and 64-bit wine
winetricks
xclip # x11 clipboard access from terminal
xfce.mousepad # simple text editor
xournalpp # Edit pdf files
zoom-us # Video conferencing
zotero # Manage papers and other sources
pdfpc # Present slides in pdf form
];
};
programs = {
home-manager.enable = true;
git.enable = true;
};
};
}

View File

@@ -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;
} }

View File

@@ -0,0 +1,173 @@
{
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 /run/current-system/sw/bin/nix flake update --flake "${cfg.flakePath}" && /run/current-system/sw/bin/nixos-rebuild switch --flake "${cfg.flakePath}"; then
echo "success" > "$LAST_STATUS_FILE"
else
echo "failure" > "$LAST_STATUS_FILE"
git -C "${cfg.flakePath}" restore flake.lock
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
'')
];
# Fixes error: repository path '...' is not owned by current user
environment.etc."root/.gitconfig".text = ''
[safe]
directory = ${cfg.flakePath}
'';
systemd.services.frajul-auto-upgrade = {
description = "Frajul's NixOS Auto Upgrade";
after = ["network-online.target"];
wants = ["network-online.target"];
restartIfChanged = false; # Do not start service on nixos switch
path = with pkgs; [
coreutils
gnutar
xz.bin
gzip
gitMinimal
config.nix.package.out
config.programs.ssh.package
];
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";
};
};
};
}