kardorf: more migration from nixos to home-manager

This commit is contained in:
Julian Mutter 2024-03-18 15:09:36 +01:00
parent 4f0fe50d0a
commit fdd53faa62
9 changed files with 261 additions and 279 deletions

64
flake.lock generated
View File

@ -108,14 +108,16 @@
"nix-matlab": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs"
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1710601327,
"narHash": "sha256-FlRF4T6I2m9WNg1+RVtZtes/nkB+awqdZCMHIPcM78A=",
"lastModified": 1710687711,
"narHash": "sha256-s9pXc9Z4gzXNcY0WrL19UKzKe+iWVVN7Nnx26UU10dE=",
"owner": "doronbehar",
"repo": "nix-matlab",
"rev": "080c763aec689b3b9f9be11913b2988efbe286f1",
"rev": "1a8e99ef27ed471e05b724a595d7a5f79f5a9926",
"type": "gitlab"
},
"original": {
@ -126,41 +128,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1710534455,
"narHash": "sha256-huQT4Xs0y4EeFKn2BTBVYgEwJSv8SDlm82uWgMnCMmI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9af9c1c87ed3e3ed271934cb896e0cdd33dae212",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1710451336,
"narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=",
"lastModified": 1710695816,
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d691274a972b3165335d261cc4671335f5c67de9",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1710565619,
"narHash": "sha256-xu/EnZCNdIj7m/QjCNIG5vrCA4TYg5uwFReb9XDxET0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8ac30a39abc5ea67037dfbf090d6e89f187c6e50",
"rev": "614b4613980a522ba49f0d194531beddbb7220d3",
"type": "github"
},
"original": {
@ -170,12 +142,28 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1710631334,
"narHash": "sha256-rL5LSYd85kplL5othxK5lmAtjyMOBg390sGBTb3LRMM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c75037bbf9093a2acb617804ee46320d6d1fea5a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"alacritty-theme": "alacritty-theme",
"home-manager": "home-manager",
"nix-matlab": "nix-matlab",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"snowfall-lib": "snowfall-lib"
}

View File

@ -21,6 +21,7 @@
};
nix-matlab.url = "gitlab:doronbehar/nix-matlab";
nix-matlab.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs:
@ -29,6 +30,14 @@
# Must always be ./.
src = ./.;
# Add overlays for the `nixpkgs` channel.
overlays = with inputs;
[
nix-matlab.overlay
# my-inputs.overlays.my-overlay
# TODO: add unstable here
];
snowfall = {
# The root of the snowfall config
root = ./.;
@ -41,25 +50,18 @@
};
};
# Add overlays for the `nixpkgs` channel.
overlays = with inputs; [
nix-matlab.overlay
# my-inputs.overlays.my-overlay
# TODO: add unstable here
];
# The attribute set specified here will be passed directly to NixPkgs when
# instantiating the package set.
channels-config = {
# Allow unfree packages.
allowUnfree = true;
nvidia.acceptLicense = true;
nvidia.acceptLicense = true;
# Allow certain insecure packages
# permittedInsecurePackages = [ "firefox-100.0.0" ];
# permittedInsecurePackages = [ "electron-24.8.6" ];
permittedInsecurePackages = [ "schildichat-web-1.11.30-sc.2" "electron-25.9.0" ];
permittedInsecurePackages =
[ "schildichat-web-1.11.30-sc.2" "electron-25.9.0" ];
# Additional configuration for specific packages.
config = {

View File

@ -39,37 +39,12 @@ config, ... }: {
rofi.enable = true;
};
home.packages = with pkgs; [
# Code formatters for use with doom emacs
nixfmt # nix
dockfmt # docker
google-java-format # java
# Lsps for use with doom emacs
# neocmakelsp # cmake
# Rust setup
rustc
rustfmt
cargo
clippy
rust-analyzer
# Further tools
(lib.frajul.my-helper-function lazygit)
languagetool
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
## My scripts
pkgs.frajul.deploy-to-pianopi
pkgs.frajul.edit-config
];
home.packages = lib.lists.concatMap
(packages-list-file: import packages-list-file { inherit pkgs; }) [
./fonts.nix
./packages.nix
];
fonts.fontconfig.enable = true; # required to autoload fonts from packages
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in

View File

@ -0,0 +1,14 @@
{ pkgs, ... }:
with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" ]; })
font-awesome
dejavu_fonts
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
source-code-pro
]

