Compare commits
4 commits
5852b1cabd
...
749d45df3c
Author | SHA1 | Date | |
---|---|---|---|
749d45df3c | |||
def36f2ab3 | |||
737b2cad33 | |||
22dbe7b96b |
11 changed files with 56 additions and 87 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,3 +2,5 @@ result
|
||||||
result-*
|
result-*
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
/.direnv
|
||||||
|
|
|
@ -231,17 +231,17 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724748588,
|
"lastModified": 1725013374,
|
||||||
"narHash": "sha256-NlpGA4+AIf1dKNq76ps90rxowlFXUsV9x7vK/mN37JM=",
|
"narHash": "sha256-fbz8MUVDWHchQSA4uguP9YYDXnX4bEdlP7YvsMcXZu4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a6292e34000dc93d43bccf78338770c1c5ec8a99",
|
"rev": "c169763c3087b02a8308e2f8a9bba77c428dcca1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c169763c3087b02a8308e2f8a9bba77c428dcca1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
# `nixpkgs-unstable` contains less(?) jobs, and usually updates faster.
|
# `nixpkgs-unstable` contains less(?) jobs, and usually updates faster.
|
||||||
#
|
#
|
||||||
# REFERENCE: https://discourse.nixos.org/t/differences-between-nix-channels/13998/5
|
# REFERENCE: https://discourse.nixos.org/t/differences-between-nix-channels/13998/5
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/c169763c3087b02a8308e2f8a9bba77c428dcca1"; # userborn
|
||||||
|
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
|
@ -102,7 +103,7 @@
|
||||||
legacyPackages = import ./pkgs pkgs;
|
legacyPackages = import ./pkgs pkgs;
|
||||||
|
|
||||||
### nix develop
|
### nix develop
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShellNoCC {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
colmena
|
colmena
|
||||||
sops
|
sops
|
||||||
|
|
6
home/applications/direnv/default.nix
Normal file
6
home/applications/direnv/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
colmena
|
|
||||||
deadnix
|
deadnix
|
||||||
nh
|
nh
|
||||||
nil
|
nil
|
||||||
|
|
|
@ -6,14 +6,6 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
../i3status-rust
|
|
||||||
../kanshi
|
|
||||||
../mako
|
|
||||||
../swayidle
|
|
||||||
../swaylock
|
|
||||||
];
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
pwvucontrol
|
pwvucontrol
|
||||||
|
|
|
@ -1,40 +1,25 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
services.swayidle = {
|
||||||
../swaylock
|
|
||||||
];
|
|
||||||
|
|
||||||
services.swayidle =
|
|
||||||
let
|
|
||||||
lock = lib.getExe config.programs.swaylock.package;
|
|
||||||
brightness = lib.getExe pkgs.brightnessctl;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
enable = true;
|
enable = true;
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{
|
|
||||||
timeout = 60 * 9;
|
|
||||||
command = "${brightness} -s set 20%";
|
|
||||||
resumeCommand = "${brightness} -r";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
timeout = 60 * 10;
|
timeout = 60 * 10;
|
||||||
command = "systemctl suspend";
|
command = "/run/current-system/sw/bin/systemctl suspend";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
events = [
|
events = [
|
||||||
{
|
{
|
||||||
event = "lock";
|
event = "lock";
|
||||||
command = lock;
|
command = lib.getExe config.programs.swaylock.package;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
event = "before-sleep";
|
event = "before-sleep";
|
||||||
command = lock;
|
command = "/run/current-system/systemd/bin/loginctl lock-session";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -6,49 +7,26 @@
|
||||||
home = {
|
home = {
|
||||||
username = "guanranwang";
|
username = "guanranwang";
|
||||||
homeDirectory = "/home/guanranwang";
|
homeDirectory = "/home/guanranwang";
|
||||||
stateVersion = "23.05";
|
stateVersion = "24.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
imports =
|
imports = [
|
||||||
[
|
|
||||||
./theme.nix
|
./theme.nix
|
||||||
./xdg-mime.nix
|
./xdg-mime.nix
|
||||||
]
|
] ++ lib.filter (x: lib.hasSuffix "default.nix" x) (lib.fileset.toList ./applications);
|
||||||
++ map (n: ./applications/${n}) [
|
|
||||||
"atuin"
|
|
||||||
"bash"
|
|
||||||
"bat"
|
|
||||||
"eza"
|
|
||||||
"fcitx5"
|
|
||||||
"firefox"
|
|
||||||
"fish"
|
|
||||||
"foot"
|
|
||||||
"git"
|
|
||||||
"go"
|
|
||||||
"gpg"
|
|
||||||
"mpv"
|
|
||||||
"nautilus"
|
|
||||||
"neovim"
|
|
||||||
"nix"
|
|
||||||
"ssh"
|
|
||||||
"starship"
|
|
||||||
"sway"
|
|
||||||
"tealdeer"
|
|
||||||
"thunderbird"
|
|
||||||
"tmux"
|
|
||||||
"ydict"
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.jq.enable = true;
|
programs = {
|
||||||
programs.obs-studio.enable = true;
|
jq.enable = true;
|
||||||
programs.ripgrep.enable = true;
|
obs-studio.enable = true;
|
||||||
programs.skim.enable = true;
|
ripgrep.enable = true;
|
||||||
programs.zoxide.enable = true;
|
skim.enable = true;
|
||||||
|
zoxide.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
dconf-editor
|
||||||
fastfetch
|
fastfetch
|
||||||
fd
|
fd
|
||||||
dconf-editor
|
|
||||||
file-roller
|
file-roller
|
||||||
fractal
|
fractal
|
||||||
gnome-calculator
|
gnome-calculator
|
||||||
|
@ -56,5 +34,4 @@
|
||||||
loupe
|
loupe
|
||||||
seahorse
|
seahorse
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,13 @@
|
||||||
time.timeZone = "Asia/Shanghai";
|
time.timeZone = "Asia/Shanghai";
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
|
# TODO: move to 'core' profile
|
||||||
|
system.etc.overlay.enable = true;
|
||||||
|
services.userborn.enable = true;
|
||||||
|
|
||||||
|
# TODO: this is currently broken
|
||||||
|
# system.etc.overlay.mutable = false;
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
"guanranwang" = {
|
"guanranwang" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
"befs"
|
"befs"
|
||||||
"cramfs"
|
"cramfs"
|
||||||
"efs"
|
"efs"
|
||||||
"erofs"
|
|
||||||
"exofs"
|
"exofs"
|
||||||
"freevxfs"
|
"freevxfs"
|
||||||
"f2fs"
|
"f2fs"
|
||||||
|
|
Loading…
Reference in a new issue