Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begins NixOS for a desktop option #576

Merged
merged 109 commits into from
Jun 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
dc88561
Begins NixOS for a desktop option
kachick Apr 28, 2024
79cd7a3
Avoid pre-built binaries in NixOS problems for LSP
kachick Apr 28, 2024
950cc5a
Start to manage xremap config
kachick Apr 28, 2024
674f73b
Translate xreamp YAML config with Nix
kachick Apr 28, 2024
ccf70d5
Save default fcitx5 config except fcitx5/conf
kachick Apr 28, 2024
e8c93bc
Apply Karabiner-Elements and alt-ime-ahk style shortcut keys into fcitx5
kachick Apr 28, 2024
a1b9411
Enable nix-ld
kachick May 2, 2024
d270b50
Enable dprint prettier plugin again
kachick May 2, 2024
ebdc2cf
Merge branch 'main' into nixos
kachick May 27, 2024
14a9919
Merge branch 'main' into nixos
kachick Jun 11, 2024
a233390
Merge branch 'main' into nixos
kachick Jun 21, 2024
cf9dd9c
How to integrate home-manager and NixOS?
kachick Jun 21, 2024
32de982
Install unfree but using tools
kachick Jun 21, 2024
e0a8932
Enable NixOS via flake
kachick Jun 21, 2024
426b702
Follow new schema for xkb.*
kachick Jun 21, 2024
66c95c9
Use same host-name
kachick Jun 21, 2024
7cbdd84
Respect latest https://nix-community.github.io/home-manager/index.xht…
kachick Jun 21, 2024
6d10b7b
Fix non executed wezterm
kachick Jun 21, 2024
0eb44ca
wezterm is not yet fixed in nixos-unstable
kachick Jun 21, 2024
e96e92d
Clarify we can use reboot in many case
kachick Jun 21, 2024
ca14440
Disable unused nix-ld for now
kachick Jun 21, 2024
195a89e
How about installing os layer?
kachick Jun 21, 2024
7f4c648
Disable wayland for wezterm
kachick Jun 21, 2024
0f47460
Use latest wezterm to avoid broken stable releases on wayland
kachick Jun 23, 2024
2006d1d
Do not install wezterm with home-manager
kachick Jun 23, 2024
89084a1
Enable backup extension in home-manager NixOS module
kachick Jun 23, 2024
637cc19
Remove duplicated wezterm in NixOS
kachick Jun 23, 2024
6d728a7
Install beedii font
kachick Jun 23, 2024
8a7ed8f
Fix fonts config for NixOS
kachick Jun 23, 2024
1582ad3
Clarify plemol doesnt have emoji
kachick Jun 23, 2024
dc6200e
Add note about frozen chrome
kachick Jun 23, 2024
4db3092
Globally enable firefox
kachick Jun 23, 2024
e5b550f
Clarify admin is not the username in GUI
kachick Jun 23, 2024
68eb199
Use global typos-lsp
kachick Jun 23, 2024
09f8f62
Set typos-lsp absolutepath with direnv
kachick Jun 23, 2024
42d1783
Skip heavy CI if PR is draft state
kachick Jun 23, 2024
ad71546
Enable stylua binary in PATH for vscode formatter
kachick Jun 23, 2024
c350fa5
Start using clipcat
kachick Jun 23, 2024
ab95c21
Install package in global
kachick Jun 23, 2024
d128a32
Install rofi for clipcat
kachick Jun 23, 2024
bb31371
Replace copycat with copyq
kachick Jun 23, 2024
3045752
Replace copyq with clipse
kachick Jun 23, 2024
14513cd
Install wl-clipboard-rs for clipse
kachick Jun 23, 2024
2e02ee6
Prefer original wl-clipboard
kachick Jun 23, 2024
915eba0
Only use hyprland
kachick Jun 23, 2024
5339829
Enable minimum x11 again
kachick Jun 23, 2024
cb0ceb3
Update new schema for libinput
kachick Jun 23, 2024
2b35c97
Disable wayland for wezterm
kachick Jun 23, 2024
fb1f2d9
Replace hyprland with KDE plasma6
kachick Jun 23, 2024
919ae09
Update new schema for KDE on NixOS24.05
kachick Jun 23, 2024
5e227e2
Enable gnome keyring and snaylock again, but still cant login...
kachick Jun 24, 2024
b609b9c
Backto hyprland era again
kachick Jun 24, 2024
6619b07
Backto GNOME era
kachick Jun 24, 2024
0b2718d
Disable hyprland
kachick Jun 24, 2024
7c99018
Autostart clipse in gnome session
kachick Jun 24, 2024
a562da8
Disable wayland in wezterm again and again and... for it cannot be mo…
kachick Jun 24, 2024
64935ba
Add some IME settings
kachick Jun 24, 2024
6df134e
Add some IME and editor settings
kachick Jun 24, 2024
43dbcfb
KDE again...
kachick Jun 24, 2024
81f49d0
Replace sddm with gdm
kachick Jun 24, 2024
1d399d7
Using gdm, I can login to KDE...!
kachick Jun 24, 2024
d94b55b
How about enabling as this?
kachick Jun 24, 2024
75a8a1f
gdm is needed...
kachick Jun 24, 2024
81a8bcb
Disable gnome theme for qt
kachick Jun 24, 2024
f512b8e
Respect https://discuss.kde.org/t/kde-plasma-wayland/9014
kachick Jun 24, 2024
6f4d457
I hope this affects natural scrolling in KDE
kachick Jun 24, 2024
bb97560
Use nixos-unstable for major GUI apps
kachick Jun 24, 2024
47d549f
Uninstall vscodium since using vscode itself
kachick Jun 24, 2024
920bb55
Attempt to fix wrong locale for Uer dirs
kachick Jun 24, 2024
bdfc1cc
Enable real podman in NixOS
kachick Jun 24, 2024
903c9b8
Fix to spewcify packages for nixpkgs
kachick Jun 24, 2024
134b813
Follow new schema for libinput
kachick Jun 24, 2024
5623b53
Clarify unfree for unstable packages
kachick Jun 24, 2024
7dee921
Clarify unfree for unstable packages
kachick Jun 24, 2024
47d37c7
Fix unfree specifier
kachick Jun 24, 2024
d5e46a3
Add note about how to enable IME on wayland and chromium
kachick Jun 24, 2024
ce45a1d
Merge branch 'main' into nixos
kachick Jun 27, 2024
7eec668
Import beedii package from kachick/nixpkgs
kachick Jun 27, 2024
78e40e3
Update fallback fonts and the configurations
kachick Jun 27, 2024
763ebbd
Add twemoji
kachick Jun 27, 2024
010b890
Manage firefox settings
kachick Jun 27, 2024
146b562
Add comment firefox findbar position
kachick Jun 27, 2024
df5a89a
Add some firefox config
kachick Jun 27, 2024
79f6e10
No music no life
kachick Jun 27, 2024
48ae00b
Do not use unuseful Spotify player
kachick Jun 27, 2024
f49b55b
Enable wayland IME for chromium apps
kachick Jun 27, 2024
76edd9e
Extract unfree packages from shared home-manager config
kachick Jun 27, 2024
c2b10e2
Always executing with enabled IEM for chromium based apps
kachick Jun 27, 2024
5b24b30
Merge branch 'main' into nixos
kachick Jun 28, 2024
a161d09
Install Signal, WARP, Dropbox
kachick Jun 28, 2024
5aee17c
Enable WARP systemd
kachick Jun 28, 2024
3a461fd
Add link to the issue
kachick Jun 28, 2024
93bc0db
Globally enable electron wayland flags
kachick Jun 28, 2024
7d82490
Putting electron-flags is not work
kachick Jun 28, 2024
5d30580
Enable wayland IME for signal
kachick Jun 28, 2024
ea91c0f
Simplify vscode overriding and then prefer latest version
kachick Jun 28, 2024
01f44f0
I dont know why commandLineArgs overriding doesnt wrap
kachick Jun 28, 2024
480657f
How about this override?
kachick Jun 28, 2024
093dee5
Inline chrome wyaland wrapping as vscode for using latest package
kachick Jun 28, 2024
7cd9638
Enable wayland IME for wezterm
kachick Jun 28, 2024
4fa5376
Update docs about NixOS
kachick Jun 28, 2024
b28e878
Consider NixOS in updeps
kachick Jun 28, 2024
ff65b31
Remove unused qt config
kachick Jun 28, 2024
a8e2192
Downgrade macos action runne to 13 to keep Intel era
kachick Jun 28, 2024
a50993b
Attempt to fix macos actions flake output
kachick Jun 28, 2024
4dd1b92
Attempt to fix home-manager flake outputs again
kachick Jun 28, 2024
c5e62c7
How about this refactor?
kachick Jun 28, 2024
fcca15a
No lint for this?
kachick Jun 28, 2024
c9ec717
Avoid macos in firefox activations
kachick Jun 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Avoid pre-built binaries in NixOS problems for LSP
Fix and refine nix flake run
kachick committed Apr 28, 2024
commit 79cd7a33dc04534fe2ece65f3460fdc6ed685baa
5 changes: 1 addition & 4 deletions .github/workflows/update-flake-lock-and-ci.yml
Original file line number Diff line number Diff line change
@@ -19,10 +19,7 @@ jobs:
pr-title: 'Bump flake.lock and related dependencies'
optional-run: |
nix run .#bump_completions
git add ./dependencies
# https://stackoverflow.com/q/34807971
git update-index -q --really-refresh
git diff-index --quiet HEAD || git commit -m 'Update dprint completions' ./dependencies/dprint
nix run .#bump_lsp
secrets:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -22,5 +22,6 @@
},
"gopls": {
"build.buildFlags": ["-tags=linux,windows,darwin"]
}
},
"typos.path": "/nix/store/02sj7rvbhzvlj1nsjzwya9fhbq34178f-typos-lsp-0.1.17/bin/typos-lsp" // selfup {"extract":"/nix/store/[^\"]+/bin/typos-lsp","replacer":["bash", "-c", "command -v typos-lsp"]}
}
7 changes: 1 addition & 6 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -6,10 +6,6 @@
},
"toml": {
},
"prettier": {
"printWidth": 120,
"singleQuote": true
},
"excludes": [
".git",
".direnv",
@@ -19,7 +15,6 @@
"plugins": [
"https://plugins.dprint.dev/json-0.19.2.wasm",
"https://plugins.dprint.dev/markdown-0.16.4.wasm",
"https://plugins.dprint.dev/toml-0.6.1.wasm",
"https://plugins.dprint.dev/prettier-0.35.0.json@0df49c4d878bb1051af2fa1d1f69ba6400f4b78633f49baa1f38954a6fd32b40"
"https://plugins.dprint.dev/toml-0.6.1.wasm"
]
}
109 changes: 75 additions & 34 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -54,7 +54,9 @@
cargo-make

