Compare commits
10 commits
885fc0e462
...
63f9776a31
Author | SHA1 | Date | |
---|---|---|---|
63f9776a31 | |||
7f3aaed6ed | |||
5359f13621 | |||
237a8f6ac5 | |||
54fd5df1f8 | |||
3838039cee | |||
bd970253f2 | |||
a7af2d561c | |||
8d6cb040cb | |||
a198949c26 |
14 changed files with 123 additions and 126 deletions
|
@ -39,7 +39,9 @@ jobs:
|
||||||
nix build --print-build-logs '.#nixosConfigurations.vm.config.system.build.toplevel'
|
nix build --print-build-logs '.#nixosConfigurations.vm.config.system.build.toplevel'
|
||||||
report-size:
|
report-size:
|
||||||
runs-on: nixos
|
runs-on: nixos
|
||||||
needs: build
|
needs:
|
||||||
|
- build-packages
|
||||||
|
- build-vm
|
||||||
steps:
|
steps:
|
||||||
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
|
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
|
||||||
- run: nix --version
|
- run: nix --version
|
||||||
|
|
40
example-vm/default.nix
Normal file
40
example-vm/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
import = [ ./vm_config.nix ];
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
users.users.jdoe = {
|
||||||
|
password = "example";
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"video"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home-manager.users.jdoe = {
|
||||||
|
home = {
|
||||||
|
username = "jdoe";
|
||||||
|
homeDirectory = "/home/jdoe";
|
||||||
|
};
|
||||||
|
jhome = {
|
||||||
|
enable = true;
|
||||||
|
gui.enable = true;
|
||||||
|
dev = {
|
||||||
|
enable = true;
|
||||||
|
rust.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# password is 'test' see module documentation for more options
|
||||||
|
services.jupyter.password = "'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba'";
|
||||||
|
jconfig = {
|
||||||
|
enable = true;
|
||||||
|
dev = {
|
||||||
|
enable = true;
|
||||||
|
jupyter.enable = true;
|
||||||
|
};
|
||||||
|
gui.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,7 +1,13 @@
|
||||||
|
## Default QEMU guest config
|
||||||
{
|
{
|
||||||
services.qemuGuest.enable = true;
|
services = {
|
||||||
|
qemuGuest.enable = true;
|
||||||
|
openssh.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot = {
|
||||||
|
loader.systemd-boot.enable = true;
|
||||||
|
initrd.availableKernelModules = [
|
||||||
"xhci_pci"
|
"xhci_pci"
|
||||||
"ehci_pci"
|
"ehci_pci"
|
||||||
"ahci"
|
"ahci"
|
||||||
|
@ -15,17 +21,14 @@
|
||||||
# "virtio_vga"
|
# "virtio_vga"
|
||||||
"virtio_gpu"
|
"virtio_gpu"
|
||||||
];
|
];
|
||||||
|
};
|
||||||
fileSystems."/".device = "/dev/disk/by-label/nixos";
|
fileSystems."/".device = "/dev/disk/by-label/nixos";
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
# this value at the release version of the first install of this system.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "22.11"; # Did you read the comment?
|
system.stateVersion = "24.11"; # Did you read the comment?
|
||||||
}
|
}
|
|
@ -8,47 +8,11 @@ in
|
||||||
{
|
{
|
||||||
# Example vm configuration
|
# Example vm configuration
|
||||||
flake.nixosConfigurations.vm = lib.nixosSystem {
|
flake.nixosConfigurations.vm = lib.nixosSystem {
|
||||||
inherit system pkgs;
|
inherit pkgs;
|
||||||
modules = [
|
modules = [
|
||||||
inputs.self.nixosModules.vm # import vm module
|
inputs.self.nixosModules.default
|
||||||
{
|
../example-vm # import vm configuration
|
||||||
time.timeZone = "Europe/Berlin";
|
{ nix.registry.nixpkgs.flake = inputs.nixpkgs; }
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
users.users.jdoe = {
|
|
||||||
password = "example";
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [
|
|
||||||
"wheel"
|
|
||||||
"video"
|
|
||||||
"networkmanager"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
home-manager.users.jdoe = {
|
|
||||||
home = {
|
|
||||||
username = "jdoe";
|
|
||||||
homeDirectory = "/home/jdoe";
|
|
||||||
};
|
|
||||||
jhome = {
|
|
||||||
enable = true;
|
|
||||||
gui.enable = true;
|
|
||||||
dev = {
|
|
||||||
enable = true;
|
|
||||||
rust.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
|
||||||
# password is 'test' see module documentation for more options
|
|
||||||
services.jupyter.password = "'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba'";
|
|
||||||
jconfig = {
|
|
||||||
enable = true;
|
|
||||||
dev = {
|
|
||||||
enable = true;
|
|
||||||
jupyter.enable = true;
|
|
||||||
};
|
|
||||||
gui.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
{ self, inputs, ... }:
|
{ self, inputs, ... }:
|
||||||
let
|
|
||||||
modules = ../modules;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
# FIXME(25.05): this version of HM should have the flake module
|
# FIXME(25.05): this version of HM should have the flake module
|
||||||
# imports = [ inputs.home-manager.flakeModules.home-manager ];
|
# imports = [ inputs.home-manager.flakeModules.home-manager ];
|
||||||
|
@ -11,7 +8,7 @@ in
|
||||||
defaultModules = [
|
defaultModules = [
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
self.nixvimModules.homeManager
|
self.nixvimModules.homeManager
|
||||||
(modules + "/hm")
|
../module/hm
|
||||||
];
|
];
|
||||||
nixos = {
|
nixos = {
|
||||||
imports = defaultModules;
|
imports = defaultModules;
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
modules = ../modules;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
flake.nixosModules =
|
flake.nixosModules =
|
||||||
let
|
let
|
||||||
|
@ -15,7 +12,7 @@ in
|
||||||
inputs.niri.nixosModules.niri
|
inputs.niri.nixosModules.niri
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
(modules + "/nixos")
|
../modules/nixos
|
||||||
] ++ lib.optional (inputs.lix-module != null) inputs.lix-module.nixosModules.default;
|
] ++ lib.optional (inputs.lix-module != null) inputs.lix-module.nixosModules.default;
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
|
@ -25,20 +22,9 @@ in
|
||||||
# Pin nixpkgs
|
# Pin nixpkgs
|
||||||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
machines = [ "vm" ];
|
|
||||||
mkMachine = hostname: {
|
|
||||||
imports = [
|
|
||||||
nixosModule
|
|
||||||
(import (../machines + "/${hostname}"))
|
|
||||||
];
|
|
||||||
home-manager.sharedModules = [ { jhome.hostName = hostname; } ];
|
|
||||||
};
|
|
||||||
machineModules = lib.genAttrs machines mkMachine;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
default = nixosModule;
|
default = nixosModule;
|
||||||
inherit nixosModule;
|
inherit nixosModule;
|
||||||
}
|
};
|
||||||
// machineModules;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
{ self, inputs, ... }:
|
{ self, inputs, ... }:
|
||||||
let
|
|
||||||
modules = ../modules;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [ inputs.nixvim.flakeModules.default ];
|
imports = [ inputs.nixvim.flakeModules.default ];
|
||||||
|
|
||||||
|
@ -10,9 +7,13 @@ in
|
||||||
checks.enable = false; # FIXME: borked due to nix-community/nixvim#3074
|
checks.enable = false; # FIXME: borked due to nix-community/nixvim#3074
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.nixvimModules = {
|
flake.nixvimModules =
|
||||||
standalone = modules + "/nixvim/standalone.nix";
|
let
|
||||||
homeManager = modules + "/nixvim";
|
module = ../modules/nixvim;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
standalone = "${module}/standalone.nix";
|
||||||
|
homeManager = module;
|
||||||
};
|
};
|
||||||
|
|
||||||
perSystem =
|
perSystem =
|
||||||
|
|
30
flake.lock
generated
30
flake.lock
generated
|
@ -226,11 +226,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739757849,
|
"lastModified": 1742234739,
|
||||||
"narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=",
|
"narHash": "sha256-zFL6zsf/5OztR1NSNQF33dvS1fL/BzVUjabZq4qrtY4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe",
|
"rev": "f6af7280a3390e65c2ad8fd059cdc303426cbd59",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -321,11 +321,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741862977,
|
"lastModified": 1742388435,
|
||||||
"narHash": "sha256-prZ0M8vE/ghRGGZcflvxCu40ObKaB+ikn74/xQoNrGQ=",
|
"narHash": "sha256-GheQGRNYAhHsvPxWVOhAmg9lZKkis22UPbEHlmZMthg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cdd2ef009676ac92b715ff26630164bb88fec4e0",
|
"rev": "b75693fb46bfaf09e662d09ec076c5a162efa9f6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -337,11 +337,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738797219,
|
"lastModified": 1742272065,
|
||||||
"narHash": "sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R+7kIbGa+2s=",
|
"narHash": "sha256-ud8vcSzJsZ/CK+r8/v0lyf4yUntVmDq6Z0A41ODfWbE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1da52dd49a127ad74486b135898da2cef8c62665",
|
"rev": "3549532663732bfd89993204d40543e9edaec4f2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -360,11 +360,11 @@
|
||||||
"nuschtosSearch": []
|
"nuschtosSearch": []
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741814789,
|
"lastModified": 1742488644,
|
||||||
"narHash": "sha256-NbHsnnNwiYUcUaS4z8XK2tYpo3G8NXEKxaKkzMgMiLk=",
|
"narHash": "sha256-vXpu7G4aupNCPlv8kAo7Y/jocfSUwglkvNx5cR0XjBo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "33097dcf776d1fad0ff3842096c4e3546312f251",
|
"rev": "d44b33a1ea1a3e584a8c93164dbe0ba2ad4f3a13",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -504,11 +504,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739829690,
|
"lastModified": 1742370146,
|
||||||
"narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=",
|
"narHash": "sha256-XRE8hL4vKIQyVMDXykFh4ceo3KSpuJF3ts8GKwh5bIU=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "3d0579f5cc93436052d94b73925b48973a104204",
|
"rev": "adc195eef5da3606891cedf80c0d9ce2d3190808",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
9
justfile
9
justfile
|
@ -13,10 +13,8 @@ run-vm: build-vm
|
||||||
|
|
||||||
update-vim-plugins:
|
update-vim-plugins:
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Use local nixpkgs if available
|
plugindir=./modules/nixvim/extraPlugins
|
||||||
nixpkgs="$HOME/Dev/nixpkgs"
|
|
||||||
# copy nixpkgs from local checkout
|
# copy nixpkgs from local checkout
|
||||||
if [ ! -d "$nixpkgs" ]; then
|
|
||||||
nixpkgs="$(mktemp -d)"
|
nixpkgs="$(mktemp -d)"
|
||||||
cp -r /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/. "$nixpkgs"
|
cp -r /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/. "$nixpkgs"
|
||||||
cd "$nixpkgs"
|
cd "$nixpkgs"
|
||||||
|
@ -24,11 +22,10 @@ update-vim-plugins:
|
||||||
git add .
|
git add .
|
||||||
git commit -m 'dummy commit'
|
git commit -m 'dummy commit'
|
||||||
cd -
|
cd -
|
||||||
fi
|
|
||||||
# update vim plugins
|
# update vim plugins
|
||||||
nix run nixpkgs#vimPluginsUpdater -- --proc=1 --nixpkgs "$nixpkgs" --no-commit -i ./nvim/extraPlugins/plugins -o ./nvim/extraPlugins/generated.nix update
|
nix run nixpkgs#vimPluginsUpdater -- --proc=1 --nixpkgs "$nixpkgs" --no-commit -i "$plugindir/plugins" -o "$plugindir/generated.nix" update
|
||||||
# format the generated output
|
# format the generated output
|
||||||
nix fmt ./nvim/extraPlugins/generated.nix
|
nix fmt "$plugindir/generated.nix"
|
||||||
|
|
||||||
# Amend Update flake.lock PR
|
# Amend Update flake.lock PR
|
||||||
flake-pr:
|
flake-pr:
|
||||||
|
|
|
@ -80,8 +80,10 @@ in
|
||||||
settings = lib.mkIf config.jhome.styling.enable (
|
settings = lib.mkIf config.jhome.styling.enable (
|
||||||
import ./waybar-settings.nix { inherit config lib; }
|
import ./waybar-settings.nix { inherit config lib; }
|
||||||
);
|
);
|
||||||
|
# Style overrides to highlight workspaces with windows
|
||||||
style =
|
style =
|
||||||
lib.optionalString config.jhome.styling.enable # css
|
lib.pipe
|
||||||
|
# css
|
||||||
''
|
''
|
||||||
.modules-left #workspaces button {
|
.modules-left #workspaces button {
|
||||||
border-bottom: 3px solid @base01;
|
border-bottom: 3px solid @base01;
|
||||||
|
@ -89,7 +91,11 @@ in
|
||||||
.modules-left #workspaces button.persistent {
|
.modules-left #workspaces button.persistent {
|
||||||
border-bottom: 3px solid transparent;
|
border-bottom: 3px solid transparent;
|
||||||
}
|
}
|
||||||
'';
|
''
|
||||||
|
[
|
||||||
|
(lib.optionalString config.jhome.styling.enable)
|
||||||
|
lib.mkAfter
|
||||||
|
];
|
||||||
};
|
};
|
||||||
# Terminal
|
# Terminal
|
||||||
wezterm = {
|
wezterm = {
|
||||||
|
|
|
@ -22,8 +22,9 @@ in
|
||||||
};
|
};
|
||||||
programs.jujutsu.settings = {
|
programs.jujutsu.settings = {
|
||||||
user = lib.mkIf (cfg.defaultIdentity != null) { inherit (cfg.defaultIdentity) name email; };
|
user = lib.mkIf (cfg.defaultIdentity != null) { inherit (cfg.defaultIdentity) name email; };
|
||||||
|
git.sign-on-push = lib.mkDefault hasKey;
|
||||||
signing = lib.mkIf hasKey {
|
signing = lib.mkIf hasKey {
|
||||||
sign-all = true;
|
behaviour = "own";
|
||||||
backend = "gpg";
|
backend = "gpg";
|
||||||
key = signingKey;
|
key = signingKey;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
final: prev: {
|
final: prev: {
|
||||||
nvim-silicon = buildVimPlugin {
|
nvim-silicon = buildVimPlugin {
|
||||||
pname = "nvim-silicon";
|
pname = "nvim-silicon";
|
||||||
version = "2024-08-31";
|
version = "2025-01-09";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "michaelrommel";
|
owner = "michaelrommel";
|
||||||
repo = "nvim-silicon";
|
repo = "nvim-silicon";
|
||||||
rev = "9fe6001dc8cad4d9c53bcfc8649e3dc76ffa169c";
|
rev = "7f66bda8f60c97a5bf4b37e5b8acb0e829ae3c32";
|
||||||
sha256 = "1qczi06yndkr2pmwidlkgmk0395x189sznvscn4fnr96jx58j5yl";
|
sha256 = "1zk6lgghvdcys20cqvh2g1kjf661q1w97niq5nx1zz4yppy2f9jy";
|
||||||
};
|
};
|
||||||
meta.homepage = "https://github.com/michaelrommel/nvim-silicon/";
|
meta.homepage = "https://github.com/michaelrommel/nvim-silicon/";
|
||||||
};
|
};
|
||||||
|
|
4
scripts/audiomenu/Cargo.lock
generated
4
scripts/audiomenu/Cargo.lock
generated
|
@ -327,9 +327,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustix"
|
name = "rustix"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f7178faa4b75a30e269c71e61c353ce2748cf3d76f0c44c393f4e60abf49b825"
|
checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"errno",
|
"errno",
|
||||||
|
|
4
scripts/jpassmenu/Cargo.lock
generated
4
scripts/jpassmenu/Cargo.lock
generated
|
@ -492,9 +492,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustix"
|
name = "rustix"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f7178faa4b75a30e269c71e61c353ce2748cf3d76f0c44c393f4e60abf49b825"
|
checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"errno",
|
"errno",
|
||||||
|
|
Loading…
Add table
Reference in a new issue