View File

@ -0,0 +1,189 @@
{ pkgs, ... }:
with pkgs; [
# Code formatters for use with doom emacs
nixfmt # nix
dockfmt # docker
google-java-format # java
# Lsps for use with doom emacs
# neocmakelsp # cmake
# Rust setup
rustc
rustfmt
cargo
clippy
rust-analyzer
# Further tools
lazygit
languagetool
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
hunspell
hunspellDicts.de_DE
hunspellDicts.en_US
makemkv
audacity
gnome.cheese
zoom-us
qutebrowser
unetbootin
# For SSS exercises
pwndbg
gcc
hexedit
# rfid reader tests
openct
opensc
pcsclite
pcsctools
ccid
libnfc
xournalpp
path-of-building
xfce.thunar-archive-plugin
zip
p7zip
imagemagick
firefox
thunderbird
nextcloud-client
qalculate-gtk
libqalculate
schildichat-desktop
tdesktop
tealdeer
gcolor2 # gcolor3 does not work
# cups
wget
gparted
emacs
nodejs
git
dotter
mc
broot
rnr # renaming tool in rust
doublecmd
mucommander
tree
alacritty
wezterm
kitty
starship
zsh
bat
ripgrep
fd
fzf
topgrade
cargo
# rust-analyzer
# rustfmt
arandr
wireguard-tools
htop
texlive.combined.scheme-full
texlab
usbutils # lsusb
pciutils # lspci
nixfmt
gnome.gnome-keyring
gnome.seahorse
polkit_gnome
nix-index
python3
black
libnotify
libclang
libreoffice
killall
findutils
xorg.xkill
unzip
vlc
direnv
nix-direnv
handbrake
nmap
jq
jdk
# emacsPackages.clang-format # formatting for java
gradle
maven
android-tools
scrcpy
dvdisaster
mate.engrampa
# toybox
unixtools.procps
qpdfview
ffmpeg
links2
julia-bin
xdg-desktop-portal-gtk
discord
lnav # log analyzing tool
fdupes # find and delete duplicate files
digikam
dbeaver
pavucontrol
sqlite
nomacs
rocketchat-desktop
# zotero
inkscape
pulseaudio
gcolor3
geogebra
languagetool
xclip
okular # Pdf reader with many features, good for commenting documents
evince # Simple pdf reader, good for focusing on document content
pdfsam-basic # Split, merge, etc for pdfs
poppler_utils # Pdf utils including pdfimages
matlab # Using nix-matlab overlay defined in flake
# sage
gimp
devbox
parted
drawio
du-dust # Like du tree but better
gnupg
rpi-imager
wine
winetricks
lf
rustdesk
realvnc-vnc-viewer
calibre
audible-cli
cudaPackages.cudatoolkit
openmvg
colmapWithCuda
## My scripts
frajul.edit-config
]

View File