edge-pkgs.dprint
edge-pkgs.yamlfmt
edge-pkgs.typos
edge-pkgs.typos-lsp
edge-pkgs.go_1_22
edge-pkgs.goreleaser
edge-pkgs.trivy
@@ -106,51 +108,90 @@
};
};

packages.bump_completions = pkgs.writeShellScriptBin "bump_completions" ''
set -euo pipefail

${edge-pkgs.podman}/bin/podman completion bash > ./dependencies/podman/completions.bash
${edge-pkgs.podman}/bin/podman completion zsh > ./dependencies/podman/completions.zsh
${edge-pkgs.podman}/bin/podman completion fish > ./dependencies/podman/completions.fish

${edge-pkgs.dprint}/bin/dprint completions bash > ./dependencies/dprint/completions.bash
${edge-pkgs.dprint}/bin/dprint completions zsh > ./dependencies/dprint/completions.zsh
${edge-pkgs.dprint}/bin/dprint completions fish > ./dependencies/dprint/completions.fish
'';

packages.check_no_dirty_xz_in_nix_store = pkgs.writeShellApplication {
name = "check_no_dirty_xz_in_nix_store";
runtimeInputs = with pkgs; [ fd ];
text = ''
# nix store should have xz: https://github.com/NixOS/nixpkgs/blob/b96bc828b81140dd3fb096b4e66a6446d6d5c9dc/doc/stdenv/stdenv.chapter.md?plain=1#L177
# You can't use --max-results instead of --has-results even if you want the log, it always returns true
fd '^\w+-xz-[0-9\.]+\.drv' --search-path /nix/store --has-results

# Why toggling errexit and return code here: https://github.com/kachick/times_kachick/issues/278
set +o errexit
fd '^\w+-xz-5\.6\.[01]\.drv' --search-path /nix/store --has-results
fd_return_code="$?" # Do not directly use the $? to prevent feature broken if inserting another command before check
set -o errexit
[[ "$fd_return_code" -eq 1 ]]
'';
meta = {
description = "Prevent #530 (around CVE-2024-3094)";
};
};

