mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:29:40 +00:00
Compare commits
4 commits
acf4bba56d
...
2bfd250806
| Author | SHA1 | Date | |
|---|---|---|---|
| 2bfd250806 | |||
| ce446ffe39 | |||
| 9affd2771d | |||
| 895173460a |
5 changed files with 21 additions and 9 deletions
|
|
@ -8,7 +8,7 @@ let
|
|||
in
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
|
||||
policies.SearchEngines.Add = [
|
||||
# Forges
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ keybinds =
|
|||
)
|
||||
|
||||
-- Launcher
|
||||
++ (let launchFirefox = "zen"
|
||||
++ (let launchFirefox = "firefox"
|
||||
launchDmenu = "dmenu_run -i -fn \"Iosevka-18\" -nb \"#36363a\" -nf \"#e2e2e4\" -sb \"#f7f7f8\" -sf \"#36363a\" -l 10"
|
||||
lock = "xscreensaver-command -lock"
|
||||
in [ ((controlMask .|. altMask, xK_m), namedScratchpadAction myScratchpads "cmus" )
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ let
|
|||
in
|
||||
{
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
|
||||
policies.SearchEngines.Add = [
|
||||
# Forges
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ in
|
|||
"zen.view.show-newtab-button-top" = false;
|
||||
"zen.view.use-single-toolbar" = false;
|
||||
"zen.tabs.ctrl-tab.ignore-pending-tabs" = true; # ctrl-tab ignore unloaded tabs
|
||||
|
||||
# https://github.com/zen-browser/desktop/discussions/12025
|
||||
# This makes tabs sync across windows, which as annoying af
|
||||
"zen.window-sync.enabled" = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -23,14 +23,14 @@ main = do
|
|||
) ->
|
||||
manageArgs `showHelpOr` do
|
||||
nixpkgs <- readNixpkgsPath
|
||||
void $ readProcessFriendly "nixos-rebuild" (action : nixosRebuildArgs nixpkgs host <> extraArgs)
|
||||
exitWith =<< transparentProcess "nixos-rebuild" (action : nixosRebuildArgs nixpkgs host <> extraArgs)
|
||||
|
||||
( "install" : host
|
||||
: (partitionArgs -> (manageArgs, extraArgs))
|
||||
) ->
|
||||
manageArgs `showHelpOr` do
|
||||
nixpkgs <- readNixpkgsPath
|
||||
void $ readProcessFriendly "nixos-install" (nixosInstallArgs nixpkgs host <> extraArgs)
|
||||
exitWith =<< transparentProcess "nixos-install" (nixosInstallArgs nixpkgs host <> extraArgs)
|
||||
|
||||
_ -> putStr help >> exitFailure
|
||||
|
||||
|
|
@ -79,8 +79,10 @@ quote x = "\"" <> x <> "\""
|
|||
blueForeground :: String -> String
|
||||
blueForeground x = "\ESC[34m" <> x <> "\ESC[0m"
|
||||
|
||||
readProcessFriendly :: String -> [String] -> IO String
|
||||
readProcessFriendly cmdName args = do
|
||||
-- |
|
||||
-- Run with a shared std{in,out,err}
|
||||
transparentProcess :: String -> [String] -> IO ExitCode
|
||||
transparentProcess cmdName args = do
|
||||
hPutStrLn stderr
|
||||
$ "Executing: " <> (quote . blueForeground) (showCommandForUser cmdName args)
|
||||
(_, _, _, pid) <- createProcess
|
||||
|
|
@ -89,8 +91,13 @@ readProcessFriendly cmdName args = do
|
|||
, std_out = UseHandle stdout
|
||||
, std_err = UseHandle stderr
|
||||
}
|
||||
_ <- waitForProcess pid
|
||||
pure ""
|
||||
waitForProcess pid
|
||||
|
||||
readProcessFriendly :: String -> [String] -> String -> IO String
|
||||
readProcessFriendly cmdName args inp = do
|
||||
hPutStrLn stderr
|
||||
$ "Executing: " <> (quote . blueForeground) (showCommandForUser cmdName args)
|
||||
readProcess cmdName args inp
|
||||
|
||||
readNixpkgsPath :: IO StorePath
|
||||
readNixpkgsPath =
|
||||
|
|
@ -100,5 +107,6 @@ readNixpkgsPath =
|
|||
, "-E"
|
||||
, "let sources = import ./npins; in sources.nixpkgs.outPath"
|
||||
]
|
||||
""
|
||||
where
|
||||
clean = filter (\c -> c /= '\n' && c /= '"')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue