Merge branch 'main' of github.com:jroeger23/.nixos
This commit is contained in:
commit
60254529e4
84
flake.lock
generated
84
flake.lock
generated
@ -20,11 +20,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739103745,
|
"lastModified": 1741934125,
|
||||||
"narHash": "sha256-c53dcRaw0F4Os9WD05HwIRs9kTDZw4Mxe1XK4edEALo=",
|
"narHash": "sha256-qwI47l3aKXRpDvmCKDbLV70iVfAqhpuKqT7qYHA4KJk=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "aquamarine",
|
"repo": "aquamarine",
|
||||||
"rev": "a3dda0d10ce9aa1d1dfb7a6c139ea8c2872c74bd",
|
"rev": "bea48d0bbe15fb3d758a8b6be865836c97056575",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -42,11 +42,11 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "pkgs/firefox-addons",
|
"dir": "pkgs/firefox-addons",
|
||||||
"lastModified": 1739383790,
|
"lastModified": 1742025179,
|
||||||
"narHash": "sha256-OuQrFnZqp9coc4b7Hz1QkTxj+pIiAvS/fUnCXqxUUFw=",
|
"narHash": "sha256-gxfMDCQeGZk3wZjqdl2boaGGm+yiAkaNFNp3x5vhuYg=",
|
||||||
"owner": "rycee",
|
"owner": "rycee",
|
||||||
"repo": "nur-expressions",
|
"repo": "nur-expressions",
|
||||||
"rev": "2b28cc6940ded52f60883074a2d53a328db9907c",
|
"rev": "9b8d2f4a1e3a199878d1eb14d7e0f176052a8038",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -116,11 +116,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1736373539,
|
"lastModified": 1739757849,
|
||||||
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
|
"narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
|
"rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -206,11 +206,11 @@
|
|||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739368482,
|
"lastModified": 1742062509,
|
||||||
"narHash": "sha256-SHDq4bk3tJsh0wyXs20OztvsCGT2+6c6sj92+qBKjfI=",
|
"narHash": "sha256-7XaXH+puaULpz2dbK9VuMgOwI9cD7MBd51N+wZsXiIY=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "68bb3e7f0a1d528a8b2da1f92d2005889587561d",
|
"rev": "4c471218c9fd8be87f0df968004e527b4f42d948",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -358,11 +358,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739048914,
|
"lastModified": 1741191527,
|
||||||
"narHash": "sha256-vd5rJBTmp2w7SDgfv23Zcd84ktI5eDA7e5UBzx+pKrU=",
|
"narHash": "sha256-kM+11Nch47Xwfgtw2EpRitJuORy4miwoMuRi5tyMBDY=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprlang",
|
"repo": "hyprlang",
|
||||||
"rev": "a7334904d591f38757c46fbe2ab68651877d9099",
|
"rev": "72df3861f1197e41b078faa3e38eedd60e00018d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -383,11 +383,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739048933,
|
"lastModified": 1741534688,
|
||||||
"narHash": "sha256-ck6MaoYvISBQKqZR+HcxXnx0wOhyCauxfVMaV5zhJxQ=",
|
"narHash": "sha256-EV3945SnjOCuRVbGRghsWx/9D89FyshnSO1Q6/TuQ14=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprutils",
|
"repo": "hyprutils",
|
||||||
"rev": "e4e018a2ca6f5a9c33511973454199e1c7c85499",
|
"rev": "dd1f720cbc2dbb3c71167c9598045dd3261d27b3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -408,11 +408,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739049028,
|
"lastModified": 1739870480,
|
||||||
"narHash": "sha256-RleJp7LYbr6s+M1xgbmhtBs+fYa3ZdIiF7+QalJ4D1g=",
|
"narHash": "sha256-SiDN5BGxa/1hAsqhgJsS03C3t2QrLgBT8u+ENJ0Qzwc=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprwayland-scanner",
|
"repo": "hyprwayland-scanner",
|
||||||
"rev": "04146df74a8d5ec0b579657307be01f1e241125f",
|
"rev": "206367a08dc5ac4ba7ad31bdca391d098082e64b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -423,11 +423,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738816619,
|
"lastModified": 1741792691,
|
||||||
"narHash": "sha256-5yRlg48XmpcX5b5HesdGMOte+YuCy9rzQkJz+imcu6I=",
|
"narHash": "sha256-f0BVt1/cvA0DQ/q3rB+HY4g4tKksd03ZkzI4xehC2Ew=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "2eccff41bab80839b1d25b303b53d339fbb07087",
|
"rev": "e1f12151258b12c567f456d8248e4694e9390613",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -439,11 +439,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739206421,
|
"lastModified": 1741862977,
|
||||||
"narHash": "sha256-PwQASeL2cGVmrtQYlrBur0U20Xy07uSWVnFup2PHnDs=",
|
"narHash": "sha256-prZ0M8vE/ghRGGZcflvxCu40ObKaB+ikn74/xQoNrGQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "44534bc021b85c8d78e465021e21f33b856e2540",
|
"rev": "cdd2ef009676ac92b715ff26630164bb88fec4e0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -455,11 +455,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739214665,
|
"lastModified": 1741851582,
|
||||||
"narHash": "sha256-26L8VAu3/1YRxS8MHgBOyOM8xALdo6N0I04PgorE7UM=",
|
"narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "64e75cd44acf21c7933d61d7721e812eac1b5a0a",
|
"rev": "6607cf789e541e7873d40d3a8f7815ea92204f32",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -479,11 +479,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1736549395,
|
"lastModified": 1740569341,
|
||||||
"narHash": "sha256-XzwkB62Tt5UYoL1jXiHzgk/qz2fUpGHExcSIbyGTtI0=",
|
"narHash": "sha256-WV8nY2IOfWdzBF5syVgCcgOchg/qQtpYh6LECYS9XkY=",
|
||||||
"owner": "pjones",
|
"owner": "pjones",
|
||||||
"repo": "plasma-manager",
|
"repo": "plasma-manager",
|
||||||
"rev": "a53af7f1514ef4cce8620a9d6a50f238cdedec8b",
|
"rev": "5eeb0172fb74392053b66a8149e61b5e191b2845",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -502,11 +502,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737465171,
|
"lastModified": 1741379162,
|
||||||
"narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
|
"narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
|
"rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -535,11 +535,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739262228,
|
"lastModified": 1741861888,
|
||||||
"narHash": "sha256-7JAGezJ0Dn5qIyA2+T4Dt/xQgAbhCglh6lzCekTVMeU=",
|
"narHash": "sha256-ynOgXAyToeE1UdLNfrUn/hL7MN0OpIS2BtNdLjpjPf0=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "07af005bb7d60c7f118d9d9f5530485da5d1e975",
|
"rev": "d016ce0365b87d848a57c12ffcfdc71da7a2b55f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -591,11 +591,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737634991,
|
"lastModified": 1741934139,
|
||||||
"narHash": "sha256-dBAnb7Kbnier30cA7AgxVSxxARmxKZ1vHZT33THSIr8=",
|
"narHash": "sha256-ZhTcTH9FoeAtbPfWGrhkH7RjLJZ7GeF18nygLAMR+WE=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
"rev": "e09dfe2726c8008f983e45a0aa1a3b7416aaeb8a",
|
"rev": "150b0b6f52bb422a1b232a53698606fe0320dde0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
13
flake.nix
13
flake.nix
@ -98,5 +98,18 @@
|
|||||||
# to pass through arguments to home.nix
|
# to pass through arguments to home.nix
|
||||||
extraSpecialArgs = {inherit inputs;};
|
extraSpecialArgs = {inherit inputs;};
|
||||||
};
|
};
|
||||||
|
templates = {
|
||||||
|
rust = {
|
||||||
|
path = ./templates/rust;
|
||||||
|
description = "A simple rust binary template";
|
||||||
|
welcomeText = ''
|
||||||
|
# Rust template
|
||||||
|
This is a simple rust binary template.
|
||||||
|
To build the project run `cargo build`.
|
||||||
|
To run the project run `cargo run`.
|
||||||
|
Before running nix build, make sure to run `cargo generate-lockfile` first.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
../../modules/programs.nix
|
../../modules/programs.nix
|
||||||
];
|
];
|
||||||
desktop.dm.name = "sddm";
|
desktop.dm.name = "sddm";
|
||||||
desktop.de.plasma.enable = true;
|
desktop.de.plasma.enable = false;
|
||||||
desktop.de.hyprland.enable = true;
|
desktop.de.hyprland.enable = true;
|
||||||
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
||||||
${pkgs.git}/bin/git diff -U0
|
${pkgs.git}/bin/git diff -U0
|
||||||
echo "NixOS Rebuilding..."
|
echo "NixOS Rebuilding..."
|
||||||
${pkgs.unstable.nh}/bin/nh home switch ~/.nixos
|
${pkgs.nh}/bin/nh home switch ~/.nixos
|
||||||
gen=$(home-manager generations | head -n1 | ${pkgs.gawk}/bin/awk '{print "Gen" $5 " @ " $1 "-" $2}')
|
gen=$(home-manager generations | head -n1 | ${pkgs.gawk}/bin/awk '{print "Gen" $5 " @ " $1 "-" $2}')
|
||||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "Home $gen"
|
${pkgs.git}/bin/git commit --no-gpg-sign -am "Home $gen"
|
||||||
popd
|
popd
|
||||||
@ -24,7 +24,7 @@
|
|||||||
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
||||||
${pkgs.git}/bin/git diff -U0
|
${pkgs.git}/bin/git diff -U0
|
||||||
echo "NixOS Rebuilding..."
|
echo "NixOS Rebuilding..."
|
||||||
${pkgs.unstable.nh}/bin/nh os switch ~/.nixos
|
${pkgs.nh}/bin/nh os switch ~/.nixos
|
||||||
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current | ${pkgs.gawk}/bin/awk '{print "Gen" $1 " @ " $2 "-" $3}')
|
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current | ${pkgs.gawk}/bin/awk '{print "Gen" $1 " @ " $2 "-" $3}')
|
||||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "System $gen"
|
${pkgs.git}/bin/git commit --no-gpg-sign -am "System $gen"
|
||||||
popd
|
popd
|
||||||
@ -38,12 +38,23 @@
|
|||||||
echo ".nixos is unclean!"
|
echo ".nixos is unclean!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
branch_staging="staging-update"
|
||||||
|
|
||||||
|
if ${pkgs.git}/bin/git rev-parse --verify "$branch_staging" >/dev/null 2>&1; then
|
||||||
|
echo "Using staging update branch."
|
||||||
|
else
|
||||||
|
echo "No staging update branch found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
${pkgs.git}/bin/git checkout "$branch_staging" flake.lock
|
||||||
echo "Updating nix-flake..."
|
echo "Updating nix-flake..."
|
||||||
nix flake update --flake .
|
nix flake update --flake .
|
||||||
echo "NixOS Rebuilding..."
|
echo "NixOS Rebuilding..."
|
||||||
${pkgs.unstable.nh}/bin/nh os switch ~/.nixos
|
${pkgs.nh}/bin/nh os switch ~/.nixos
|
||||||
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current | ${pkgs.gawk}/bin/awk '{print "Gen" $1 " @ " $2 "-" $3}')
|
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current | ${pkgs.gawk}/bin/awk '{print "Gen" $1 " @ " $2 "-" $3}')
|
||||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "Upgrade $gen"
|
${pkgs.git}/bin/git commit --no-gpg-sign -am "Upgrade $gen"
|
||||||
|
${pkgs.git}/bin/git branch -D "$branch_staging"
|
||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
update =
|
update =
|
||||||
@ -55,15 +66,28 @@
|
|||||||
echo ".nixos is unclean!"
|
echo ".nixos is unclean!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Updating nix-flake..."
|
branch_staging="staging-update"
|
||||||
nix flake update --flake .
|
branch_current="$(${pkgs.git}/bin/git branch --show-current)"
|
||||||
echo "NixOS Building..."
|
|
||||||
${pkgs.unstable.nh}/bin/nh os build ~/.nixos
|
if ${pkgs.git}/bin/git rev-parse --verify "$branch_staging" >/dev/null 2>&1; then
|
||||||
|
echo "There is already a staging update branch."
|
||||||
|
else
|
||||||
|
echo "Creating a new staging update branch."
|
||||||
|
${pkgs.git}/bin/git switch -c "$branch_staging"
|
||||||
|
nix flake update --verbose --flake .
|
||||||
|
${pkgs.git}/bin/git add flake.lock
|
||||||
|
${pkgs.git}/bin/git commit --no-gpg-sign -m "staging update"
|
||||||
|
${pkgs.git}/bin/git switch "$branch_current"
|
||||||
|
fi
|
||||||
|
|
||||||
|
nix store diff-closures \
|
||||||
|
'.?ref='"$branch_current"'#nixosConfigurations.'"$(${pkgs.hostname}/bin/hostname)"'.config.system.build.toplevel' \
|
||||||
|
'.?ref='"$branch_staging"'#nixosConfigurations.'"$(${pkgs.hostname}/bin/hostname)"'.config.system.build.toplevel'
|
||||||
|
|
||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.bash
|
|
||||||
home-rebuild
|
home-rebuild
|
||||||
rebuild
|
rebuild
|
||||||
upgrade
|
upgrade
|
||||||
|
|||||||
@ -27,8 +27,11 @@ in {
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
libsForQt5.kwallet
|
libsForQt5.kwallet
|
||||||
libsForQt5.kwalletmanager
|
libsForQt5.kwalletmanager
|
||||||
|
spaceFM
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.udisks2.enable = true;
|
||||||
|
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
withUWSM = true;
|
withUWSM = true;
|
||||||
|
|||||||
@ -101,13 +101,6 @@
|
|||||||
("C-TAB" . 'copilot-accept-completion-by-word)
|
("C-TAB" . 'copilot-accept-completion-by-word)
|
||||||
("C-<tab>" . 'copilot-accept-completion-by-word)))
|
("C-<tab>" . 'copilot-accept-completion-by-word)))
|
||||||
|
|
||||||
(add-hook! 'prog-mode-hook #'undo-tree-mode)
|
|
||||||
(after! undo-tree
|
|
||||||
(setq undo-tree-auto-save-history t)
|
|
||||||
(setq undo-tree-enable-undo-in-region nil)
|
|
||||||
(setq undo-tree-history-directory-alist '(("." . "~/.cache/doom/undo"))))
|
|
||||||
|
|
||||||
|
|
||||||
(after! markdown-mode
|
(after! markdown-mode
|
||||||
(setq markdown-split-window-direction 'right)
|
(setq markdown-split-window-direction 'right)
|
||||||
(setq markdown-command "pandoc -t html5 -f markdown_mmd --embed-resources --standalone --mathjax --quiet --highlight-style=zenburn")
|
(setq markdown-command "pandoc -t html5 -f markdown_mmd --embed-resources --standalone --mathjax --quiet --highlight-style=zenburn")
|
||||||
@ -122,7 +115,7 @@
|
|||||||
:config
|
:config
|
||||||
(setq graphviz-dot-indent-width 4))
|
(setq graphviz-dot-indent-width 4))
|
||||||
|
|
||||||
(after! latex
|
(after! auctex
|
||||||
(add-hook! 'LaTeX-mode-hook 'lsp)
|
(add-hook! 'LaTeX-mode-hook 'lsp)
|
||||||
(map! :map LaTeX-mode-map
|
(map! :map LaTeX-mode-map
|
||||||
:localleader
|
:localleader
|
||||||
|
|||||||
@ -70,9 +70,9 @@
|
|||||||
:emacs
|
:emacs
|
||||||
dired ; making dired pretty [functional]
|
dired ; making dired pretty [functional]
|
||||||
electric ; smarter, keyword-based electric-indent
|
electric ; smarter, keyword-based electric-indent
|
||||||
;;ibuffer ; interactive buffer management
|
(ibuffer +icons) ; interactive buffer management
|
||||||
|
|
||||||
undo ; persistent, smarter undo for your inevitable mistakes
|
(undo +tree) ; persistent, smarter undo for your inevitable mistakes
|
||||||
vc ; version-control and Emacs, sitting in a tree
|
vc ; version-control and Emacs, sitting in a tree
|
||||||
|
|
||||||
:term
|
:term
|
||||||
@ -112,7 +112,7 @@
|
|||||||
|
|
||||||
:os
|
:os
|
||||||
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
|
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
|
||||||
;;tty ; improve the terminal Emacs experience
|
(tty +osc) ; improve the terminal Emacs experience
|
||||||
|
|
||||||
:lang
|
:lang
|
||||||
;;agda ; types of types of types of types...
|
;;agda ; types of types of types of types...
|
||||||
|
|||||||
@ -55,9 +55,11 @@
|
|||||||
(package! copilot
|
(package! copilot
|
||||||
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))
|
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))
|
||||||
|
|
||||||
|
;; TODO: Remove this when a fix for https://github.com/doomemacs/doomemacs/issues/8286 is included
|
||||||
|
(package! package-lint :pin "21edc6d0d0eadd2d0a537f422fb9b7b8a3ae6991")
|
||||||
|
|
||||||
(package! direnv)
|
(package! direnv)
|
||||||
(package! copilot)
|
(package! copilot)
|
||||||
(package! undo-tree)
|
|
||||||
(package! pdf-tools)
|
(package! pdf-tools)
|
||||||
(package! eww)
|
(package! eww)
|
||||||
(package! pandoc-mode)
|
(package! pandoc-mode)
|
||||||
|
|||||||
@ -3,7 +3,34 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
screenshot = pkgs.writeShellScriptBin "screenshot" ''
|
||||||
|
region=0
|
||||||
|
clip=0
|
||||||
|
while [[ "$#" -gt 0 ]]; do
|
||||||
|
case $1 in
|
||||||
|
--region) region=1; ;;
|
||||||
|
--clip) clip=1; ;;
|
||||||
|
*) echo "Unknown parameter passed: $1"; exit 1 ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ $region -eq 1 ]]; then
|
||||||
|
if [[ $clip -eq 1 ]]; then
|
||||||
|
${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||||
|
else
|
||||||
|
${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" ~/Pictures/Screenshots/$(${pkgs.coreutils}/bin/date +'%Y-%m-%d_%H-%M-%S').png
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ $clip -eq 1 ]]; then
|
||||||
|
${pkgs.grim}/bin/grim - | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||||
|
else
|
||||||
|
${pkgs.grim}/bin/grim ~/Pictures/Screenshots/$(${pkgs.coreutils}/bin/date +'%Y-%m-%d_%H-%M-%S').png
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in {
|
||||||
services.hypridle.settings = {
|
services.hypridle.settings = {
|
||||||
general = {
|
general = {
|
||||||
# lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
|
# lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
|
||||||
@ -190,8 +217,10 @@
|
|||||||
"$mod, 9, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
"$mod, 9, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
||||||
"$mod, 0, exec, ${pkgs.wlogout}/bin/wlogout -b 5"
|
"$mod, 0, exec, ${pkgs.wlogout}/bin/wlogout -b 5"
|
||||||
"$mod, n, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"
|
"$mod, n, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"
|
||||||
", Print, exec, ${pkgs.grim}/bin/grim -g \"\$(${pkgs.slurp}/slurp)\" ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
|
", Print, exec, ${screenshot}/bin/screenshot"
|
||||||
"CTRL, Print, exec, ${pkgs.grim}/bin/grim -g \"\$(${pkgs.slurp}/slurp)\" | wl-copy"
|
"CTRL, Print, exec, ${screenshot}/bin/screenshot --region"
|
||||||
|
"SHIFT, Print, exec, ${screenshot}/bin/screenshot --clip"
|
||||||
|
"CTRL SHIFT, Print, exec, ${screenshot}/bin/screenshot --region --clip"
|
||||||
]
|
]
|
||||||
++ (
|
++ (
|
||||||
# workspaces
|
# workspaces
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
{config, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.ranger = {
|
programs.ranger = {
|
||||||
settings = {
|
settings = {
|
||||||
preview_images = true;
|
preview_images = true;
|
||||||
@ -7,5 +11,50 @@
|
|||||||
then "kitty"
|
then "kitty"
|
||||||
else "ueberzug";
|
else "ueberzug";
|
||||||
};
|
};
|
||||||
|
extraConfig = lib.strings.concatStringsSep "\n" [
|
||||||
|
"default_linemode devicons"
|
||||||
|
];
|
||||||
|
mappings = {
|
||||||
|
f = "console fzf_filter%space";
|
||||||
|
};
|
||||||
|
plugins =
|
||||||
|
[
|
||||||
|
{
|
||||||
|
name = "ranger_fzf_filter";
|
||||||
|
src = builtins.fetchGit {
|
||||||
|
url = "https://github.com/MuXiu1997/ranger-fzf-filter";
|
||||||
|
rev = "bf16de2e4ace415b685ff7c58306d0c5146f9f43";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "ranger_archives";
|
||||||
|
src = builtins.fetchGit {
|
||||||
|
url = "https://github.com/maximtrp/ranger-archives";
|
||||||
|
rev = "b4e136b24fdca7670e0c6105fb496e5df356ef25";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "ranger_devicons";
|
||||||
|
src = builtins.fetchGit {
|
||||||
|
url = "https://github.com/alexanderjeurissen/ranger_devicons";
|
||||||
|
rev = "f227f212e14996fbb366f945ec3ecaf5dc5f44b0";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
||||||
|
++ (
|
||||||
|
if config.services.kdeconnect.enable
|
||||||
|
then
|
||||||
|
lib.lists.singleton
|
||||||
|
{
|
||||||
|
name = "ranger_kdeconnect.py";
|
||||||
|
src =
|
||||||
|
builtins.fetchGit {
|
||||||
|
url = "https://github.com/bwconrad/ranger-kdeconnect";
|
||||||
|
rev = "710c600bb894fed3e293f6518930c16a494dd154";
|
||||||
|
}
|
||||||
|
+ "/kdeconnect_send.py";
|
||||||
|
}
|
||||||
|
else []
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,16 +7,19 @@
|
|||||||
killall
|
killall
|
||||||
neofetch
|
neofetch
|
||||||
nix-search-cli
|
nix-search-cli
|
||||||
|
nix-tree
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
pass
|
pass
|
||||||
poetry
|
poetry
|
||||||
python311Packages.radian
|
python311Packages.radian
|
||||||
ranger
|
ranger
|
||||||
thefuck
|
thefuck
|
||||||
|
unstable.mmtui
|
||||||
unzip
|
unzip
|
||||||
vim
|
vim
|
||||||
w3m
|
w3m
|
||||||
wget
|
wget
|
||||||
yt-dlp
|
yt-dlp
|
||||||
|
zip
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,16 +13,18 @@ in {
|
|||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# fancy ls command
|
||||||
|
programs.lsd = {
|
||||||
|
enable = true;
|
||||||
|
enableAliases = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Zsh
|
# Zsh
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
shellAliases = {
|
|
||||||
ll = "ls -l";
|
|
||||||
update = "sudo nixos-rebuild switch";
|
|
||||||
};
|
|
||||||
history.size = 10000;
|
history.size = 10000;
|
||||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
|
|||||||
@ -32,18 +32,19 @@ in {
|
|||||||
pkgs.docker
|
pkgs.docker
|
||||||
pkgs.docker-compose
|
pkgs.docker-compose
|
||||||
pkgs.drawio
|
pkgs.drawio
|
||||||
|
pkgs.feh
|
||||||
pkgs.ffmpeg
|
pkgs.ffmpeg
|
||||||
pkgs.firefox
|
pkgs.firefox
|
||||||
pkgs.gimp
|
pkgs.gimp
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.insomnia
|
pkgs.insomnia
|
||||||
pkgs.kicad
|
|
||||||
pkgs.krita
|
pkgs.krita
|
||||||
pkgs.libreoffice
|
pkgs.libreoffice
|
||||||
pkgs.lutris
|
pkgs.lutris
|
||||||
pkgs.mosquitto
|
pkgs.mosquitto
|
||||||
pkgs.mpv
|
pkgs.mpv
|
||||||
pkgs.mupdf
|
pkgs.mupdf
|
||||||
|
pkgs.nh
|
||||||
pkgs.nix-index
|
pkgs.nix-index
|
||||||
pkgs.nix-output-monitor
|
pkgs.nix-output-monitor
|
||||||
pkgs.obsidian
|
pkgs.obsidian
|
||||||
@ -53,7 +54,6 @@ in {
|
|||||||
pkgs.ranger
|
pkgs.ranger
|
||||||
pkgs.sops
|
pkgs.sops
|
||||||
pkgs.spotify
|
pkgs.spotify
|
||||||
pkgs.unstable.nh
|
|
||||||
pkgs.vim
|
pkgs.vim
|
||||||
pkgs.vlc
|
pkgs.vlc
|
||||||
pkgs.vscode
|
pkgs.vscode
|
||||||
|
|||||||
17
templates/rust/.envrc
Normal file
17
templates/rust/.envrc
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# ^ make editor happy
|
||||||
|
|
||||||
|
#
|
||||||
|
# Use https://direnv.net/ to automatically load the dev shell.
|
||||||
|
#
|
||||||
|
|
||||||
|
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
|
||||||
|
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
|
||||||
|
fi
|
||||||
|
|
||||||
|
watch_file nix/**
|
||||||
|
watch_file -- **/*.nix
|
||||||
|
# Adding files to git includes them in a flake
|
||||||
|
# But it is also a bit much reloading.
|
||||||
|
# watch_file .git/index .git/HEAD
|
||||||
|
use flake . --show-trace
|
||||||
3
templates/rust/.gitignore
vendored
Normal file
3
templates/rust/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.direnv/
|
||||||
|
target/
|
||||||
|
result/
|
||||||
11
templates/rust/Cargo.toml
Normal file
11
templates/rust/Cargo.toml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[package]
|
||||||
|
name = "hello"
|
||||||
|
description = "A test rust binary"
|
||||||
|
publish = false
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "hello"
|
||||||
|
path = "src/main.rs"
|
||||||
61
templates/rust/flake.nix
Normal file
61
templates/rust/flake.nix
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
description = "Rust-Hello";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
rust-overlay = {
|
||||||
|
url = "github:oxalica/rust-overlay";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
crate2nix = {
|
||||||
|
url = "github:nix-community/crate2nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = inputs @ {
|
||||||
|
crate2nix,
|
||||||
|
flake-utils,
|
||||||
|
nixpkgs,
|
||||||
|
rust-overlay,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (
|
||||||
|
system: let
|
||||||
|
# Overlay pkgs with rust-bin
|
||||||
|
overlays = [(import rust-overlay)];
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system overlays;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Use rust-bin to generate the toolchain from rust-toolchain.toml
|
||||||
|
rust-toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||||
|
|
||||||
|
buildRustCrateForPkgs = _:
|
||||||
|
pkgs.buildRustCrate.override {
|
||||||
|
rustc = rust-toolchain; # Use rustc from toolchain
|
||||||
|
cargo = rust-toolchain; # Use cargo from toolchain
|
||||||
|
};
|
||||||
|
|
||||||
|
# Cargo.nix for IFD
|
||||||
|
generatedCargoNix = crate2nix.tools.${system}.generatedCargoNix {
|
||||||
|
name = "rustnix";
|
||||||
|
src = ./.;
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoNix = import generatedCargoNix {
|
||||||
|
inherit pkgs buildRustCrateForPkgs;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
packages = rec {
|
||||||
|
hello = cargoNix.rootCrate.build;
|
||||||
|
default = hello;
|
||||||
|
};
|
||||||
|
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
buildInputs = [rust-toolchain];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
3
templates/rust/rust-toolchain.toml
Normal file
3
templates/rust/rust-toolchain.toml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[toolchain]
|
||||||
|
channel = "1.85.0"
|
||||||
|
components = [ "rustfmt", "rustc-dev", "rust-analyzer", "rust-src"]
|
||||||
3
templates/rust/src/main.rs
Normal file
3
templates/rust/src/main.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
println!("{}", "Hello, world!");
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user