apps = {
# example: `nix run .#home-manager -- switch -n -b backup --flake .#kachick`
# https://github.com/NixOS/nix/issues/6448#issuecomment-1132855605
home-manager = flake-utils.lib.mkApp { drv = home-manager.defaultPackage.${system}; };

bump_completions = {
type = "app";
program = "${packages.bump_completions}/bin/bump_completions";
program =
with pkgs;
lib.getExe (writeShellApplication {
name = "bump_completions";
runtimeInputs = with pkgs; [
git
edge-pkgs.podman
edge-pkgs.dprint
];
text = ''
podman completion bash > ./dependencies/podman/completions.bash
podman completion zsh > ./dependencies/podman/completions.zsh
podman completion fish > ./dependencies/podman/completions.fish

git add ./dependencies/podman
# https://stackoverflow.com/q/34807971
git update-index -q --really-refresh
git diff-index --quiet HEAD || git commit -m 'Update podman completions' ./dependencies/podman

dprint completions bash > ./dependencies/dprint/completions.bash
dprint completions zsh > ./dependencies/dprint/completions.zsh
dprint completions fish > ./dependencies/dprint/completions.fish

git add ./dependencies/dprint
git update-index -q --really-refresh
git diff-index --quiet HEAD || git commit -m 'Update dprint completions' ./dependencies/dprint
'';
meta = {
description = "Bump shell completions with cached files to make faster";
};
});
};

bump_lsp = {
type = "app";
program =
with pkgs;
lib.getExe (writeShellApplication {
name = "bump_lsp";
runtimeInputs = with pkgs; [
git
nix
edge-pkgs.typos-lsp
];
text = ''
git ls-files .vscode | xargs nix run github:kachick/selfup/v1.1.2 -- run
git diff-index --quiet HEAD || git commit -m 'Sync LSP path with nixpkgs' .vscode
'';
meta = {
description = "Bump typos-lsp";
};
});
};

check_no_dirty_xz_in_nix_store = {
type = "app";
program = "${packages.check_no_dirty_xz_in_nix_store}/bin/check_no_dirty_xz_in_nix_store";
program =
with pkgs;
lib.getExe (writeShellApplication {
name = "check_no_dirty_xz_in_nix_store";
runtimeInputs = with pkgs; [ fd ];
text = ''
# nix store should have xz: https://github.com/NixOS/nixpkgs/blob/b96bc828b81140dd3fb096b4e66a6446d6d5c9dc/doc/stdenv/stdenv.chapter.md?plain=1#L177
# You can't use --max-results instead of --has-results even if you want the log, it always returns true
fd '^\w+-xz-[0-9\.]+\.drv' --search-path /nix/store --has-results

# Why toggling errexit and return code here: https://github.com/kachick/times_kachick/issues/278
set +o errexit
fd '^\w+-xz-5\.6\.[01]\.drv' --search-path /nix/store --has-results
fd_return_code="$?" # Do not directly use the $? to prevent feature broken if inserting another command before check
set -o errexit
[[ "$fd_return_code" -eq 1 ]]
'';
meta = {
description = "Prevent #530 (around CVE-2024-3094)";
};
});
};
};
}