@ -27,6 +27,7 @@ in {
config = mkIf cfg.enable {
programs.direnv = {
enable = true;
nix-direnv.enable = true;
enableZshIntegration = true;
};
};

View File

@ -29,6 +29,7 @@ in {
config = mkIf cfg.enable {
programs = { i3status-rust = { enable = true; }; };
home.packages = with pkgs; [ nitrogen ];
xsession.windowManager.i3 = { enable = true; };
# Overwrite default home-manager config file

View File

@ -19,11 +19,11 @@ start_program()
}
i3-msg 'workspace 9; append_layout ~/.config/i3/workspace-messaging.json'
start_program chat.schildi.desktop
start_program schildichat-desktop
sleep 0.1
start_program telegram-desktop
sleep 0.1
start_program chat.rocket.RocketChat
start_program rocketchat-desktop
sleep 0.1
start_program thunderbird
sleep 0.1

View File

@ -2,10 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ lib, inputs, config, pkgs, ... }:
let python-packages = ps: with ps; [ ];
in rec {
{ lib, inputs, config, pkgs, ... }: {
imports = [ ./hardware-configuration.nix ];
nix.buildMachines = [{
@ -97,19 +94,13 @@ in rec {
xterm.enable = false;
xfce = {
enable = true;
# noDesktop = true;
# enableXfwm = false;
noDesktop = true;
enableXfwm = false;
};
};
services.xserver.displayManager.defaultSession = "none+i3";
services.xserver.windowManager.i3.enable = true;
services.xserver.windowManager.i3.package = pkgs.i3-gaps;
services.xserver.windowManager.i3.extraPackages = with pkgs; [
rofi
i3lock
i3status-rust
nitrogen
];
# Configure keymap in X11
services.xserver = {
@ -156,26 +147,14 @@ in rec {
group = "julian";
shell = pkgs.zsh;
extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [
hunspell
hunspellDicts.de_DE
hunspellDicts.en_US
makemkv
audacity
gnome.cheese
zoom-us
qutebrowser
unetbootin
# For SSS exercises
pwndbg
gcc
hexedit
];
packages = with pkgs; [ ]; # Using home-manager instead
};
home-manager.useGlobalPkgs =
true; # make overlays for nixpkgs work for home-manager, not only the system
programs.zsh.enable = true;
programs.nix-ld.enable = true;
users.groups.julian = { gid = 1000; };
@ -194,11 +173,8 @@ in rec {
"${pkgs.xfce.xfce4-notifyd}/lib/xfce4/notifyd/xfce4-notifyd";
environment.etc."manual-links/polkit-gnome-authentication-agent-1".source =
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
environment.pathsToLink = [ "/share/nix-direnv" ];
environment.shells = with pkgs; [ zsh ]; # adds zsh to /etc/shells
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = false;
@ -223,172 +199,8 @@ in rec {
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# rfid reader tests
openct
opensc
pcsclite
pcsctools
ccid
libnfc
xournalpp
path-of-building
xfce.thunar-archive-plugin
zip
p7zip
imagemagick
(pkgs.python3.withPackages python-packages)
firefox
thunderbird
nextcloud-client
qalculate-gtk
libqalculate
schildichat-desktop
tdesktop
tealdeer
gcolor2 # gcolor3 does not work
vim
neovim
# cups
wget
gparted
emacs
nodejs
git
dotter
mc
broot
rnr # renaming tool in rust
doublecmd
mucommander
tree
alacritty
wezterm
kitty
starship
zsh
bat
ripgrep
fd
fzf
topgrade
cargo
# rust-analyzer
# rustfmt
arandr
wireguard-tools
htop
texlive.combined.scheme-full
texlab
usbutils # lsusb
pciutils # lspci
nixfmt
gnome.gnome-keyring
gnome.seahorse
polkit_gnome
nix-index
python3
black
libnotify
libclang
libreoffice
killall
findutils
xorg.xkill
unzip
vlc
direnv
nix-direnv
handbrake
nmap
jq
jdk
# emacsPackages.clang-format # formatting for java
gradle
maven
android-tools
scrcpy
dvdisaster
mate.engrampa
# toybox
unixtools.procps
qpdfview
ffmpeg
links2
julia-bin
xdg-desktop-portal-gtk
discord
lnav # log analyzing tool
fdupes # find and delete duplicate files
digikam
dbeaver
pavucontrol
sqlite
nomacs
rocketchat-desktop
# zotero
inkscape
pulseaudio
gcolor3
geogebra
languagetool
xclip
okular # Pdf reader with many features, good for commenting documents
evince # Simple pdf reader, good for focusing on document content
pdfsam-basic # Split, merge, etc for pdfs
poppler_utils # Pdf utils including pdfimages
matlab # Using nix-matlab overlay defined in flake
# sage
gimp
devbox
parted
drawio
du-dust # Like du tree but better
gnupg
rpi-imager
wine
winetricks
lf
rustdesk
realvnc-vnc-viewer
calibre
audible-cli
cudaPackages.cudatoolkit
openmvg
colmapWithCuda
];
# nixpkgs.overlays = [
# (self: super: {
# nix-direnv = super.nix-direnv.override { enableFlakes = true; };
# })
#];
fonts.fonts = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" ]; })
font-awesome
dejavu_fonts
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
source-code-pro
];
# Packages needed as root
environment.systemPackages = with pkgs; [ vim htop mc home-manager ];
virtualisation.docker.enable = true;