mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-24 17:53:51 -08:00
Compare commits
4 commits
af078330e8
...
be38e0a073
Author | SHA1 | Date | |
---|---|---|---|
be38e0a073 | |||
5b13a132cc | |||
4939d8ef22 | |||
46e9621dbb |
5 changed files with 39 additions and 19 deletions
|
@ -757,16 +757,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730272153,
|
"lastModified": 1730531603,
|
||||||
"narHash": "sha256-B5WRZYsRlJgwVHIV6DvidFN7VX7Fg9uuwkRW9Ha8z+w=",
|
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53",
|
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixpkgs-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
description = "System configuration flake.";
|
description = "System configuration flake.";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
||||||
# stablepkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
# stablepkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
# bleedingpkgs.url = "github:nixos/nixpkgs/master";
|
# bleedingpkgs.url = "github:nixos/nixpkgs/master";
|
||||||
# nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
# nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
@ -29,17 +30,24 @@
|
||||||
"flakes"
|
"flakes"
|
||||||
];
|
];
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
gc = {
|
# gc = {
|
||||||
automatic = true;
|
# automatic = true;
|
||||||
dates = "weekly";
|
# dates = "weekly";
|
||||||
options = "--delete-older-than 14d";
|
# options = "--delete-older-than 14d";
|
||||||
};
|
# };
|
||||||
# Free up to 1GiB when there is less than 100MiB left
|
# Free up to 1GiB when there is less than 100MiB left
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
min-free = ${toString (100 * 1024 * 1024)}
|
min-free = ${toString (100 * 1024 * 1024)}
|
||||||
max-free = ${toString (1024 * 1024 * 1024)}
|
max-free = ${toString (1024 * 1024 * 1024)}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.nh = {
|
||||||
|
enable = true;
|
||||||
|
clean.enable = true;
|
||||||
|
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||||
|
flake = "/home/youwen/.config/liminalOS";
|
||||||
|
};
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -84,12 +84,25 @@
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
programs.fish.functions = {
|
programs.fish.functions = {
|
||||||
rebuild = ''doas nixos-rebuild --flake ~/.config/liminalOS\#${osConfig.networking.hostName} switch &| nom'';
|
# rebuild = ''doas nixos-rebuild --flake ~/.config/liminalOS\#${osConfig.networking.hostName} switch &| nom'';
|
||||||
os-test = ''doas nixos-rebuild --flake ~/.config/liminalOS\#${osConfig.networking.hostName} test &| nom'';
|
# os-test = ''doas nixos-rebuild --flake ~/.config/liminalOS\#${osConfig.networking.hostName} test &| nom'';
|
||||||
nixos-update = ''
|
# nixos-update = ''
|
||||||
cd ~/.config/liminalOS
|
# cd ~/.config/liminalOS
|
||||||
nix flake update --commit-lock-file
|
# nix flake update --commit-lock-file
|
||||||
doas nixos-rebuild --flake ~/.config/liminalOS\#${osConfig.networking.hostName} switch &| nom
|
# doas nixos-rebuild --flake ~/.config/liminalOS\#${osConfig.networking.hostName} switch &| nom
|
||||||
'';
|
# '';
|
||||||
|
nh = {
|
||||||
|
body = ''
|
||||||
|
if count $argv > /dev/null
|
||||||
|
if contains -- os $argv or contains -- clean $argv
|
||||||
|
doas ${pkgs.nh}/bin/nh $argv -R
|
||||||
|
else
|
||||||
|
${pkgs.nh}/bin/nh $argv
|
||||||
|
end
|
||||||
|
else
|
||||||
|
${pkgs.nh}/bin/nh
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
timeout-critical = 0;
|
timeout-critical = 0;
|
||||||
fit-to-screen = false;
|
fit-to-screen = false;
|
||||||
control-center-width = 500;
|
control-center-width = 500;
|
||||||
control-center-height = 1025;
|
control-center-height = 800;
|
||||||
notification-window-width = 500;
|
notification-window-width = 500;
|
||||||
keyboard-shortcuts = true;
|
keyboard-shortcuts = true;
|
||||||
image-visibility = "when-available";
|
image-visibility = "when-available";
|
||||||
|
|
Loading…
Reference in a new issue